Until this week, I had been putting off setting up a CL/Emacs/SLIME environment from scratch ever since I had trouble getting ASDF to work with Lispbox. Every time I tried, I ran into some will-sapping problem like needing to find a good Windows program for .tar.gz files, or finding the command line flags to get CLISP to run right, or figuring out the best way to setup a folder structure that matches the Unix folders used by most Lispers. Every time I fixed one problem, I ran into another. For someone out there trying to do a setup like this, there are lots of good resources, but they are either incomplete or outdated.
For instance, the Common Lisp Cookbook has a very thorough page on Setting Up an IDE with Emacs on Windows or Max OSX, but as far as I can tell, it’s from 2004 or earlier because it doesn’t mention SBCL or SLIME, two of the most popular pieces of CL development software today. Or when you run into a specific problem, it’s usually not too hard to find an answer, but it might not match the setup you’re using. That’s why I had to quit using Lispbox, because no one had any clue how it was configured, especially not on Windows. n00bs didn’t know the answers and the wizards had a traditional setup.
Here are some of the variables that contribute to the combinatorial explosion of configuration, in order or pain caused:
- Operating system: Linux (many flavors), Mac, Windows, Cygwin
- CL implementation: most common are SBCL, CMUCL, Allegro, LispWorks, CLISP
- CL implementation version (I ran into a problem here)
- SLIME version (stable 2.0 release or CVS snapshot)
- Emacs version (I didn’t run across any problems with this)
- I almost forgot, now there’s Cusp/Eclipse if you don’t want to use Emacs/SLIME, but right now Cusp is only tested on SBCL.
Maybe someday someone will try out all of those combinations and report, but for today, I did exactly one: Windows XP, CLISP 2.44, SLIME CVS, and Emacs 22.2 Why CLISP? After reading lots of internet, I came to the conclusion that (aside from the commercial CLs), CLISP is the best implementation for Windows users. The knocks against it are that it’s slow because it’s byte-code compiled, it doesn’t have threads, and on some points, it’s ideologically different from CL and other implementations.
Well, the performance isn’t a big concern for me (plus as I went to press, 2.45 was released with experimental JIT compilation), the threads also aren’t a big deal right now, and I think the differences will help me be aware of the considerations for writing portable code. Also regarding the SBCL windows port, it’s still considered experimental (currently v1.013 for Windows) but people are saying it’s stable and everything works except the threads. There’s even an msi installer for the Windows version. One of my next projects will be to dive into the SBCL documentation and mailing lists to get a better feel for it.
As far as the philosophy behind this (and future) setup guides, I want them to be a) thorough and b) instructive. Instructive? If you just want to take my word for everything, that’s fine, but I want you to know where I got my info from, so I’ve tried to include links to references for each step. On to the setup guide!