Conway's Game of Life
1. Install Leiningen
Leningen is a dependency and build tool for Clojure and ClojureScript.
Follow the installation instructions at http://github.com/technomancy/leiningen
2. Compile the ClojureScript
lein cljsbuild once
3. Start the HTML server
lein ring server
4. Test that it works
localhost:3000/auto.html. You should see the Game of Life running in the browser.
At this point, you can modify the program. Just recompile using
lein cljsbuild auto and refresh the browser to see your changes.
If you like, you can use
lein cljsbuild auto to automatically recompile whenever the source file changes.
5. Hook up a REPL and start hacking.
lein trampoline cljsbuild repl-listen at the command prompt (or as an inferior lisp in Emacs).
Try typing some forms at the REPL! Start with simple forms, like
(+ 1 1) and move up from there.
To start the game of life execution, invoke the
start function in the
game-of-life namespace. For example: