I’ve decided to accelerate my plans for moving planetscala away from this domain. So, this is an announcement: At the end of the month, drmaciver.com/planetscala feeds will no longer work. Please point your feed readers to the new planetscala.com URLs.
Category Archives: programming
More kittens: Improving edge weight calculations
One of the problems with my old kitten clustering was that inside the black bits (text, the kitten, etc) the clustering descended into a chaotic rainbow of teeny tiny clusters.This turns out to be little to do with the clustering and more to do with the slightly moronic way I’d calculated edge weights, which was doing a bad job between dark colours. I’ve simplified the calculation, so the following should be more indicative of how markov clustering clusters this sort of thing:

The clusters are still very small, but now recognisable rather than just dots.
In case you’re wondering, this isn’t going anywhere in particular. I’m just experimenting and figured I may as well do it in public.
Segmenting kittens: Experiments with clustering image contents
I’ve been experimenting with using Markov Clustering at work. It’s a very nice algorithm for clustering certain classes of symmetric graphs.
I had a vaguely interesting thought: What, thought I, if I took an image and built a graph out of its pixels. The edges would go between nearby pixels and would be weighted according to the similarity of their colours. We could then markov cluster that and see what the results looked like.
Well… the results are amusing. There’s some interest in them, but mainly in what it say sabout how markov clustering works. Behold, as we turn this:

Into this:

Hmm. Back to the drawing board.
I’ve dumped the code here if you’re at all curious.
More fun with xsel
Bind this to a keyboard shortcut:
xsel -i | pastebinit | xsel -o
It takes the current selection buffer, dumps it to a pastebin (pastebin.com by default) and replaces the contents of the selection buffer with the URL of the paste, ready for you to use anywhere. Works in any program you like.
planet scala now on github
We were talking in #scala about how there was a bunch of infrastructure work I’m supposed to do on Planet Scala but probably never will. They’re basically all to do with the web frontend aspect of it – a logo, a bunch of style oddities, etc.
Thing is, I really don’t care about the web frontend. As far as I’m concerned, planet scala is a feed aggregator that happens to have a web page. I’m not going to take it away or anything – clearly a lot of people like to use it – but it rather discourages me from putting a lot of effort into it. Additionally, I hate doing web development. So there’s not much chance of me actually ever making the web frontend great.
What I really need is someone else to do it for me. Someone who actually cares about the web page, is good at it and has the time to work on it.
If only there were some way of getting a distributed group of programmers with disparate interests to collaborate on a project…
So, planet scala is now available for you to hack on. Feel free to have a play, see if you can get yourself happy with the results, then see if you can get me happy with them so I merge them in to the main planet scala.