PCL -> Clojure
My current leisure-time project is porting the examples from Peter Seibel's excellent Practical Common Lisp (PCL) to Clojure.
I think Clojure is interesting for three reasons:
- Clojure is Lisp, but minus historical baggage.
- Clojure gives full access to the JVM and Java libraries.
- Clojure groks concurrency and state.
My ground rules are simple:
- I am not going to port everything, just the code samples that interest me as I re-read Practical Common Lisp.
- Where Peter introduced Common Lisp features in a planned progression, I plan to use whatever Clojure feature come to mind. So I may jump straight into more "advanced" topics, even in the intro chapters.
Please do not assume that this port is a good introduction to Common Lisp! I am cherry-picking examples that are interesting to me from a Clojure perspective. If you want to learn Common Lisp, read PCL. In fact, you should probably read the relevant chapters in PCL first, no matter what.
The Series
- Intro (this post)
- Chapter 3. Practical: A Simple Database
- Chapter 5. Functions
- Chapter 6. Variables
- Chapter 7. Macros: Standard Control Constructs
- Chapter 8. Macros: Defining Your Own
- Chapter 9. Practical: A Unit Test Framework
- Chapter 10. Numbers, Characters, and Strings
- Chapter 11. Collections
- Chapter 16. Object Reorientation: Generic Functions
- Chapter 17. Object Reorientation: Classes
The Book
If you find this series helpful, you might also like my book, Programming 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 git repository for the sample code is at http://github.com/stuarthalloway/practical-cl-clojure.
- Hat tip to Ola Bini who is working on a similar idea, porting PAIP to Ruby.
Responses
blog comments powered by Disqus