Or connect using:

# Dafydd's Journal

## Recent Entries

You are viewing the most recent 25 entries.

### 31st March 2011

12:31am: removing cartridge bearings
Finding advice on removing a cartridge bearing from a bicycle wheel proved surprisingly difficult recently. Even a fairly recent and comprehensive bicycle repair manual that I had to hand didn't say anything about it.

It turns out the way to do it is to remove any end caps and locknuts and washers and nuts and then bang the end of the axle really hard against a piece of wood. You will probably make dents in the piece of wood.

This works because cartridge bearings are pressure fit both to the hub and to the axle. (This is really neat!) Both the hub and the axle are stepped to hold the cartridge in place. A hard enough bang will simultaneously make the step on the upmost side of the axle pop the upmost cartridge from the hub and make the step on the downmost side of the hub pop the downmost cartridge from the axle. You can then pull the axle out and remove the other cartridge by poking through a screwdriver or similar and tapping with a mallet.

### 1st March 2011

Recently I've been giving a few talks, and anticipate giving several more in the near future, and have been getting annoyed at how time-consuming writing the slides is. My current preferred (read: least despised) tool for writing slides is LaTeX Beamer, which is a fairly good compromise between simplicity, control and quality. However, the markup is still somewhat verbose, and hence time-consuming to edit.

To make things easier, I wrote a tool, Breakdown, which converts Markdown to Beamer. Of course, Markdown only has limited text formatting capabilities, so Breakdown passes through LaTeX commands. This way, the easy things are easy and hard things are possible.

For example, the markup:

@@

# Breakdown

* Quick and simple
* Use \LaTeX syntax when you need to, e.g.
* for equations: $e^{i\pi} + 1 = 0$
* for quoting'' things
* for images, code listings, tables, quotations\ldots


Gets converted to:

Conversion can be automated using a couple of Makefile rules:

%.pdf: %.tex
rubber -d $< %.tex: %.mdwn breakdown <$< > \$@


Thankfully, the excellent Pandoc Haskell library does msot of the work; most of the Breakdown code is for splitting the input into slides.

Breakdown has a competitor in wiki2beamer, but I like the fact that Breakdown uses a standard markup language and standard TeX commands with a very small amount of custom syntax, rather than a custom wiki-style markup. Each to their own.

The code is in a git repository.

### 16th May 2009

11:09am:

Futility Closet, ever edifying, notes that the word “ravine” is reversed when rot13 is applied. Are there other words that have the same property? We can easily find out with a bit of code:

> import qualified Data.ByteString.Char8 as B
>
> rot13 = B.map (toEnum . r . fromEnum)
>    where r c | (65 <= c) && (c <= 90)  = (c - 65 + 13) mod 26 + 65
>              | (97 <= c) && (c <= 122) = (c - 97 + 13) mod 26 + 97
>              | otherwise = c
>
> main = B.interact (B.unlines . filter (\x -> rot13 x == B.reverse x) . B.lines)


The answer: not many. Running this on /usr/share/dict/words yields a paltry 12 words; all of which, “ravine” excepted, are four letters or less. We get slightly better results running it on the 390,583-word british-english-huge file from 12dicts (which I keep installed for exactly this sort of tomfoolery). On the other hand, some of the extra words are quite obscure. The full list:

an anan cherup fans fobs fs gant gnat grivet na nana ravine re rebore rive robe serf tang thug uh

(This post can be compiled by saving it as a .lhs file and running ghc --make on it.)

### 3rd May 2009

10:43pm: recent hacking

## crosswords

I enjoy crosswords very much, and for a while I've been loading the free Houston Chronicle crosswords in Xword. Although they indulge in sports references (which I'm useless at) and tend to be a little repetitive, they have nice puns and they have a good variety of difficulties (they follow the US convention of easiest ones on Mondays and hardest ones on Sundays). Incidentally, the repetitiveness seems common to US crosswords — perhaps a side-effect of the US grid style?

However, I like the Guardian's crosswords a lot too. Unlike the Chronicle, they have cryptics, which I like to try my hand at from time to time. The problem is that the Guardian crosswords are only available online via an annoying Java applet or as PDFs. I managed to work around this using the fact that the input to the Java applet is encoded on a screen-scrapable HTML page, and wrote a tool to convert the HTML to the AcrossLite .puz format. To get the reulsting files to work in Xword, I had to write some patches to support British-style grids.

## debri

Like debi, but installs packages to a remote host over SSH. Useful when cross-compilating for Debian-based embedded systems.

### 25th February 2009

9:46am: Jingle interoperability day

Before FOSDEM this year, a bunch of people got together to test our various Jingle implementations with each other. Attendance was great: I think we had representatives from most implementations, and we almost ran out of chairs.

Paul Witty from Tandberg and Sjoerd from Collabora, testing Jingle calls to a Tandberg video conferencing endpoint.

I'd judge the event a great success: we found a number of bugs and even fixed some of them the same day. In particular for Collabora, we got to try out our new support for raw UDP transports and the latest ICE signalling. There was also good discussion about future directions for file transfer and relaying support in Jingle, as well as XTLS and its relationship to Jingle. Plus, the testing done on the day itself was continued afterwards, notably including working interoperability between our ICE library, libnice, with Paul's implementation.

### 2nd December 2008

6:01pm: Multi-User Jingle

Update Since I posted this, we discovered that our first choice of name, Mingle, has some trademark problems. For the time being, we're going to call it Multi-User Jingle.

When I joined Collabora in 2006, I was quickly thrown into the deep end when I was assigned to work on extending Jingle, the then-nascent VoIP protocol for Jabber, to support video. That work came to fruition on the Nokia N800, and the protocol we developed is incorporated into the latest Jingle drafts (which incidentally are now in Last Call).

This year, we wanted to try to take Jingle further by extending it to support more than two participants, and a grant from the NLnet Foundation made it possible for Sjoerd and I to spend time on it. I'm now happy to announce that we have a working implementation of the beast we've dubbed Mingle Multi-User Jingle. There is still much that remains to be done, but we think that the basic design is finished.

Our initial implementation builds heavily on work done by others. Wim's RTP session manager for GStreamer gives us clock syncing and RTCP support. Olivier's Farsight 2 work gives us multiparty-capable codec discovery and autoplugging. Youness's work on libnice gives us robust NAT traversal using ICE.

Future protocol work includes support for multicast transport, media mixers and relays, and of course ironing out all the corner cases that will inevitably turn up. Our ultimate goals are to standardise the protocol through the XEP process and to make it possible to use it with Empathy.

We've submitted a draft XEP to the XMPP editor, and kicked off some discussion on the Jingle mailing list. Our wiki page describes how to get our client working. This currently isn't as easy as we'd like due to the dependency on recent versions of various components, but should become easier with time.

### 24th October 2008

4:05pm: serious change
My friend Francis has launched Serious Change, an initiative to represent UK citizens who want climate change to be taken as seriously as it deserves to be, and who believe it can be an opportunity and not just a threat. As a MySociety dude, Francis knows a thing or two about getting people engaged via useful websites.

Francis rightly points out that climate change is not a partisan issue. Nor is it a ‘green’ issue. It affects us all. It's not just another environmental problem. It changes everything. Individual, voluntary action will not solve it — even the Confederation of British Industry is calling for the government to legislate (and is in the meantime getting proactive). Furthermore, what we do (or don't do) about it now can seriously affect how things turn out.

Given the urgency and magnitude of the problem, why don't we seem to be taking serious action?

If you feel similarly, I urge you to join in.

### 25th March 2008

12:49pm: Control-click
The fact that you can use Control-click to open URLs in Gnome Terminal is not very discoverable. (Just clicking doesn't do anything; perhaps this is to avoid breaking text selection?) I can't remember how I found out about it myself, but somebody I pointed it out to recently was delighted that they didn't have to use the context menu to open URLs, so I think it deserves wider publicity.

### 6th January 2008

11:32pm: Internet cloud

This is my new favourite depiction of the Internet, courtesy of RFC 908:

Given that the Internet is a bit like a game of Robot Finds Kitten, it only makes sense that it look like one. Alternatively, it's reminiscent of the swearing in Asterix, which is also appropriate.

### 24th December 2007

1:30am: do not confuse
 stationary stationery shop mobile stationery shop stationary mobile shop mobile mobile shop

### 25th November 2007

9:29pm: identity management

Crypto-Gram recently recommended a study by Utica College's Centre for Identity Management & Information Protection. They do not limit their interest in personal information to the abstract: indeed they require your name, job title, company and email address if you would like to read the study.

### 31st October 2007

4:05pm: Loudmouth 1.3.2 released

I just released Loudmouth 1.3.2. This has been some time in the making: the goal has been to provide new features and keep compatibility with the stable 1.2 branch while Loudmouth 2.0 matures. We managed to add support for STARTTLS encryption, SASL authentication and DNS SRV lookups with minimal additions to the API. Together, these changes mean that Loudmouth will Just Work with your Jabber account in more cases, and that Loudmouth complies better with the XMPP 1.0 standard.

Users of Gossip and Telepathy will benefit from these improvements, and they should land in Maemo in the Diablo timeframe. We anticipate some stabilisation work on the 1.3 branch followed by a stable 1.4 release.

Senko deserves much of the credit for this release; he worked hard to make this happen. Thanks to Micke for supporting me in getting my first Loudmouth release out. Thanks also to Nokia, who supported Collabora's work.

### 9th October 2007

4:58pm: kasa

Yesterday I borrowed Mika's umbrella.

mi kasa es tu kasa

### 23rd September 2007

3:28am: chopper

Turns out turning a bicycle into a chopper is not so complicated.

### 22nd September 2007

3:57pm: D-Bus API in DevHelp

The Telepathy API has until recently only been available as a single large HTML document. The HTML is generated from D-Bus introspection XML with extensions for stuff like enums. I hacked up a conversion to DevHelp's index format, meaning you can use DevHelp to browse the documentation.

To set it up:

• check out the telepathy-spec repository
• run make
• copy doc/spec.html and doc/telepathy-spec.devhelp2 to a directory /usr/share/doc/gtk-doc/html/telepathy-spec/

This might also work for other D-Bus APIs; I haven't tried.

(If you're developing using Gtk/GLib/Cairo/Pango/GStreamer/etc. and not tried DevHelp, I heartily recommend it. It's really handy, especially with the Ctrl-S shortcut.)

### 12th August 2007

3:21am: Bike power

Recently I got involved with a local group, the Magnificent Revolutionary Cycling Cinema. The idea is to use bikes to generate electricity, and to use that as an instrument for education, in particular about sustainability. We just had our first outing at The Big Chill, a three-day music festival.

Eight of us cycled from Cambridge to the Big Chill site in Herefordshire, a journey of roughly 130 miles. Many others arrived by other means to take part. Once we got there, we set up a tent with a platform for the bikes, a central console for managing the power generation, a projector and a pair of speakers. This took the best part of a week.

By some amazing coincidences, many people with ties to the project happened to be at the festival:

• David Butcher, the godfather of pedal power; who was doing his own bike-powered project at the festival
• members of the Chicago and local Ross-on-Wye chapters of the Rat Patrol, who brought along some brilliant mutant bikes and home brew cider
• Fredric King, producer of B.I.K.E., a film we were showing about the Black Label Bicycle Club
• Run Wrake, creator of amazing short film Rabbit that we were also showing; though Run was VJing at the Big Chill, we sadly didn't get to meet him

As for the cinema: in general, reception was very positive. Many festivalgoers made the trek up the hill from the festival to visit us, and people were generally keen to get on a bike for a bit and feed our machine. We were very happy that it all actually worked; as it turns out the power we generated was pretty close to what we needed to keep running. (Odd, and somewhat disquieting, to think that the tent housing our roughly 330 Watt show was shone upon by a number of 1000 Watt lights.)

By the end, we were all exhausted from the 10pm-3am shifts, and somewhat sad at having to take it all apart. Nevertheless, I had a wonderful time. We learned a lot from our first excursion, and got lots of ideas for future improvements. Everyone involved seems eager to take the project forward to further success.

### 11th August 2007

Though it's been a while since Guadec, it's been a rather busy time since so I've only just got around to putting up the photos I took there. Shortly after getting to Birmingham, I gave in to the temptation of a 30mm f/1.4 Sigma lens. Guadec was great for testing it on people.

### 8th July 2007

12:32pm: party: July 13th
Matthew Garrett has a birthday soon. As birthday is a pretty good excuse to have people come to your house and drink. So, if you're in Cambridge on July 13th, come to 6b Fair Street with some booze or food around 9pm, and help Matthew forget how old he is.

### 5th July 2007

When people criticise Wikipedia, they often cite specific errors in articles as evidence that its overall quality is poor. The irony in this is that it encourages Wikipedians to fix those exact errors.

For instance, in his essay “The Faith-Based Encyclopedia”, Robert McHenry ― one of Wikipedia's most ardent critics ― pointed out ambiguities in the article on Alexander Hamilton:

While the day and month of Hamilton's birth are known, there is some uncertainty as to the year, whether it be 1755 or 1757. Hamilton himself used, and most contemporary biographers prefer, the latter year; a reference work ought at least to note the issue. The Wikipedia article on Hamilton (as of November 4, 2004) uses the 1755 date without comment. Unfortunately, a couple of references within the body of the article that mention his age in certain years are clearly derived from a source that used the 1757 date, creating an internal inconsistency that the reader has no means to resolve.

I think McHenry underestimates Wikipedia's readers, and I suspect that when people notice inconsistencies they are smart enough to refer to other sources. At any rate, the article now devotes an entire paragraph to the question, including two citations. McHenry acknowledges this problem in a later essay (while criticising a different article):

By the time you read this, the entry will likely have been corrected, and some Wikipedians will proclaim this as another proof of concept. It does not occur to them to wonder how many people may have come upon that entry in the more than three years it has existed and relied in some way on the misinformation in it. They nearly got me.

He was right about one thing: the error in the article was fixed that same day. But I think this says something positive about Wikipedia: that it is willing to acknowledge mistakes and try to fix them as soon as they are discovered. For as long as McHenry continues to points out errors, there will be Wikipedians on hand happy to fix them.

### 22nd June 2007

12:41pm: indecision
I am vegetarian. I am also indecisive. Because most restaurants have a small (non-zero) number of vegetarian options, these things go well together. This doesn't work in vegetarian restaurants, which is a shame, because I like to support vegetarian restaurants but I don't like to be faced with many choices.

### 10th May 2007

5:46pm: Building tubes

Part of the One Laptop Per Child vision is that children can use the laptop in a very social way. Bringing this vision about involves making it very easy for programs on the laptop (activities in OLPC parlance) to talk to each other. When Collabora was handed the challenge of making this happen, it fit well with an an idea that had been floating around for a while: namely Application Data Channels, a Telepathy interface for sending arbitrary data to your contacts.

While designing a solution for OLPC, we adopted two key simplifications. Firstly, we decided to reuse D-Bus's nice data marshalling and method/signal model, since Telepathy applications will be using D-Bus anyway. Secondly, we dropped the somewhat unwieldy "Application Data Channels" name in favour of calling it tubes.

Last year, Mads Olesen worked on a Google Summer of Code project to introduce Application Data Channels to Jabber. By building on Mads' work, Guillaume laid the groundwork for Jabber tubes in Telepathy. Then, with a bit of libdbus hacking, I got our first tube hooked up.

Since then, we've built an OLPC activity that uses tubes to implement networked board game, Marc Maurer has started on an AbiCollab backend for tubes, and work has begun in Sugar on making tubes really easy for activities to use.

In short: opening a Telepathy tube tube gives you a way to talk D-Bus over the network, without worrying about the underlying protocol. I'm really excited about the sort of things that people will build with this, in OLPC and beyond.

Image © flickr user swafo; licence cc 2.0 by-nc-nd.

### 25th March 2007

6:48pm: Faust
On Friday, I went to see Punchdrunk's adaptation of Goethe's Faust to 1950s USA; possibly my favourite theatre experience ever. (Previously I would probably have cited Beautiful Thing.) Despite having had only 4 hours' sleep, I had a wonderful wonderful time.

This was no ordinary production:

• it took place in a disused warehouse in London docklands

• there are five floors with around 40 rooms

• audience members wear a mask at all times

• different parts of the plot happen in parallel

• you are free to wander around as you please

The sets were detailed and fabulous and at times surreal: an alchemical laboratory, a pine forest, several bars, a diner, a corn field, an office, motel rooms, a family drawing room. At several points, audience members were pulled into the fray. At several points, I became part of a crowd of people running after an actor to follow the story. My role as an audience member was directly challenged, to the extent that my place in the world felt different when I came out.

A few mentions I found from the Grauniad which do it better justice than I are listed here.

My only regrets are that I spent more time than I would have liked searching for the action; and that the run, which ends on the 31st, is completely sold out so that I can't see it again. Nevertheless, I'll be keeping an eye out for future Punchdrunk productions; I hear tell that they have something new starting in September.

### 8th March 2007

11:54pm: Phlebotomy
When I was last in hospital, some tests needed running on my blood. I wasn't overly excited about this, but when the doctor told me that a phlebotomist would be with me shortly to take my sample, the loveliness of the word did much to distract me from my discomfort.

Of course, at the time I did not reflect on how near in sound are "phlebotomy" and "lobotomy".

### 15th February 2007

2:17am: Tonight I saw Attila the Stockbroker and David Rovics at the Loft: both of them informed, topical, policial, angry, wonderful. There was a lot of joining in on the choruses, especially on songs like Burn it Down, I'm a Better Anarchist than You and Guy Fawkes' Table. I can't resist quoting from Attila's Asylum Seeking Daleks: it captures so well my feelings re Daily Mail xenophobia.

Asylum seeking Daleks
are landing here at noon!
Why can't we simply send them back
or stick them on the moon?
It says here in the Daily Mail
they're coming here to stay -
The Loony Lefties let them in!
The middle class will pay...

This satire on crass ignorance
and tabloid-fostered fear
Is at an end. Now let me give
One message, loud and clear.
Golf course, shop floor or BNP:
Smash bigotry and hate!
Asylum seekers - welcome here.
You racists: emigrate!