问题标签 [chicken-scheme]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
910 浏览

scheme - how to access the keys in a multidimensional hash table in scheme?

I have a hash table in Chicken Scheme the hash table has keys with values corresponding to those keys are hashes with corresponding values of hashes again. The keys of the "inner hashes" have corresponding values which are strings. (For Those familiar with, say, Ruby, setting the relevant portion of the hash might look like

or to read the string:

, for example.)

At the point where I read the string, I need to know what the group_name, section_name, and part_name are and I need to be able to perform certain actions based on the values of each of the strings and the for-each and map features of Scheme do not seem to be sufficient because only one of the three key/sub-key strings seems available at any given moment. I do not know what patterns the respective strings might hold. A web search turned up no work able solution. At the same time, I am relatively new to Scheme and may not be as familiar as I should. Can Anyone point Me in the direction of a solution?

0 投票
2 回答
175 浏览

scheme - 如何在方案中进行基准测试?

我正在寻找测试各种方案结构以进行比较,并且想知道如何去做。我知道 Ruby 有一个用于此类基准测试的专用模块,而且网络搜索似乎并不容易提供 Scheme 版本。任何人都可以向我指出这样一个设施的方向吗?如果重要的话,我正在使用鸡计划。

0 投票
1 回答
145 浏览

scheme - 我在哪里可以找到有关 Scheme 中“使用”指令的文档?

我正在使用 Chicken Scheme,我试图理解它的含义(use abcd)以及它与(require-extension abcd). 鸡肉网站似乎没有足够的信息来澄清,网络搜索也没有提供任何有用的信息。如果有人能向我指出此类文档的方向,我将不胜感激。谢谢。

0 投票
1 回答
220 浏览

scheme - 如何在 Chicken Scheme 中使用 abort 程序

我正在尝试使用Chicken Scheme 的 中止程序,如下面的代码所示:

但收到以下警告:

该文档没有提到需要导入的任何其他模块。我试过导入extras,utils,srfi-12没有任何成功。谁能告诉我使用中止程序的正确方法?还是我错过了其他东西?

0 投票
2 回答
382 浏览

macros - Error during expansion of macro in Chicken Scheme

I'm learning how the macro system in Scheme works and I'm trying to make my code look more JavaScript-y. So I thought I would start with the function macro. This is how I want a function definition to look:

It should expand to the following:

So I write a macro as follows:

However when I use it I get the following error (in Chicken Scheme):

Where am I going wrong? In addition how do I read such error messages to be able to debug the program myself?

0 投票
1 回答
232 浏览

slime - 为鸡计划安装粘液时出错

在 finally 的多行标准输出文本之后,chicken-install slime它已打印:

鸡版是 4.8.0.3。

对不起我的英语不好。

0 投票
1 回答
59 浏览

macros - 循环列表并在 lambda 中生成串行语句

我有一个宏叫做compare-and-swap!

它有效,我正在像这样测试它:

我有一个函数,它返回一个我可以调用比较和交换的对列表!在串行上对整个列表进行排序:

现在我希望创建一个宏来生成一个 lambda,它通过调用 batcher 并对compare-and-swap!每对元素进行排序来对 N 元素列表进行排序。

例如,

我制作了一个生成必要代码的函数:

但我现在不知道如何把它变成一个宏。

0 投票
1 回答
435 浏览

scheme - 如何使用 Chicken 4.8.0.3 安装 SRFI-19?

如何使用 Chicken 4.8.0.3 安装 SRFI-19?使用sudo chicken-install srfi-19失败。

经过一些实验,我发现我需要先运行sudo chicken-install setup-helper,但我仍然卡住了。我收到的输出是

任何帮助将不胜感激。

[注意:我已经向鸡虫追踪器提交了一份错误报告。但是,我希望其他人之前已经看到过这个问题和/或知道如何解决它。]

0 投票
1 回答
909 浏览

emacs - 在 emacs 中运行鸡计划

我是 emacs 新手,不知道如何通过 emacs运行Chicken Scheme 。从 Chicken Scheme Wiki我遇到了一个解决方案——使用 cluck。所以,我按照cluck.el文件中的说明添加(require 'cluck)到我的.emacs文件中。

但是,emacs 无法加载.emacs文件,因为它无法打开 cluck。这是emacs给出的错误消息:

链接将带您到cluckgithub 上的文件。我认为问题cluck在于我需要它需要的其他文件......我从哪里得到这些。

  1. 如何通过 emacs 运行鸡计划cluck
  2. 一旦 emacs 将读取cluck通过 emacs 运行鸡肉方案解释器 (csi) 的命令是什么?
  3. --debug-init如果我实际使用的是Aquamacs Emacs ,我将如何使用该选项?

如果您需要更多信息,请告诉我。感谢所有的帮助。

0 投票
1 回答
241 浏览

chicken-scheme - In Chicken Scheme how can I require files when writing a script

I'm using the BDD library missbehave for Chicken Scheme to write some scripts.

I currently have a single file containing my specs and my code that I run with behave. This works as expected. Running my tests to verify the code.

I know that when using the csc compiler I can define units and link files using the following syntax

and when both files are compiled and linked this will work.

I can't find a way of acheiving something similar for a script that is run using the csi interpreter. Is there a way to do this?

An analogous concept would be require_relative in Ruby.