Practical Common Lisp
I’ve always been fascinated by programming languages and I never really stopped to explore beyond the tools that I know well. So, somewhere last year I ordered a copy of Practical Common Lisp. Mostly out of curiousity and to learn a bit more about that strange language and understand where the hype that it is getting is coming from.
I ordered a dead tree version but you can read the full book online too.
I read a bunch of chapters when I received the book but then never really looked back at it until about two weeks ago when I had a lot of time to kill in the train to Berlin, a nice six hour ride from Amsterdam.
Practical Common Lisp truly is a great book. It is very well written in an ‘explore while you read’ style that I very much enjoy since I am way too impatient to read a full book before putting things in practice. That style is also very compatible with Lisp’s interactive development environment where you can try out things immediately. Read and experiment. Or ‘Lather, Rinse, Repeat’ as it is called in Chapter 2.
Common Lisp is huge, both language and library, but the author, Peter Seibel, chooses the right topics in the right order to build up your knowledge at a good pace.
I really like it that the book starts of with some Lisp history. It is very interesting to read how it all started. Lisp’s father, John McCarthy has more details online on his web site.
Next is an short explanation on how to setup your basic Lisp work environment. The book promotes Lisp in a Box, which is basically a preconfigured Emacs, SLIME (The Superior Lisp Mode for Emacs) and Lisp implementation of choice in a nice combo meal. If you are not into Emacs then you can also get the free LispWorks Personal Edition which works great too.
I’m more than familiar with Emacs as a 10+ year user, so getting that up and running on OS X in combination with SBCL was pretty simple. SBCL is a pretty decent Common Lisp implementation that runs well on OS X (Both PowerPC and Intel) and there seems to be a lot of momentum behind it … an active developer community and new releases every few weeks. It is also in MacPorts, so installing it is easy.
To put things in practice quickly the first real ‘code’ chapter builds a simple application that touches a lot of Lisp functionality already. You will build a simple CD database that you can search with a simple query language. Like a DSL. Sounds trivial but it is done with some really important core Lisp features like higher order functions, lambda expressions and a macros. Each which will be covered in much more detail in later chapters.
After that the book covers all the basics from Lists to Macros to the Common Lisp Object System that you can use to do object oriented programming in Lisp.
This posting is getting way too long so I’m just going to say “Lisp is Cool! Try it!” and write more about Practical Common Lisp and my Common Lisp Journey later!
Created

Olle Jonsson says:
Added on October 3rd, 2007 at 12:40 pmHey Stefan, you too, huh. I have to buy the dead-tree of this baby. Having followed it online last Christmas, a couple of days there, I sort of fell off the wagon. But it’s lots to learn from that book (and that field).
I’d just like to second that the book’s a good learn-as-you-go experience. A learned friend said that this book was not so good when you wanted to go back to it; he complained of there not being any nice index, and that the book was so much built on the “read this before you read this” sequence.
But that’s OK with me.