The Wayback Machine - https://web.archive.org/web/20170630151510/http://www.advogato.org/person/robertc/diary.html?start=104

Older blog entries for robertc (starting at number 104)

Faster bzr commits, and subunit.

I've just put up for a review two patches that when combined make 'bzr commit FILENAME' substantially faster. For hackers on launchpad (which I used as test data) the time drops from 1.2 seconds to 0.3 seconds. \o/. One less blocker for 2.0 (this was a regression due to the changed characteristics of the 2a repository format).

This friday, at SLUG I'm giving a talk about subunit - a test streaming and activity protocol I've had kicking around for some years now. This allows all sorts of neat coupling and introspection that adhoc formats don't. If you're familiar with TAP, subunit has similarity, but is in my (biased opinion) substantially more powerful - in ways that matter. If you're in sydney and run automated tests of [nearly] any sort, come along, I'm sure you'll enjoy it.

Re: Michael Rooney: Simple timing of Python code

This blog post talks about timing python code...

There is a great little component in the standard library: timeit.

python -m timeit "code to time"

24 Jun 2009 (updated 25 Jun 2009 at 00:51 UTC) »

[edit: a home has been found]

Free to good home, one Intel 510T 22 port switch. (There are a couple of dead ports but its otherwise fine - no glitches or anything).

I've just replaced my home ethernet switch - I was using 5 ports, and most of my wired machines have gigabit now. Yay.

So, if you need a 22 port network switch, let me know. If I don't hear from anyone, it'll go into next months local recycling pickup.

This will be a 'come pick it up' arrangement, unless you're going to be at the same place I am for some other event - in Sydney, if thats not obvious.

intel 510T photo

What is it with pc vendors that they make selecting machines by fairly useless things like model number (e.g. shuttle), or a hacky fugly hierarchy (e.g. auspcmarket) easy, but by attributes (e.g. '2 ethernet ports, no fans, small chassis') terribly hard.

They should take a leaf out of the way people ask each other for recommendations. auspcmarket /kindof/ does that with the systems hierarchy - but only for a few categories.

What I want I guess, is a menu of tags/attributes I can search for on a vendors site (and/or review sites like CNet's and, google shopping and so on). Doing a google shopping search for my interesting attributes above is a pretty epic fail.

Latin (As in church latin, not latin character encoding) in Ubuntu Karmic will work better than it did in Hardy/Intrepid. I had missed one of the packages that want hard coded locale data when I did the initial enablement patch.

For reference, when adding a locale:

  • xlib (wants to know what locales are actually UTF8 and what compose sequences to use)
  • gdm (wants to know what locales to display)
  • glibc-locales (has the actual definition

I'm leaving UDS early due to a loss in my family - I have to travel now to get to the funeral.

Folk that I had specific meetings/planned discussiongs lined up with I have tried to contact in person, and this post is intended to act as a catchall for anyone I didn't find.

My desktop machine blew up, so I got a lovely fresh install of Jaunty. And, X and Gnome still disagreed by default about my actual screeen size... it was unreadably small with the default fonts. I've posted the following instructions before - these are basically unchanged except that the location of the fonts dialog has moved.

Tip for folk that would like X to show fonts (i.e. the GDM log in screen) in the correct size: Teach X about the dpi setting!

Step 1: run xdpyinfo and look for the dimensions: line. There will be something like this:

dimensions: 1280x768 pixels (266x161 millimeters)

resolution: 122x121 dots per inch

Grab a ruler and measure the screen you have. If it matches the millimeters reported by X, then skip step 2.

Step 2: edit /etc/X11/xorg.conf, and locate your Monitor section:

Section "Monitor"

Identifier "Generic Monitor"

Option "DPMS"

DisplaySize 265 160

EndSection

Add in a DisplaySize like I have there. Now logout of your GUI and restart X - you can run /etc/init.d/{g,k}dm restart from the console, or do what I do - just hit ctrl-alt-bkspace so it restarts. Your login screen should change appearance slightly - either the fonts and regions will get bigger if your dpi was set too low, or vice verca.

Step 3: (For KDE users, someone please tell me what it should be, for GNOME read on)...

Run xdpyinfo again and find the Resolution: line. Ignore the fact that it may not be square, grab one of the two numbers ( I suggest the higher)..

Go to System, Preferences, Appearance, and the Font tab. Select 'Details'. There is a Resolution field there. Put in the single number you chose. Changes should take effect immediately.

Applications I know of which benefit from having this set correctly:

xpdf, gnome-* (panels are readable etc etc), firefox.

2 Apr 2009 (updated 2 Apr 2009 at 00:51 UTC) »
Launchpad has just upgraded their bzr server to bzr 1.13. This makes the signficant performance improvements in bzr 1.13 available when pushing and pulling from branches hosted on launchpad. 1.14 has further improvements in the client, so if pushing to launchpad is slow please consider upgrading your client to 1.14 (which about to enter beta).

This has irritated me for a while in configure.ac. You've probably seen this pattern before:

AC_INIT([foo], [0.0.1])
MAJOR=0
MINOR=0
MICRO=1
MY_VERSION=$MAJOR.$MINOR.$MICRO
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(MICRO)
AC_SUBST(MY_VERSION)

I finally hit my annoyance threshold for this, and the answer is pretty obvious. (If its not, or you think there is a simpler one, give it a shot - I'd like something more pithy).

AC_DEFUN([MAJOR], [0])
AC_DEFUN([MINOR], [0])
AC_DEFUN([MICRO], [1])
AC_DEFUN([MY_VERSION], [MAJOR.MINOR.MICRO])
AC_INIT([foo], [MY_VERSION])
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(MICRO)
AC_SUBST(MY_VERSION)

Its not a big deal to be duplicating version numbers, but not duplicating at all is nicer.

Certain amount of hyperbole, but still a great perspective on software-as-a-service vs service-as-a-service in Iceland.

Microsoft Skull-fucks Iceland’s Economy, Contracts Syphilis

Entertaining too :)

95 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!