Tollef Fog Heen's blog

tfheen Wed, 25 Jan 2006 - i18n done the wrong way.

From evolution's widgets/misc/e-dateedit, a custom date field:

    e_utf8_strftime (buffer, sizeof (buffer), _("%m/%d/%Y"), &tmp_tm);

You see that _("%m/%d/%Y") there? That means you'll only have a sane (that is, non-American) date format if you're running with LC_MESSAGES set to the format you prefer for dates and such. It also means extra work for the translator as well as possible errors due to translators having a personal preferred way to write dates. Using "%x" instead fixes the problem (verified by binary patching /usr/lib/evolution/2.6/libemiscwidgets.so.0.0.0, since I don't have a very recent evolution source handy) and gives me nice and (semi-)sane dates.

Bug not yet filed due to me being aboard an aeroplane.

Now I just have to fix the way to write dates in nb_NO.UTF-8 into the same as ISO-8601, but that should be easy enough.

Update. I meant %x, not %c, of course

[12:19] | tech | i18n done the wrong way.

tfheen Mon, 23 Jan 2006 - How to configure XKB to give you a compose button

Eric Dorland wonders how to enable the Compose key just using XKB. Personally, I use my caps lock key for that, and using

        Option          "XkbOptions"    "compose:caps"

in /etc/X11/xorg.conf, that's easy enough.

Other options are compose:ralt, compose:rwin, compose:menu and compose:rctrl.

[22:06] | Debian | How to configure XKB to give you a compose button

tfheen Wed, 11 Jan 2006 - On humans failing Turing tests

Adam Rosi-Kessel writes about humans failing Turing tests. Apart from speculating why this is happening, a workaround could be to use CSS (or javascript) to hide the input box, or possibly the same for disabling it. I imagine most spambots don't parse the CSS or run the javascript. Of course, the text saying "please don't write anything here" should be kept.

[09:16] | Debian | On humans failing Turing tests

tfheen Tue, 10 Jan 2006 - Casper, the friendly little ghost

Everybody who has used an Ubuntu live cd over the last nine months or so has used casper. It started out as a special udeb, called by the debian-installer code to bootstrap a live environment. While d-i is fairly flexible, this was stretching the limits and not really a great solution. Amongst the problems were user interactivity halfway through the boot and a very slow boot.

In the middle of December, mdz asked me if I could take a look at implementing the SimplifiedLiveCD specification. As I had played a bit with casper already, I did. Casper is nothing like what it used to be, it now uses initramfs, so no user interactivity after the bootloader. It uses unionfs where available, which speeds it up a fair bit (compare to devmapper + cloop), and if the cd image has squashfs, it uses that too, which makes it even faster. Boot time improvements from around 368 to about 231 seconds is fairly good, but I hope to get it even lower.

What I really, really like about casper however is how hackable it is. I added cd integrity check in less than a day (modulo some bugs in usplash I had to fix). Today, I integrated it with the new usplash in initramfs, so we actually have progress in the initramfs as well. (Instead of "mounting root file system" taking about 40 seconds.)

Another neat feature is the persistence support. It will now look for filesystems with the label casper-cow (that will be changed to ubuntu-live-rw, I think) if persistent is seen on the kernel command line. This makes it easy to drag your setup around with just an USB key and any Ubuntu live cd.

Next out is getting keyboard selection better and more speedups.

[22:08] | Ubuntu | Casper, the friendly little ghost

tfheen Sun, 08 Jan 2006 - Social dysfunction: happy

I have no idea how happy can be a social dysfunction, but here we go:

Your Social Dysfunction:
Happy


You're a happy person - you have a good amount of self-esteem, and are socially healthy. While this isn't a social dysfunction per se, you're definitely not normal. Consider yourself lucky: you walk that fine line between 'normal' and being outright narcissistic. You're rare - which is something else to be happy about.

Take this quiz at QuizGalaxy.com

Please note that we aren't, nor do we claim to be, psychologists. This quiz is for fun and entertainment only. Try not to freak out about your results.

[19:18] | memes | Social dysfunction: happy

tfheen Sat, 07 Jan 2006 - L'Eau Benite

This is the second of a set of sample beers Karianne and I brought home from Canada. It's described as "a golden ale with a slightly fruity taste and a light spicy aromatic flavour". It's absolutely an ale, but it mostly reminds me of Stjørdalsøl, the "beer" Anders served this fall. Unlike Stjørdalsøl, this is carbonated like normal beer. What's special about this compared to a regular ale is the taste of burnt or smoked barley. As long as the taste is not too strong, I find it quite good, but too much (as is the case with Stjørdalsøl), it just gets overwhelming and makes the beer undrinkable.

The body is relativetly thin, as is the case with regular ales. Carbonation is a bit on the high side compared to the rest of the beer. The ale is more of a spring or summer drink than something to drink around the turn of the year.

So, all in all an interesting beer, but not one I'm going to drink much more of in the future (just the fact that you can't get it outside of Canada limits the chance I'll see it again anyway).

[18:09] | beer | L'Eau Benite

tfheen Thu, 05 Jan 2006 - Abusing usplash

Last night, I ended up hacking on the usplash and casper codebases until about 0500 (local time) in the morning (mostly due to the developer status meeting at 0200 UTC).

usplash had a fairly icky bug where it would choke and die if the fifo filled up and it got "incomplete" commands. No longer, it now uses a buffer which it fills up and then processes, handling partial commands and such correctly.

casper-md5check is a tool which does md5summing according to a list of files, similar to the regular md5sum program, but with one notable exception: it does progress information through usplash. So, since the live CD has a huge file which is the compressed live file system, just doing a per-file progress bar would be silly and inaccurate. It therefore does a size-based progress bar which looks quite neat.

If the debian-cd config has already been updated, just pulling down today's daily cd and choosing "integrity check" should show you the nice little hack.

[09:57] | Ubuntu | Abusing usplash

Tollef Fog Heen <tfheen@err.no>