Yesod web application dependencies

I have been experimenting with using Yesod to throw together a web application or two. My experience so far has been broadly positive—if you like computers to check things for you, I recommend it. ((assuming you like deciphering compiler error messages when the computer says no, that is)) That said, watching the full chain of dependencies fly past was moderately entertaining: ((for a quiet Wednesday morning…))

parsec-3.1.2

An excellent parser-combinator library, widely imitated. This wouldn’t be funny, except…

attoparsec-0.10.1.0

Another excellent parser-combinator library, inspired by parsec.

base-unicode-symbols-0.2.2.3

This defines a bunch of Unicode aliases for standard functions with boring ASCII names. Why write:

x `elem` xs

when you could write:

x ∈ xs

Invaluable!

utf8-light-0.4.0.1 and utf8-string-0.3.7

Two UTF-8 encoding libraries!

semigroups-0.8

“In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative binary operation. A semigroup generalizes a monoid in that there might not exist an identity element. It also (originally) generalized a group (a monoid with all inverses) to a type where every element did not have to have an inverse, thus the name semigroup.”

My favourite Empathy feature no-one knows about

Picture the scene. You’re painstakingly composing a lengthy message…

…when you manage to close the tab by accident (maybe you hit Ctrl-W after too many years using a terminal? or maybe you thought your browser was focused?). You hammer your keyboard in frustration: your beautiful prose is gone forever. But wait! What’s this lurking in the Tabs menu?

Not only does it reopen the tab you just closed, but the message you were composing is remembered, too. Crisis averted!

The keyboard shortcut is Shift-Ctrl-T, just like in many web browsers (which inspired this feature). As a secret bonus feature, the keyboard shortcut works in the contact list, too, to rescue you when you’ve closed the very last tab by accident. Empathy remembers the last few tabs, not just the most recent.

Of course, if you don’t know the super-secret contact list shortcut, you can go find the contact in your contact list again: Empathy should still have remembered the message you were typing. (Right now it doesn’t persist across sessions; a patch to add that would be most welcome!)

Undo Close Tab has been around for a while; remembering the half-written message was added in Empathy 3.1.2, so it’s coming soon to a GNOME 3.2 near you! Thanks, Jonny.

A Tale of Two Conferences

I spent the week in humid, rainy Berlin for the Desktop Summit. I particularly enjoyed Sunday’s keynotes by Claire Rowland and Nick Richards, not to mention the many great talks and discussions. It’s always fun to catch up with old friends (not to mention my coworkers at Collabora, very few of whom I see regularly), and to meet some new (to me, at least) faces, including João Paulo, whose Summer of Code project—implementing OTR in Telepathy—I have the pleasure of mentoring. I gave a talk of my very own, which apparently is one of the few videos available so far. I haven’t dared watch it yet. 😉 I hope to make the promised new release of Bustle this coming week.

Later in the week, the BoFs on D-Bus and on GNOME IM integration were both very productive. Hylke and Andreas’s input was very useful in the latter, as was the presence of David and George of KDE-Telepathy fame: they’re solving (and hitting) a lot of the same issues as are found in GNOME, so we had some true cross-desktop pooling of ideas and solutions. Thanks to everyone!

The passport queue at Stansted

The journey back on Friday evening was smooth—at least until we hit Stansted, where of course there was an inexplicable zoo of thousands of travellers queueing for passport control. (Not pictured: the thousands more behind me.) And of course, what better to do after a week at a conference than to attend another two-day hackathon at Homerton

Desktop Summit and CamHac Lanyards

CamHac is the first Haskell hackathon I’ve attended. It’s a very welcoming community, full of interesting people and projects. I swapped Vim tips, shoulder-surfed some of the internals of GHCi, chatted about open data and web server frameworks with some Silk folks, learnt about the internals of fast output stream libraries, and otherwise hacked on a long-dormant GObject introspection-based binding generator. It took a while for me to catch up with Daf’s work to date; I warmed up by generating code for enums and flags, and then started reworking the code generator to use haskell-src-exts’s AST and pretty-printer. Interesting stuff.

Bustle 0.2.5: now with statistics

Bustle 0.2.5—“Why go all the way to Glastonbury to not watch U2 when you can just not turn on the BBC at any point this weekend to not watch them?”—is out now. This release adds a sidebar containing statistics about the log: namely, method call and signal emission frequency, and total/mean times spent in method calls.

Screenshot of Bustle 0.2.5

This code has mostly been sitting around in a branch since Plumbers in November. Sorry, dear users!

Shaving a yak with an angle bracket

Today I wrote an XMPP console for Telepathy, in the form of a little Gabble plugin plus a really terrible Gtk+ interface that lets you send an IQ and see the result, syntax-highlighted—mostly in bright pink—by GtkSourceView. Wocky, gobject-introspection and GtkGrid.attach_next_to are all great. In the highly unlikely event that XMPP consoles are something that interest you, and that the lack of one has been dissuading you from embracing Empathy, I hope this meets with your approval.

This has mostly been a diversion from debugging some weird alias, roster and presence interactions between Gabble and Prosody, which I still haven’t tracked down. But hey, the angle brackets look nicer now!

Bustle 0.2.4 released

Just released Bustle 0.2.4. Various bits of clean-up and bug fixes were kicking around in master that should have been released months ago. The viewer’s much more Postel-compliant, so if you’ve had trouble with your D-Bus logs being rejected with cryptic errors messages, you should upgrade. Also, Sergei Trofimovich contributed a build fix: thanks!

A mundane screenshot of Bustle 0.2.4

While we’re here: Bustle finally has a bug tracker! Bugs are in the Bustle component on freedesktop.org Bugzilla. And the Git repository has moved to freedesktop.org too. With luck, the next release will be more exciting. 🙂

Sojourner help wanted for MeeGo Conference SF

A few months back, Topi Santakivi updated Sojourner for the MeeGo Summit in Tampere. Andrew Flegg wonders about an update for MeeGo Conference San Francisco 2011, which I’m sadly not attending. The schedule’s available as a web page. I had a quick poke around for a version in a more machine-readable format—ideally PentaBarf XML, which Sojourner understands, but even something that could be converted to that—and couldn’t see anything obvious.

Dear reader, would you happen to know of such a machine-readable schedule, and would you like to send a merge request updating Sojourner to show it?

Empathy chat room improvements

Folks who’ve tried using Empathy for IRC will have found the experience a bit lacking. While some of this is due to Empathy itself, many of the problems are due to Idle, the Telepathy backend for IRC, being sorely in need of love and caring. Happily, Debarshi Ray has taken it under his wing. Most visibly, he’s implemented the ContactInfo interface, which allows Telepathy UIs to show WHOIS information. I threw together a few patches for Empathy to take advantage of this information:

Contact information for ‘wjt’ on Freenode, showing other channels, away message, and other IRC-specific details
Please ignore the ‘missing image’ icon!

Sadly, the “Channels” field is not very useful on most major networks, like Freenode, since—by default—you can only see the rooms that both you and the contact are in. In the past, on IRC, that window was positively anaemic, showing only the first three lines. Now it’s full of information, and could do with some advice from designer types: how can we show all the information described in his blog post without the dialog becoming even more a massive grid of words?

Rishi’s also fixed up many less obvious annoyances in Idle, like making it sending pings to keep otherwise-idle (ahem) connections alive. It’s great to have him on board!

Stepping away from IRC, I’ve recently been using XMPP chat rooms more, and noticed a subtle improvement implemented by Chandni: Empathy now shows per-user typing notifications in the user list. Now I wish this were possible on IRC too, or that more channels would move to XMPP: it’s really useful information to have, particularly in smallish rooms.

Termite Misdirection

I really hate how submitting or updating a bug on Bugzilla leaves you at post_bug.cgi or process_bug.cgi, rather than bouncing you back to a URL that actually identifies the bug in question. So, I wrote a Greasemonkey userscript named Termite Misdirection to detect this situation and fix the URL. If your browser supports the HTML5 history API, it should be mostly transparent; if not, then you’ll see the page being reloaded, and you’ll lose the “Changes submitted” etc. message.

I use this Chromium; I’m told it works in Firefox too. (Yes, I know I should submit a patch to Bugzilla itself to make this unnecessary, but that would be more work than 16 lines of Javascript and wouldn’t work with all the existing Bugzilla instances I use every day.)