Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the recommended way of running a stand-alone clojure REPL?

Tags:

I'm using rlwrap, but I don't have tab-completion, and characters with accents get mangled. This is on OSX 10.6 in Terminal.app.

like image 853
Michiel de Mare Avatar asked Feb 23 '10 19:02

Michiel de Mare


1 Answers

ClojureX attempts to be just what you want to OS X users. I've got no experience with it myself (I'm a Linux user), but I'm under the impression that the ClojureX folks will be willing to help you if you run into weird problems (character mangling? I don't get that, with or without rlwrap...).

Update: Here's a link to an announcement on the Clojure group re: some recent changes in ClojureX...

There's a second option for readline-like functionality in JVM-based console apps -- jline. Use something like

java -cp $CLASSPATH jline.ConsoleRunner clojure.main

(with jline.jar included in $CLASSPATH, of course) if you'd like to give it a try.

Also, I don't think I've ever heard of tab completion in stand-alone Clojure REPLs. Most people use Emacs / Aquamacs + SLIME, Vimclojure or some Java IDE with a Clojure plugin for stuff like that. Well, some other people have heard about it alright (see Brian's answer). And I've since found this description of how to set up tab completion with jline. And I've since checked the sources for ClojureX -- it does set up tab completion for you. That makes this part of my original answer a bit of a blunder, I guess... But the fact remains that ClojureX is a very safe bet which may save you the trouble of configuring things yourself.

like image 51
Michał Marczyk Avatar answered Oct 25 '22 00:10

Michał Marczyk