相当于“lein swank”到 emacs/slime 的其他 Lisp/Scheme 实现
我一直在使用 emacs/slime 来编码 lisp,但是使用 Clojure 我发现了“lein swank”。 我必须说它非常有用,因为我可以连接到运行 clojure 的服务器。
其他 Lisp 实现怎么样?哪些 Lisp 实现提供了与 Clojure 中的“lein swank”等效的功能?我的意思是,是否有任何其他 Lisp 实现提供服务器连接,以便我使用“Mx slime-connect”,而不仅仅是“Mx slime”?
I've been using emacs/slime for coding lisp, but with Clojure I found 'lein swank'.
I must say that it's pretty useful, as I can connect to a server that runs clojure.
How about the other Lisp implementations? What Lisp implementations provide the equivalent of 'lein swank' in Clojure? I mean, is there any other Lisp implementations that provide server connectivity so that I use 'M-x slime-connect', not just 'M-x slime'?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
非 clojure swank 后端不需要 lein swank 等效项,因为它们只需启动一个 lisp 实例并在运行时更改其加载路径以使其适用于给定项目。这种方法不适用于 Clojure,因为 JVM 的类路径无法在运行时修改。
Non-clojure swank backends don't need a lein swank equivalent since they can just launch a lisp instance and change its load-path at runtime to make it work for a given project. That approach doesn't work with Clojure since the JVM's classpath can't be modified at runtime.
我不知道 clisp,但这就是我对 SBCL 的了解。这也与我的 clojure swank 设置共存。我不使用 ELPA,而是完全手动设置。
我有一个手工编译的 SBCL。我在 SLIME CVS 代码库中看到了 CLISP 的华丽后端,所以我想,将 slime-default-lisp 和 slime-lisp-implementations 更改为 clisp 可能会起作用。
lein swank 主要用于在特定项目上启动 swank 端口。这是必需的,因为 JVM 类路径无法在运行时修改。因此,我们使用 lein swank 或 swank-clojure-project 启动 java,并将类路径设置为项目目录和依赖项。对于 CL,这不是必需的,因为可以在运行时修改路径名。
我已将完整的配置文件发布在: http://github.com/vu3rdd/dotfiles
我会很高兴帮助您设置完全手动的 emacs/slime/swank 设置。
I don't know about clisp, but this is what I have for SBCL. This co-exists with my clojure swank setup as well. I don't use ELPA and instead have a completely manual setup.
I have a hand compiled SBCL. I see a swank backend for CLISP in the SLIME CVS codebase, so I guess, changing slime-default-lisp and slime-lisp-implementations to clisp probably will just work.
lein swank mainly exists for starting swank port on a particular project. This is needed because JVM classpaths cannot be modified at runtime. So, we start java with classpaths set to our project directories and dependencies using lein swank or swank-clojure-project. With CL, this is not necessary, as pathnames can be modified during runtime.
I have posted the complete config file at: http://github.com/vu3rdd/dotfiles
I will be glad to help setting up a fully manual emacs/slime/swank setup.
您可以在 CL 中手动加载 swank 并启动服务器(毕竟 slime/swank 是为 CL 创建的)。
You can load swank manually in CL and start the server (slime/swank were created for CL after all).
启动 Lisp 实现,加载 Swank(例如,通过 Quicklisp),然后运行
swank:create -server
:如果您想指定不同的端口,可以使用
:port
关键字参数来实现:请注意,由于协议在版本之间往往会发生变化,因此您需要确保您没有使用截然不同的 SLIME 和 Swank 版本。对于 Common Lisp,我倾向于使用 Quicklisp 的版本,将以下内容放入我的
.emacs
中,具体取决于 Quicklisp 中当前可用的 SLIME 版本:Fire up the Lisp implementation, load Swank (via Quicklisp, for example), and run
swank:create-server
:If you want to specify a different port, you can do so by using the
:port
keyword argument:Note that since the protocol tends to change between versions, you need to make sure that you are not using wildly different versions of SLIME and Swank. For Common Lisp, I tend to use the versions from Quicklisp by putting something like the following into my
.emacs
, depending on the version of SLIME currently available in Quicklisp: