Installing Lisp working environment slime with Emacs in Ubuntu

No matter how hard it looks emacs is not that hard to use, at least for basic purposes.


Let’s install emacs first:

sudo apt-get install emacs -y

Install Steel bank common lisp the Common Lisp compiler:

sudo apt-get install sbcl

Install the slime(Superior Lisp Interaction for Emacs) for Emacs:

sudo apt-get install slime

Now, we can open the emacs


Press “Alt – X” to jump to the command line and type “slime” and open up our working environment.

For example, let’s code a function that returns the double of given integers.

We will have a screen like the one below;

; SLIME 2015-08-24

We can start coding here:

(defun double (x) (* x 2))

After we complete the function we can call it and give an input.

(double 6)

It will return 12 as you know.

Good luck, have fun!