Sunday, May 16, 2010

The most portable Clojure REPL box - Eee PC 701

I have been trying to put my Eee PC 701 into a good use. This weekend I realized that turning it into a portable Clojure Box could not be more useful considering I can have REPL access whenever I want. As it turned out, it is quite easy, and here is how I got it done:
  1. Download the Arch Linux ISO (here: http://www.archlinux.org/download/) and burn it onto a CD.
  2. Use an external CD drive to boot your Eee PC with Arch Linux Image and follow the instructions to install the base system.  You will find very detailed step by step instruction from here: http://wiki.archlinux.org/index.php/Asus_Eee_PC_701. Even though the installation process is pretty straight forward, here are few things you need to pay attention:
    • Make sure you select ext2 file system
    • Run "pacman -Syu" to do system upgrade before installing any extra programs
    • Make sure to add hal and fam to the deamon list by adding "DAEMONS=(syslog-ng network netfs crond @hal @fam)" to your /etc/rc.conf if you are planning to add a graphical desktop environment
    • Now you can install Mercurial, Git, Java and Clojure. (You can install all from Arch repo except Clojure. You can easily install Clojure by: hg clone http://bitbucket.org/kasim/clojurew/, which is a project I created to make setting up Clojure less painful.)   
You can also install Xorg and a lightweight desktop called lxde very easily if you want. However, All I needed is a shell log in so I can play with Clojure REPL. The Clojurew project include latest versions of Clojure-contrib and JLine so you pretty much have all Clojure API doc and source code browsing at your fingertips with command line history. After installing Mercurial, Git, Java and Clojure with clojure-contrib, you will still have close to 3 Gig empty space left on your hard drive(It has only 4 Gig hard drive). That means you can still install Incanter, which I have been playing with a lot recently. (Note: you can just copy Incanter app jar from the binary download to Clojurew's lib directory to have Incanter available at the REPL).  It took me around an hour to set everything up and the joy of being able to carry a little Clojure box around is well worth the effort and amazing. Go ahead and try it out if you own Eee PC 701.

No comments:

Post a Comment