Getting Clojure Set Up for Snow Leopard
This morning I had time to spend a bit getting Clojure set up on my MacBook Pro. I have started reading the Pragmatic Programmer book Programming Clojure, and I wanted to be able to start playing with the examples in the book. So I did what any tech guy would do - I Googled to see if anyone had done this already. Simple.
I found this page where he installs just the required jars into ~/Library/Clojure, and after looking at the extent of the installs, it seemed reasonable to try this install method as opposed to what I might have normally done. I ended up getting version 1.1.0 of Clojure which was the latest release version on the site.
Personally, I'd have probably put the Clojure, JLine, and Clojure-contrib installs into /usr/local and then soft-linked them to their non-versioned names. From there, I'd have probably made a similar script, and put it in ~/bin - as he suggests linking to. It's not that big a difference what he's suggesting - it's just keeping it all in one place. Fair enough.
I will say that I did not need to build clojure-contrib as that's now available from Google Code. But other than that, the page was spot on.
I will say I'm stunned that there's no "exit" from the clojure.main run-loop. You have to type:
user=> (System/exit 0)
to get out. Or, just hit Ctrl-D. This is even referenced in the book. Wild, but hey... that's what they wanted to do.
Now I can play with Clojure and see what all the hub-hub is about.