Sign up for weekly Clojure tips, software design, and a Clojure coding challenge.
Issue 1.3 - March 29, 2012
Abuzz in the Clojureverse
The crowd must be back from Clojure/West, because the blogs were buzzing this week. I do not have a theme this week, just hand-picked, wholesome goodness with terrible abuse of portmanteaus.Eric Normand
HomoiconicA blog by Reg Braithwaite (raganwald) hosted on github. It is voluminous and focused on code. There's not much on Clojure, but it definitely focuses on functional programming. I especially recommend the posts inspired by To Mock a Mockingbird. For instance: Kestrels.
Joda TimeThe definitive time library in Java. If you have to deal with times, use Joda Time. It handles leap years, daylight savings time, and stuff you have never heard of. Add [joda-time "2.1"] to your dependencies for the latest version. There is a Clojure wrapper that depends on a slightly older version (1.6). Add [clj-time "0.3.7"] to use clj-time.
Human Readable SizeNeale Swinnerton translates some Java code, which converts bytes to "human readable" format (like 4K instead of 4096), into Clojure. Unfortunately it does not convert nibbles to giganibbles.
Where's _why?An interesting read in Slate that interweaves learning Ruby with tracking down _why, the infamous Ruby programmer that dropped off the face of the internet.
Inventing on PrincipleBret Victor is a prolific "purveyor of impossible dreams". Victor explains his principles by showcasing a small fraction of his work. He focuses on "reducing abstraction and indirection" in computing. Also check out his site, especially Magic Ink.
kibitA static analysis library to refactor Clojure code into a more idiomatic form. I guess you could call it a linter. It uses lists of forms to pattern match your code and suggest improvements. Check out this sample:(defrulesrules
[(+ ?x1)(inc ?x)]
[(+ 1?x)(inc ?x)]
[(- ?x1)(dec ?x)]
[(* ?x(* . ?xs))(* ?x. ?xs)]
[(+ ?x(+ . ?xs))(+ ?x. ?xs)])It looks like they are open to additions.Check out the rules and find how you can contribute.