Helpful Hints for Surviving Lisp in CS and AI...
Lisp at GMU

Running Lisp on Mason

Lisp runs fine on mason.gmu.edu (type lisp). But only use Lisp on Mason to verify your code, not for development. Instead, do development on your own machine -- it's much less painful. However, in Prof. Luke's classes, your Lisp homework and projects must compile and run properly on Mason for them to count. So be sure it's working on Mason.

If you're familiar with Emacs, you may wish to run lisp under emacs on mason. You probably will want to install slime as well. See below for more information.

Getting a Lisp system at Home

On the Command Line

The basic, if primitive, way to get Lisp running is to install a command-line Lisp system. This works especially well if you have a UNIX system (OS X or Linux). Command-line Lisps include:

Lisp IDEs

Lisp is an interactive programming language and IDEs were invented originally for Lisp. Use an IDE designed for Lisp -- it will make your coding far more productive. There are several approaches to doing this:

Not Common Lisp

You should be aware that there are two other variants of Lisp out there which are NOT Common Lisp. Those variants are Scheme and Emacs Lisp. Do not use either one. Scheme is a really nice language, but it's not what we'll be using. BTW, if you want to try out Scheme, PLT Scheme is definitely the way to go. If you'd like to instead edit Scheme with Emacs, check out quack.

There are some new Lisp-related languages lately. Qi tries to move Lisp towards strong typing languages like Haskell or Ocaml. Clojure is a Lisp of sorts which is designed to directly target the Java Virtual Machine. And Arc is Paul Graham's exploratory revision of Lisp for rapid coding.

My Tutorials and Assorted Lisp Stuff

Lisp is a daunting language. To help you get up to speed quickly, I have put together a Lisp tutorial that coverx concepts of the language which are similar to languages you've already seen. This should enable you to do basic programming in Lisp. I give short shrift to features special to Lisp. Afterwards you should have enough basics to tackle the "special to Lisp" features (macros, CLOS, etc.) in a textbook at your own leisure.
  1. Lisp QuickStart. GMU Students: pay particularly close attention to the "Lisp Style" section.
Some other stuff I've done which you might find useful:
  1. A cheat sheet for using various data structures in Lisp.
  2. A very short tutorial on Cons Cells
  3. My doseq macros, simple examples of useful Lisp macros.
  4. My snarf object-oriented language. Much smaller and simpler than CLOS. An example of how you can bend Lisp to your will (in this case: I've modified Lisp to support an OO language with a fe macros and functions). This is often how Lisp is used in big projects -- programmers twist Lisp into the language they'd most like for their project, then write in that language!

Other People's Lisp Tutorials and Information

  1. One of the best books out there is now available entirely online. It's a lisp tutorial called Practical Common Lisp, by Peter Seibel. It's got a lot of examples that you may find helpful.
  2. Another good online Lisp tutorial called the Lisp Primer. It's very good.
  3. CMU's David Touretzky put his 1990 book, Common Lisp: A Gentle Introduction to Symbolic Computation, online as a PDF file. Still a very good text.
  4. If you're looking for all sorts of information about Common Lisp (books, online resources, software, whatever) try the Common Lisp Introduction.
  5. Common Lisp is very big -- if you need a complete reference to Common Lisp to find just that function you're looking for, try Harlequin's Common Lisp HyperSpec.
  6. Paul Graham's book On Lisp, a fine book on advanced Lisp, is out of print. So he has graciously made it available online! Including source code.
  7. Peter Norvig wrote a book called Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp, which goes through many large AI projects and implements them in their entirety in Lisp. Norvig has provided the source code on his web page. Also, the web page for Russel and (again) Norvig's Artificial Intelligence: A Modern Approach has a ton of code in Lisp, among other languages. Did I mention that Norvig's now Director of Research at Google?
  8. If you've read all the way to the bottom of this page, you're clearly into Lisp. Here's where you get advanced Lisp packages of all sorts (everything from networking to regular expressions to 3D graphics): QuickLisp. Basically, it's apt-get for Lisp. But you have to know what you're looking for.