Install lisp on my linux machine
Asked Answered
M

4

14

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

But how to compile it? Is lisp a compiled language? sorry, i just don't know anything, i'm newbie in lisp

Can anybody tell me what exactly need to install lisp on my linux? What's SLIME, sbcl,.. etc.?

Muraida answered 1/7, 2011 at 10:35 Comment(0)
W
10

Install and learn the following things:

  • SBCL the compiler

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

watch this screencast to see someone implementing a raytracer Raytracer in Common Lisp

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 runs within Emacs.

    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

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

This is the make for lisp. You should learn how to define a system in an ASDF file.

  • Reference

I printed this booklet, Common Lisp Quick Reference. It's very concise.

Won answered 1/7, 2011 at 13:37 Comment(0)
P
10

Lisp can be compiled but that is not "necessarily" so. Clisp is just one Lisp running on Linux. SBCL is another one. And SLIME is the interface from Emacs to one can say all Lisps on Linux.

You can use Slime with SBCL, CLisp, Lispworks and Franz Common Lisp. You can even learn much of Lisp just by using Emacs. It has it's own Lisp-dialect Elisp, but you can use Common Lisp compatibility libraries also.

Emacs probably is a preferred IDE for Common Lisp because of it's use of an internal Lisp.

If you want one software to install you should check LispWorks or Allegro Common Lisp (formerly Franz Common Lisp).

Precinct answered 1/7, 2011 at 10:41 Comment(0)
W
10

Install and learn the following things:

  • SBCL the compiler

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

watch this screencast to see someone implementing a raytracer Raytracer in Common Lisp

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 runs within Emacs.

    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

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

This is the make for lisp. You should learn how to define a system in an ASDF file.

  • Reference

I printed this booklet, Common Lisp Quick Reference. It's very concise.

Won answered 1/7, 2011 at 13:37 Comment(0)
H
3

Can anybody tell me what exactly need to install lisp on my linux?

The other answers have described what SLIME, sbcl etc. are. But I wanted to give a concise answer.

To install clisp on Ubuntu, just run sudo apt-get install clisp. Nothing else is necessary to run Lisp. For other distros find clisp on their relevant package managers. However do not be surprised not to find clisp on some distros, for example the Amazon Linux AMI appears not to have clisp. clisp ~/test.lisp is all you need to run Lisp.

Nowadays it is more popular to use SLIME and ASDF. As a beginner you will not need to use them yet. SLIME is a fancy editor for Lisp, and ASDF is a package manager. It is much easier to setup Clisp given that it literally takes just one line to install and one line to run. SLIME and ASDF are more involved and take more time to learn and setup. I personally would recommend starting off with using Clisp and only later on using SLIME and ASDF so that you will gain a better understanding of Lisp which will make using SLIME and ASDF much easier. When you are ready, then I recommend reading the documentation of SLIME and ASDF.

Heiduc answered 28/8, 2017 at 3:5 Comment(1)
clisp is no-more. See: No clisp in Debian's repository?Stegodon
S
2

You can learn lisp using the idioms you're used to from other languages (editing, compiling, running). In the long run, lisp offers other choices, which you may come to prefer.

So long as Vim will balance ()'s as you type, it has the only feature you really need in your editor.

Eventually, you might well choose to look into SLIME (which needs emacs), but it's certainly not necessary to get started.

You can choose any 'Common Lisp' implementation (of which clisp appears to be one you already have). Some will compile to a standalone binary (as you may be used to from C like toolchains), but most will depend on the runtime the lisp comes with, even when the .lisp file is compiled (similar to Java, Python, etc).

You can lookup 'compile-file' in your lisp's documentation to see how to compile .lisp files. Common Lisp's include the compiler in the language runtime.

Soble answered 3/7, 2011 at 11:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.