I’ve finally decided to give that “Lisp” thing another try – my first one being back in about 1978 or so. So, first order of business, find a good set of tools. A lot of programmers are ranting and raving about the wonderfulness of Emacs, so I decided to give it a try. With Emacs and Lisp, you will be inevitably be pointed to SLIME as the development environment of choice.
First stop: AquaMacs More or less it’s Emacs, adopted for OSX. I installed it – it was as easy as Mac apps should be – but it turns out it already has a built-in version of SLIME. And most SLIME docs recommend you always use the latest CVS version.
So back to the drawing board. We have to build the real McCoy. You get it like this:
Use your e-mail address as password, wait a while till everything’s downloaded, and
If you’re not familiar with emacs, I’d recommend you at least do a quick run through the emacs tutorial. Fire up emacs, press Control-h followed by t, and follow the on-screen instructions.
Next up – we’re installing SBCL
Once that is done,
, and it should bring up the SBCL prompt. Type
followed by enter to leave it again.
Now we’re ready to get SLIME
Finally, all you need is add a couple of lines to your .emacs
(setq lisp-sbcl "/usr/local/bin/sbcl")
(add-to-list ‘Info-default-directory-list "/Users/groby/usr/share/info")
;; by registering your implementations, you can choose one by
;; its "short name" when doing M– M-x slime
(setq slime-lisp-implementations
‘((sbcl ("//usr/local/bin/sbcl")))) ; default
(setq slime-edit-definition-fallback-function ‘find-tag)
(setq slime-complete-symbol-function ’slime-fuzzy-complete-symbol)
(slime-setup )
(global-set-key "\C-cs" ’slime-selector)
If you need more detailed instructions, go to http://www.david-steuber.com/Lisp/OSX/
The most recommended starting point for the language, at least according to Google: Practical Common Lisp
My verdict so far – I can’t stand that environment. SLIME is fragile, and Emacs is a prehistoric editor. As for Practical Common Lisp, it’s a decent intro, but the code examples bored me to tears. I really don’t want to write yet another MP3 song database…
More research reveals that there is a rather overwhelming collection of possible starting points. One of the best collections of references to Lisp environments and Lisp books is a thread on reddit – I really should’ve looked there sooner.
So the setup I ended up with for now? I stuck with SBCL, the editor is good old trusty TextMate, and for a starting set of problems to cut my teeth on, I went with Project Euler. (PCL left me with a good enough grasp of Lisp that I could at least start on problem one…)