I recently discovered how tricky it is to get a working Lisp environment on my Mac. So, equipped with fresh copies of OpenMCL 1.0, Slime 1.2.1, and Carbon Emacs for Tiger, I waded through the less-than-helpful documentation and got everything working. I hope these instructions can be applied more generally and help some other frusterated person trying to get started with Lisp! Enjoy!
OpenMCL
- Go to the OpenMCL website and download the latest version.
Untar the file. This will leave you with a folder called ccl, which you may want to name to something more descriptive, like OpenMCL.
Move the OpenMCL folder to your Applications folder.
Under the folder scripts is a script called openmcl. Open it in some text editor and change the line that says
CCL_DEFAULT_DIRECTORY=[something]toCCL_DEFAULT_DIRECTORY=/Applications/OpenMCL.Open a terminal window. Use the command
sudo cp /Applications/OpenMCL/scripts/openmcl /usr/bin/openmclto copy the script in your shell’s search path.To test it out, try typing
openmcl. Type(quit)to exit.
Emacs
Go get Carbon Emacs.
Open the disk image, and drag the Emacs application to your Applications folder.
SLIME
Download the latest version of SLIME.
Untar the file. You should get a folder named something like slime-x.x.x. Once again, I like renaming my folders, so I changed mine to Slime.
Move the Slime folder to your Applications folder.
Open a text editor and copy the following into it:
(setq inferior-lisp-program "/Applications/OpenMCL/scripts/openmcl") (add-to-list 'load-path "/Applications/Slime") (require 'slime) (slime-setup)Save this file under your home directory as .emacs.
Test it out: open Emacs, use the keystroke Command+x, type in ’slime,’ and hit return. In a flurry of letters, the REPL should appear!
Congratulations. You now (hopefully) have a working Lisp environment. I’m now going to work through Practical Common Lisp, if anyone wants to join me!
Post a Comment