Clojure is a great language, and one of the few things I dislike about coding in Clojure are namespaces.

It is not because namespaces are fundamentally a bad idea – in fact namespaces are a great feature and I believe they are fundamentally important if you are trying to manage a code base effectively.

But they are particularly fiddly to get right in Clojure. They cause a lot of unnecessary grief. They are not Simple. This is the story of my battle with the namespace demons to construct a decent namespace for Clisk live-coding.

I’m pretty happy with the little fractal DSL which is implemented using keyword arguments. You can control pretty much every aspect of the iterative procedure used to create the fractal. There are some handy shortcuts you can use in your formulae:

x, y, z, t – the current co-ordinates in space that gets updated in each iteration

pos – the current co-ordinate vector

c – the initial co-orinate vector (i.e. equal to pos on the first iteration)

‘i – the iteration number. Note this is a symbol, I might make this into a function in the future for convenient to avoid the quote but you need it for now

For example, by tweaking the :result formula you can easily create some interesting fractal patterns:

Performance is also looking good – the image above took around 3secs to render on my machine. It’s amazing how much hardware has progressed – I still remember the days when I had to leave my Atari 800XL running overnight to get a low resolution mandelbrot image!