Clojure start again
It's my other attempt to learn Clojure.
The landscape has changed a lot since last time I took a look.
The landscape has changed a lot since last time I took a look.
Toolbox
Some tools that I used to play comfortably
Building and dependency tracking
Most popular is unfortunately Ant in building Clojure. I'm not looking forward to editing build.xml files again.
But there are two alternatives that keep track of dependencies, and do packaging.
It boils down to this:
But there are two alternatives that keep track of dependencies, and do packaging.
Leiningen - build tool
Leiningen is a build tool for Clojure designed to not set your hair on fire.That certainly sounds nice. Installation is straightforward as well, following Zefs instructions does the trick.
It boils down to this:
cd ~/binLeiningen is wrapping up Maven2 in nice Clojure syntax and gives you by default access not only to Maven Central Repository but also clojars.org.
wget http://github.com/technomancy/leiningen/raw/stable/bin/lein
chmod +x lein
lein self-install
clojure-maven-plugin - build tool
Another option is clojure-maven-plugin Maven2 plug-in to help you out with Clojure.
Adding following snippet should get you started:
Adding following snippet should get you started:
<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3</version>
</plugin>
</plugins>
Clojuresque Third option
Responses I received after publishing this post showed third option that I've missed.
It is used by ClojureQL and certainly has supporters. It lacks a bit of documentation but ClojureQL - Where are we (going)? describes process quite well.
It is used by ClojureQL and certainly has supporters. It lacks a bit of documentation but ClojureQL - Where are we (going)? describes process quite well.
IDE
There is quite some options here, following one is most popular amongst Clojure developers.
Emacs + SLIME
Well normally I use VIM, but after watching Dynamic Interactive Webdevelopment I took for a spin Emacs, well Aquaemacs.
Following two posts were very helpful in setting up nice environment:
And it welcomes me with message:
Lets get learning Clojure.
Following two posts were very helpful in setting up nice environment:
- Setting up Clojure, Incanter, Emacs, Slime, Swank, and Paredit,
- Setting up Clojure, Emacs and SLIME.
And it welcomes me with message:
Connected. Your hacking starts... NOW!
Lets get learning Clojure.
Welcome to teh Emacs.
ReplyDeleteThank you,
ReplyDeleteit is actually welcome back, long time ago I used emacs.
Went for vim as it was present on all productions I had to work.
Will have to re-learn all shortcuts for Emacs now.
Please see this post for a 3.rd alternative, which I find to be the best for building Clojure projects: http://www.bestinclass.dk/index.php/2009/12/clojureql-where-are-we-going/
ReplyDeleteGood luck with it,
Lau
Thanks Lau for feedback, I've updated post to include your comment.
ReplyDeleteHubert.
Good post! I'll keep it as a reference, thanks!
ReplyDeleteHey Hubert, just a note to tell you that Emacs has a wonderful, super complete mode, called viper that's practically indistinguishable from vim: http://www.delorie.com/gnu/docs/emacs/viper.html
ReplyDeleteSo you can have the best of both worlds.
:D Nick