Older blog entries for jamesh (starting at number 117)

Build Infrastructure

Got approval and checked in my glib changes. I also have intltool modified po/Makefile.in.in's passing make distcheck with newer automakes, which should make upgrading other modules a lot easier.

Talked to malcolm who has apparently been working on some docs for updating packages to newer versions of the build tools, so I won't be writing my own document.

PyGTK, Reference Counting and Cyclic GC

When I started working on the 1.99.x branch of PyGTK, I added a feature to make sure that there was at most one Python wrapper object for each GObject, and that the wrapper would stay alive for as long as the GObject did and vice vesa.

This is implemented using a bit of a hack, which I needed to update as Python 2.2 developped. It essentially goes like this:

  • The Python wrapper holds a reference to the GObject
  • The GObject holds a pointer to the wrapper, but doesn't own a reference.
  • If the refcount on the wrapper goes down to zero and it gets freed, and the GObject's ref count was greater than 1 (ie. something other than the wrapper holds a ref to the GObject), the tp_dealloc() routine would resurrect the wrapper. The GObject would now own a reference to the Python object.
  • If some other code tried to get the wrapper for the GObject, the saved reference would be transferred to it (ie. the GObject would no longer own the last reference).
  • If the GObject later gets disposed, the wrapper will be freed.

This worked okay for a while, until I started work on adding cycle GC support for wrappers. Since the GObject didn't hold a real reference to the wrapper, if the only references on the wrapper were parts of cycles, the GC might think it okay to free the wrapper. Due to a small bug in pygtk, the wrapper itself wasn't being cleared, but its instance dictionary was. This led to the unfortunate situation where all the instance attributes would sometimes disapear.

The obvious solution (in retrospect) is to work with the cycle GC when implementing the single-wrapper-per-GObject code, rather than ignoring it. Instead of the current hacks, I make the GObject hold a reference to the wrapper and the wrapper hold a refernce to the GObject, forming a cycle.

Since the Python cycle GC only applies to PyObjects, I still needed some way to communicate information about references on the GObject to the GC code. If there are references to the GObject other than the one its wrapper holds, then we obviously don't want to free either.

I came up with a smart solution that seems to handle this very nicely: If the GObject reference count is equal to 1, then the wrapper will visit itself as part of the GC traverse, otherwise it won't visit itself. Essentially this means:

  • If anything other than the wrapper holds a reference to the GObject, make the reference the GObject holds on the wrapper look like an external reference.
  • If the only reference on the GObject is held by its wrapper, make the reference the GObject holds on the wrapper look like a cycle.

This seems to solve the problem very nicely.

Sieve

I just found out about the imapflags sieve extension implemented in the Cyrus IMAP server. This allows me to set IMAP flags on messages as part of the server side mail filtering.

Since the mozilla message labels are implemented as IMAP flags $Label1 to $Label5, I am able to set message labels as part of the delivery. This is quite useful for highlighting certain messages in a folder without sorting them into a separate folder. For example, I can highlight bugmail about new bugs in my bugzilla folder. Looks like it will be very useful.

Build Infrastructure

For the past few weeks, I have been working on improving the Gnome build infrastructure. It is something that we have needed to do for a long time. Most of Gnome is still using automake-1.4 because they rely on bugs that have since been fixed, and don't handle the readonly sourcdir builds that "make distcheck" does with newer automakes.

So far I have been working on updating the various build tools that Gnome uses to reduce the amount of work needed to update a package's build infrastructure. So far, I have updated the gnome-common package, removing most of the macros it contained and doing significant updates to the shared autogen.sh script, and gtk-doc (adding code to separate out the common section of the docs makefiles everyone is using).

To test things out, I recently ported glib over to using Automake 1.7. The patch is currently in its second revision, and waiting for another review. Afterwards, I might look at doing a bit of documentation on how to update a package -- I don't intend to do the conversion for every package in CVS ...

25 Feb 2003 (updated 25 Feb 2003 at 15:14 UTC) »

website

After not having touched my website for a long time (years), I finally decided to do a bit of work on it. Wrote some scripts to automatically generate the navigation links (and added <link> elements). Decided to put the slides for talks I have given up in one place. Still a fair bit more information worth putting up for the packages I maintain though.

linux.conf.au:2003

The conference CD should be finalised tomorrow (thanks to a lot of work done by Tony). We've got material from just about all the speakers, audio of all the talks (in Speex format) and some photos, so it should be quite good. The CD will be mailed out to delegates, and ISOs will be made available when they are ready.

Ring John Howard at Home

The Chaser stirred up a bit of trouble at the end of last week with the headline on the front page of their satirical newspaper: Howard Ignores the People. So call him at home on (02) 9922 6189. According to a story in the Sydney Morning Herald, his home phone was ringing non stop until they changed the number.

fontilus

Put out a new release of fontilus, which increased the number of supported languages from 2 (including the default english) to 21. It also has a few small UI improvements for the font view dialog, and adds a context menu item for fonts in the "fonts:" folder that allows you to easily set the default application font for Gnome.

You can also now use fontilus to view the Bitstream Vera fonts. The fonts are currently available in a limited beta form (you can download and use the fonts, but not redistribute them). The terms that will be used for the finished version of the fonts is also available at the above site, which probably meets the open source definition (some people think it doesn't, but the license seems to satisfy all the points in the definition).

lmjohns3: if you use a locale with right to left text direction, GTK+ will automatically flip the direction of standard widgets.

This means that if you have a GtkHBox, items added with pack_start() will end up on the right hand side of the box, and ones added with pack_end() on the left (after all, they aren't called pack_left and pack_right).

To see what happens, try out the "flipping" test in the testgtk program included with GTK.

freetype: I have a "beta" version of the Vera fonts, and they are in TrueType format. I think it is safe to assume the final version will also be in TrueType format.

The Vera fonts are based on the Prima fonts if you want to see more samples. The copies I have display quite nicely with recent freetype versions (using the autohinter). The slides for my presentation at linux.conf.au were displayed with the Vera fonts. They didn't look as good as they might have because MagicPoint still uses freetype1 :(

The fonts should be available to the general public in about a month (or maybe a bit less). Jim has done a great job with this.

28 Jan 2003 (updated 28 Jan 2003 at 04:51 UTC) »

linux.conf.au:2003

The second day of talks went well. That night we had the conference dinner which went pretty well. We continued the tradition of auctioning off a conference tshirt signed by all the speakers. This year's tshirt was also signed by many of the people who attended the kernel summit at OLS. The winning bid was made by the people at the Sun table for about AU$2100.

Everyone had a good time, although a few had too much to drink. We ended up having to take one to hospital, where he spent a night. He was okay in the morning though. This is something the next conf organisers should take into account.

The talks on Saturday went pretty well (including mine). After a year of telling me how much better PPC laptops were, jdub ended up borrowing my laptop to give his presentation because his one had no VGA connector.

A group shot of all the speakers and some of the organisers was taken as well.

The closing ceremony was pretty good. We gave out bottles of "Holy Penguin Pee" to all the speakers. I haven't been able to find a photo of these online yet. I am pretty proud of of the labels, as I did the layout myself.

At the closing, it was also announced that the next LCA will be held in Adelaide, followed by Canberra in 2005.

A Speex file is available from the LCA website containing the audio from the Q&A session. It came out at 3.4MB for about 45 minutes. This is the format we will be encoding all the audio in for distribution on CD.

On the Sunday I didn't do much, as I was exhausted. I cycled into the city to see the Australia Day fireworks in the evening though. They were pretty good this year. It looked like they were using about 6 zodiacs to launch smaller fireworks, in addition to the larger barges. A great ending to a great conference.

Update: a picture of the Holy Penguin Pee. If you look at the larger version you can see a bit more of the penguin silhouette. Another picture of Linus getting his Holy Penguin Pee from Tux.

linux.conf.au:2003

Things have been going very well so far. Registration was a breeze (compared to last year). By having all the bags packed with the correct tshirt size and labeled with the person's name, we could process each registration in less than a minute. We had some of the speakers giving out bags, which was nice.

The speakers dinner on Tuesday and was very successful. It was a very relaxed atmosphere, and I got to talk to many interesting people. Some of the other organisers managed to convinced Linus to make an appearance at the welcome session. You can see the results here.

Tutorials on Wednesday went quite well. Went to a bit of malcolm's talk in the morning, and to Rusty's talk in the arvo. They were followed by the "Proffesional networking session" which also ran very well. Everyone who attended was very impressed with how things were going. Tony brought some very nice Little Creatures beers.

Thursday saw the start of the talks. Also, the fonts announcement happened at LWE, so I was finally able to talk about it :). Jim has done a wonderful job following through with this. I hope to get a copy of the Vera fonts to display my slides with.

Has a nice lunch with malcolm, alan and telsa and managed to miss the first lot of talks afterwards.

After the talks, we had a Q&A session. On the panel we had Linus, Tridge and Bdale. Part way through, Rusty was added as well because he was answering so many questions. Afterwards, someone said something like "you know you are at a good conference when you have 3 people on the panel and none of them are Alan".

After that, the Linux Australia AGM was run. As part of the conference registration, delegates automatically got a membership with LA. This has very quickly brought the total number of members up from 5 to about 405. There were nominations and elections for seats on its board. It wasn't as well handled as I would have liked. Since the nominations happened right before the voting there were many candidates I didn't really know, which made it hard to make an informed choice. Good to see some new faces on the board though. Will be interesting to see how things shape up.

20 Jan 2003 (updated 20 Jan 2003 at 14:02 UTC) »

linux.conf.au:2003

The mini-conferences started today, and have been going pretty well. More of the speakers have arrived, and there will be even more tomorrow.

Had take-away chinese down by the river for dinner tonight. jdub was lecturing the seagulls with a pair of chopsticks. They weren't listenning.

Probably the biggest news that has broken recently is that we got Linus. We managed to sell all tickets to the conference without this information leaking, so I am pleased with how popular it is so far.

Probably the best place to keep up with the media coverage is at news.google.com.

linux.conf.au

Spent the day packing bags for the Linux conference. Stuffing cruft into 350 bags is more work than you would at first think ... Good thing that there was a lot of people to help.

Alan and Telsa got in today, and got tricked into helping out with the bag stuffing.

I also put together an iCalendar file containing all the talks in the program that people can merge into their calendars. I don't think I have seen other conferences do this, so I don't know how many people will use it. Was a bit fiddly to set up with Evolution, and even more so when I realised I had my Evo timezone set wrong :(.

Hacking

My fontilus nautilus extension was in the new Red Hat beta (as well as being in Debian and Mandrake). It even got a mention in the ExtremeTech review of the RH beta. The newest release will turn on thumbnailing by default (if you have a new enough libgnomeui and nautilus), so it looks a bit better than the screenshots in that article. I also put out the first tarball release of nautilus-rpm, which currently only views info in the RPM database rather than modifying things. Still a lot to do to make it really useful.

108 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!