Friday, August 30, 2013

String Calculator Kata in Clojure (Emacs)

In the previous post I have been evaluating Light Table's instarepl using the String Calculator kata. Performing code katas is great way to improve one's workflow so this time I tried to do the same kata using the Emacs. You can see recorded screencast below.

In order to get quicker feedback I had to modify the clojure-test-mode to display test failures right inside current Clojure buffer. Fortunately Brian Marick already implemented this for the midje-mode so I just reused parts of his code. I'll probably send pull request to clojure-test-mode when I implement it correctly. You can find the code which I'm currently using in my dotfiles repository. It's really great that one can easily extend/modify Emacs to match his needs.

Due to my familiarity with Emacs/Evil I managed to do more stuff in 9 minutes so the resulting code is little bit cleaner than in the previous screencast. Also thanks to the ace-jump-mode I didn't have to touch the mouse at all.

Tuesday, August 27, 2013

Getting the feel for the Light Table's instarepl (screencast)

Today I was sitting at a coffee shop and none of the wireless networks worked so I started to explore my local stuff and I did find recent version of the Light Table sitting in my Downloads folder. I didn't have much time to play with any of the previous versions so I thought this could be the good time to give it a try. I was especially interested in how instarepl could help me solve problems in Clojure so I tried it on my favorite code kata called String Calculator. I recorded screencast of this experiment which you can see below.

My first impressions are pretty positive as it helped me multiple times to get the code to work pretty fast. There were also times where I could use a little more help (e.g. it didn't show much useful information in the add function at the beginning). But overall it was pleasant experience and I'm looking forward for future versions. Maybe someday I'll switch from the Emacs/Evil to the Light Table. Or the best stuff will get ported to the Emacs... :)

Q: Does the Light Table contain some Clojure documentation functionality? E.g. something like eldoc-mode / clojure-cheatsheet in Emacs?