Getting Started with Clojure Guides
assembla.com
assembla.com
I just got Halloway's book, and I have to say, getting started with Clojure isn't as seamless as it could be. I mainly want to write web-apps with it, so I thought I'd get going writing an app using compojure. Well, it turns out that I to do that I need:
1. Java 2. Clojure 3. Clojure-contrib 4. Ant 5. Maven 6. Leiningen
And there's no equivalent of CPAN or gem to fetch all this for me, IMHO, a huge pain in the ass, doubly so because a lot of this stuff involved mucking around with env vars like JAVA_HOME and CLASS_PATH. Is there an easier way to set this up than just downloading the individual packages? Something like WAMP for Clojure? I'm not looking forward to going through this again.
By comparison, in ruby I could just: 1. Download the ruby installer (Windows)/ apt-get install ruby-full (Ubuntu Linux) 2. gem install sinatra
And you're done.
http://mmcgrana.github.com/2010/03/clojure-web-development-r...
All you need is leiningen and your favorite text editor.
apt-get install clojure maven2
Followed by downloading the leiningen self installer works just fine.
Thanks for the link btw!
Once Leiningen is installed, dependencies are handled automatically. You can use "lein new my-project" to create a new project skeleton, and then customize the project.clj file to add in new dependencies. Most Clojure projects are now up on clojars.org, which is one of the repositories included by default in Leiningen.
It would be nice though to just build a little ruby gem with the lein binary. "gem install leiningen" but that would be violating the language barriers :)
I wanted to have a template for Compojure+Ring, etc. I am creating a second template that uses congomongo + MongoDB as the backend datastore.
There's a _lot_ of out-of-date docs out there. This is probably the #1 hurdle newcomers face getting started with Clojure and Emacs at least. That's why this Getting Started wiki page is so important; it gathers it in one place where out-of-date stuff can be fixed collaboratively.
The EAP for "Joy of Clojure" has been pretty good; it will probably also be a must-have.
I haven't heard much of anything about the Apress book, so I can't comment on that. Luke Vander Hart is a pretty smart dude, so it has a chance of also being a good book.
http://manning.com/free/dotd.html
Or, you can google for them, they're usually 25-35% off
Of those 3 the PragProg and "Clojure In Action" seem to be the ones that most people are using to get up and running with Clojure. The PragProg is pre 1.0 (FYI).
Both the above mentioned books look good. But I am especially impressed with the Joy Of Clojure by fogus (a HN'er) - From what I have read so far (which is the first 4 chapters in the MEAP) - they are taking a different approach to teaching Clojure. They are emphasizing the philosophy of Clojure - so they attempt to explain the "why" as well as the "how". Having played with some Clojure this definitely helps to bring somethings into perspective.
I would recommend picking up the PragProg book (if for no other reason than it's the only complete Clojure book out there) and "The Joy of Clojure". I am eagerly waiting out the Apress book to see how it is.
Hope that helped.