Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install lisp on my linux machine

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.?

like image 875
Hieu Nguyen Avatar asked Jul 01 '11 10:07

Hieu Nguyen


People also ask

How do I run a Lisp in Linux?

Step 1: After logging into a CUIT machine, enter "lisp" after the $ shell prompt and then hit <return>. Another way is to run lisp via emacs: Meta-x run-lisp (i.e. hit 'esc' followed by 'x', type "run-lisp" and you'll be in lisp mode from which you can load files of lisp code...)

How do you install slime Lisp?

Quick setup instructions Set up the MELPA repository, if you haven't already, and install SLIME using M-x package-install RET slime RET . Use M-x slime to fire up and connect to an inferior Lisp. SLIME will now automatically be available in your Lisp source buffers.


1 Answers

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

  • quicklisp.lisp http://www.quicklisp.org/beta/

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.

like image 143
whoplisp Avatar answered Sep 27 '22 23:09

whoplisp