gpt4 book ai didi

macos - 从 Mac 终端编译/运行 Common LIsp

转载 作者:太空宇宙 更新时间:2023-11-03 18:33:35 27 4
gpt4 key购买 nike

有没有办法做到这一点?我一直在使用 Slime 来学习 Lisp,我想开始构建更大的项目,这意味着(我认为)我将不得不开始编写一些 .lisp 文件。

最佳答案

我认为 Mac Common LISP 的最佳选择是 LispWorks Personal EditionSBCL .

假设您已经安装了 SBCL,您可以使用文本编辑器创建一个 .lisp 文件(emacs 是传统的选择):

(defun test ()
"Hi!")

然后你可以在 shell 中运行 lisp 解释器:

bash% sbcl
This is SBCL 1.0.29, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (load "test.lisp")

T
* (test)

"Hi!"
*

外壳可以是 mac 终端窗口或 inferior lisp interpreter在 emacs 中运行。

关于macos - 从 Mac 终端编译/运行 Common LIsp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5302826/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com