You can’t beat python for seeing in the new year…

Gimbo’s New Year’s Eve 06/07: human_twister.py

gimbo breaks everything – hurrah!

Well, hopefully not everything, but…

Woo: I’ve migrated (some might say upgraded) gimboland from Movable Type to WordPress.

This is the fifth system I’ve used to maintain gimboland. Initially I was just editing HTML by hand; very soon thereafter I started using Blogger; in June 2002 I ditched that in favour of some home-grown Python scripts; in December 2004, the desire for a commenting system led to Movable Type; now this. What next? Something in Haskell, perhaps? ;-)

The migration process was by no means “one click” (though aided considerably by my host’s use of directadmin and installatron) – which is why things have been so quiet here lately – and has had a number of consequences…

For one thing, all the URLs have changed, which means bookmarks and inward-links will tend to be broken. I’ve tried to fix this as much as possible with HTTP redirects (yay apache magic). There are nearly 2000 posts in Gimboland, however, so that’s now one long .htaccess file. :-) I might well have screwed up, so if you’re aware of anything missing or horrible, do let me know. One possible issue is the syndication feeds: I used to have RSS and atom feeds, whereas now there’ll be just one RSS feed in a different location – if the feed situation is unsatisfactory do let me know and I’ll look into alternatives.

The most obvious change is that all the blog stuff is now off gimbo.org.uk/blog/ rather than at the root; the rest of Gimboland – ie everything not off /blog/ – is still in a somewhat broken state (in particular the images), but now I’ve got this major part back under control, I look forward to making the rest of the site as good as I’d like it to be. The only problem is that it takes so long to get this stuff sorted, and I’ve got so much other stuff I should be doing. Well, I’ll get there, particularly if I remember that perfect is the enemy of done.

What else has changed? Generally, things have been getting “crufty” for a while, and much of that cruft should now be gone. The search box is working again; comments are up again (and handled better, particularly for code samples – though we’ll have to see how WP handles the spam question); we now have tags rather than categories; hopefully the colour scheme is nicer. :-) Finally, WordPress is GPL‘d, unlike Movable Type – yay.

Anyway: now it’s really time (I hope) to stop tweaking this stuff and start blogging again. And on that note…

WordPress appears to have a quite powerful plugin architecture; one plugin I’ve found fun is lightstats which, with some tweaking (bleurgh, PHP), gives me some interesting and informative graphs about gimboland’s posts over the last nearly six years. The first two show category use and are boring at the moment because most of the posts are uncategorised: I aim to fix that. The third one, posts per month, is the one I really wanted, and it’s a depressing sight: I’ve really dropped off posting over the last couple of years. Part of that, maybe, I hope, is that I’m posting less but better (much early stuff is just links to silly things), but I think I’ve also just trailed off in shame as the site got cruftier and cruftier. Thus, onwards to a cruft-free post-rich future!

Posts per category, snapshot 21 Jan 2007

Words per category, snapshot 21 Jan 2007

Posts per month per category, snapshot 21 Jan 2007

Comments per post, snapshot 21 Jan 2007

go faster stripes #1: flickr sidebar

I’ve added a flickr feed to the sidebar, using the flickrrss plugin. Nice plugin: I can control how many images to get, their size, whose images to get (user, group, everyone, etc.), refine it by tag, and cache the thumbnails on my server so they’re not fetched from flickr for every hit. Sweet. It can only handle one such feed, unfortunately, but I guess I can live with that. :-)

go faster stripes #2: sidebar comments & better tagging

The sidebar’s getting chunkier, with the addition of comment previews courtesy of simple-recent-comments.

I’ve also switched tagging tool; I was using category tagging, which is a deliciously simple solution let down by the WP interface for setting multiple categories – c’est clunky! Now I’m using Ultimate Tag Warrior which has a much slicker super-whizzy AJAX-o-matic type interface and also, to my eye, slightly more beautiful tag clouds. However, I do now need to hack lightstats further to examine tag tables rather than category tables – no biggie, just a little SQL tweakery some time. Oh yeah, and now all posts will have the category “Uncategorized”, because I just don’t need categories to be visible any more; so I need to fix the RSS feeds to list tags not categories, and redirect all /category/ URLs to the front page, or maybe to /tags/.

Why the iPhone puts Java into the past tense (apparently)

In Which I Think About Java Again, But Only For A Moment [smallcool].

Me, I defected long ago. I’m another of those Apple Java engineers who dropped out. I spent five years as a raving Java fanboy, but I gave up after optimizing AWT, implementing drag and drop, and trying to make 1,200 pages of crappy APIs do the right thing on the Mac. Then I took a one-week Cocoa training course, and wrote the first prototype of iChat.

Desktop Java never worked because Sun tried to build their own OS on top of the real OS, duplicating every API and feature. This led to terrible bloat, making every app as heavyweight to launch as Photoshop. Worse, the GUI portions of the Java platform are awful, because Sun is a server company with no core competency at GUIs. The APIs are too clumsy to code to, and compared to any decent Mac app, the results look like a Soviet tractor built on a Monday.

He almost makes me want to get a Mac, ditch BSD and emacs, and start writing Cocoa apps – except that then life would just be too darn easy, and I’d never hear the end of it from TR (or Bash, probably).

It’s always somewhat depressing, or at least downheartening, to see someone like this tell me I shouldn’t be using emacs. It always makes me wonder if, maybe, they’re right – maybe out there there’s an editor that’ll do everything emacs does for me, but somehow nicer, more productive. Usually, as far as I can tell, that means the editor does IDE-like things such as autocompletion, code browsing, etc. – and yes, that’s stuff I just don’t use when coding. But gosh darn it, I’ve tried a lot of editors and nothing has ever come close, for me, to the feeling of power and (welcome) flexibility emacs gives me. Effortlessly editing multiple files in multiple split views in multiple windows (across multiple virtual desktops), powerful and easy regexp and macro capabilities, and (as one of the commenters on the linked article says) just doing The Right Thing with indentation in Python, Java, C, Haskell, … So the downheartening aspect is the tantalising feeling that there’s something else out there I should be using, but I just can’t find it! Of course, not using a Mac probably doesn’t help me, here. ;-)

I haven’t listened to Depeche Mode for a while, mind…

Oh, and here‘s another “Java is rubbish” story (comparing EJB lines of code with python/django) from the same source.

Final notice! The Earth will fall into Null Space! ACT NOW!!!1111

I received one of these PDFs today, apparently from Frank Hatch himself, sent to my work email address. Quite fascinatingly wrgon. As spam, it certainly makes a change from drugs and 409s…

(Tee hee… When tagging this post, I accidentally forgot to comma-separate the tags, and gave birth to the new uber tag “spam-humour-religion”. Anyone care to found such a religion with me?)

Hacking lightstats for ultimate tagness

I’ve hacked the lightstats plugin to forget about categories, and instead display “posts per tag” and “bytes per tag”, querying the tables created/maintained by ultimate tag warrior. Examples here. Code available by request.

Arguably the “posts per tag” is a bit redundant given the w00ty uber tag cloud – particularly once I have that displaying post counts in the tooltips. I’m quite proud of the “bytes per tag”, though… One big SQL statement gives me all I need:

SELECT tag, sum(length(post_content)) AS bytes
  FROM wp_post2tag
  INNER JOIN wp_tags ON wp_post2tag.tag_ID=wp_tags.tag_ID
  INNER JOIN wp_posts ON wp_post2tag.post_ID=wp_posts.ID
GROUP BY (wp_tags.tag_ID)

Well, OK, not so big. Quite big as a one-liner though. :-)

I’ve also installed wp-cache, which may or may not be pointless… (And, the following morning, disabled it, because it would prevent comments appearing for up to an hour after they’re posted!)

Popgadget, and some thoughts on domains

Bash pointed me to popgadget yesterday — cool gadgetry and “stuff”, reported mostly from a geek girl PoV. Some representative goodies: Mmmm… Non-alcoholic malt liquor flavored with beef extracts! · go grammar girl! · your very own space age shower and turkish bath · skateboarding robot (rollerskating, more like?) · awesome inflatable iceberg climbing wall.

Peeve: once upon a time, .net domains were (albeit informally) reserved for people providing network services, eg ISPs, registrars, etc. These days it’s “just another” gTLD which anyone can buy space in, and I think that’s a shame. The appeal of the domain to its purchasers – as far as I can tell – is that you get to say “look! We’re on the net!”. Well, so? I mean, you have a domain, so clearly you’re on the net. Saying .net tells us nothing more about who you are. I guess what I’m trying to get at is: why have a variety of gTLDs if they have no actual meaning? As far as I can tell, the country TLDs have some meaning, but the gTLDs are just one big pool now.

Irony: I’m guilty of this too, having registered both gimbo.org.uk and gimbo.co.uk; in my defence, requests to the latter are rewritten as requests to the former, as I wish to discourage use of the latter, while retaining ownership. But why should I retain ownership? What if some fellow Brit forms a company called “gimbo” and wants the domain? Well, it’s obvious, isn’t it? I’d be rich! Rich! Rich! ;-)

Frob it!!!

Surely this is what molly guards are for?

Thanks, moderate spender.

Robot beauty is just… incomprehensible.

Bash, while watching Futurama

Yahoo UI library for fluid layouts with CSS

Potentially useful: Intricate Fluid Layouts in Three Easy Steps.

This is a CSS library, from Yahoo (under a BSD license), which claims to do flexible page layout, with multiple rows and columns, arbitrary nesting, etc. well – ie works across browsers, works across font sizes, etc.

I certainly spent a long time on getting the layout “right” (or at least satisfactory) with gimboland-reloaded, and only really concentrated on getting it right in Firefox. I think there are issues in IE, and I haven’t even seen it in Safari. As I’ve said, I’m not so bothered, but I must admit to being tempted by a tool which claims to do this work for me.

I’m not going to apply it here, however (at least just yet). In particular, the following excerpt from the comments on that page is +1 Insightful, IMHO:

Like Andrew said, this is a step backwards. In order to change the look of the site, I now have to touch the structural layer. So now presentation is being relegated back to the markup, which is just all kinds of bad.

Nate Cavanaugh

The point being that for YUI to work, your desired rendering structure must be reflected in the document source — so for example, if I want the kind of layout I have here, then my structure must be “header, footer, and ‘container’ are siblings; main and sidebar are children of ‘container’”; whereas in the current source the header, main, sidebar, and footer are all siblings at the same level which is, well, just a bit nicer. :-) Still, I’m not 100% convinced it’s still not worthwhile, so I’m keeping the link around, hence this post. :-)

(Expect more “stuff I just want to bookmark” posts from now on (again) — unless I start using deli.cio.us or something, I suppose.)

The creed

How to be.

(And if you haven’t read every single xkcd from start to finish, you really should. Gorgeous gorgeous romantic poetic and true.)

OK, I’ll stop being such a fucking snob

Yesterday, I saw how this blog looks in IE, and I was dismayed. So OK, I’ll try to do something about it. Sigh…

But seriously, IE users, what are you doing? Haven’t you seen Firefox? It’s so much nicer it’s just not true – and the plugins, oh, the plugins! Just having adblock should be reason enough for migrating, not to mention DownThemAll, gmail manager, PDF download, and VideoDownloader. Oh yeah, and IE Tab for those pesky pages that just have to be viewed in IE. So – no excuses, nothing to lose and everything to gain… Come! Join us!

Checkit out Mao, the funk soul brother

Checkit out Mao, tha funk soul brother
Checkit out Mao, the funk soul brother. [devan78]

Sweet. Afros are back – great news for me. :-)

The Big Bus

This week, I saw The Big Bus for the first time since I were a lad. It was every bit as fantastically ludicrous as I remember it, except now I could truly appreciates its kitsch 70s retro glory. In short: awesome. God bless mail-order DVD rental.

The film centres on the maiden voyage of `Cylops’, a colossal nuclear powered bus embarking on the first ever non-stop voyage from New York to Denver (clearly an important niche market in the late 70s). Big Oil interests are sabotaging the project, and a bomb-blast has put the pilot and co-pilot out of action. The project designer’s daughter (played by Rizzo – so sexy in her two-tone brown jumpsuit) goes in search of her ex-lover, the legendary Dan Torrance (played by the improbably monikered Joseph Bologna), the only man who can learn to drive such a complicated rig in the two weeks remaining before launch day. But wait! Torrence has a dark past, as we learn in a (to my mind classic) fight scene set in a smoky bus-driver’s dive bar – he was the sole survivor of the disaster of `Mount Diablo’, and is now haunted by accusations that he ate all 110 passengers.

Basically, it goes downhill from there, in glory.

Apparently it was a big influence on the Airplane! movies, Police Squad! and the Naked Gun movies. It was certainly a big influence on the comedy stylings of the Gimblett family. I still have an almost irresistible urge to go “Look out! He’s got a broken milk carton!” every time I see a fight scene. I’m also pleased to report Bash seemed to quite like it too, and I’m fairly sure she wasn’t just humouring me.

You eat one lousy foot and they call you a cannibal. What a world!

Dan Torrence

Classic comment / code impedance mismatch

Awesome, almost Dadaist WTF:

// MUST be set to 1!
Params->ParentalLevel = 3;  // QA now insist this is set to 2.

Made me laugh out loud, anyway.

Good spam filtering in WP

I’m very impressed with WordPress’ built-in spam protection (well, strictly not built-in – but provided by the Akismet plugin that came bundled with). Since making the switch a couple of weeks ago, it’s caught 354 spam automatically, straight to the spam queue. Today, for the first time, two pieces of spam snuck through to the comment moderation queue. Even better, as soon as I hit “re-check queue for spam”, they were gone – yay, collaborative filtering.

This is such an improvement on my old situation, where I didn’t even have a separate spam queue, and occasionally spam was even published. It was pretty primitive, really. I expect that upgrading my MT version would have helped, but meh. Anyway, as Jo would say: will everyone please stop blogging about blogging, and blog. :-)

Foozles!

Yikes. This is waaaaay too close to home: Foozles – a programming language feature comin’ atcha soon! [wadler]

2013: Francoise Boisbleu proves that under a certain formulation, Foozles are a categorical dual to Aspects, which gets everyone terribly excited.

It certainly would.

I would be like David Lee Roth!

Currently greatly enjoying reading Questionable Content from start to finish. Bash spotted it linked off xkcd.

I saw Children Of Men last night and it completely broke my brain. That film is completely drenched in fear; every moment of the film, every character, everything that happens is driven by fear. Awful, just absolutely horrible. I mean, a great film (and I really like Clive Owen, I think) but I will be happy never to see it again. The last film I saw which left me feeling like this was Requiem For A Dream back in late 2002, but if anything last night was worse – with Requiem, it was really only the last half hour that was drowning in trauma, whereas last night it was the whole fucking film.

As such, I am spending the day at home nursing my psyche by drinking cups of tea and reading harmless web comics. :-)

Autoattach / automount encrypted home partition in FreeBSD using GBDE

I’ve just set up one of my laptops, running FreeBSD, so that /home is encrypted using GBDE, and is auto-attached/mounted/fsck’d at boot time. The instructions in the FreeBSD handbook aren’t completely clear, so here are some notes on how I did it.

Actually, most of those instructions are very clear, provided you don’t care about attaching at boot time. Indeed, I’ve had an encrypted partition which I attach/detach by hand, for about a year now, for which those instructions were perfectly adequate. Unfortunately, the section on “Automatically Mounting Encrypted Partitions” leaves out two important details which conflict with the rest of the chapter: your lock file’s name needs to end in the text “.lock”, and you need to be careful where you put it. This was confusing, and in some ways what you have to do to get automounting working contradicts the other examples in the chapter.

Anyway, long story short, I had to dig into /etc/rc.d/gbde to work out what had to be done, and here it is… A summary of how to set up an auto-attaching encrypting home partition on FreeBSD using GBDE:

(I did this as pretty much the first thing after a fresh install, before I’d even created any users. Needless to say, then, all of this happens as root.)

Here’s how /etc/fstab looked before I started:

# cat /etc/fstab
# Device        Mountpoint         FStype    Options   Dump Pass#
/dev/ad0s1b     none               swap      sw        0    0
/dev/ad0s1a     /                  ufs       rw        1    1
/dev/ad0s1e     /tmp               ufs       rw        2    2
/dev/ad0s1f     /usr               ufs       rw        2    2
/dev/ad0s1g     /usr/home          ufs       rw        2    2
/dev/ad0s1d     /var               ufs       rw        2    2
/dev/acd0       /cdrom             cd9660    ro,noauto 0    0

Unmount /home because I’m about to blat it completely:

# umount /usr/home

Create a directory to contain the lock files:

# mkdir /etc/gbde

Initialise the partition for GBDE. I used a use sector size of 2048 (which matches the UFS fragment size). Note that the lock file’s name ends in .lock; this is not how the main body of the GBDE instructions in the handbook does it, but it’s necessary to get /etc/rc.d/gbde to attach it properly on boot up:

# gbde init /dev/ad0s1g -i -L /etc/gbde/ad0s1g.lock
Enter new passphrase:
Reenter new passphrase: 

Attach the encrypted partition to the kernel for the first time (entering the passphrase previously specified), and write the filesystem:

# gbde attach /dev/ad0s1g -l /etc/gbde/ad0s1g.lock
Enter passphrase: 
# newfs -U /dev/ad0s1g.bde 
/dev/ad0s1g.bde: 6632.5MB (13583360 sectors) block size 16384,
                 fragment size 2048 using 37 cylinder groups of
                 183.77MB, 11761 blks, 23552 inodes.  with soft
                 updates
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624,

*SNIP*

Test the mount:

# mount /dev/ad0s1g.bde /usr/home

Assuming that looks good (eg in df), unmount it and detach it:

# umount /usr/home
# gbde detach /dev/ad0s1g

Now we’re ready to set it up for auto-attaching. We need to alter /etc/rc.conf and /etc/fs.tab

# tail -n 3 /etc/rc.conf
gbde_autoattach_all="YES"
gbde_lockdir="/etc/gbde"
gbde_devices="ad0s1g"

We need the gbde_lockdir line because otherwise it looks for the lock files just in /etc, I think.

# grep home /etc/fstab
/dev/ad0s1g.bde /usr/home          ufs       rw        2    2

Now when I boot, it asks for the passphrase, attaches the encrypted partition, and mounts it – automatically – then it gets fsck’d with everything else. It doesn’t automatically detach upon halting the system, but I guess that’s no problem. :-)

The only thing I don’t totally like is that if I get the passphrase wrong (3 times), it doesn’t attach or mount the encrypted partition (obviously), but then of course it fails filesystem checks completely and the boot process dumps down to single user mode, messily. Not completely unreasonable, I guess, but still a bit annoying.

Anyway, anyone now stealing my (crappy) laptop will have a much harder time of getting at the data on it (the interesting data, anyway). Whee!

Haskell and Category Theory

An introduction to Category Theory from a Haskell point of view. As always, monads are where your brain starts hurting.

RMS in lego

I just found two super photos on flickr…

More super for computer people, I guess, but anyway…

(Number 2 in an ongoing Thorsten series.)

hpDJ: an automated DJ with floorshow feedback

Here’s a little gem for anyone else out there interested in dance music, DJ’ing, and computers: hpDJ: An automated DJ with floorshow feedback. Basically, it describes a system which allows one to define a “qualitative tempo trajectory” for a DJ set, then chooses tracks to fit the trajectory (the words “partial ordering” occur at this point, but that’s as close as we get to TCS), and automatically beatmatches/timestretches/mixes the tracks accordingly. Towards the end it considers the performance and “collaborative consumption as composition” possibilities, with genetic algorithms and the like, but the bit which impressed me the most was on the mixing, where the opportunities afforded by doing the job in software are recognised and made the most of.

However, because hpDJ operates in the pure software realm of digital signal processing (DSP), it is possible to create as many sweepable band-pass/cut filters as is desired for any particular cross-fade from one track to another. As with traditional hardware mixers, each DSP filter can have variables that control the degree of attenuation or boost, and its center-frequency. In addition to this, the shape of the DSP filter’s transfer function (e.g. the nature and rate of the fall-off or boost) and its bandwidth can also be under automatic control. Recording studios do have filters with these added controls, but such filters (known as a Parametric EQ) are too expensive to be built into each channel of professional mixing desks on a many-per-channel basis.

Thus, it becomes possible to specify hpDJ so that it analyses the audio frequency-time spectrogram for the incoming and outgoing tracks in the cross-fade, and uses a number of heuristics to determine how many DSP Parametric EQ filters are necessary and what their settings should be. This can be used to, for instance, selectively suppress the frequencies for a synthesizer melody-line in one track, attempting to make that melody “disappear” while keeping the bass-guitar and percussion elements in place during the cross-fade. By employing simple heuristics for detecting when one component of one track “clashes” with another component of the other track, such aesthetically unpleasant clashes (which may remain despite perfect beat-matching) could be automatically eliminated by hpDJ.

Note that this is all happening automatically (except maybe setting some initial loose parameters at the start) – very impressive.

Although this was published only in 2005 (I spotted it in this book on this man‘s desk), much of this was apparently done around 2000 or so. Thus, I wonder what goodies they’re cooking up in Bristol even as I type. Dave Cliff’s “inventor profile” page doesn’t really bring us up to speed, I feel… Aha! He’s moved to Southhampton.

Finally, I note that this is the first paper I’ve ever seen which opens with a Sisters of Mercy quote. Rock on.

The Trembling Giant

Introducing Pando, a male Quaking Aspen clonal colony – at six gigagrams the most massive known single organism on the planet, and possibly the oldest (although this is apparently controversial and of course upsets those imaginative people who maintain that the whole planet was flooded by God a mere six thousand years ago).

Drumming on the streets of Mumbles

Last night, Shiko featuring Gimbo played a gig. Sorry I didn’t mention it sooner – I meant to, but kept forgetting. It was at a fundraiser put on by the University’s Visual Arts student society (jugglers, firebreathers, etc.), at the Chicago Rock cafe off Wind St; they’d asked us to come along and play, and so we did: and it was good. In fact, I’d say it was the best gig we’ve done since I’ve been Shiko’ing (which is, admittedly, less than a year) – quite tight and confident. Speaking personally, it was certainly the most confident I’d ever been when performing to an audience (musically at least). We weren’t playing for long, but what we did was fairly high impact, I think. (We did Kennefoli/Soli, then Kassa, for the record.)

Anyway, fair warning: on Saturday 3rd March 2007, we’ll be playing in a St David’s Day parade in Mumbles. More details than that I do not know, except that we’ll be walking and drumming simultaneously, which will be a new experience for me, at least. Should be fun – hope to see you there!

Ooh look: Shiko a few weeks ago. That’s me seated on the right…

Shiko, 13th February, 2007

(Also, awesome (but 5MB) montage of the Shiko new year party, for which I was sadly absent.)

autopushd in zsh – make cd behave like pushd always

I’ve just been exposed to one of those delightful little hacks that are both forehead-slappingly simple/obvious and yet so powerful and clearly “right” that I just know I’m going to be using it for the next n years. Allow me to share.

In every Unix shell I’ve ever seen, one uses the “cd” command to change directory, moving around the directory structure.

cd has no memory of where you were before. Some shells add a stack-based history via the commands “pushd” and “popd” (which I only discovered in 2004). If you pushd to a directory (eg pushd /some/distant/directory), you can subsequently get back to where you were before very easily by just entering popd; furthermore, such calls can be nested arbitrarily deeply (that’s what the stack is for). This is, on occasion, tremendously helpful, and can save a lot of typing/thinking.

The insight: why bother with cd, then? Why not just always pushd around the place? That way, you’ve always got the possibility of using popd to get back to where you were before easily and quickly. There are two possible reasons why not. First the stack takes up some space in memory. Feh, no problem – it’s not that big, and I never have a shell open long enough for it to become a problem. Second, pushd is a few more keystrokes than cd, and my habits have cd hardwired into them.

Thus, the hack: alias cd to pushd. But wait! Don’t do that!

Since I use zsh, I don’t even need to alias it. I can use the zsh config option “autopushd” to make cd always behave like pushd. Hell, yeah! I just add the following to ~/.zshrc:

setopt autopushd

and hey pesto:

# Start by going to some fairly deeply nested directory
[gimbo@mane ~] cd work/teach/cs-238/current 

# Now I cd (but really pushd) to some other, also deeply nested, directory
[gimbo@mane current] cd ~/work/research/mphil/tools/HetCATS/CspCASL
[gimbo@mane current] pwd
/home/gimbo/work/research/mphil/tools/HetCATS/CspCASL

# In the words of Baloo: take me home, daddy!  (This next line doesn't work without the autopushd trickery)
[gimbo@mane current] popd
~/work/teach/cs-238/current ~
[gimbo@mane current] pwd
/home/gimbo/work/teach/cs-238/current

Update 2007-02-24: Will has just pointed out to me that “cd -” will take you back to where you were before, so repeatedly issuing cd - allows you to flip between two places easily – which is of course a common use case. Neato!

[gimbo@orb ~] cd /tmp 
[gimbo@orb /tmp] cd -
~
[gimbo@orb ~] cd -
/tmp
[gimbo@orb /tmp]

Haskell study plan

Haskell study plan [smallcool].

Saving Private Ryan

Bash & I watched Saving Private Ryan this evening. I’ve wanted to see it since it came out, mainly because I’d heard that the first half hour or so was incredible. More generally, I quite like gritty WW2 stuff since I read Cryptonomicon, and I enjoyed what I saw (little) of Band of Brothers, so it seemed likely I’d enjoy this.

Well, yeah, it was all right. Not a life changer, but also not a complete waste of three hours either. The first half hour certainly didn’t disappoint, and overall I was fairly gripped, and impressed by the grittiness, jumpiness, fleshiness of it. I think it would be improved about tenfold by (a) having absolutely no music whatsoever (apart from the Edith Piaf, obviously), and (b) having no Stars ‘n’ Stripes fluttering fore and aft. But hey, shrug, it’s a product of its time and place, I guess (three years before the WTC attacks, btw). I expect it had more impact when it was fresh and the camerawork/lighting techniques were new & exciting, but still, it worked well. Tom Hanks did his Thinking Man’s Regular Joe routine as well as ever, and the supporting cast was gratifyingly full of “ooh look, I know him” faces (Ted Danson – yay). I was surprised to see Matt Damon as Ryan (I didn’t know before I watched it), which of course spawned a slight Team America moment on the couch. Always a pleasure…

(Hey, check the trivia on IMDB: interesting snippet on the Lincoln letter. It figures – historical truth is almost never as stirringly poetic as it is portrayed by propogandists, I suppose.)

woof

woof – very handy for occasional one-shot (or multi-shot) file serving. Put it somewhere in your path and every now and then it will make you happy.

Woof (Web Offer One File) tries a different approach. It assumes that everybody has a web-browser or a commandline web-client installed. Woof is a small simple stupid webserver that can easily be invoked on a single file. Your partner can access the file with tools he trusts (e.g. wget). No need to enter passwords on keyboards where you don’t know about keyboard sniffers, no need to start a huge lot of infrastructure, just do a

$ woof filename

and tell the recipient the URL woof spits out. When he got that file, woof will quit and everything is done.

The Quest of the Algorithm of the Chimes of the Bells of the Clock of the Long Now

I’m on a bit of a quest at the moment, which is turning up all sorts of interesting bits and bobs (and distracting me nicely from the work I should be doing today).

Yesterday I listened for the first time to Danny Hillis‘ 2004 Long Now seminar on “Progress on the 10,000 Year Clock” (listen here). Like most of these seminars (which I really should write about in more detail some time) it’s well worth a listen, bristling with neato facts, insights, and mind-expanding ideas. (A less time-consuming but still usefully detailed introduction to the clock project can be found here.) One of the things which particularly caught my imagination was the discussion of the bells. Apparently His Enoship noticed that the number of days in 10,000 years is almost exactly equal to the number of permutations of ten things (365 x10000 = 3650000; 10! = 3628800) – so the idea is that once per day these ten bells will chime in a certain order, never heard before, never to be heard again. (Eno has released a CD of “bell studies”, which is on its way to me even as I type.) Hillis invented an algorithm for the ordering of the chimes, so we know what ordering will be played for any day in the next 10,000 years (Eno’s CD plays the sequences for January 7003) and as you’d expect, people have run with this idea. I have an itch to run with it too, probably (predictably) in Haskell.

So where’s the algorithm? I haven’t found it yet, to my great surprise. :) I would have expected it to be fairly easily available, but apparently not. It might be in Stewart Brand’s book about the clock (also on its way to me), but I sure don’t see it anywhere online. However, there are a couple of implementations floating around, so perhaps some reverse engineering is in order…

Sean Burke has created a web page for exploring the bell patterns, with visualisations and MIDI downloads – code in Perl (and a Postscript (!) version here). Not fancying reverse-engineering the Perl too much, I wrote and asked Sean if there was a better source for the algorithm. Apparently Danny’s original version is in Mathematica. I haven’t found it, but Sean says he’ll send me what he can find in a few days. Otherwise, I guess I’ll keep digging, ask around on the Long Now forums, etc.

Sean pointed out that, when reverse engineering, “there’s understanding, and there’s understanding”, and pointed me at this fantastic war story, which sounds like a Daily WTF candidate to me. I’ve been there in the past, and in my case it was spaghetti Perl I was banging my head against – not pleasant. Still, the whole process of reverse engineering, of picking apart the code slowly, gradually and gently teasing the tangled knot open, can be a wonderful thing in itself. Or it might just turn out that the Mathematica code is clean and easily Haskellised. I doubt it, though, from what I’ve seen of Mathematica. :-) I expect it’ll live in a much lower-level domain than I want to work in, which is, of course, more than half the fun. If I can take an esoteric algorithm in a difficult language and translate it into beautiful and readable higher-order code, that’d be something worth writing about. So, watch this space (but don’t, of course, hold your breath).

In the mean time, as I said, the search is turning up all sorts of cool stuff. We present:

Another version of the algorithm, by Joe McMahon, in OS X/AppleScript discussed here, here & here (code via that last link). Interesting mention of ChucK too, which looks quite shiny (though again, maybe a little low-level for my taste).

Prototype chime generator diagram – I would wear a t-shirt with that on it.

An interview with Alan Kay from two weeks ago, which also points at the Kay-says-it’s-a-must-read Doug Engelbart essays (and no, I must confess, I hadn’t heard of Engelbart).

Pop culture lives in the present; it doesn’t really live in the future or want to know about great ideas from the past. I’m saying there’s a lot of useful knowledge and wisdom out there for anybody who is curious, and who takes the time to do something other than just executing on some current plan. Cicero said, “Who knows only his own generation remains always a child.” People who live in the present often wind up exploiting the present to an extent that it starts removing the possibility of having a future.

Stewart Brand meets the Cybernetic Counterculture – whee, the 60s!

(These last two via this del.icio.us page on “admirable people”.)

Muhammad Yunus – Nobel Lecture: Poverty is a Threat to Peace

Awe inspiring.

Ninety four percent of the world income goes to 40 percent of the population while sixty percent of people live on only 6 per cent of world income. Half of the world population lives on two dollars a day. Over one billion people live on less than a dollar a day. This is no formula for peace.

Poverty is the absence of all human rights. The frustrations, hostility and anger generated by abject poverty cannot sustain peace in any society. For building stable peace we must find ways to provide opportunities for people to live decent lives.

Today, Grameen Bank gives loans to nearly 7.0 million poor people, 97 per cent of whom are women, in 73,000 villages in Bangladesh. Grameen Bank gives collateral-free income generating, housing, student and micro-enterprise loans to the poor families and offers a host of attractive savings, pension funds and insurance products for its members. Since it introduced them in 1984, housing loans have been used to construct 640,000 houses. The legal ownership of these houses belongs to the women themselves. We focused on women because we found giving loans to women always brought more benefits to the family.

In a cumulative way the bank has given out loans totaling about US $6.0 billion. The repayment rate is 99%. Grameen Bank routinely makes profit. Financially, it is self-reliant and has not taken donor money since 1995. Deposits and own resources of Grameen Bank today amount to 143 per cent of all outstanding loans. According to Grameen Bank’s internal survey, 58 per cent of our borrowers have crossed the poverty line.

eBay architecture notes

Quite interesting rough notes on eBay’s architecture – (horizontal) scalability is the watchword, with J2EE on Oracle being the central technologies. Interesting (but not entirely surprising) to see that most of the work is done application-level [raganwalk].

Spamboland

Curses – the good name of the gimbo.org.uk domain is being sullied by spammers.

Today I found about 200 “Mail delivery failure” reports in my gimbo.org.uk “catchall” mailbox. It looks like the spammers are abusing me indirectly, in a way which can’t be stopped. (Though I can fairly easily ignore them, tbh.)

Since I own the gimbo.org.uk domain, I get to look after any email sent to that domain. There are a few boxes set up, but if you email, say, randomgibberish@gimbo.org.uk (for which there isn’t a mailbox set up), it’ll fall through to a “catchall” account. This is incredibly useful for, eg, signing up to websites. I don’t need to re-use a “real” email address, I can just use something_appropriate@gimbo.org.uk. If that site ever sells on that address and it starts getting spam, I can filter it easily. Nice, no problemo, etc.

Unfortunately, this means that if anyone sends you an email with a forged reply address of (say) ArchieGorney@gimbo.org.uk, and you bounce it (because it’s obviously spam, or the recipient address doesn’t exist), your bounce notification ends up in my inbox.

It appears that some spammer has started using gimbo.org.uk addresses for this purpose. I wonder if it’s someone I know having a go at me. Possible, but unlikely (I guess). Occam’s Razor says it’s probably just my random bad luck today. I wonder how long it’ll last… I don’t think there’s anything I can do about it, unfortunately… Ah well!

Later… TR suggested I was being Joe Jobbed, which I agree is possible. The profile of the spam is “normal contemporary spam”, however (ie nonsense text and attached gifs actually selling something), which perhaps doesn’t fit the Joe Job profile. *shrug*.

The man with the van

This just in: Brandon Bird is still a genius. (Damn right he is.)

Bee girl alive and well and living in the front bedroom

Wow… The Blind Melon bee girl (or someone claiming to be her) has sent a postcard to Postsecret. Apparently she’s 18 and still trying to find where she belongs. She shouldn’t worry; I’m 32 and only just starting to work it out, I think.

(I hope that permalink remains valid – in the past, Postsecrets have been impossible to link to effectively once they fell off the front page.)

Tags working again

Tags in Gimboland were broken. Now they’re fixed. That is all.

Spam problem seems to have resolved itself

The spam issue I reported a few days ago seems to have gone away (for now). I suppose they used gimbo.org.uk addresses for “one run”, and then I saw the undeliverable reports petering in over the next few days (though mostly on that first day), and now they’ve stopped. Still, it could start up again any time.

My ISP’s advice was to disable the (otherwise very handy) “catchall” account; I can still create “one use” addresses my setting up an alias/forward (easily via their web admin interface), but that’s still gonna be a PITA (I’ll be bound to miss some, too). Why is the world full of people who insist on making things shittier for the rest of us? The catchall is really handy but now I’m told I can’t use it because of some asshat trying to sell viagra? It ain’t right.

“Somebody somewhere has got to be high”

PHP programmers: did you know that the name of your favourite language actually stands for Pot Head Pixies? All starts to make a bit more sense now, eh?

Callington museum goes up in flames

Sad day: Mum rang earlier to tell me that Callington museum caught fire this morning. Sadder still, I haven’t ever visited it – for all those years since it opened, I’ve always postponed going because “it’ll be there when I get round to it”. Well, too late Gimbo. Lesson in there for all of us, I’d say.

(Callington is my home town, btw.)

Update 2007-03-05: Dad sent me the following photo:

Callington Museum (burnt out)

Apparently he spoke to one of the firemen, and (I quote) it would appear most of the artifacts were saved, with only smoke & water damage. Cause was apparently an electrical fire at the control box.

Threads should pass messages, not share memory

Highly recommended reading for any of my students out there: a comparison of message-passing concurrency vs. shared-memory concurrency, with a healthy dose of historical perspective. The author introduces Erlang-style concurrency in a Java-ish setting, and does so quite well, to my mind.

Reading the introductory remarks about candidates in interviews, I was pleased, nay, smug to realise that – albeit inadvertantly – I came to multi-threaded programming via the message-passing route, and would probably have made him quite happy if he’d interviewed me. Back when I worked at Frontier I did my first multi-threading work, in Python, and made heavy use of its excellent Queue class for inter-thread communication. Queue provides a thread-safe message passing mechanism, hiding all the nasty details of locking from me, which was exactly what I was looking for. My threads shared almost no state, and what state they did share was mostly Queue objects. They communicated by passing messages through Queues (messages could be anything, and often were), and it was all lovely and clean.

Why did I go down that route? No genius; I just got lucky (yeah, lucky in that I was using Python not Java or C or C++). I had excellent advice from the good folk on comp.lang.python/python-list: this was the way to proceed. Of course, looking back I realise many of these guys knew all about message passing vs shared memory, they knew about Erlang, they knew about Haskell, hell some of them even knew about Lisp. A community as smart and welcoming as that one is a precious resource for a budding programmer.

Anyway, this led to two strongly noticeable results.

First, my code worked well, and didn’t suffer from mysterious hard-to-debug race conditions, etc. It “just worked”, as is often the way with Python.

Second (confession time), I didn’t actually learn properly about semaphores, monitors, shared memory concurrency and all its ridiculous fiddly baggage until I came to teach them in the Operating Systems module at Swansea! By then I’d already formed a strong sense that high-level languages (and Python in particular) made life so much sensibler, so the shared memory stuff slotted quite readily into the mental space of “low level stuff which has to be understood, but is best done by software not humans” (like much of that module).

I was discussing this whole issue with one of my students earlier in the week. If she closed her app’s main window while a worker thread was running, the program would exit uncleanly. This being Python, it was nothing more drastic than an exception/traceback, but she found this properly displeasing and wanted to clean it up (good, I said). It turned out that the main thread wasn’t waiting for the worker to finish: it exited immediately, cleaning up all data, including data the worker was trying to update. Hence, exception city. I showed the simple fix (make the main thread wait for the worker to finish, using a shared boolean “I’m not dead yet” variable), but then I tried to persuade her that message-passing concurrency was the way to go for all inter-thread communication. Even, said I, right down to the (frequent, many) interface updates caused by the worker thread. That is, I suggested, the worker shouldn’t update the GUI component directly, because the GUI is owned by the main thread. Instead, the worker should pass messages to the main thread telling it what updates to perform, and the main thread should poll for these messages and do the updates. I don’t think I sold her on it entirely, but maybe I planted sump’n.

(Caveat: yes, if performance really matters – eg you’re doing volume graphics – this may be poor advice. For the other 95% of us, however…)

Shiko at Mumbles St David’s Day Parade 2007

Drumming in public last Saturday was super ++fun.

The “Mumbles St David’s Day Parade” turned out to be somewhat smaller than I’d expected, but was excellent, nonetheless. It consisted of a group of primary school children in a Chinese-style dragon (red, of course), Shiko drumming alongside them, and another group of primary school childen behind, dancing and holding aloft a banner (which I didn’t actually read). About 50 people in total, I guess? It was enough, anyway, and a good crowd turned out to watch us.

The dragon looked like this:

Parade dragon (thumbnail)

Pretty good, eh? There are more photos on the all new Shiko flickr space.

The parade started in the quarry car park, crossed the road to get to the sea front, went south for maybe a couple of hundred metres in front of the grassy bit, then back north along the road to the mini-roundabout, and up Newton Road past the shops and the Ostreme Centre as far as the church at the top. We should have ended up in the school grounds opposite the church, but apparently nobody knew the combination lock for the gate! There was a moment of faff before plan b, and a diversion over the road.

This was the first time I’d drummed and walked at the same time. We all had light drums, mine one of these, donated to Shiko by Abbie, sadly missed since she disappeared around the world on a yacht. Although you can’t see it, I carried it via my climbing harness & a crab, as opposed to the more traditional sling (eg Chris, on the left). I wasn’t sure how well that was going to work, but it was great! I felt very much the modern climbing djembe innovator.

So yeah, it was a lot of fun. Lots of enthusiastic spectators, bemused shoppers & Mumblians, and an interesting mix of car drivers. The downhill traffic was halted all the way down Newtown Road (the uphill side was kept clear, halted further back), and the cars contained, I’d say, a 70/30 mix of people who were lovin’ it, happy to be in the middle of this strange unexpected happening (especially if they had kids, as you can imagine), and scowling men on their own in large cars trying to get to town and Do Important Things. I took particular care to play enthusiastically at these people, and make it as clear as possible that I was having a damn good time on this gorgeous sunny day, even if they weren’t. :-)

In other news, chor and indeed tle.

Two future Shiko gigs

Sometimes people complain to me that I don’t tell them about Shiko gigs far enough in advance (typically I forget about it until the day before, or the day after). Well, let’s do something about that, and put some gigs on the long-range radar for anyone who’s interested.

First, on Saturday 19th May, there’s a benefit gig in Cafe Cesso (?) at the Waterfront Museum, Swansea Marina. This is the cafe at the edge of the museum, with a stage, etc. I think this happens in the afternoon, and there’ll be various people playing, raising money for a project installing wells in Africa. (Novel wells where the pumping is powered by a kids’ roundabout at the top, which leads me to imagine parents swinging whips and shouting “play harder!”, though I’m fairly sure that’s not the actual intent.)

Second, and muchos excitingly, on Saturday 21st July, we’ll be playing at the Bee Hop festival in Dorset, which just looks so cute you could take it home and feed it. This one I’m really looking forward to.

So there you go – no excuses, come and watch! I’m sure there’ll be more cropping up as the summer gets going, and I’ll try to do a better job of mentioning them here. There is, by the way, also a running page of upcoming Shiko stuff on the Shiko site. But anyway.

Get on the nut… foot.

The porn is deleted.

Monad wrangling, and the joy of #haskell

Three days ago, I enthused about the Python community, and what a great help to me they were back in the day.

These days it’s Haskell that has my brain feeling too small, and I’ve just had my first experience of the Haskell community. I installed an IRC client for the first time in four years just so I could log on to the #haskell IRC channel. I’m happy to report that the experience was entirely positive.

For an imperative programmer, learning Haskell is initially hard because you have to stop thinking in terms of issuing instructions which will be performed in order, and start thinking in terms of composing pure functions (which have no side effects) together to Get Things Done. It’s weird at first, but ultimately very powerful, as it lends itself much more nicely to higher-order programming, lazy evaluation, actually composing programs out of reusable parts, etc. I’d say I’m starting to get a reasonable feel for that, although I’ve got a long way to go.

Unfortunately, a little later, you realise that there are cases where you need side-effects (eg input/output), which leads you into this whole sort-of-imperative side of Haskell, at the heart of which lie the hairy monad things. You totally can’t avoid this, because sooner or later you need to do I/O. Monadic I/O (and monads in general) look & feel imperative at first, but you soon hit barriers thinking like that, and ultimately really have to read stuff like The I/O Inside Tutorial, Tackling The Awkward Squad, etc. in order to understand what’s really going on, which is actually really clever, decidedly not imperative, and at some point turns into lambda calculus or category theory (take your pick).

It’s monads that I’ve been wrangling with lately. I’ve been trying to do a fairly simple I/O task: I have some directory containing some files; I want to operate on a subset of the files in that directory, for each of them reading the file and creating some data object representing its contents. The details aren’t important. Doing this in Python (say) is trivial. Doing it in Haskell has had me stuck for nearly a week. :-) I spent all day last Friday working through “I/O Inside”, and now understand monads much better than I did, and maybe half as well as I should (but maybe not even). That was all very informative and educational, but still didn’t answer my problem.

Anyway, long story short, tonight I installed an IRC client, went on #haskell, asked the question, and got an answer immediately and in a wonderfully friendly fashion. Full #haskell chat log for today is here if anyone’s interested, but in essence it turns out that mapM is what I need for this task. Sweet, and actually incredibly simple when you know it. I think a lot of Haskell is like that…

By the way, the #haskell channel has this neato lambdabot running, which among other handy functions, remembers and repeats amusing/apposite quotes when instructed to do so. Given the sad theory geek that I am becoming, this quote it kicked up tonight made me chortle:

Binkley: the sex is all in the operational semantics, denotational semantics only deals with love.

vincenz, 14:41:22

Photo goodies x 3

Some photographic goodness: sleep sequences (no gay couples, I note), lego escher, Leo Sayer (geddit!?).

Tune in

Bash has just played me “Tune In” by Hadouken!. Incredible. I haven’t felt this way since Funky Town. No, wait. Turn The Page.

Parakeets UK

Parakeets in London & the home counties.

One for Rich

Brings a nostalgic tear to the eye, is what it does

What have you been doing? Acting mad.

I know this is nothing new, and I know there are many, many pages like this on t’Internet, but I just wanted to bookmark one for personal future chortle reference, thus: loads of pictures of cats acting mad or looking weird. Often the captions make the picture, though the whole “i’m on yr noun, verbing yr noun” meme gets stretched too far too often, I think. Still, I love cats, I love looking at them, I love laughing at them – so this is pure uplifting fun as far as I’m concerned. :-)

Classics: full speed ahead · your guy · dead of cute · proceed · offline · (original) · fail · charles · askance · thoughts · sup · shoryuken · relevant · rumbled · lion · slippers · trap · danger (how beautiful is that?) · cookie · hats · bat country · richard griffiths · camouflage · schweaty.

RSS feed – don’t miss a kitty!

All about python and unicode

Handy for future reference and pointing confused ASCII-loving students at: all about python and unicode, just the thing to explain the mysteries of unicode in a friendly manner, especially, er, if you know python.

Sayaka

Sayaka – gosh [via Bash].

Surprise Shiko gig: Monday 2nd April, Monkey Bar

Woo. In a surprise move, Shiko will be drumming at the Monkey Bar, Swansea, on the evening of Monday 2nd April 2007. There is, apparently, some sort of African night going on, and since our beats are west African, our beats are invited. :-) Come!

Bash, Singleton Park, 2003

Thumbnail: Bash, Singleton Park, 2003

She so foxy. 4 years ago now, mind! Oh, but still foxy. Don’t hit me, Bash. Ow.

That is comedy.

Come in, number 348, your time will be up in ten thousand years

Woo hoo. I am the 348th charter member of the Long Now Foundation. Among other things, this gets me access to the US premiere of Eno’s “77 Million Paintings”; alas, I’d say the probability of me affording a flight to the USA this year is approximately zero. Ah well.

On the other hand, I don’t really mind. The best thing you can do to protect the environment, as Spencer Beebe says, is stay at home. :-)

There’s no escape

SQL injection attacks in a nutshell.

If only there was a separate radio fee…

Your opinions, please:

As of the 10th of April, the Gimboland household will once again be television-free, and thus free of the obligation to pay for a TV licence. The Gimboland household will, however, continue to love such gems as Late Junction, Rob da Bank, Radio 4 (except the plays, obviously), and the BBC’s online presence in general. All of the above are funded by the licence fee, so the question is: should we in fact continue paying it? I’m half tempted, despite the lack of a legal obligation, simply because I do so value the BBC, in all its commercial-free glory. It has been said by wiser humans than I that the fee is worth it just for Radio 4, and that’s not entirely untrue, I’d say.

Thoughts?

A treat for everyone who prints Gimboland to read on the bus

Sweet. I’ve just discovered the joy of media="print" Cascading Style Sheets. Now if you print (or, yea, print preview) any of the pages on Gimboland, the printed version won’t include sidebar, footer, most of the header, or a comment entry form (if one is present). Tidy!

This is achieved using the strip-it-down magic that is my print.css.

Seems to work great under Firefox. Slightly less optimal under IE7 but hey, who cares? I haven’t tried it with Safari or Opera yet. Any takers?

Kennefoli/Soli for Monkey, 02007/04/02

Kennefoli/Soli djembe patterns for Shiko gig @ Monkey Bar, April 2nd 02007.

Read the rest of this entry »

Yankadi/Macru for Monkey, 02007/04/02

Yankadi/Macru djembe patterns for Shiko gig @ Monkey Bar, April 2nd 02007.

Read the rest of this entry »

Kassa for Monkey, 02007/04/02

Kassa djembe patterns for Shiko gig @ Monkey Bar, April 2nd 02007.

Read the rest of this entry »

Zoetica

Zoetica

Found while rambling. Yowzer.

New Orleans flood warnings in 2001

While going through Gimboland history, I came across this post from 2001, discussing the near-certainty of an imminent catastrophic hurricane/flood decimating New Orleans — less than four years later, along came Katrina. Interestingly, Wikipedia tells us that the population of the city has largely bounced back since Katrina — so expect more of the same in a few years, I guess.

Wasabi — sushi/noodle bar in Swansea

You can now get sushi in Swansea – at last!

A place called Wasabi opened in Uplands a few weeks ago (phone no/address here); we’ve eaten there twice: it did not disappoint on either occasion. Great food, nice decor/atmosphere, loads of cute asian waitresses, plum wine, sake, green tea ice cream (deep fried and not), etc. The first time, I had gyoza, california rolls, and shoyu ramen, which last dish would have sufficed perfectly well alone – huge and delicious, with a soup spoon more like a gently dimpled spatula. The second time, the irresistable gyoza again, and another ramen, this time with spicy beef. My only disappointment here was that it wasn’t spicy enough: I’d hoped for something reminiscent of a spicy beef soup I’d had for breakfast on my last day in Beijing, nearly two years ago. Life continues to attempt to teach me the lesson that things anticipated are rarely as sweet as the anticipation, and I continue to put my fingers in my ears and sing la-la-la.

Anyway, all in all, highly recommended, long overdue, and very welcome.

Weirdly, they seem to have done a really bad job of sorting out an internet presence. On Friday they didn’t even have a Yell listing, though they’ve sorted that out now. (It clearly did no harm to their sales – word of mouth, I assume, assured that the place was packed both times we went.) Furthermore, and quite curiously, the menu sports the address www.wasabi.com, which is (currently) just a placeholder page, and the domain is registered to a PO box in Hong Kong. I guess it could be the people behind the restaurant, but my first thought was that it was just a domain squatter, and that the restauranteurs had made a big blunder, somehow. :-) The email address info@wasabi.com is also on the menu, though, so they really do seem to mean it. It all seems a bit weird, to me — can it really be that the (surely highly desirable) wasabi.com domain is owned by a restaurant in humble Swansea? I could understand it being owned by a chain, but then I’d expect the website to have more than a holding page.

Ah, in true geek fashion, I’ve spent as much of this post discussing domain issues as I did on the food (and the waitresses). Somebody save me, please.

Oooh! In related news, congratulations to Jo, who had her PhD viva on Friday and got through it without needing rescue or anybody getting poisoned. Hurrah for Jo! (And thanks for the spicy beef ramen.)

On banning unnatural practices

Amusing; satirical; makes a good point. [pixi]

A chilled night of African drumming at the Monkey

Oh, hey, the Shiko gig at the Monkey on Monday was fun. It was reeeeaaalllly quiet: probably a quarter of the people there were Shiko people, I’d say. Monday night in Swansea’s bound to be fairly quiet, I suppose, particularly outside term time, plus it was the first night of the new Wales-wide smoking-inside ban. The latter may or may not have been a factor, but it certainly made for strangely smoke-free Monkey experience.

We were there as part of an “African Rhythms” night – basically a couple of guys DJ’ing African music (not the usual Mondo boys, one of whom, Eddie, is also a Shiko’er), and us! As I said, it wasn’t massively well-attended, but that was kinda cool, because it ended up feeling less like a gig, and more like just going and playing together somewhere, but with people dancing. :-) Two people in particular: two girls who do African dancing (they were in the carnival, I remember). We’d prepared three pieces, but in the end only did two of them, and that seemed enough. Later, some random jamming occurred, which was sweet. So, all in all, very chilled, very cool, very much fun.

netrenderer

Handy & cunning: netrenderer: how does such-and-such-a-URL look in IE7? Handy for those of us who avoid Windows like the plague as much as possible…

(And yes, I know Gimboland’s still a bit broken. Ah well.)

How many?

How many software engineers does it take to change a lightbulb?
Just one. But the house falls down.

software engineering proverbs

On lies

Clive James on hoaxes & fraudsters. I’m with him on this one.

Some commentators regard fraudsters as romantic types, more interesting than poor old plodding us. These commentators say that few of these frauds would work without our greed. Perhaps not, but none of them would work without the propensity of the fraudster to lie.

Quite right.

font-family: sans-serif;

I have Firefox configured to not allow pages to specify their own fonts: instead, everything just gets rendered as sans-serif. I do this to make the web more legible.

This morning I realised an unintended consequence: my view of Gimboland differs from everyone else’s! While I was seeing it in beuatiful clean sans-serif, everyone else saw Georgia, or Lucida, or one of a list of several possibilities specified by the style sheet. Not what I wanted! So, for now, I’ve switched Gimboland’s style-sheet to specify sans-serif. To my mind this ought to be nice & clean (assuming your fonts are reasonably sensible); you may of course disagree – do let me know if you care to. And you can, of course, override the font in your own browser if you don’t like it. ;-)

This is, by the way, part of my ongoing effort to make Gimboland look OK across platforms & browsers. I think I’ve sorted out the alignment in the header, and now the only thing to do is work out why the sidebar overflows horizontally under Windows (even in Firefox, I think?).

Playing with sections in Haskell

Consider the function (:) in Haskell…

Hugs> :t (:)
(:) :: a -> [a] -> [a]

So, (:) is a polymorphic function which takes an element of some type, and a list of elements of that type, and returns a list of elements of that type. In particular, it prepends the singleton element onto the list. For example:

Hugs> 'c' : "ello"
"cello"

Now for the fun part.

Hugs> :t ('c':)
('c' :) :: [Char] -> [Char]

Here, we see that ('c':) is a function which takes a list of characters (ie a string) and returns another one. As you might expect, it prepends it with a 'c':

Hugs> ('c':) "ello"
"cello"

('c':) is an example of a section: we “partially evaluate” a function by providing only some of its parameters, which yields a new function. Obviously this is only possible if we have higher-order functions in our language.

We can take the section “on the other side” of the :, and define the function which takes a character and prepends it onto the string "ello"

Hugs> (:"ello") 'c'
"cello"

What’s its type?

Hugs> :t (:"ello")
flip (:) "ello" :: Char -> [Char]

Interesting. The type is as we would expect (Char -> [Char]), but what’s this flip thing?

Hugs> :t flip
flip :: (a -> b -> c) -> b -> a -> c

So flip takes a function with type signature (a -> b -> c) and returns an equivalent function with type signature (b -> a -> c) – OK, simple enough. But why did hugs introduce it here, I wonder, though, why didn’t hugs just do what ghci does, and say:

Prelude> :t (:"ello")
(:"ello") :: Char -> [Char]

? I say: shrug.

In other news, I’ve just discovered Neil Mitchell’s Haskell blog. I met Neil at BCTCS 05 in Nottingham, and again at BCTCS 06 in Swansea (though at that time I felt like I was moving away from TCS). He’s a thoroughly nice bloke, and clearly knows considerably more about Haskell than I do, thus, a good blog to find. I enjoyed:

I think I was quite a bit less successful at explaining this one. The only way you can show sequence is not necessary is by writing an OS, a compiler, a web server etc in Haskell – all of which have been done. Unfortunately I only had a small piece of paper so couldn’t write any of those.

Neil Mitchell, “Describing Haskell to an Ada programmer”.

(The section saga continues here.

Installing Haskore (Haskell/CSound) under FreeBSD

I’ve spent most of today looking at Haskore, which appears to be the most well-developed kid on the block for doing Csound type things using Haskell (and indeed, doing music type things using Haskell). Here are my notes on finding/installing it, which experience wasn’t completely straightforward…

Read the rest of this entry »

All known bodies in the Solar System larger than 200 miles in diameter

Here’s a super-cool (and very very large) image: All (known) bodies in the Solar System larger than 200 miles in diameter. Via the recently unveiled Long Now blog.

I received my Long Now charter membership card this morning. The envelope was beautiful – square, dun cardboard, a big Long Now logo, pretty American stamps, a San Francisco postmark, understated address labels… I was really impressed. Unfortunately, I was much less impressed by its contents, my “limited edition, individually numbered, stainless steel Charter Member card”. Flimsy (in fact, slightly bent), and fingerprinted, it really didn’t have the expected feel of, well, longevity. I was, at least, expecting something thicker and less bendable. :-)

Stop. Nuptials time!

Oh wow. According to the all-knowing Wikipedia Corey Feldman‘s second marriage was offociated by MC Hammer! I think that’s the best thing I’ve heard all year.

(Why am I Feldman-surfing? Last week, Bash & I watched The Goonies. I hadn’t seen this movie since its original release, when I went with my mum to see it at a cinema in Aylesybury. That must have been late 1985, and I’d have been 11 years old. Fun film, good to see it again, but made me wonder whatever happened to ol’ Corey. Well, now I know. :-) )

Boy falsely jailed for bomb threat for 12 days due to DST changeover

Boy falsely jailed for bomb threat for 12 days due to DST changeover. (URL in RISKS story doesn’t seem to work? Lots of google hits though, many of which have the same content and no attribution, sadly.)

Webb gave an insight into the school’s impressive investigative techniques, saying that he was ushered in to see the principal, Kathy Charlton. She asked him what his phone number was, and, according to Webb, when he replied ‘she started waving her hands in the air and saying “we got him, we got him.”’

‘They just started flipping out, saying I made a bomb threat to the school,’ he told local television station KDKA. After he protested his innocence, Webb says that the principal said: ‘Well, why should we believe you? You’re a criminal. Criminals lie all the time.’

Dorks. Dorks in positions of authority, more to the point.

Blogging as writing notes for public consumption

The Reason for Blogging, or rather Josef Svenningsson‘s reason for blogging – but I agree with what he says. In fact, I was only reading that post because he had commented on an earlier post of mine – a post which someone (ooh, dons)has submitted to programming.reddit.com and which was hence received some attention. As such, the following particularly resonated:

But then, why do I blog, as opposed to just writing on a piece of paper? The reason for me is that the possibility that someone might read what I write helps me write. Blogging means that I have an (at least potential) audience which I can target my writing towards. This (perhaps imaginary) audience is very important for me, I wouldn’t be able to write without it. I simply can’t motivate myself to write only for my own sake.

Absolutely. That post of mine about sections started with me just playing around for my own sake, investigating something interesting I’d just come across for the first time. I like to make notes (my memory is lamentably poor), and a blog is a nice way to do that; but as Josef says, once you commit to publishing, you think more carefully about what you write, how it’s structured, etc. Of course, I’m fairly used to writing (sometimes extensive) notes for semi-public consumption in my work, but a blog is nicer than a lecture in that anyone can leave comments and expand my understanding. That happens in lectures sometimes, but rarely, and almost never with random Haskell experts from all over the world. :-)

Another goodie of Josef’s: yak shaving. Yep, been there.

The Joy of Grothendieck

A name I’ve come across in my work on hets is Grothendieck. In a great example of Wikipedia cascade, someone on #haskell this morning mentioned the programming language Joy (which looks pretty cool), which led to the page on monoids, which led to the page on Grothendieck groups, which led to the page on Grothendieck himself, who a) also looks cool, and b) “gave lectures on category theory in the forests surrounding Hanoi while the city was being bombed, to protest against the Vietnam war”. Respect.

More playing with sections (and flip) in haskell

Last week I wrote about sections in Haskell, and discovered flip. Today I hit upon a problem which got me thinking about them again, leading to one of those wonderful moments when Stuff You Just Learnt turns out to be exactly what you need to solve the problem you’ve got right now. (Then you blog about it and find an Even Better Way, as it turns out.)

I’ve been writing some file-manipulation code, and along the way had written the following function:

-- | Check if a given string (subject) ends with another (target).
endswith :: String -> String -> Bool
endswith sub tgt = drop (length sub - length tgt) sub == tgt

(Actually I’ve forgotten now whether I wrote this myself or found it somewhere, but it’s clearly not a new problem. If anyone knows a source for the above code, please do tell so I can attribute it. Anyway…)

So then you can do:

*Ew> endswith "banana" "na"
True
*Ew> endswith "banana" "moo"
False

So far so good. Later, I had a list of filenames, and I wanted to filter it down to just those ending with a particular suffix. Initially, unthinkingly, I tried:

*Ew> filter (endswith "na") ["banana", "cat", "iguana", "mastodon"]
[]

Spot the cunning use of a section. Actually not so cunning, as it turns out – the empty list is not the result I was hoping for! The problem is that the first parameter of endswith is the subject (the string to be searched) not the target (the string to be searched for) so the section (endswith "na") is not the function which checks if a string ends with “na”. It’s the function which, given a string, checks if “na” ends in that string:

*Ew> (endswith "na") "banana"
False
*Ew> (endswith "na") "a"
True
*Ew> (endswith "na") "na"
True

My first reaction was to just swap the parameters around. Let’s call this version endswith'. It’s exactly the same as endswith except for the parameter order:

endswith' :: String -> String -> Bool
endswith' tgt sub = drop (length sub - length tgt) sub == tgt

Then (endswith' "na") is the section I’m looking for, and in particular works as I want under filter:

*Ew> (endswith' "na") "banana"
True
*Ew> filter (endswith' "na") ["banana", "cat", "iguana", "mastodon"]
["banana","iguana"]

I only use endswith in a couple of places, so this change was totally viable. Lesson learnt (or so I thought): you have to think carefully about parameter order when writing functions, because some sections will be more useful than others. Obviously with endswith, the section with bound target is more generally useful than the section with bound subject.

Later, I realised this lesson is bogus, or at least not very strong. I mean, there’s probably something in it, but I didn’t actually have to swap the parameters to make my filter work. That’s exactly what flip does:

*Ew> ((flip endswith) "na") "banana"
True
*Ew> filter ((flip endswith) "na") ["banana", "cat", "iguana", "mastodon"]
["banana","iguana"]

What’s going on here? (flip endswith) is endswith with the parameters flipped. Thus ((flip endswith) "na") is exactly the same function as (endswith' "na") which, as we saw above, does what I want. So in the end, I didn’t have to replace endswith with endswith' to get my filter to work – I could just flip it. Bearing in mind I didn’t even know flip existed a week ago, I felt pretty smug to realise this. :-)

The next question on my mind is what you might call “generalised sections for multi-parameter functions”… If I have a 4-parameter function and I want to build a section where 2 of the parameters are bound (say), and it’s not the first two, how do I do it? Stupid toy example:

f :: Int -> Int -> Int -> Int -> Int
f a b c d = a + b + c + d

Can I make a section representing f with b fixed at 3, and d fixed at 5, say? I know I can do this:

g :: Int -> Int -> Int
g a c = f a 3 c d

but can we do it inline, as it were, as with the section approach? Answers on a postcard to the comments page, please! :-) I suspect currying‘s going to wind up in there somewhere…

Postscript

That’s all I originally intended to blog about; when chasing links to support this post, however, I read this and learnt two more interesting things.

First, someone has, of course, solved this problem already, and I can just use isSuffixOf to get this job done (Strings in haskell are Lists of Chars). So now I get to throw endswith away – w00t, less code. A fundamental lesson: once the language starts making sense, learn what’s in the standard libraries!

Second, thanks to Haskell’s ability to deal with functions in infix form, the section (isSuffixOf "na") can also be written as ("na" `isSuffixOf`) which is, I suppose, more natural (provided you’re not scared off by the backticks, which I’m trying not to be). Then we have:

*Ew> filter ("na" `isSuffixOf`) ["banana", "cat", "iguana", "mastodon"]
["banana","iguana"]

Sweet.

Parametric Polymorphism and the Girard-Reynolds Isomorphism (video)

Great stuff: Parametric Polymorphism and the Girard-Reynolds Isomorphism [reddit] – a 30 minute Google Tech Talk by Phil Gossett. A really clear presentation covering a number of interesting topics, with a very convincing historical sweep. Certainly cleared a few things up for me, at least. His response to the last question is really more Hindley-Milner than Girard-Reynolds, mind. ;-)

Update 2007-04-23

Phil Wadler comments.

Bread lung

Bread lung.

Python-style string split (and strip / trim) in Haskell

Haskell’s an incredible language but I’m repeatedly struck by (what I perceive as) gaps in its standard libraries (though as proven yesterday I could know them better). For example, there aren’t any cross-platform file path manipulation routines in the style of python’s os.path (though not for long, thanks to Neil Mitchell). Another lacking area seems to be string manipulation.

Today, I needed to split a string up according to some token, where that token is itself a string, not a single character. Thus, a split in the style of python’s strings’ built in split() method. That is, I wanted to be able to do this:

*StringSplit> split ", " "one, two, three, four"
["one","two","three","four"]
*StringSplit> split "an" "banana"
["b","","a"]

To my amazement, this isn’t a standard library function, and I couldn’t find hundreds of examples of how to do it via google. I couldn’t even find one! I could find a number of variants where the token is just a single Char, usually utilising takeWhile and the like. Gladly this led me to a reasonable (I hope) solution. This example splits on Chars but in the comments I was introduced to unfoldr, which looked tantalisingly close to what I wanted. All I needed to do now was write the function unfoldr calls. About half an hour and much hoogling later, hey pesto:

module StringSplit where

import List

-- | String split in style of python string.split()
split :: String -> String -> [String]
split tok splitme = unfoldr (sp1 tok) splitme
    where sp1 _ "" = Nothing
          sp1 t s = case find (t `isSuffixOf`) (inits s) of
                      Nothing -> Just (s, "")
                      Just p -> Just (take ((length p) - (length t)) p,
                                      drop (length p) s)

All of the complexity is in sp1 (short for “split once”), which performs a single split. sp1‘s type is String -> String -> Maybe (String, String); the section (sp1 tok) then has the right type for unfoldr (sections just seem to be cropping up everywhere lately, eh?). The point of sp1 is to split s at the first occurrence of t. It does this by using inits to build all prefices of s and finding the first one having t as a suffix. If found, it splits the string at the token, throws the token away, and return the (before, after) pair. If the token isn’t found, it just returns s paired with an empty string; that gets passed by unfoldr to sp1 on the next call, causing sp1 to return Nothing, causing unfoldr to finish – whew!

That last bit sounds a bit complicated, but it was necessary to fix a bug present in my first implementation of sp1:

sp1' t s = case find (t `isSuffixOf`) (inits s) of
               Nothing -> Nothing
               Just p -> Just (take ((length p) - (length t)) p,
                               drop (length p) s)

This misses the final substring, so split "n" "banana" would return ["ba", "a"] instead of ["ba", "a", "a"]. Hence the whole empty string/Nothing/stop machinery.

I could not have written this code two weeks ago, I think. Thus, I’m sure there are better ways to do this, and would love to hear them – and any criticism. I was a wee bit worried about using inits and find in this way for finding a substring (no standard substring function?). Haskell’s lazy nature ought to help me here though: inits will only build the entire list of prefices if t isn’t in s at all. For anything I’m planning to use this for, it ought to be fine; it’s probably not the best general way to do it though.

Postscript

For good measure, since I had to implement it later that evening, here’s a string.strip() (aka trim):

strip :: String -> String
strip s = dropWhile ws $ reverse $ dropWhile ws $ reverse s
    where ws = (`elem` [' ', '\n', '\t', '\r'])

I’m particularly proud of the ws part. :-) Look at me, all full of Haskell pride. ;-)

Postpostscript

I realised I can generalise split beyond strings, to work on lists of anything of class Eq:

-- | A function inspired by python's string.split().  A list is split
-- on a separator which is itself a list (not a single element).
split :: Eq a => [a] -> [a] -> [[a]]
split tok splitme = unfoldr (sp1 tok) splitme
    where sp1 _ [] = Nothing
          sp1 t s = case find (t `isSuffixOf`) $ (inits s) of
                      Nothing -> Just (s, [])
                      Just p -> Just (take (length p - length t) p,
                                      drop (length p) s)
*StringSplit> split [2,3] [1,2,3,4,3,2,1,2,3,4]
[[1],[4,3,2,1],[4]]

A few photos of Familia Gimboland

From Bash, a great portrait of my father and I:

Andy and Terry

… and from Gimbo, three pictures of our cats:

Fudge, resplendent Kisses and disdain Eye to eye with Sophie

Bonus from Bash, just ‘cos it made me say “wow”:

Heart, take flight

Church’s Thesis and Functional Programming

(I realise it’s gone very “theory of programming languages” round here lately. Don’t worry, I’m sure I’ll have something else to talk about soon.)

Church’s Thesis and Functional Programming, a lovely little paper by David Turner (he of SASL & Miranda fame). Like the Google Tech Talk I mentioned a couple of days ago, it’s big on unifying historical perspective, which is a welcome change from most of the papers I see on these topics, which seem to assume you’ve either read all the papers they reference (recursively), or you’re about to. ;-)

It’s a veritable concucopial tour of TPL: Church’s thesis; the equivalence of lambda-calculus, Turing machines, and recursive functions; how the halting problem fits into that; the lambda calculus; Church-Rosser; strict vs. non-strict; combinatory logic; typed lambda-calculi; implementation of lazy FP (exemplars Miranda & Haskell); domain theory; FP without general recursion; Curry-Howard; Martin-Lof; and a hint of abstract Stone duality (which always makes me think of Father Stone). Seriously, if you’re at all interested in theoretical computer science, you should definitely take a look at this. I started losing the thread in the final section, but loved the rest and, I think, learnt quite a bit – mainly how various bits fit together; like joining the dots on a map.

(Ooh. Strachey coined the term “syntactic sugar”.)

xmonad – a minimal window manager in Haskell

Wow, synchronicity. Yesterday I was browsing dons‘ space (because I spotted something like my string split in his h4sh stuff), and was very intruiged to spot xmonad. It’s another lightweight tiling window manager in the style of ion, wmii, dwm, and appears to be most like dwm in fact. It’s written in Haskell. Today, they announced the 0.1 release, so I just had to take a look.

It wasn’t too hard to install… A few dependencies, but all handled by Cabal, tvm. Since I already use wmii I didn’t find the keybindings too alien, and of course I can configure them at leisure should I wish to (and unlike dwm, it apparently doesn’t need a recompile when the config changes). Its (dwm-like) style of window management doesn’t sit completely easily with me, I have to say. I guess I’ve got used to the wmii way. I’m going to give it a go for a while, though, as I have an inkling I could grow to love it. It’s very snappy.

I miss three things.

First, a statusbar visible on every workspace. I just want to be able to see some things at a glance, always. Examples: time/date; battery life and charging/discharging status; xmms time remaining and shuffle status. Looking at the mailing list archives, it smells like there is or will be room for user-supplied extensions, and I guess this is an obvious candidate. If I don’t write it I’m sure someone else will. :-) Related to this is the ability to name workspaces, so they’re not just 1-9 – not critical but very handy. I don’t care about the whole tagging thing wmii does – I just want named workspaces as an aide memoir in the statusbar. “Ah yes, workspace 6 is hets.” That kind of thing.

Second, and routable-around: floating/unmanaged workspaces. Tiling/management is great 95% of the time, but sometimes it’s just a pain. The Gimp is the main culprit here, with its myriad windows of joy, but there are other cases. Xnest is probably the answer here. Here’s a little script to run an embedded icewm session:

#!/bin/sh

Xnest :1 -name "Xnest" +kb -ac -geometry 1280x800 &
DISPLAY=:1
xsetroot -display :1 -solid black &
exec icewm

Third, I miss my window bars (the bits along the top where most wms put close buttons, etc.). Primarily I miss them in my terminals, where they report the full path of the current working directory. Another handy at-a-glance feature. I guess I can live without this though, for the sake of precious screen space. :-)

None of these are killers/blockers, though, so I’m definitely going to give xmonad a serious go.

Don’t kiss in public in India?

Wtf? Warrant issued for Richard Gere’s arrest in India following public kissing. Kissing on the cheek, mind you. An “obscene act”, apparently – it’s official!

Public displays of affection are still largely taboo in India, and protestors in Mumbai (Bombay) set fire to effigies of Gere following the incident.

Wtf? They burnt effigies of him? For a bit I wondered if the anger was directed solely at him. Apparently not.

… while protesters in other cities shouted “death to Shilpa Shetty”.

Here we have actual human beings, calling for the deaths of other actual human beings, because they kissed in public? Ye gods and little children, will the insanity of men never cease?

Haskell packages gotcha: global vs. per-user package databases

This morning, I was having a problem involving Haskell’s Cabal build system. Since it’s something which could conceivably affect others, and since googling on the error text didn’t help me, I’m going to report my experience for the benefit of future travellers/googlers.

I was trying to (re)build xmonad, and got the following error:

[gimbo@orb xmonad] runghc -v Setup configure 
   Could not find module `Distribution.Simple':
       Use -v to see a list of the files searched for.
Read the rest of this entry »

My hovercraft is full of eels

Here’s that well-known phrase “my hovercraft is full of eels” translated into more than sixty languages [reddit].

Also, I can flare my nostrils at will

Something to remember next time I’m applying for a job.

Primes one-liner in Haskell – oh my!

mux on #haskell pasted what is perhaps the most beautiful code I’ve ever seen in my life:

      <mux> > nubBy(((>1) .) . gcd) [2..]
<lambdabot>  [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...

(Number two in an ongoing series of jaw-dropping Haskell one-liners which began with the fibonacci series.)

A pragmatic look at monads in Haskell

(Within an hour or two of publishing this, it was pointed out to me that this talk is really about the IO monad rather than monads in general, and that in particular the assertion that a monad represents a computation which performs a side-effect is not, in general true. A nice example is the Maybe monad. So a better title for this talk is “A pragmatic look at monadic I/O in Haskell”.)

A pragmatic look at monads in Haskell (PDF, 293KB) – slides from a talk I gave last Friday in Swansea University’s Computer Science department, as part of our “No Grownups” series of non-research talks given for and by postgraduate students.

The aim of the talk was to explain monads to a non-expert (and, largely, non-Haskell-programming) audience: why do we have them, what problems do they solve, and how are they used? The approach is pragmatic in that the talk explicitly does not go into technical details, instead focusing on a broad understanding, and on some specific useful “rules of thumb” for programming with monads in Haskell. I don’t claim to be an expert on monads or to have produced a talk which is authoritative or even necessarily completely correct. I do hope to have produced something reasonably comprehensible and useful, however. I would welcome any feedback, comments, corrections, clarifications, etc.

The talk was filmed, but I don’t know if my delivery was good enough to warrant putting it online. :-) Let me know if you’re interested. The post-talk discussion was quite useful, so it might be worth it for that. In particular, there was a question about when exactly the “non-purity” happens – when does referential transparency go away? My answer was that it happens when it needs to (ie when the result is required) and that yes, obviously somewhere there is some code which isn’t pure Haskell and which is doing the impure operation – eg an operating system call. Markus opined that a big part of the point of monads is to give us a clear indication, in the type system, that an operation is impure and thus, in some sense, unsafe/not nice. I thought that was a good enough point that I’ve since added a bullet saying that to the talk – but that’s the only addition I’ve made before publishing.

Background/reference material: A History of Haskell: being lazy with class (historical context), monads @ wikibooks (the nuclear waste metaphor), IO inside: down the rabbit’s hole (probably the point where I started understanding monads), rules for Haskell I/O (not an influence, but something with a similar flavour which I saw when I’d nearly finished), do-notation considered harmful (desugaring), monads on the unix shell (just because the dirty string “dramatisation” is so great).

Shiko live! This Saturday and next Saturday!

Gig-tastic… Shiko will be drumming at 5pm this Saturday (19th May 2007), at Coffee Cesso, next to the Waterfront Museum in Swansea Marina. We’ll be playing as part of a charity fundraiser for wells in Africa, so come along, listen to some good music, and give generously! It looks like a good event – from 12 noon until 7pm it’s free (fingers crossed for good weather so we can play outside), then from 7pm to midnight it’s ticketed (a tenner each) but with some pretty good local bands, I’d say. More details here. While Shiko gigs are usually “unpredictable” in terms of timing, we’re assured that 5pm really is our slot, and it really will be 5pm not, say, 5:30. So don’t be late!

Then, the following Saturday (26th May 2007), we’ll be playing again, at the Monkey, on the wonderful Mondo world music night. Woo! Heaven only knows what time we’ll be playing at this one. :-)

Come!

Salsa dancing from Paviland Cave to Rhossili

The Venn diagram of my friends includes a number of sets. “Computer Scientists” is an obvious one. Less obvious is “German”: since coming to Swansea I’ve made a lot of friends who are either German, work in the German department, or are buddies with people who work in the German department. This is probably mainly due to house-sharing with a lovely German, Barbara, for the first year I was here. Well, of late it’s become clear that many people in or close to that set are also in “Salsa dancers”. I recently realised that my colleagues Ben & Parisa form the intersection of “Computer Scientists” and “Salsa dancers”. There was even a rumour that Markus might conjoin all three sets – alas, not yet.

Still, it became increasingly clear that some kind of cosmic conjunction was underway, and Something Had To Be Done. So we’ve done two things.

First, a couple of weeks ago, sixteen of us went for a big walk on the Gower, which proved to be something of a Meeting Of Sets. Bash & I had planned to go check out Paviland Cave with our friend John since last autumn, and finally managed to set a date. Somehow, over the fortnight leading up to the day, we managed to invite a further thirteen people between us – a lovely mish mash of computery types, visitors from other shores, and sexy salsa dancing girls – with at least one person in all three categories.

It was a great day – a really gorgeous walk with some great people, blessed with superfine weather, a taste of adventure, and a nice pub meal at the end. I made a map of the route we took via google maps (with some notes). Parisa took some great photos, including one of me climbing the rocks towards the cave (another), though at times I wished I’d bowed out gracefully at this point. I did make it to the cave in the end, one of the six of us who did, where I took these photos:

The mouth of Paviland Cave Inside Paviland Cave, looking out The view from Paviland Cave

So, yeah, all in all, a great day, and a highly recommended excursion.

The second thing we’ve had to do is, of course, give this salsa dancing lark a try. I was resistant to this for quite a while, on the grounds that I had the prejudice that it’s something thirty-something yuppies do as a substitute for actually having fun. However, at a recent night at the Monkey I got dragged onto the dancefloor by a recently-returned-from-Mexico drumming compadre, and realised the point of salsa: dancing close to girls. Aha. Not actually a substitute then, but the genuine article – even if I am a thirty-something (I don’t think I’m upwardly mobile enough to count as a yuppie).

So we went to a beginner’s class at Mambo last Friday and Had Lots Of Fun. It was easy enough to get, but new and difficult enough to not do well, and very hot and sweaty, and full of a big mix of interesting looking people. A good way to spend a Friday night, for sure. Thus, watch this space for more salsa musings as I learn my steps. One thing I’ll say: I think the drumming has definitely improved my sense of rhythm, and my ability to learn/remember sequences of actions to perform with my limbs. Ain’t brains wonderful?

On Belgian Beer

On Belgian Beer.

Jenny had a mouthful of Carillon gueuze – one of the most exalted blends – at a bar on Friday lunchtime, and she looked at me in horror. “I suppose it’s meant to taste like that,” she said. “Yep,” I replied. “It’s not for me,” she said. I took a sip. I could see exactly what she meant. It was like an wildly unsuccessful stab at a Lithuanian salad dressing. But… I had to keep ordering gueuze, where’er we went.

Ask Gimboland: web hosting recommendations?

I want to move gimbo.org.uk to a different web hosting provider. Got any recommendations? (Particularly good UK ones?)

From day one, I’ve been with webquarry; I’ve been happy until recently. Now I’m unhappy because their MySQL server goes offline for 15 minutes every day for backup, taking Gimboland with it (I didn’t notice until I switched to WordPress, because my pages used to be static), and because they’ve just disabled catchall email accounts (for, eg, randomnonsense@gimbo.org.uk) without telling us. I understand the rationale for disabling these, but having to work out ourselves that it happened has been stressful and costly, both in time and money (business lost).

I need to host 4 domains (gimbo.org.uk, gimbo.co.uk, andys-trek.co.uk, basheerakhan.com – with gimbo.co.uk just aliasing gimbo.org.uk); I need email and webspace on each of these; I need ssh access; I need MySQL databases; I need all the obvious things you’d expect, basically. I need it to not go offline for 15 minutes every day! I’d like it to be in the UK so latency on ssh sessions is reduced. ;-) Oh yeah, and I don’t want to pay too much…

I’m paying about $13 (about £7) per month right now, but only getting 1GB of disk space, 48GB of bandwidth per month (the bandwidth’s OK, but that disk space is tight.

Bash pointed me at Media Temple, whose grid service hosting looks excellent and good value at $20 pcm. 100GB of storage, never offline, up to 100 domains, 1000 emails, etc. – it does look good. If they were in the UK I’d go for it immediately. I do, however, have a slight hankering to host in the UK, if only for reduced latency during ssh sessions, and MediaTemple, like WebQuarry, look to be in California. :-)

So: who’s your web daddy?

Losing my (his) Star Wars virginity

Losing my Star Wars virginity (not me, obviously).

10.05: C-3PO and R2-D2 are making me laugh. They’re like bickering lovers. I hope Princess Leia escapes Darth’s evil clutches and makes it to Alderaan.

A save point is reached on my journey of musical discovery

We went to Hay-on-Wye today. For those that don’t know, it’s a little town with an abundance of (mainly second hand) bookshops, and the location of an annual literary festival much beloved of the British middle class: Guardian readers/Radio 4 listeners in particular. Today was the last day of the 20th edition (a ha ha ha) of the festival; we popped by but didn’t linger, all the good events being sold out. Instead, we hit the shops.

I’m very proud to say that my prize purchase of the day was not in fact a book (though I bought four), but the album Innervisions by Stevie Wonder, featuring not only what I’m rapidly coming to believe is The Greatest Song Ever Recorded, Higher Ground, but also what is certainly The Song With The Greatest Intro Ever Recorded, namely Don’t You Worry ’bout a Thing. Awesome. Just incredibly awesome. Why wasn’t I informed?

I can only conclude that until now, I was not ready, and so the Universe kept Stevie and I apart from each other. I note that Innervision was released in 1973, the same year as Tubular Bells, an album which (along with its successors and others like of its ilk) had a much greater influence on my musical development than the joyous funkfest within which my ears are currently glorying. I wonder if I’d have grown my afro sooner, had things only been different…

While we’re on the topic of shaking your (big) hair, I’m happy to report that Shiko’s Monkey gig on Saturday went well and was a lot of fun. It was crowded (and cramped – we were playing literally on the dancefloor!), people danced (a few, anyway), people appluaded and cheered, and (it was generally agreed) we sounded good and didn’t noticeably screw up. Later there was an impromptu jam on the top floor with three djembes, a shekere and a bell, which was much more raw and at least as enjoyable (as a player) as the “proper” gig. So yeah, a great night. I’m still very much loving the drumming, and loving getting better at it, which I seem to be doing. Woo.

Hypnotic Brass Ensemble

Ladies and Gentlemen, introducing the Hypnotic Brass Ensemble – how good is that? Blog here.

(Found while googling for “Moments in Love”, the old Art of Noise number, yielding this fine rendition.)

My eyes, they are burning!

One thing I’ve learnt, to my great surprise, while marking my students’ exams is this:

My handwriting, which I’ve always considered pretty bad, really really could be a hell of a lot worse.

*shudder*

Xmonad does status bars right by not doing them at all

The first thing I complained about the first time I saw Xmonad was the lack of a status bar. As Xmonad approaches its 0.2 release, it has become clear to me that this absence is in fact a feature, not a bug. Here’s why…

It’s now possible in Xmonad to define gaps on the edges of the screen, over which it will not arrange windows. This immediately and beautifully solves the status bar problem, because now you just run a separate status bar app, filling in whatever gap you’ve defined. If the app sets the “override-redirect” X flag (which anything claiming to be a status bar should), it’ll appear on every desktop and be excluded from Xmonad’s window management.

This is a stroke of genius, and a fine illustration of that principle at the beating heart of Unix, namely that you should write apps which do one thing well, and use them in synergetic combination. xmonad manages windows, but it is not in fact its job to provide a status bar: only the space for one. Factoring the status bar out in this manner gives us choice and orthogonality, both of which are A Good Thing.

For now, I’m going for the easy option: dzen, a minimal text-only status bar (looking a bit like this but at the bottom of the screen). Alternatives exist, for example the KDE kicker, but I haven’t really explored that space yet. In all honesty, I’ll probably just stick with dzen. What I want next: a way to display, on the status bar, info about which workspaces are in use, and which is visible. For this, Xmonad will need to report its current status somehow, perhaps like wmii does with its plan-9 inspired pseudo-filesystem.

Update 2007-06-15: very quickly, I got my wish; xmonad now has configurable logging hooks which can write arbitrary data to stdout every time the internal state changes — pipe that to dzen and hey pesto, problem solved. By default there’s a basic logger which simply writes a list of workspaces which currently have windows on, with the current workspace surrounded by square brackets. Lovely jubbly.

Double header

Quiet here lately because it’s exam processing time in the real world, so I’ve been busy busy busy marking, check-marking, and munging. Next week’s busy too but then I can settle into research gear for the summer and do lots of Haskell — woo.

I’m still loving the hell out of xmonad, which just keeps getting better every day. Yesterday I went dual head through the magic of Xinerama; at first it made my brain hurt, trying to keep track of where each workspace was, but now I’m getting to grips with it, I’d say. It’s nice to be able to work on one thing (a blog post, say) while keeping an eye on a background job, and while programming it’s cool to have multiple emacsen filling my field of vision. What could be better?

There is surely much more to say about many things, and I will surely say them soon.

A not-camp-at-all weekend in London

Two weeks ago, we spent the weekend in London, to attend a civil partnership ceremony (I call it a wedding as, I’m sure, would the happy couple) and a house-warming. The wedding was on Friday morning, so (after giving up on trying to find reasonable rail tickets) we drove up Thursday night and stayed with Jason & Sid, whose party was on Saturday. The wedding was lovely: Robin & Oliver, South-African compadres of Bash’s who came to ours (front row/right in this photo), so we were very happy to return the honour. :-) They made a lovely couple, and the ceremony was very touching. The wedding took place at Old Marylebone Town Hall (“Reception Room”) – a very nice venue, with lovely officers (though marginally and amusingly haphazard a couple of times), followed by reception at The Groucho Club. I shudder to think how much it cost them, but the food and wine were both delicious and copious. No, we didn’t see anyone famous. :-)

We milled around Wimbledon on Saturday, wombling on the common and browsing expensive charity shops. In the evening, the house-warming party… Continuing the geeky tradition begun at New Year, some of us did some programming: this time on the classic Amstrad CPC-464 at the top of the stairs (Jason is Very Retro). This being a bit old and light to run a python interpreter, Jason and I knocked up a simple BASIC program to print “Welcome to Jason & Sid’s party” at a random place on the screen every 5 seconds. We even had to RTFM.

It wasn’t all geekery, of course: evidence here. My choice cuts follow.

Will, Bash, Andy Rena doing the chicken dance Crafty smirk Me and the missus Jo worship Lush I left my heart in syntax error Exactly what it looks like Oh, you! Gorgeous Martina I have no idea

Ruby vs Java/PHP ads

Rails vs Java in style of PC vs Apple, PS3 vs wii, etc. [digg]

Full set on youtube: 1. Rails vs Java; 2. Rails vs PHP; 3. Rails vs PHP; 4. Rails vs PHP.

“I’m wearing a glowing hat – just look for a glowing hat!”

(If you can’t be bothered to read all the of the following, just watch this video and know that I Was There…)

At 5pm yesterday, I left Swansea in the company of eight excellent people. Around 10pm, we arrived at the car park at Stonehenge, and set up our tents. Around 11pm, I stood before the stones and took a deep breath, before walking among them, touching them, looking, wondering (and weaving my way through a tight-packed throng of revellers). Around 4:50am, along with about 24,000 other weirdos, I looked to the sunrise but alas, ’twas hidden in clouds. Around 6am, I was in the tent, being horizontal; around 10am, I was up and about, rejuvenated and ready for the drive home; around noon, we left. Around 5pm I was waving madly at ex-students from the passenger window of a mini on the M4, much to their amusement. Around 7, I got home and made the cats happy through the magic of food.

26 of the most pleasant hours I have ever spent, I must say. The only thing missing was Bash, which is an excellent excuse for going again next year.

I’d never been to Stonehenge before at all, and I am incredibly grateful to my parents for never taking me, because this was the best first visit I can imagine. Ordinarily, it’s impossible to get right up to the stones (see google maps – those greayish dots trailing around the stones are disappointed tourists), but for the solstice it’s open and free – all praise English Heritage. It was so good to be able to walk right up to this incredible site without restriction, and I recommend a solstice visit if only for this purpose. Word to the wise, however: if weirdos bother you, arrive early, touch the stones, and don’t stay past sunset.

Cos yep, it’s gotta be said: the place was full of weirdos. I was happy to be one of them, but definitely on the normal side, alas. Much nonsense was spoken, but I was particularly amused by: “Emergency! Emergency! Glowstick breakage on the western stone!”, “If you’re not drinking ginger wine you don’t really exist – it’s a quantum thing.”, and “Your hat would be no good for Burning Man: they’d run you out of town. No, they’d fire-poi you out of town.”

BBC coverage here – though I’m sure most of the crowd didn’t get up early: they stayed up late. :-) “It’s bad lovin’, woo hoo, it’s bad lovin’!”

It was a clear night with stratocumulus scudding in from the south just in time to sprinkle us with a couple of light showers and obscure the sunrise – given the rain lately, we were more than grateful for the weather. I certainly didn’t mind not seeing the sun actually break the horizon: I was there for the night, not for the moment. It was a bit chilly around 3am, but I was kept super snug (and thus smug) by my birthday present from Bash and my parents: a shiny new Montane Extreme Smock, as recommended by intrepid Mountain Rescue types. All hail.

Interesting: 5000 more people than last year, but 1000 less cars. Only four arrests.

Photos will follow.

Shiko gig: Crofty Carnival, Saturday 30th July 2007

Heyup. Shiko will be drumming at Croft Carnvial this Saturday — come and see us!

Crofty is a small village on the north coast of the Gower Peninsula (map here). I’m not 100% sure of the times yet, but I think it starts around noon. I should become certain tomorrow. It’ll probably be a smallish fun affair, drumming on foot as part of a parade, apparently. As usual with Shiko gigs I’m not completely sure what to expect. :-) There is talk of heading off to Pontardullais afterwards to do some busking in pubs (it’s their carnival this Saturday too).

Hundreds of hatboxes, each containing a single brown wig

I’m William John Cavendish-Bentinck-Scott, the Fifth Duke of Portland. Which Historical Lunatic Are You?

Who’s a pretty boy, then?

Who's a pretty boy, then?

3 magnets + 40,000 pendula + 2 hits of acid = wow

Movie here. Psychedelic!

visualising the motion of 40,000 pendula under the influence of 3 magnets using Haskell. Shiny.

What’s going on here? OK, so it’s not 40,000 pendulums “all going at once”, because obviously they’d bounce off each other. ;-) What we have is a 200×200 grid (ie 40,000 pixels), and for each pixel we define a pendulum. At a given time, a given pixel’s colour represents the corresponding pendulum’s distance, at that time, from each of the 3 magnets (the pixel’s RBG components represent the three distances). Each pendulum’s movement is affected only by the magnets, ie the pendula are independent of each other. Hey presto, psychadelica-a-go-go.

An interview with Ulli Haarbürste

Back in June 2003 I blogged about the truly wonderful Roy Orbison In Clingfilm stories – if you haven’t seen these yet I highly recommend a visit. Anyway, I’ve just noticed, returning for a long-overdue refresher, that there’s now also an interview with the author which is also not to be missed.

I am not aware of anyone seeing it as humour. I venture the occasional joke or puckish remark in my work as relief from the sensuality and romantic lyricism, and if people laugh that is nice, but I do not think my fans would class me as a humorist in the way that you would, say, Dan Brown.

I remember I read an interview with Gunter Grass just before my tome was delivered to the printers, and he talked of his forthcoming book and said that it was the best thing he had ever written, and I thought Oh no! Gunter Grass has had the idea to write a book on Roy in Clingfilm too! I will only be the Buzz Aldrin of this genre. And I can laugh with relief now as his book turned out to be some boring thing about the Nazis, but at the time this obsessed me, and I considered examining his dustbins and so forth to find out. Perhaps I should not admit this but I actually rang his agent of literature and pretended to be a reporter and asked ‘May I enquire, who are Herr Grass’s favourite musicians?’ but he only mentioned people like Rush and Hawkwind so I knew it was OK.

Loud and clear

I had a hearing test this morning. To my small amazement, my hearing is apparently just fine – completely within normal bounds. In particular, there are no signs of noise-induced hearing loss, which is frankly incredible given the punishment (mainly via headphones) I’ve given these babies over the years.

The bad news: this means that my apparent difficulty in following conversations (particularly ones I’m on the edge of) in loud-ish surroundings (eg parties, pubs, conferences, etc.) is either a result of deficient mental processing or (probably more likely) that I’m simply not paying enough attention. Still, good to know!

Idempotence vs Referential Transparency

Idempotence vs Referential Transparency [reddit].

(Spoiler: idempotence wins.)

A lucid explanation of closures

Here’s a pretty clear explanation [reddit] of closures, which have hit the mindspace in a big way since Rails made Ruby the hot sauce of the day. When I say “clear”, I mean, perhaps, from a “traditionalist imperative” point of view — the discussion of stack frames and the funarg problems in particular. Of course, lambda-heads and category theorists probably have other criteria for “clear”. ;-)

It’s All Text!

Loving it: It’s All Text, a Firefox add-on to enable you to edit textarea contents in the editor of your choice. It works!

Djelidon for Bee Hop, 02007/07/21

Djelidon djembe patterns for Shiko gig @ Bee Hop, July 21st, 02007.

Read the rest of this entry »

Chad Vader – Day Shift Manager

Chad Vader – Day Shift Manager.

Fanti for Bee Hop, 02007/07/21

Fanti djembe and dun-dun/bell patterns for Shiko gig @ Bee Hop, July 21st, 02007.

Read the rest of this entry »

Show me the way (to go home)

show me the way (to go home).

As part of an art project about spoken directions, we’re trying to collect as many recordings as possible of people giving directions.

To take part, use one of the buttons below to give us directions to wherever you think of as “home”, in any country, and speaking in any language. Don’t refer to any maps or guides, just give directions as if you’d been asked on the street.

1000 Films to See Before You Die

The perfect way to pump up our lovefilm queue: The Guardian’s 1000 Films to See Before You Die.

(I do, however, really dislike all this “before you die” nonsense. See sketch in recent Mitchell & Webb radio series. Also, surely we’ll all live forever now thanks to genetic engineering / uploading ourselves into vast computers / our benevolent alien overlords – so the whole concept’s totally passé.)

Chore wars

Chore Wars.

Desired outcome.

Won’t somebody please think of the children?

Wifi routers: silent, blinking death?

(I may get round to writing something actually meaningful and/or profound at some point – but not right now.)

Me drumming, two weekends running

Yo.

Next Saturday it’s carnival time in Swansea! Once again I’ll be playing steel pans with Rocco’s Rockets, or whatever we’re called this year. Photos from last year here. This time, I’m pleased to report, I’m on bass (pleased because this is easy, it’s bassy, and I’m close to the Jamie-powered main drumkit).

A number of changes from last year: starting point, route, and ending point is different – in particular, we end up on the open area in front of the Waterfront Museum, which sounds all right to me. This probably means we go down Wind Street, which ought to be interesting.

So, come and see!

Then, the following weekend, on Saturday 1st September, Shiko are gigging in sunny Porthcawl. It’ll be in the afternoon, around 2pm, as part of some bigger event taking place (possibly some surfing thing?). There’ll be several drumming groups from the area playing, so it promises to be pretty good. More details as I have them.

Cliffhanger

I am a cliff hanger!
Find your own pose!

Fantastic quiz, particularly question 3. Evany still rules, I’m happy to say.

No blogging for ages because: lots of work, nobody cares anyway, and the devil that is Facebook. Have re-established contact with many many old friends, and made the somewhat disquieting discovery that most (but – yay – not all) of the girls I used to fancy have settled down and started making babies. The life, she goes on.

What it says on the tin

3catsinboxes.jpg

xkcd + goats = dresden codak

Gorgeous, wistful.

See what I mean?.

But start at the beginning.

The Catsters

The Catsters — twenty category theory lectures on Youtube. Looks like they start with monads. Also: ++cute lecturer ftw! Aha, it’s Eugenia Cheng. Lucky Sheffield.

Waves of happiness

Lots of things have been happening to me outside of computers lately, which is one of the main reasons I haven’t written anything here. I suppose Facebook has also been pressing my online contact buttons. Anyway, here’s one of those things.

Yesterday, I had my first experience of something called Five Rhythms dance. It’s hard to describe, but in short, you might say it’s moving meditation, set to music (ordinary, popular music, though thoughtfully chosen and sequenced), journeying through five phases called flow, staccato, chaos, lyrical, and stillness. A complete sequence through all five is called a wave. Well, yesterday I was at an all-day workshop here in Swansea, with a theme of male/female balance, in which we went through three waves: two before lunch, flowing together seamlessly (or was it just one? it feels like it was two, but it is a blur, I admit!), and then another, slower (deeper?) wave in the afternoon.

I’m finding it quite hard to write about, because what I want to express, I can’t, really. I suppose I could say it was one of the most incredible experiences of my life, but that somehow sounds throwaway and doesn’t really capture it. It certainly feels like it’s going to have been a very significant experience – it’s definitely opened up some doors.

As someone who loves anyway to dance, and in particular rejoices at the moments when the music and the dance take you out of yourself, out of caring who’s watching, out of thought and out of the moment, well, I just loved it. It was easy and challenging, and familiar and surprising, hot and cold, fast and slow, I could go on…

I’d worried, in hearing about the process, that the music would be some half-baked new agey nonsense incapable of moving me. I was completely wrong – it was singularly excellent, including a number of pieces I recognised (Massive Attack’s Protection and Art Of Noise’s Close To the Edit are two staccato pieces I particularly remember), and much else new. The James Holden Remix of The Sky Was Pink by Nathan Fake (as I found out afterwards) was where it hit the peak to me, at the start of chaos in the final wave. You can hear it on Youtube, but you’ll have to imagine satisfactory bass and a transcendent mental state, I feel. (I’ve just bought it on Juno — my first paid-for music download evah!)

I’m feeling very different after yesterday, about a number of things. If I had to pick one word it would be “calmer”, but it’s also a sense of being more centred, more accepting, more flowing, more connected and (frankly) more alive. A reinvigorated sense of connection with everyone and everything else – for which I’m sure I can largely thank the group, which was (trying not to sound too much of a hippy, if that’s not too late) just utterly welcoming, safe, nurturing, open, opening. If the purpose of the day was the explore male/female balance, it certainly worked for me. Gah, incredible and indescribable!

Though I have written many, words fail me. There we are.

If you want to find out more, and in particular if you’re in Wales and want to try it, here’s Alan Withers, the teacher (workshop dates here, and there are weekly classes in Swansea (clashes with Shiko, alas) and Cardiff). If it sounds at all interesting, I’d say go for it – only good things can happen.

Oh, PS: Shiko should be busking somewhere in Swansea town centre this Saturday, hopefully, as part of Oxjam. More details when I know them. Come gives us your ears and money!

Minus

I have a new love; she is a girl; she fills the world with beauty, sadness, and utter disregard of the laws of physics. Her name is minus, and she starts here.

How to disable underscore subscript in TeX mode in emacs

After some random recent upgrade, emacs started doing something annoying: when in TeX mode (eg when editing LaTeX docs, which I do a lot), it would treat every underscore in the document as a signal that the next symbol should be subscripted, and display it as such: the character would be offset vertically using font-lock magic. This is very annoying, because underscore only means subscript in maths mode; the rest of the time, it’s wrong and silly to visibly subscript the thing. In general, I don’t want emacs to do such semi-WYSIWYG-ness – syntax highlighting is about as much as I need, thank you.

Anyway, how to turn it off is non-obvious, and required several increasingly imaginative google search strings. In the end I came across this recent thread on gnu.emacs.help, one of whose posts suggested that turning down font-lock-maximum-decoration from “maximum” is the right thing to do. Yep, that works: I changed it to “nil” and now I’m happy.

Circles of Sound

Circles of Sound: African drumming (4 bands), dancers, DJ; Railwaymens Club, Wind St, Swansea; 8pm, Sat Nov 24th 2007

Woo. Come! Map.

Colossus reborn

Colossus reborn.

What Bash did with her Sunday

Bash cut her hair today. Photos (mainly by me) here.

(Photos of the Circles of Sound gig should be forthcoming soonish, but she’s got about 500 to wade through – ’twas a good night!)

Emo Bash Mohawk down Easier than shaving a goat The serenity of the recently shorn II

Water! From the skies!

Water! From the skies! – Armstrong & Miller comedy gold on Youtube.

Just like a tutorial with Gimbo.

I used to love Armstrong & Miller — hit and miss, for sure, but when it hit it hit well. If you ask me what the funniest thing I’ve ever seen was, I’d tell you it was a sketch of theirs involving an undercooked steak, some surly chefs, and a remote-controlled car. Haven’t found it online yet, and in a way I hope I never do because it’ll be bound to be a disappointment now, but oh, the memory…

“Perl, I’m leaving you”

Damn straight.

5 glorious years of, er, rambling and mumbling and getting paid to do it

I started working in Swansea University’s Computer Science department five years ago today. Here’s the evidence. It’s been a blast, and the executive summary still holds true, somewhat amazingly. That is all.