Some of my websites seem to be under attack at the moment. Or rather, WordPress hosting is infected by some kind of PHP virus.

So, I’m in the process of containing and fixing the issues. First I’m using the extremely useful HTTrack to make flat copies and swap the live-sites for these.

In fact, I’m using too many WordPress sites for small static sites. Time to move them to Project GeekWeaver.

Then, I’ll be exporting the databases of the bloggier blogs and either creating fresh new WordPress installs or looking into alternatives.

So for a while, this blog, and other of my self-hosted blogs will be going fairly static.

Don’t worry though, I’ll be back soon.

So I wasn’t actually planning this. But I’ve been working on Patterning again in the last week or so.

There’s a new version coming.

The bad news is that it’s going to break the “API” and your existing code. 🙁

The good news is that there will now actually BE an API. A real one, made with Protocols and defrecords that should be usable directly from Java without yet another wrapper. And will hopefully be more stable in future. 🙂

So, sorry for any inconvenience. But I think it’s all going to be a lot better from here on in.

Clojure is a wonderful language. The more I use it, the more I like it.

But the default error reporting is catastrophically bad, forcing you to look through screensful of Java stack-trace for the needle of a bit of code that’s actually yours.

I’m sure there are better solutions, but today I just hacked a very quick and dirty python program to filter this result, highlighting the lines that I care about.


import sys
p = sys.argv[1]

for line in sys.stdin :
    if p in line :
        print '33[92m' + line + '33[0m',
    else :
        print line,

I made this code in an executable file called “colourit” in my bin directory. Now I can do this :

lein test |& colourit patterning

to, for example, highlight lines containing the word “patterning”.

So Clojure is getting Reader Conditionals ie. a way to put Clojure / ClojureScript etc. variants into ordinary source files.

It’s like .cljx files but without the separate pre-processor. Now the Clojure / ClojureScript compilers themselves will be able to pick out the variant of the code relevant to them.

Most of Patterning’s core is in .cljx format. I’m looking forward to moving to .cljc but it seems like this feature is so new (only in Clojure 1.7) I’d be better waiting a bit longer.

While on the subject of Project ThoughtStorms, I realized that the tools Quick Paste and Compare were broken.

These are now working again. Quick Paste lets you quickly paste a a bunch of paragraphs of text and get back an SFW formatted file that can be dropped directly into your pages directory in an SFW wiki,

Point Compare at two different SFW installations, and give it a page-name and it will show you a json diff of their underlying files.

Both are rough and ready, but can be useful.