简体   繁体   English

有没有办法在 Windows 上的 emacs 下运行 MIT 方案解释​​器?

[英]Is there way to run MIT scheme interpreter under emacs on Windows?

I am a newbie for Lisp, and trying to run MIT scheme interpreter under emacs on Windows.我是 Lisp 的新手,并试图在 Windows 上的 emacs 下运行 MIT 方案解释​​器。 But info seems all indicate that this is impossible.但信息似乎都表明这是不可能的。 http://www.cs.rpi.edu/academics/courses/fall05/ai/scheme/starting.html http://www.gnu.org/software/mit-scheme/ http://www.cs.rpi.edu/academics/courses/fall05/ai/scheme/starting.html http://www.gnu.org/software/mit-scheme/

So I wonder if there is a way to do so.所以我想知道是否有办法做到这一点。 Thanks.谢谢。

The following works for me. 以下适用于我。 You'd obviously need to add your paths. 您显然需要添加路径。 If I omit the --library option, then upon startup mit-scheme complains about not finding it's runtime band. 如果我省略了--library选项,那么在启动时,mit-scheme会抱怨没有找到它的运行时带。

(require 'cmuscheme)
(setq scheme-program-name "/usr/local/scheme/bin/mit-scheme --library /usr/local/scheme/lib/mit-scheme")

In the scheme buffer: 方案缓冲区中:

MIT/GNU Scheme running under MacOSX
Type `^C' (control-C) followed by `H' to obtain information about interrupts.

Copyright (C) 2011 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Image saved on Tuesday November 8, 2011 at 10:45:46 PM
  Release 9.1.1     || Microcode 15.3 || Runtime 15.7 || SF 4.41
  LIAR/x86-64 4.118 || Edwin 3.116

1 ]=> 

I run on Linux emacs with xscheme: https://www.gnu.org/software/mit-scheme/documentation/mit-scheme-user/GNU-Emacs-Interface.html 我使用xscheme运行Linux emacs: https ://www.gnu.org/software/mit-scheme/documentation/mit-scheme-user/GNU-Emacs-Interface.html

It was rather easy to install. 这很容易安装。 See this question about it's installation. 看到关于它的安装的这个问题。 He seemed to get it running OK: running scheme from emacs 他似乎让它运行正常: 从emacs运行方案

Good luck. 祝好运。

I had tried what you want on WINDOWS 7, independent terminal could be popped up outside emacs but with error info in REPL. 我在WINDOWS 7上尝试了你想要的东西,独立终端可以在emacs外弹出,但在REPL中有错误信息。 It seems that there was no official support for this feature on windows, Racket works fine with the geiser package, maybe you could try it. 似乎在Windows上没有官方支持这个功能,Racket可以正常使用geiser包,也许你可以尝试一下。

https://www.gnu.org/software/mit-scheme/documentation/mit-scheme-user/GNU-Emacs-Interface.html#GNU-Emacs-Interface https://www.gnu.org/software/mit-scheme/documentation/mit-scheme-user/GNU-Emacs-Interface.html#GNU-Emacs-Interface

This interface works under unix only, because it requires unix signals for its operation. 此接口仅在unix下工作,因为它需要unix信号才能运行。 Porting it to Windows would require reimplementing the interface to eliminate the use of signals. 将其移植到Windows将需要重新实现接口以消除信号的使用。 We have no plans to do this. 我们没有计划这样做。 To invoke Scheme from Emacs, load the xscheme library, then use Mx run-scheme. 要从Emacs调用Scheme,请加载xscheme库,然后使用Mx run-scheme。 You may give run-scheme a prefx argument, in which case it will allow you to edit the command line that is used to invoke Scheme. 您可以为run-scheme提供一个prefx参数,在这种情况下,它将允许您编辑用于调用Scheme的命令行。 Do not remove the --emacs option! 不要删除--emacs选项!

There are instructions for getting Chez Scheme working with Emacs on Windows . 关于让Chez Scheme在Windows上与Emacs一起使用的说明 It might be possible to translate those instructions to MIT Scheme. 有可能将这些指令翻译成MIT Scheme。

However, an alternative option is to use Racket with the SICP language mode . 但是,另一种选择是使用具有SICP语言模式的 Racket Once the package is installed, using Scheme is simple: 安装软件包后,使用Scheme很简单:

To use the sicp language simply use #lang sicp as the first line of your program. 要使用sicp语言,只需使用#lang sicp作为程序的第一行。

This is what I'm currently using to edit SICP code on Windows. 这是我目前用于在Windows上编辑SICP代码的内容。

You can use Emacs in Windows, together with Scheme in WSL2, and set scheme-program-name to wsl scheme :您可以在 Windows 中使用 Emacs,以及在 WSL2 中使用 Scheme,并将scheme-program-name设置为wsl scheme

(setq scheme-program-name "wsl scheme")

Then run run scheme will Enter into the Scheme.然后运行run scheme就会进入Scheme。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM