pseudofish

powered by text files

technology

Lisp in a Box

I like to learn programming by doing. After many attempts to learn Lisp by reading, I tried by doing. Much higher level of success!

The turning point was finding the online version of Practical Common Lisp. Aside from being a great book, it also includes a bundled Lisp and Emacs package called - Lispbox. This provides similar functionality to other languages, such as hugs/ghci for Haskell or the python interpreter.

A quick download for any major platform and you have a Lisp prompt waiting for you to type something useful. Start reading the book and you learn something useful to type.

Peter Seibel has done a terrific job with this book. The tone used involves the reader in the Lisp world with glimpses into the long history of Lisp. All of this with a practical approach to learning. By the end of the book, a streaming Mp3 server is possible!

Perhaps the biggest barrier to a proper understanding of macros is, ironically, that they’re so well integrated into the language.

  • Chapter 8

Lisp macros have started to make sense to me (help!). Try to think of being allowed to write any C++ code to generate the expansion of a #define and having the C preprocessor know what you meant. Very, very powerful.

Why am I learning Lisp? One theory is Sapir-Whorf:

the hypothesis argues that the nature of a particular language influences the habitual thought of its speakers. Different patterns of language yield different patterns of thought.

Possibly. My main reason is that it looked fun. I’ve spent a bit of time playing with languages that owe a lot to Lisp. It made sense to have a look at Lisp and see for myself. The scary part is that I may stay a while … writing web services in Lisp is awfully tempting.

Bonus link: http://www.defmacro.org/ramblings/lisp-ducati.html - discussion as to Lisp vs Haskell and which to learn … Both!