in which we retire a workhorse

«

»

When I first got started with Clojure I was disappointed that the process of getting started was pretty rough around the edges, but one of the things that helped sustain my momentum was the fact that I could use SLIME to write Clojure code from Emacs via the swank-clojure project, running and testing it while in the middle of writing it. This helped me overlook the fact that I needed to construct nasty java command-line invocations to launch the process.

UW

As time went on I did what I could to try to improve the situation. Early attempts were quite primitive, but eventually when Leiningen came out the lein swank command obsoleted all my hokey elisp setup scripting. Still a few other things kept it from being a really smooth experience. The main issue is that SLIME was developed primarily for Common Lisp. The protocol behind it changes every so often, and there aren't any stable releases; users are expected to simply run straight out of CVS.

When the creator of swank-clojure passed maintainership to me, I kept things going by applying patches and adding a handful of features at the edges, but nobody really understood the ins and outs of the project. Part of this was because it was just a really old quirky codebase, (most of it predated the introduction of Clojure atoms) but part of it was because it was a fairly literal port of the Common Lisp server.

The end result was that SLIME moved forward while swank-clojure stood still. This mostly worked once we bundled a frozen SLIME revision, but it was common to have confused users wander into the IRC channel with a broken setup, unsure of where it went wrong or how to get the right SLIME. Even for experienced users it was impossible to have a setup that could connect to both Clojure and Common Lisp at the same time.

Meanwhile in Clojure-land the nREPL project was started as a tool-agnostic counterpart to swank-clojure, building a general networked repl server and an ecosystem around it. While I appreciated the idea, I thought that it would be a long time before Emacs support for it could catch up to the level of functionality in SLIME.

Still, one evening on a short flight to San Francisco I bashed out the beginnings of an nREPL client in Emacs. I got a bit stuck on the socket-based bencode functionality and dropped it after the flight, but not before pushing the code out and mentioning it on the Clojure mailing list.

Fortunately Tim King picked it back up, and now it has quickly become a respectable competitor to SLIME. I've switched over to it for day-to-day use. The main thing I've noticed about it is how accessible the codebase is; I've found it very easy to dive in and add features. So even though it's still missing a few things that SLIME boasts, it's on course to improve at a steady pace. It also works out of the box with Leiningen 2.x's repl task without any extra plugin needed.

It's now gotten to the point where I'm ready to consider swank-clojure deprecated. Of course, it will go on working, so if you already have a setup that works for you, there's no need to switch. Also if you find yourself particularly attached to the inspector or debugger from SLIME you might want to hold off. (For debugging in particular the ritz project works with SLIME and has advanced debugging features.) But if you're looking for a simpler way to get started, give nrepl.el a try.

Update: Jeffrey Chu, original author of swank-clojure, writes: As creator of swank-clojure, I'm a little sad to see it die. But I'm very happy to see that it's being replaced by something designed/maintainable instead of hacked about just to scratch an itch. Thanks for keeping it alive all this time and I look forward to the great work coming out of nrepl.el.

« older | 2012-08-22T05:50:47Z | newer »