brool

brool \brool\ (n.) : a low roar; a deep murmur or humming

Archive for August, 2009

Snippet: Automatic Proxy Creation in Clojure

Friday, August 21st, 2009
The proxy function makes it easy for Clojure to interface with the Java layer, but I was dealing with an interface (the AIM Java API) that had an punitive number of things that needed to be overridden… [code lang="java"] public void OnIdleStateChange(AccSession arg0, int arg1) { } public void OnInstanceChange(AccSession arg0, AccInstance arg1, AccInstance arg2, [...]

Pattern Matching In Clojure

Wednesday, August 12th, 2009
Updated: Note that this is available as a clojars module. Clojure code density seems to be pretty good. There are a fair number of convenient shortforms in the language; for example, associative datatypes all act as a function — so given a hash map you can reference it with (my-hashmap :key). The base language itself [...]

aset is Faster Than aset-int

Saturday, August 8th, 2009
Clojure isn’t the fastest functional lanuage — that title seems to go to Haskell these days, at least for the stuff that I do — but it nonetheless is usually fast enough. It’s a dynamic language, so is perhaps cursed to be somewhat slower always, but nonetheless for the things that I do, it seems [...]

Tokyo Cabinet API for Clojure

Thursday, August 6th, 2009
I’ve been playing with Tokyo Cabinet and Clojure for a bit, and while I will go on about both of them in another blog post (or not), I have to mention that Clojure is such a well designed language that it’s a pleasure to play with. It has much of the same intrinsic power as [...]