Archive for the ‘Clojure’ Category
Friday, June 11th, 2010
One of the appealing features of Clojure is the pervasive use of (efficient!) persistent data structures. (In previous posts I've shed some light on how PersistentHashMap and PersistentVector are implemented, although some of that information is slightly dated now).
There are many advantages to programming with persistent data structures (which implies ...
Posted in Clojure, General | 3 Comments »
Wednesday, May 5th, 2010
(Update July 2nd 2010:
I've cleaned up the code and git repo.
Inlined the protocol function definitions in the state records for native-platform speed.
The policy can now specify which exceptions should be considered errors: this is really useful in real life when you don't want to trip the circuit breaker ...
Posted in Clojure | 3 Comments »
Thursday, January 14th, 2010
In case you haven't noticed there is a very interesting Clojure book coming out, titled "The Joy of Clojure," written by two very interesting authors that anyone hanging out in the Clojure community should know: Chris Houser and Michael Fogus.
As an appetizer, the first chapter is available for ...
Posted in Clojure, General | 3 Comments »
Tuesday, September 8th, 2009
[sept. 8th, 21:22: fixed a +/- 1 error]
In a previous post, I gave a high-level description of how Clojure's PersistentVector is implemented. While the code has changed, the description was high-level enough that the explanations still hold (although some code snipplets don't correspond to what's in Git master.)
In this ...
Posted in Clojure | 4 Comments »
Monday, August 17th, 2009
Upcoming events: I am giving a talk on Clojure in Copenhagen and Aarhus - this is the first chance for a dcug meetup (though also non-dcug members are invited). The events are after work and free - there will even be free sandwiches, compliments of Trifork :-)
Monday, Sept. 7th in ...
Posted in Clojure | No Comments »
Monday, July 13th, 2009
I suggested to the JAOO program committee that the JAOO Aarhus 2009 conference should have a concurrency track. Their reply was "that's a good idea - you are hosting it!" - this is how Trifork works ;-)
The good thing is that the track host gets to pick (or at least ...
Posted in Clojure | No Comments »
Thursday, April 23rd, 2009
I've often needed to do a combination of filtering and mapping on arrays. E.g. in a Ruby on Rails app, I might have a list of "RecurringActivation" model objects which have a product_id and an integer period. Now I would like a list of product_ids where the current time "matches" ...
Posted in Clojure, performance | No Comments »
Sunday, February 22nd, 2009
Event sourcing:
Event Sourcing ensures that all changes to application state are stored as a sequence of events. Not just can we query these events, we can also use the event log to reconstruct past states, and as a foundation to automatically adjust the state to cope with retroactive changes.
I recently ...
Posted in Clojure, General, instanceof | 1 Comment »
Sunday, February 1st, 2009
Update: See also the description of PersistentHashMap.
One of the unique features of Clojure is that the core data structures are persistent (immutable with efficient structural sharing). This includes data structures Vector and Map that are mutable in most other languages. To be useful, operations on persistent data structures need to ...
Posted in Clojure | 9 Comments »
Saturday, October 18th, 2008
It is a need usually provoked after experiencing an emotional conclusion to a difficult life event, such as the breakdown of a close interpersonal relationship [or an unreliable concurrent program, editor] or the death of loved one [or an old familiar programming language, editor]... A person with a high need ...
Posted in Clojure | 6 Comments »