Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clojure REPL from USB drive

I'm trying to learn Clojure at the moment, but off to my parents this weekend. They have a Windows laptop, but I don't want to install anything...so is it possible to run a Clojure REPL solely with files installed on a USB drive?

like image 829
Alistair Collins Avatar asked Feb 16 '11 20:02

Alistair Collins


3 Answers

The best portable clojure "environment" that I have come across is Lisp Cabinet.

It gives the option of multiple lisp environments, but you can choose to just have a clojure environment. It is a little dificult to discern from the website that it's portable, but the installer gives you the option of installing everything in one folder for a completely portable experience.

Edit: As for a repl, when you launch it, Lisp Cabinet gives you an emacs slime REPL for the environments that you choose (that would probably just be clojure).

like image 178
Stone Mason Avatar answered Oct 17 '22 08:10

Stone Mason


Sure, absolutely this will work. If you install both Java and Clojure onto a flash drive, it will work just the same as if you installed it onto a normal hard drive.

As this blog post recommends you can set up a clj.bat file:

@ECHO OFF
java -cp clojure.jar clojure.lang.Repl

Just keep in mind that your parent's laptop won't have any environment variables set (i.e. PATH), so depending on where everything is located, you will need to tweak it to make sure java is recognized, and clojure.jar is on the classpath.

like image 44
dbyrne Avatar answered Oct 17 '22 06:10

dbyrne


You could also install leiningen on the USB drive. Then call

/path/to/USB/lein.bat repl

Enjoy!

like image 1
Matthew Boston Avatar answered Oct 17 '22 07:10

Matthew Boston