Blog

Math icon

Brians Brain Optimized in Clojurescript

In this post I’ll walk you through some of the steps I took to bring Brians Brain down from 340ms per frame, to about 35ms in compiled Clojurescript. Although this is a performance boost of about 970% I think its still much too slow. In the current brute force traversal of the of the array […]

Read More

Math icon

Brians Brain on Clojurescript

In this post you’ll find a 20 minute screencast which demonstrates how to port a Swing UI app to Clojurescript and HTML5/Canvas. My weapon of choice for this excercise is LightTable which Im currently trying out instead of Emacs. I’ll show off a few of its features, but more to come on LightTable in the […]

Read More

art

My Tribute to Steve Ballmer

These days Microsoft is often being hammered in both the news and in Open Source communities across the globe, so on behalf of the Clojure community I would like to submit a small tribute to the man at the wheel, Steve Ballmer. First we’ll write a small lisp macro and use that for some simplified […]

Read More

Global Warming

Clojure Vs Global Warming

Nobody who’s connected to the rest of the world, either via TV or the Internet is unaware of Global Warming – This phenomenon which threatens to destroy us all if we don’t collectively assume responsibility for the globe. Here’s my contribution to a solution in 98 lines of heavy computational Clojure! Preface As a Danish […]

Read More

Programming Language Fightclub

Clojure vs Ruby & Scala – Transient Newsgroups

Recently I had the good pleasure of reading a blogpost which demonstrated a fun exercise in both Ruby and Scala, namely scraping newsgroups. I had a look at both solutions and decided to roll one in Clojure as well, examining the differences between the famous Ruby, the Juggernaut Scala and the elegant Clojure. Clojure stands […]

Read More

Math icon

Brians Functional Brain

If you’ve always wanted to implement a purely functional 2D rendered cellular automaton which runs in parallel on all your cores, this post is for you! I’ll walk you through how to render a 2d model of Brians brain in just 67 lines of Clojure. My last post sparked an overwhelming interest from the coding […]

Read More

chaos

Clojure Vs Chaos Theory

I think we’ve all been attracted to the Lorenz Attractor, but how many of us have had a closer look at an Ikeda map? Let me walk you through building an animated anti-aliased 2d renderer of mathematical functions (in this case Chaotic) in just 80 lines of Clojure! – Batteries included! An Ikeda map is […]

Read More

think

Dining philosophers – The 4th solution

In my last post I set out to solve a classic concurrency problem called ‘The sleeping barber’ and contrasted an STM solution with an Actor based solution. It occurred to me afterwards, that the interest in concurrency is quite huge these days (and for good reason), so I’ve decided to walk through the deadlock/livelock/starvation trap […]

Read More

Programming Language Fightclub

Scala Vs Clojure – Round 2: Concurrency

The time for ignoring concurrency has almost passed. If you read my last post you’ll know that I’m looking at Scala Vs Clojure and a big part of both of these languages is their support for concurrency. Scala uses an Erlang inspired actor model, which is a distributed approach to concurrency. Clojure on the other […]

Read More

Programming Language Fightclub

Scala Vs Clojure – Let’s get down to business

Of the new languages that are emerging these days, no two are as interesting as Scala and Clojure. Both claim to be functional and geared for concurrency, one is a Lisp the other a Curly braces language. On paper, they stack fairly well against each other, so let’s investigate how well they are suited for […]

Read More