On Lisp

by Paul Graham

An advanced textbook on Common Lisp, with special focus on macros. Highly recommended. Currently out of print, but plans for republication in near future exist. Paul Graham has also gotten the copyright back and has made it freely available (both PDF and Postscript) on his website. A couple of unofficial TexInfo versions exist as well. The source code for the examples is also available -- both from the official site and for vn-cclan as PgUtils.

On Lisp (official site) http://www.paulgraham.com/onlisp.html (PDF, PostScript, Errata)
TexInfo (unofficial version by Shawn Betts) http://www.sfu.ca/~sabetts/docs/
HTML (based on unofficial texinfo version) http://www.bookshelf.jp/texi/onlisp/onlisp.html


When defining continuation-passing macros (p. 267) Paul Graham seems to be assuming that *cont* global variable has lexical scope. This contradicts Common Lisp standard. With present day Common Lisp implementations, the aforementioned macros just don't work. Also, this issue can be very confusing for newcomers. Suggested solutions for fixing the macros are (note that #'values is used instead of #'identity - according to Paul Graham's Errata):

Oh, thank you for this hint!!!

This page is linked from: Dave Warner   document   elisp   Favorite Lisp books   Lisp books   ParenscriptTipsAndTricks   Paul Graham  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively