SQL WHERE and HAVING clause strings can be rendered from neat, structured S-expressions with this simple Clojure macro.
How do you undef / unintern a symbol in Clojure?
(ns-unmap 'namespace 'symbol).
The date and time classes built into Java are a horrible mess. What are Clojure programmers to do? Use Joda Time instead. Joda Time is coherently designed and easy to use.
Clojure.contrib.logging doesn’t have any way to set the log level. This is obviously a problem if you want to make use of various log levels (debug, warn, etc.) to separate different logging depths. Here’s a function to set the logging level.
A Clojure version of my Yahoo Finance Ruby gem seemed like an interesting challenge and a good way to learn Clojure better. This version uses Apache HttpClient, which is significantly slower than libcurl. A libcurl version is on the way.
You can enable remote debugging of your Clojure / Leiningen programs by setting JVM flags in the JAVA_OPTS environment variable at startup.
How to load JNI native libraries via Leiningen’s undocumented :native-path argument, for installation of Rincanter.
Memoize in Clojure is cool. Memoize is even built in to the core Clojure API. Resetting the built-in version is impossible since the atom used as a cache is hidden in a closure, but it’s easy to write a custom resettable version. Here are two versions that we came up with on IRC today.
Clojure-mode for Emacs will clobber any line-final commas, even if they’re embedded in a string literal. O_o