Saturday, May 01, 2010

Enter the Lich!

So I've finally spent a little bit of time unpacking and bookshelving my trove of geek books from my move last summer. Among many that I want/need to read Real Soon Now (TM), the book "Lisp in Small Pieces" by Christian Queinnec caught my eye and reminded me that I need to actually do something about learning Clojure.

So I've set out to implement Lisp in Clojure, following Queinnec's book. I've put the shell of the project -- featuring 100% test coverage; go me! -- on GitHub, at http://github.com/davidrupp/lich. For some reason I haven't taken the time to obsess about (yet), lein repl doesn't include the project's src directory on the CLASSPATH, so you can't really require your code and play with it in the REPL. So I've included my own in script/repl. I suspect that once I really get the hang of unit testing I won't need/want to rely on it so much, but at least it's there for now.

This should be fun ...

2 comments:

Alex Ott said...

regarding src directory in classpath - that's very strange - I just checked last stable version of lein and see, that it uses -cp "src/:classes/:$CLASSPATH" to invoke java
unstable version yes - don't include src into classpath

David Rupp said...

Thanks for that, Alex. It is strange. Even stranger: it now just works, without any intervention from me. I must have been doing the require wrong or something.