Chapter 3. Common Lisp

Lisp is one of the oldest programming languages which is still in use (only Fortran is older). It was developed by John McCarthy in the late 1950's leading to the first Lisp interpreters in 1959. During the next 20 years a number of dialects developed which motivated a standardization effort during the 1980's which culminated in the definition of ANSI standard in 1992.

Common Lisp is a big language. Whether it is list processing, string formatting, or objects and classes: Lisp has always something special to offer. I can only hope that this chapter gives you an idea what you can do with Lisp. There is a light weight Lisp dialect, Scheme, which is built on the same foundation, but is much smaller (and in some areas cleaner).

3.1. Software and Installation

There are several good open source implementations of Common Lisp. Two popular choices are

Most examples in this chapter can be run with any of these Common Lisp implementations. For Linux, they are available as package of the standard distributions (e.g., Debian packages "clisp" and "cmucl"). On Windows, the easiest choice is Clisp, for which a Windows binary is available at the official Clisp site. To install it, unpack the zip archive and follow the instructions in the readme file. In the configuration file config.lisp, just adapt the location of the clisp installation in the definition of *load-paths* to the where you unpacked the zip file (e.g., c:\\Program Files\\clisp-2.32\\...\\).

I have used Clisp for the most part and later CMU Common Lisp (for example, to run the database examples).

References

Paul Graham's book presents Lisp on 400 densely written pages. It can be used as an introduction as well as a reference. Sonja Keene's book [KEENE88]> is a very readable introduction to CLOS including the advanced features such as the meta object protocol. If you want to learn about what is considered the major domain for Lisp, Peter Norvig's book about artificial intelligence is for you. It contains plenty of AI programs implemented in Common Lisp.

Paul Graham, 0-13-370875-6, Prentice-Hall, 1996, ANSI Common Lisp.

Sonja E. Keene, 0-201-17589-4, Addison-Wesley, 1988, Object-Oriented Programming in Common Lisp: A Programmer's Guide to CLOS.

Peter Norvig, 1-55860-191-0, Morgan Kaufmann, 1992, Artificial Intelligence Programming: Case Studies in Common Lisp.