在我的linux机器上安装lisp [英] Install lisp on my linux machine
问题描述
我使用Vim作为编辑器. 实用的通用Lisp"建议安装Lispbox,我不知道如何使用emacs,不知道如何在该TT上运行lisp代码,之后我找到了一个名为limp.vim的vim Lisp插件,其中包含冗长而艰苦的安装说明:(( 最终,我安装了"Clisp",并且可以使用简单的命令运行lisp代码:
I use Vim as my editor. "Practical common Lisp" suggest installing Lispbox, I don't know how to use emacs, don't know how to run lisp code with that T.T after that i find lisp plugin for vim called limp.vim with a long and hard install instruction :(( Finally i installed "Clisp" and i can run lisp code with a simple command:
clisp ~/test.lisp
但是如何编译呢? Lisp是一种编译语言吗?抱歉,我什么都不知道,我是Lisp的新手
But how to compile it? Is lisp a compiled language? sorry, i just don't know anything, i'm newbie in lisp
有人可以告诉我在Linux上真正安装Lisp到底需要什么吗?什么是SLIME,sbcl等?
Can anybody tell me what exactly need to install lisp on my linux? What's SLIME, sbcl,.. etc.?
推荐答案
安装并学习以下内容:
- SBCL编译器
从 http://www.sbcl.org/platform-table.html安装二进制文件一旦习惯了,请从源代码进行编译,并保留源代码.这样,您可以轻松地通过M-跳转到SBCL的功能定义.在Emacs中.
install a binary from http://www.sbcl.org/platform-table.html Once your used to it, compile from source and keep the source around. This way you can easily jump to the definitions of functions of SBCL with M-. in Emacs.
- Emacs
观看此截屏视频,看看有人实现了光线追踪器在通用Lisp中使用光线追踪器
watch this screencast to see someone implementing a raytracer Raytracer in Common Lisp
- quicklisp.lisp http://www.quicklisp.org/beta/
这是新的软件包管理.当我开始时,它不在那儿.现在我们有了它,您应该使用它.它使事情变得容易得多. 运行'sbcl --load quicklisp.lisp',然后输入(quicklisp-quickstart:install),按Enter键 然后运行(ql:add-to-init-file)
This is the new package management. When I started it wasn't there. Now we have it and you should use it. It makes things a lot easier. Run 'sbcl --load quicklisp.lisp' and then enter (quicklisp-quickstart:install) press enter and then run (ql:add-to-init-file)
-
SLIME在Emacs中运行.
SLIME runs within Emacs.
尝试使用quicklisp安装它.阅读其手册,找出要写入.emacs文件的内容,以便在打开Lisp文件时它会自动启动. (可选)观看截屏视频.
Try installing it with quicklisp. Read its manual and figure out what to write into your .emacs file so that it automatically starts when you open a lisp file. Optionally watch a screencast.
Paredit
认真地,您必须学习这一点(即使光线跟踪截屏中的那个人没有使用它).您应该以(开头,这将带有两个括号.使用M-(您可以将现有的s表达式括起来.C-k会将s表达式切入光标后面,而使用C-y则可以将其插入任何位置.
Seriously, you have to learn that (even if the guy in the raytracing screencast didn't use it). You should start with ( , this will make two parenthesis. With M-( you can enclose an existing s-expression. C-k cuts the s-expression behind the cursor and with C-y you can insert it anywhere.
- ASDF
这是Lisp的品牌.您应该学习如何在ASDF文件中定义系统.
This is the make for lisp. You should learn how to define a system in an ASDF file.
- 参考
我印了这本小册子 Common Lisp快速参考.非常简洁.
I printed this booklet, Common Lisp Quick Reference. It's very concise.
这篇关于在我的linux机器上安装lisp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!