When I first installed Clojure, I had a working java environment on OS X, so all I had to do was download the clojure jars. Then I ran the REPL with java -cp clojure.jar clojure.main
That got packaged into a shell script, clj, which was added to my path and chmod +x so that I could run the REPL with clj
That worked for a while, but then I got frustrated not having command history (arrow up to get your last so many commands). I followed the instructions here to use the JLine ConsoleRunner, which works just fine.
(Here is another set of instructions to do the same thing, but with rlwrap.)
When I went exploring for more Getting Started material, I found the Clojure Assembla, which led me to Leiningen and labrepl. This made me rethink how I got clojure in the first place. Akin to test-driven development, you can do something along the lines of “deploy-driven” builds – get your tools/environment with the build tool. Clever. Here are some great instructions on how to get clojure using the clojure build tool, Leiningen.
I got Leiningen and labrepl installed and started working through some of the labrepl exercises. It’s nice to have some more supporting learning materials in addition to the Programming Clojure book. It is a good introduction to the language, but it is not Learning Clojure. I will likely also get Joy of Clojure.
For some background on where Clojure came from, there is Rich Hickey’s keynote at the 2009 JVM Language Summit.
Leave a Reply