如何让方案解释器在 Emacs 中工作?

发布于 2024-07-10 06:32:26 字数 429 浏览 11 评论 0原文

我正在学习 SICP,我希望有一个类似于交互式 Python 解释器的解释器,可以在我观看讲座和阅读书籍时使用。 此外,我希望这个解释器在 Emacs 中运行,这样我就可以在方案代码文件和交互式解释器等之间来回跳转。

然而,我对 Emacs 还很陌生,到目前为止还没有能够让它工作或找到一套清晰的指令来让它工作。

看来我应该能够对其进行设置,以便 Mx run-scheme 将打开一个交互式解释器,至少听起来正是我想要的,但目前这只是返回 搜索程序:没有这样的文件或目录,方案并且我无法确切地弄清楚我需要将哪些文件放在哪里来解决这个问题。

我正在运行通过 OS X 10.5 安装 DVD 安装的 GNU Emacs 22.1.1(mac-apple-darwin,Carbon 版本 1.6.0)

I'm going through SICP and I'd like to have an interpreter analogous to the interactive Python interpreter to play around in while I'm watching the lectures and reading the book. Furthermore, I'd like this interpreter to run inside Emacs so I can jump back and forth between files of scheme code and the interactive interpreter and so forth.

However, I'm fairly new to Emacs and have not as of yet been able to get this to work or find one clear set of instructions to use in getting it to work.

It seems like I should be able to set it up so that M-x run-scheme will open up an interactive interpreter that at least sounds like exactly what I want, but at the moment this just returns Searching for program: no such file or directory, scheme and I haven't been able to figure out exactly what files I need to put where to remedy this.

I'm running GNU Emacs 22.1.1 (mac-apple-darwin, Carbon Version 1.6.0) as installed through the OS X 10.5 install DVD.

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

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

发布评论

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

评论(5

此刻的回忆 2024-07-17 06:32:26

您需要安装像 MIT Scheme 一样的 Scheme 解释器(这是进行 SICP 练习的推荐实现)。 在 Ubuntu 上,它带有一个名为“scheme”的符号链接,这正是 Emacs 正在寻找的。 您可以在此处下载 MacOS X 版本。

You need to install a Scheme interpreter like MIT Scheme (which is the recommended implementation for going through the SICP exercises). On Ubuntu it comes with a symbolic link called "scheme" which is what Emacs is looking for. You can download it for MacOS X here.

梦归所梦 2024-07-17 06:32:26

Mxcustomize-group,然后告诉它您要自定义scheme。 向下浏览一下页面,您将看到“Scheme Program Name”,如果您的方案解释器不名为 scheme,则可以更改该名称。

您可能还会发现 Quack 很有用 - http://www.neilvandyke.org/quack/

M-x customize-group, then tell it you want to customize scheme. Wander down the page a bit and you'll see "Scheme Program Name", which you can change if your scheme interpreter isn't called scheme.

You may also find Quack useful - http://www.neilvandyke.org/quack/

以酷 2024-07-17 06:32:26

即使它不在 emacs 内运行,您也可能需要考虑运行 PLT Scheme,这是一个世界一流的Scheme编程环境,它设计了很多工具来帮助人们学习Scheme。 由于您对 emacs 相当陌生,因此可能值得更换。 (并查看 PLT 计划者的书,如何设计程序。)

Even though it doesn't run inside emacs, you might want to consider running PLT Scheme, which is a world-class programming environment for Scheme and which has been designed with lots of tools to help people learn Scheme. Since you're fairly new to emacs it's probably worth the switch. (And check out the PLT Schemers' book, How to Design Programs.)

╄→承喏 2024-07-17 06:32:26

查找与 Emacs 捆绑在一起的 cmuscheme 包的描述 - 它提供代码评估等。Quack 也非常

有用 我计划(在接下来的 2 天内)上传到我的网站 关于“Emacs 作为 IDE”的文章的第二部分,将描述 Emacs 中的方案支持

Look for description of cmuscheme package bundled with Emacs - it provide code evaluation, etc. Quack is also very useful

P.S. i plan to upload (during next 2 days) to my site a second part of article about "Emacs as IDE", that will describe Scheme support in Emacs

心舞飞扬 2024-07-17 06:32:26

十一月份我就处于你的位置。 我终于让它发挥作用并给自己写了方向。 具有讽刺意味的是,昨天我决定将其发布为我的第一个我的网站上的文章。 它是在 Ubuntu 中设置 Scheme 的说明,但如果您遇到困难,它可能是一个方便的参考。 如果不出意外,其他人可能会发现这个问题并发现它有用。 希望能帮助到你。

I was in your position back in November. I finally got it working and wrote myself directions. Ironically, yesterday I decided to post it as my first article on my website. It's directions for setting up Scheme within Ubuntu, but it might be a handy reference in case you get stuck with something. If nothing else, someone else might find this question and find it useful. Hope it helps.

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