So your Clojure app wants to write logfiles. It’s easier than it used to be, thanks to Malcom Sparks and his clj-logging-config project. All the messy and utterly static log4j.properties stuff has been wrapped up in a nice dynamic Lisp layer! Here’s how.
Custom dialog boxes are a must for any game. iPhone’s standard dialog boxes are fine for a business or productivity app, but in a game they look out of place. Users play games to escape from their everyday lives. Showing them the same exact graphic design that they associate with work and ordinary routine is […]
Which platform should I target first? iPhone, for now, though it’s close. Android cannot (yet) provide the same level of developer tools or paying user base, the Android emulator can’t handle graphics, and I already own an iPhone. I do expect that Android’s competitive position will improve significantly over the next few years, but it’s not there yet.
Now that we have implemented Black-Scholes in Clojure, let’s make a Swing GUI for it. The Swing GUI will have text boxes for all the necessary inputs, and calculate prices and Greeks when the button is pressed. It’s a simple and straightforward way to get started in Swing GUI programming in Clojure. Here’s what it […]
Clojure.contrib’s log/spy macro does not realize the contents of lazy sequences by default when logging, as they might be infinitely long. If you’re sure that your lazy sequence is finite, you can use this lazy-spy macro to force it to be realized when it’s logged, so that you can inspect the contents.
Clojure, Log4J, and clojure.contrib.logging can play nicely together. Here’s a reasonable default configuration.
I wanted to parse some externally-generated and malformed HTML, so naturally I went to the short and sweet clojure.xml/parse function. I got a nasty error: error: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd It seems that the W3C blocked access to the DTDs two years ago, but Java still tries to load […]
Psyleron sells a hardware random number generator and software for experimentation on the interaction of consciousness and randomness. As the Psyleron system only runs on Windows, I wrote some quick Clojure to do experimentation with randomness.
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).