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.
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.
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.)
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.
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.
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, firstname.lastname@example.org) 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?
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.
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:
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?
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. :-)
(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).