Iím about to try to teach a bunch of people (primarily Python devs running OS X) how to use Clojure, and Iím not satisfied with any of the currently existing documentation on how to get up and running from scratch. When I was going through all this myself a few months back, there was a weird period of a good few weeks when I had basically no mental map of the Clojure ecosystem and had no idea how to assemble one.
My goal for this post is to create the resource I wish I had six months ago. Iíll assume that youíre running on OS X and have a non-zero amount of programming experience.
Don't bother using `brew install clojure` or Clojure from any system package manager ever. All you need and want is Leiningen. You can get a better repl in Leiningen just by typing `lein repl`. No need for any pointless scripts to run a Clojure jar at a random place on the file system when Leiningen can do it properly and better.
I avoided Leiningen at first because I wanted to understand how to do things in whatever way I found best... but it really is a lifesaver. Use it and never look back.
Yessir. This is actually a fairly common misconception for budding Clojurians. The problem is mostly to do with how leiningen is sometimes referred to as a build tool. We've been trying to mitigate that lately by avoiding 'build tool' wording. Leiningen is less a build tool and more an 'interface' to Clojure. Clojure as a language is actually more of a library.
With Clojure, you just get an executable jar file that can start a REPL for you. The problem is that you have no classpath management. The moment you want to add a library that isn't built in, you run into lots of trouble. Leiningen manages libraries and Clojure itself via maven under the hood. It is your build tool, dependency management system, and interface for running Clojure. It's also full of all sorts of win. And I'm not just saying that because I wrote portions of it. I promise.