So if inf-clojure is so great, why are all the cool kids talking about CIDER?
Well, to understand that we need to talk about nREPL.
nREPL isn’t so much a REPL as it is a backend server for Clojure tooling. You
can use it to power a REPL, or a documentation browser, or a refactoring tool,
anything that can benefit from hooking into and interacting with a Clojure
You can send a message to an nREPL server, and it will send you one or more
messages in return. If you send it an “eval” message, it will evaluate some code
and send back the result. If you send it a “describe” message it will tell you
all the operations it supports. Send it a “load-file” message and it will
(re)load a certain file.
Messages are sent over the wire using a binary format called BEncode, but that’s
not so important, conceptually you can think of a message as a map with
All main Clojure IDEs and editors are powered by nREPL, including CIDER.
Communicating programmatically with a REPL process over input and output streams
is tedious, it also means it’s impossible to distinguish between a REPL result
and other program output. In contrast nREPL provides a richer interaction model.