通过 SICP 工作的最佳方案实施是什么?

发布于 2024-07-08 00:13:41 字数 110 浏览 2 评论 0原文

我一直在使用PLT方案,但它有一些问题。 有谁知道通过 SICP 进行工作的更好实施吗?

I have been using PLT Scheme, but it has some issues. Does anyone know of a better implementation for working through SICP?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

那伤。 2024-07-15 00:13:41

使用 Racket(以前称为 PLT 方案)。

DrRacket IDE 是所有方案(包括 SICP)的绝佳起点。

要在文档中查找关键字,请将光标放在关键字上并按 F1。 在 DrRacket 中,您现在可以直接在 REPL(读取-评估-打印循环)中查看图像。

SICP 对 DrRacket 的支持,作者:Neil van Dyke。

更新(2016):新的 SICP 包位于 http://pkgs.racket-lang.org /#[sicp]
使用包管理器(在 DrRacket 中)下载它或使用 raco。
手册

Update2 (2016):如果您想尝试新的实现SICP 图片语言,然后下载 sicp-pict2.rkt


Update3(2020):sicp-lang包包含sicp语言和sicp图片语言的实现。

文档:SICP 对 DrRacket 的支持
源代码:GitHub 上的 sicp-lang
Racket包:sicp-lang包信息

注:图片语言还有更多功能(如颜色和更大的尺寸)比书中描述的图片语言。 源包含示例: https://github.com/ sicp-lang/sicp/blob/master/sicp-pict/main.rkt

Use Racket (formerly PLT Scheme).

The DrRacket IDE is an excellent starting point for all things Scheme including SICP.

To look up keywords in the documentation, place the cursor on the keyword and press F1. In DrRacket you can now see the images directly in the REPL (the read-eval-print-loop).

SICP Support for DrRacket, by Neil van Dyke.

Update (2016): The new SICP package is at http://pkgs.racket-lang.org/#[sicp]
Download it with the Package Manager (in DrRacket) or use raco.
Manual

Update2 (2016): Also if you want to try a new implementation of the SICP picture language, then download sicp-pict2.rkt.


Update3 (2020): The sicp-lang package includes an implementation of the sicp language and the sicp picture language.

Documentation: SICP Support for DrRacket
Source Code: sicp-lang on GitHub
Racket Package: sicp-lang package info

Note: The picture language has more features (such as colors and larger sizes) than the picture language described in the book. The source contains examples: https://github.com/sicp-lang/sicp/blob/master/sicp-pict/main.rkt

热情消退 2024-07-15 00:13:41

使用MIT 方案

它由 SICP 作者推荐,并在 MIT 的6.001:计算机程序的结构和解释课程中使用。

Use MIT Scheme.

It's recommended by the authors of SICP, and is used at MIT for the 6.001: Structure and Interpretation of Computer Programs course.

九歌凝 2024-07-15 00:13:41

在 macOS 上完成这个任务是非常烦人的。 假设您有 Homebrew,那么它的工作原理如下。 (可能需要偶尔运行一次brew update)。

brew cask install racket
raco setup  # might be optional
raco pkg install sicp

现在您可以(需要 sicp) 或简单地运行

racket -l sicp --repl

您可能希望缩写为scheme 的内容。 在 bash 中,

alias scheme='racket -l sicp --repl'

您可以将其添加到您的 ~/.bashrc

This was suprisingly annoying to get done on macOS. Here's how it works as of today, assuming you have Homebrew. (Might want to run brew update once in a while).

brew cask install racket
raco setup  # might be optional
raco pkg install sicp

Now you can (require sicp) or simply run

racket -l sicp --repl

Which you might want to abbreviate to scheme. In bash that'd be

alias scheme='racket -l sicp --repl'

which you can add to your ~/.bashrc

黑色毁心梦 2024-07-15 00:13:41

MIT/GNU Scheme, just make sure you load the SICP compatibility package (yes, they provide specific libraries to enhance guarantee the SICP exercises work).

萌辣 2024-07-15 00:13:41

我这周刚开始做 SICP。

目前,MIT 方案已在 Ubuntu Linux(9.04“jaunty”)中破解。 它可能在未来发挥作用。

DrScheme 正在运行,而且运行良好。 您可以使用上面列出的 soegard 软件包或 Neil Van Dyke 软件包,该软件包基于 soegard 软件包,可从 http 获取://www.neilvandyke.org/sicp-plt/。 这个包的好处是,安装后,您可以使用 Language|Choose Language... 菜单项来选择 SICP。

I've just started do SICP this week.

Currently, MIT Scheme is broken in in Ubuntu Linux (9.04 "jaunty"). It might be working in the future.

DrScheme is working, and is working well. You can use soegard's package listed above or Neil Van Dyke's package, which is based on soegard's package and is available from http://www.neilvandyke.org/sicp-plt/. The nice thing about this package is that when installed, you can use Language|Choose Language.... menu item to select SICP.

甲如呢乙后呢 2024-07-15 00:13:41

鸡计划有一个sicp 库,提供对 SICP 的支持。 您可以通过运行chicken-install sicp来安装它,并在源代码的开头写入:(use sicp)

CHICKEN Scheme has an sicp library that provides support for SICP. You can install it by running chicken-install sicp and writing this at the beginning of your source code: (use sicp).

娜些时光,永不杰束 2024-07-15 00:13:41

PLT 方案 效果很好,或者 MIT 计划 正如 Keparo 建议的那样。 您有什么问题吗?

PLT Scheme works pretty well, or MIT Scheme as Keparo suggested. What issues are you having with it?

酸甜透明夹心 2024-07-15 00:13:41

我现在正在使用 Chez Scheme 完成 SICP。 这是一种相当古老的Scheme 方言,所以想必它与SICP 的编写内容相差不远。

请注意,Chez Scheme 项目页面链接了可以在类 Unix 平台上构建的 Windows 二进制文件和源代码。 但如果你使用的是 Mac,你可能会想要

brew chezscheme
man chez

假设你有 homebrew,你确实应该这么做。

为什么不选择麻省理工学院计划? 因为交互前端是Edwin,一个使用EMACS约定的编辑器。 (目前,它是一个实际的 EMACS 模式,尽管它曾经在Scheme 中实现。)我曾经了解基本的 EMACS,但我的技能因不用而萎缩,这告诉我重新学习这个编辑器是不值得的。

为什么不选择 DrRacket? 如果我看过 @frederick-squid 的酿造说明,我可能会尝试一下。 相反,我尝试遵循scheme和sicp的官方说明,这些说明已经严重过时了。 然后我尝试让 IDE 进入方案模式,这似乎很直观,但事实并非如此。

就是太麻烦了。 而且我不确定我是否想进入一种奇特的语言设计 IDE,尤其是它对 Scheme 的糟糕支持引发了最初的问题。

I'm now working through SICP using Chez Scheme. It's a pretty old dialect of Scheme, so presumably it isn't too far from what SICP was written around.

Note that the Chez Scheme project page links a Windows binary and source that can be built on Unix-like platforms. But if you're on a Mac, you'll probably want to do

brew chezscheme
man chez

Assuming you have homebrew, which you really should.

Why not MIT Scheme? Because the interactive front end is Edwin, an editor that uses EMACS conventions. (Currently, it's an actual EMACS mode, tho it used to be implemented in Scheme.) I used to know basic EMACS, but my skills atrophied from disuse, which tells me that relearning this editor is just not worth the trouble.

Why not DrRacket? If I had seen @frederick-squid 's brew instructions, I might have given it a try. Instead I tried to follow the official instructions for scheme and sicp, which are seriously out of date. Then I tried to make the IDE go into scheme mode, which seems to be intuitive but isn't.

Just too much trouble. And I'm not sure I want to get into a fancy language design IDE, especially one whose poor support of Scheme sparked the original question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文