Monthly Archives: April 2010


Launching URLs after Ubuntu 10.04 upgrade

I recently upgraded a machine to Ubuntu 10.04, which has been an overall positive experience. But, the one bad thing was that I could no longer launch links from my emails or RSS feeds (using Thunderbird and RSSOwl, respectively).

In searching for the answer, I used
strace -f >trace.txt 2>&1
to try to see what was going on. I found that somehow, something was trying to launch firefox-3.5, which no longer exists (3.5 having taken over as the default version now). Nothing in /etc/ was referring to this… Some searching on the web led me to learn about xdg-open, which calls gnome-open, which uses settings in GConf to figure out how to launch a URL. Launching gconf-editor and finding ‘/desktop/gnome/url-handlers/http’ and ‘/desktop/gnome/url-handlers/https’, I saw that the command for each was ‘firefox-3.5’. Changed those back to ‘firefox’ and everything was cool again.

Now that I see that, I think I used gconf-editor to set those the other way when I first started using firefox-3.5. So it’s sorta my fault, although it wouldn’t be a terrible thing if the install scripts looked for and repaired that sort of error.


Searching for anagrams

Occasionally I get on a little anagram kick. Last time, I wrote a little program that let you input a starting text, then interactively create your anagram text. As you typed the anagram text, it would complain if you used a letter that wasn’t available, or suggest words from the dictionary that were available to you. I made the search pretty fast by putting each word in the dictionary into a sort of radix tree, where both internal nodes and leaves had lists of words that could be formed with the letters used thus far on that path.

This time around, I wanted a bit more of an automated approach. I haven’t seen any great results yet, but here are some that are at least sorta evocative:
“The Miss Rhode Island pageant” < => “The time and rags and polishes”
“federal constitution” < => “failure to discontent”
“that girl with sunbonnet eyes” < => “but only the greatness within”
“college teaching is almost a” < => “glance at the seismological”
“a cut over his left eyebrow” < => “over by the sluice of water”

The approach I took this time was to start with an English corpus (well, a couple, appended, totaling 3M words). For each ‘phrase’ (sequence of consecutive words, really) of between 3 and 6 words, I stick the phrase in a list in a hashmap, where the key is the sorted list of letters used in the phrase. After eating through the whole corpus (which bloats the Python hashmap to about 4GB of RAM), I look for any lists of length longer than one, sort and filter the results to be a little more useful, and spew out the results. Even though the input comes from a nominally grammatical source, there’s still plenty of dumb junk, so it still requires a human to pick out the few good answers, and maybe do some word reordering. And even after that, you end up with what you see above, so, ya know, why bother? Just cuz.


Another 100-word story

I’m ‘playing dead’, waiting for them to cut the rope off their bumper and peel away. This sort of outcome is really a drag, but I still like to see it out. I think it gives them a feeling of power. That’s close enough to success, for me. I hear my show described as ‘passive recruitment’. No. I mean, definitely, if someone wants to become a zombie, I’ll give ’em a bite, but what I’m really trying to do is convey the ineffable sense of freedom that we feel on this side. Or give just ’em a little thrill. Whatever.