Boot as a sort-of Quicklisp
Really quick: after dismissing Clojure for years (I have Common Lisp, I don’t care about the JVM, why do I need it?) I finally took the time to learn it about a year ago and OMG I love it and I want to use it for everything (much to the dismay of my team at work).
One of the pain points though is how project-based everything seems to be: if you want to pull in any sort of third party library, you have to build some sort of project, be it Maven, Leiningen, or something similar. List the libraries you want to pull in there and start (or restart) your REPL before you can use them.
Coming from Quicklisp, it’s super annoying, especially if you just want to give something a quick spin.
Enter Boot! It’s a relatively new way to handle building Clojure projects, but it allows you to easily name dependencies when you run it, like so:
That gives me a REPL with Gson loaded and ready to use.
To make life a little easier, I have a task in my
pulls in the dependencies Cider needs:
So when I want to tool around with something, I just run
boot -d whatever:version cider repl,
fire up Emacs, connect and go to work.
I haven’t take the time to get comfortable with Boot for full projects yet, so I’m still using Leiningen for most things, but I love it for quick one-off experiments. It’s not as good as being able to load whatever I want from the comfort of the REPL, but it makes things a lot less painful.