Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (83 sloc) 4.92 KB
# -*- html -*-
timestamp: Tue 21 Aug 2012 10:50:47 PM PDT
title: in which we retire a workhorse
tags: projects, emacs
id: 163
content: |-
<p>When I <a href="/121">first got started with Clojure</a> 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 <a href="">SLIME</a> to
write Clojure code from Emacs via
the <a href="">swank-clojure</a>
project, running and testing it while in the middle of writing it.
This helped me overlook the fact that I needed to construct
nasty <tt>java</tt> command-line invocations to launch the
<img src="/i/uw.jpg" alt="UW" class="right" />
<p>As time went on I did what I could to try to improve the
situation. <a href="">Early</a> <a href="">attempts</a>
were quite primitive, but eventually
when <a href="">Leiningen</a> came out
the <tt>lein swank</tt> 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.</p>
<p>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.</p>
<p>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.</p>
<p>Meanwhile in Clojure-land
the <a href="">nREPL</a>
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.</p>
<p>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
<a href="">mentioning
it on the Clojure mailing list</a>.</p>
<p>Fortunately Tim
King <a href="">picked it back
up</a>, 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 <tt>repl</tt> task without any extra plugin
<p>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 <a href="">ritz</a> project
works with SLIME and has advanced debugging features.) But if
you're looking for a simpler way to get
started, <a href="">give
nrepl.el a try</a>.</p>
<p><b>Update</b>: Jeffrey Chu, original author of swank-clojure,
writes: <i>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.</i></p>