I am porting the examples from the macro chapters of Paul Graham's On Lisp (OL) to Clojure.
My ground rules are simple:
- I am not going to port everything, just the code samples that interest me as I re-read On Lisp.
- Where Paul introduced macro features in a planned progression, I plan to use whatever Clojure feature come to mind. So I may jump straight into more "advanced" topics.
Please do not assume that this port is a good introduction to Lisp! I am cherry-picking examples that are interesting to me from a Clojure perspective. If you want to learn Lisp, read OL. In fact, you should probably read the relevant chapters in OL first, no matter what.
The Series
- Intro (this post)
- Chapter 7, Macros
- Chapter 9, Variable Capture
- Chapter 10, Other Macro Pitfalls
Note: Fogus is also porting On Lisp to Clojure.
Other Stuff
If you find this series helpful, you might also like:
- My book Programming Clojure
- My blog series porting Practical Common Lisp to Clojure
Talks
I am available to give conference talks on Clojure. Check the schedule for an event near you, or contact Relevance (info@thinkrelevance.com) to schedule an event.
Notes
- The sample code is available at http://github.com/stuarthalloway/onlisp-clojure.