- Yes but it’s UGLY. No guarantees. (here, via @fulldisclojure) — If you watched the latest screencast from Full Disclojure you might have noticed the nifty inspector that Sean Devlin was using. Well, here is the source code for such inspector.
- Clojure debug-repl now uses defmacro’s new implicit &env arg (here, via @georgejahad) — This is an update version of debug-repl that allows you open a debug REPL anywhere in your code so you can debug when the execution reaches the pre-defined point. This version allows you to exit the debugging environment quickly regardless of the level of nesting
- clojure comojure gzip (here, via @tebeka) — how to write a gzip handler for Compojure that gzips your pages before sending them back to the browser.
- [...] Clojure pattern matching (here, via @fogus) — This links to a rather old article on a pattern haskell-esque pattern matching library for Clojure, for example:
; simple recursive evaluator
(defn arithmetic [lst]
(match lst
v :when (number? v) v
[ _ "error" _] "error"
[ _ _ "error"] "error"
[ "add" a b ] (+ (arithmetic a) (arithmetic b))
[ "sub" a b ] (- (arithmetic a) (arithmetic b))
[ "mul" a b ] (* (arithmetic a) (arithmetic b))
[ "div" a b ] (/ (arithmetic a) (arithmetic b))
[ "squared" a ] (arithmetic ["mul" (arithmetic a) (arithmetic a)])
_ "error" ))