Whenever I’m learning a new language, it always seems like it’s the little things that drive me mad. With that in mind, I’m going to try and post fixes to the little things as I make my way through Clojure. To that point, I rapidly got tired of closing down the command window and starting a new one when I seriously hosed things up. Ctrl-D didn’t work though I think that’s the command for Common Lisp. As usual, Google knows everything and the command is Ctrl-C.
Also, if you’re running Clojure on Windows and want to be able to fire up the REPL from anywhere, create a batch file called clojure.bat in your Windows\system32 folder and put the following line in it:
java -cp c:\clojure\clojure.jar clojure.lang.Repl
Then you can just type clojure at the command prompt anywhere and have the REPL start up in that directory. This is helpful once you start writing larger programs that aren’t located in the Clojure install folder.