I wanted to get SLIME working so that I could efficiently code lisp, which is my next learning endeavour. This turned out to be much more difficult than I imagined. I've decided to document the steps I took to connect SLIME to a running SBCL (my lisp implementation) on Gentoo. Although outdated, the video on this page (direct link) is a good overview of SLIME.
- Emerge SBCL
sudo emerge -av sbcl
- Check out the fairly-stable version of SLIME
I put all the software I build from source by myself in ~/src, but you could put it anywhere.
cd ./src cvs -d :pserver:anonymous@common-lisp.net:/project/slime/cvsroot checkout -r FAIRLY-STABLE slime - Create a "systems" folder for SBCL to find SLIME's
swank.asdfile in.cd ./lisp mkdir systems cd ./systems ln -s ~/src/slime/swank.asd
- Add the following to ~/.sbclrc (create the file if it doesn't exist).
(require :asdf) (push "/home/[user]/lisp/systems/" asdf:*central-registry*) - Add the following to ~/.emacs
(setq inferior-lisp-program "/usr/bin/sbcl" ; your Lisp system slime-startup-animation t) (add-to-list 'load-path "~/src/slime") ; your SLIME directory (require 'slime) (slime-setup '(slime-fancy slime-asdf))
- Start up SBCL, and run the following:
(asdf:oos 'asdf:load-op :swank) (swank:create-server) - Now running 'M-x slime-connect' in Emacs should start a REPL that looks something like
; SLIME 2011-11-03 CL-USER>
Expect to be prompted for host name and port; accept the defaults.
