Automatic generation of .list files

When you use a VCS that makes it easy to manage several braches, it’s easy to get conflicts in the .list file used to generate the C marshallers. I recently fixed this problem in WebKit stealing some code used at least by various Telepathy components and by avahi-gobject, and I want to share the solution so every project can benefit from it.

First of all you have to open your Makefile.am and move the myproject-marshal.list file from EXTRA_DIST to BUILT_SOURCES and add somewhere in the file:

myproject-marshal.list: $(myproject_SOURCES) Makefile.am
        ( cd $(srcdir) && \
        sed -n -e 's/.*myproject_marshal_([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*).*/1/p' \
        $(myproject_SOURCES) ) \
        | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
        if cmp -s $@.tmp $@; then \
                rm $@.tmp; \
        else \
                mv $@.tmp $@; \
        fi

Then remember to remove the myproject-marshal.list file from your VCS (svn/git/hg/bzr rm).

The code will search for all the functions looking like myproject_marshal_RETTYPE__ARG1TYPE_ARG2TYPE and generate the myproject-marshal.list from them, regenerating automatically the list when you change a signal signature.

Update: fixed the blackslashes in the code that were misteriously eaten by WordPress.

Back from GUADEC[1]


Doesn’t this look like the GUADEC t-shirt?

GUADEC was great and talks turned out to be more interesting than what I was expecting after all the decadence discussions, this is also proved by the fact that I managed to stay awake during all the talks despite having a party every day :). Being in an awesome city with wonderful food[2] helped a lot for the final result, this is why I’m so happy that Gran Canaria was chosen for the next GUADEC.

In Istanbul I finally met other people working on WebKit or on related projects and had a chance to discuss with them about the future development of WebKit. While meetings on IRC are useful and allow you to talk with people from everywhere, real life meetings give you a much more efficient channel of communication: how about a hackfest for people working on WebKit, FireFox and desktop programs using them?

[1] Actually I came back to Cambridge ten days ago but, as usual, I fail at writing blog posts at the right moment, I wanted to write this on Sunday but my flight was moved to Monday and then real life started again. [Insert here other childish excuses for being so lazy]
[2] I’m already experimenting some Turkish recipes, Collabora people in Cambridge should expect a Turkish dinner really soon.

Gnome 3.0 != Topaz

What the release team just announced sounds like a good plan for Gnome 3.0 and also a good strategy for other future major releases. Kudos to them and to the GTK+ developers!
I’m sure that they will give us more details soon both on the planet and on the relevant mailing lists.

Hurray for Gnome 3.0!

Music back on my hard disk

After my desktop computer died over a year ago I have had no space for mp3s on my hard disk, so I only used the music on my mp3 reader.

A week ago I was able to free some gigabytes of disk space and finally I put my music back on my computer. The first problem I faced was choosing a music player, after some testing the only two competitors were Banshee and Rhythmbox. In the end I chose Banshee, but I have to say that this was a completely subjective choice as both programs are nice and have almost all the features I wanted.

Then I decided to cleanup a bit my mp3s removing duplicates. This is a “once in your life” task, so I didn’t want to spend hours finding a suitable program, understanding how it works and tweaking it: I just needed something that worked without too much hassle.
The first program I found was DupeMusicMatch, you just have to run it passing on the command line the directories where your mp3 or ogg files are and "-r" for a recursive search. DupeMusicMatch just works, it seems to finds some false positives but it seems also able to find duplicates if the file names differ a lot. Thanks Todd Korody for your easy to use program!