News for hackers. Stuff that matters.

Ask HN: Clojure code worth reading?

I'm learning Clojure. Coming from Python and JavaScript, I'm still not used to the Clojure way of doing things.

Can anyone recommend code (ideally, large apps or libraries) that is considered high quality and readable? I'd like to better wrap my head around the techniques used.

( 5 comments | 19 points | on HN )
Re:Ask HN: Clojure code worth reading? by zaph0d on Thursday May 24, 2012 @04:28AM (#4017408)
Some of my favourites -

* Enlive, a HTML scraping & templating library implemented on top of DOM parsing & state machines https://github.com/cgrand/enlive

* Core Logic, a Prolog-like logic programming library https://github.com/clojure/core.logic

* The ClojureScript compiler, a Clojure compiler that targets JavaScript https://github.com/clojure/clojurescript/blob/master/src/clj...

* Ring, a Rack/WSGI like web-app library https://github.com/mmcgrana/ring

* Midje a very powerful test framework https://github.com/marick/Midje

* Carmine, a Redis client lib in Pure Clojure https://github.com/ptaoussanis/carmine/

[EDIT] Added Midje, Ring.

Re:Ask HN: Clojure code worth reading? by psawaya on Thursday May 24, 2012 @07:54PM (#4021208)
Thanks so much for these!
Re:Ask HN: Clojure code worth reading? by Borkdude on Wednesday May 23, 2012 @03:57AM (#4012041)
Nice question! I'm looking forward to the answers here. Meanwhile, you could have a look at my TicTacToe game: https://github.com/Borkdude/tictactoe It's not large, and I'm not claiming high quality either, but it might be educational to read and poke at as a beginner.

It's a very simple game built as a webapp in the very simple Noir framework (webnoir.org). It also contains unit tests. It uses leiningen as a build tool (so you can simply run it using "lein run" or poke at using "lein repl", run the unit tests using "lein test" etc). As a next exercise I want to build it in ClojureScript (client side only), which should not be too hard.

Re:Ask HN: Clojure code worth reading? by shane-armstrong on Wednesday May 23, 2012 @04:44AM (#4012154)
As someone who has been hearing about Clojure for a long time, but largely ignoring it due to lack of need, I enjoyed reading your git :)

Thanks for the post.

Re:Ask HN: Clojure code worth reading? by wink on Wednesday May 23, 2012 @04:04AM (#4012052)
It's not large, but I found reading https://github.com/weavejester/hiccup very insightful.