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.


#!/usr/bin/python

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”.

Smart Disorganized Individual philosophy is about doing things piecemeal; engaging in small opportunistic actions as and when the inspiration strikes. Today was just such a quick burst with the Smallest Federated Wiki.

I love SFW a lot, but it’s a bit of a pain to bring a page or large chunk of writing from elsewhere into it. Adding one paragraph at a time is a nuisance.

So here’s a quick tool to create an SFW page from an arbitrary large, multi-paragraph chunk of text. Just paste your text into the box, add a title and choose whether you want ordinary paragraphs (of the kind that most SFW installations use) or whether you want “wikish” (the UseMod derived format which is somewhat compatible with UseMod / SdiDesk markup). Hit the submit button, and it will deliver a json file suitable for dropping into the pages directory of your SFW installation.

Update : the source-code for this is part of Project ThoughtStorms on GitHub.  (Note: I may have broken other import scripts in the refactoring to make this import script work. Please log an issue if you find this.)