Monthly Archives: January 2010

Off you go

Clojure has really good integration with the java platform. It’s really easy to instantiate java classes and call their methods. Another very useful Clojure construct is the proxy macro which allows the easy construction of a Clojure object that can … Continue reading

Posted in Computers and Internet | Leave a comment

Macro mayhem

Macros are one of those things that set Lisp based languages apart from the rest, so Clojure has them too. A macro is a function that is called by the compiler when it is compiling code, and this function then … Continue reading

Posted in Computers and Internet | Leave a comment

Back to the future (to get its value)

Everyone wants to exploit concurrency these days, in order to get the best out of the new multi-core processors that are just around the corner. One of the patterns for concurrency is fork-join parallelism, where a computation is launched on … Continue reading

Posted in Computers and Internet | Leave a comment

De-structure the structure

Clojure has a nice mechanism that you can use in loop and let bindings. I’m talking here about destructuring, a primitive form of pattern matching which is found in many functional programming languages. user=> (let [x [1 2 3]]             (let … Continue reading

Posted in Computers and Internet | Leave a comment

I’ll be back

Recursion is one of the really nice techniques in computer science which allows proof to follow implementation. Tail recursion, and self tail recursion in particular, are often patterns that compilers go to a lot of effort to implement efficiently. Without … Continue reading

Posted in Computers and Internet | Leave a comment

Change of heart

There are videos of two really good videos of sessions with Mark Russinovich from PDC 09 online here and here. He goes into detail about the changes they have made to the Windows kernel whilst working towards Windows 7. I … Continue reading

Posted in Computers and Internet | Leave a comment

Laziness is good for you

Clojure has a nice little type called LazySeq which supports the ISeq interface, and which is accessed using the lazy-seq function in core.clj.(defmacro lazy-seq  "Takes a body of expressions that returns an ISeq or nil, and yields  a Seqable object … Continue reading

Posted in Computers and Internet | Leave a comment