Knackered
This weekend, we tidied the garden a little. This involved some gardening and throwing away rubbish.
Thirteen large bin bags of garden waste, and a skip full of doors, concrete and metal tubing later, we've finished the easy tasks. Next week the new door and paving slabs arrive, so the hard work can begin. I haven't been sleeping too well recently so bought a herbal sleep remedy today, but I don't think I'll need any help tonight.
In other news, Jekyll finished last night. An excellent series with some interesting twists and a good mix of horror and comedy, I highly recommend it to anyone who can watch it (I believe it's being aired on BBC America next Saturday, and I'm sure its all over the interwebs).
GUADEC Roundup
This is probably the last GUADEC roundup to hit the Planets, considering that it finished a week ago. But, hey, I've been busy.
GUADEC was, as usual, a blast. Less sun, sea, and beach parties than last year; more rain, clouds, and parties in fake-Australian bars with too-loud music. If the weather was better we could have hijacked the landlocked beach, which would have been fun.
As an educational conference I totally failed at GUADEC, out of an entire week of talks I managed to attend a grand total of seven talks. Between the GNOME Mobile meeting sprawling across two afternoons, a few meetings with clients, occasional attending our stand and having to leave Thursday afternoon meant that there just wasn't enough time.
As a photographic experience I mostly failed. I took more photos at Matthew's excellent Clutter Foo talk than the rest of GUADEC itself, and more photos at the ping pong tournament than the others combined. From playing with my camera at the tournament I now know that the Sigma 17-70 lens is no way up to the challenge of sports photography: too slow and too short. My next lens however will be Sigma's new 30mm f/1.4, I've been eyeing it for a while now and Daf had given in to temptation so I could have a play with it. Sports photography will have to wait.
As a member of the organising team however, I don't think I totally failed. There were a few last minute snafus in the schedule but on the whole it appeared to hold together, the main problem being there being just too many good talks on at the same time. Congratulations of course are due to Paul, Thomas, Bastien and Rob, who kept the conference running on track all week.
Next year, Istanbul. That will be interesting.
NP: F♯ A♯ ∞, Godspeed You! Black Emperor
Devil's Pie Tutorial
Christer Edwards over at Ubuntu Tutorials has written a short tutorial on Devil's Pie. Thanks Christer!
Now if only people would stop using a hack I wrote several years ago and fix the real problems...
NP: The Last Flowers from the Darkness, Mark Van Hoen
Katachi Update
It appears that some people actually want to see Katachi in action before they try it. I can't imagine why, it only requires two libraries to be installed from version management, both of which are slightly obscure. So, here is a screenshot.
Also some other people don't know where to get GVFS and GtkImageView from. This is the git tree for GVFS, and GtkImageView is here. GtkImageView 1.1.0 should work fine if you fix the trivial compile warnings, so maybe I should ditch my local SVN checkout and use the release for now.
Announcing Katachi 0.1
Over the last few months I've been hacking on (yet another) image viewer for GTK+, using the hot new GVFS library (go Alex!) for asynchronous file handling and GtkImageView because I'm lazy.
It's got a pretty lean interface at the moment and is fairly fast in use. My goal is to use it on my Zaurus for reviewing images from a CF card in the field, so performance is quite important to me. As the primary users are photographers, filenames are not shown in the interface (just thumbnails). There is a lot of work left to do, but I've used 0.1 for some time now.
The source is being developed in a Bazaar branch at http://burtonini.com/bzr/katachi. I've just tagged a 0.1 release, a tarball of which is here. You'll need to build GVFS from git, and GtkImageView from svn, sorry. :)
NP: Closes Volume 1, Boards of Canada
GUADEC
Currently at GUADEC. We had the joint OpenedHand/Collabora party last night, which explains the headache I guess. Also I'm glad I bought spare jeans because somehow a glass of Pimms managed to get all over them.
I also saw KDE 4 running today. Best quote: Well at least maximise
works
.
Alex's GVFS talk was good this morning, I totally love it and can't wait for it to land in glib. The file monitoring API alone makes me want to have Alex's babies (but it appears I've been beaten to it). I've already written an application using libgio, which was amazingly simple. It's a shame that so many people were asking questions during the talk instead of waiting until the end, because he had to skip the last few slides.
Dear Interweb: Where Is My N800
This is unusual for Dear Interweb... my personal N800 was on our stand at GUADEC being used to demo Contacts, Dates and Tasks. Then by the end of the day when we packed up... it was gone. I'm hoping it is buried in someone else's bag from OpenedHand, but I'm also thinking that someone picked it up from the stand thinking it was their own.
Can everyone please check that any N800s they have are actually their own? Mine is quite distinctive, it has the full Pimlico suite installed (Contacts, Dates, Tasks) and my addressbook, calendar, and task list on. Thanks!
More GUADEC Lightning Talks
We've had so many great Lightning Talk submissions this year that we're going to have to split the session into two. There is still the original session at 15:00, but there is now another session at 17:00 for any talks that don't fit into the first session.
If you are doing a lightning talk, please remember to either check that your laptop works with the projector in the hall perfectly before the talks start, or put your talk on a USB memory stick -- something portable such as PDF or S5 please -- so you can use the provided laptop (a ThinkPad T43, 1024x768).
Embedding Binary Blobs With GCC
For a long time I've wanted to know how to embed binary blobs into executables. This would be most useful for files like Glade and and UI Manager definitions, which are required for a given program to work at all but either cannot be embedded as a string literal (Glade) or can be but is annoying (UI Manager). I finally asked the Interweb, and Daniel Jacobowitz replied with some pointers. It turns out that doing this is remarkable simple.
First, a caveat. This probably requires GNU ld, which may or may not be a deal breaker for many people.
First, create a data file. Let's call it foo.txt, and put some text in it.
Hello, World!
Using ld this can be read in as a plain binary blob, and then written as a standard relocatable ELF object.
ld -r -b binary -o foo.o foo.txt
Now we have a standard ELF object with the data and some useful symbols defined. objdump will show you the contents.
$ objdump -x foo.o
foo.o: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 0000000d 00000000 00000000 00000034 2**0
CONTENTS, ALLOC, LOAD, DATA
SYMBOL TABLE:
00000000 l d .data 00000000 .data
0000000d g .data 00000000 _binary_foo_txt_end
0000000d g *ABS* 00000000 _binary_foo_txt_size
00000000 g .data 00000000 _binary_foo_txt_start
Here we see 13 bytes of data, and a symbol which contains the address of the data. This is all we need to access it from a C program.
#include <stdio.h>
extern char _binary_foo_txt_start[];
int main (void) {
puts (_binary_foo_txt_start);
return 0;
}
Now if we compile this and link it against the generated object, we'll have a binary.
$ gcc -o test test.c foo.o $ ./test Hello, World!
Hooray! One small problem which alert people should have noticed: the string itself is in the .data section, which is read/write. For my use, I want it to be read-only data in the .rodata section so that it isn't copied for every instance of the application. As far as I know, this isn't possible with ld but objcopy will let us rename sections on the fly.
$ objcopy --rename-section .data=.rodata,alloc,load,readonly,data,contents foo.o foo.o $ objdump -h foo.o ... 0 .rodata 0000000d 00000000 00000000 00000034 2**0
Excellent, problem solved. If you want to download this sample, I have a tarball. Many thanks to Daniel Jacobowitz for pointing out how to achieve this.
Update: note that any data embedded in the binary like this won't be terminated with a NULL. This is obvious in hindsight, but due to luck my example still worked. There might be a way of asking objcopy to append a 0 to the end of the data, but if not always remember to use the start and end pointers or size instead of just the start, or append a NULL yourself before converting to an ELF.
NP: (), Sigur Rós
Dear Interweb: GCC and Arbitrary Binary Sections
Mono/C♯ has this nice feature where arbitrary files can be linked into the final binary, and you can programmatically access them. I'd like to be able to do that in C too, I'm sure it is possible, I just don't know an easy way. I know that if you have a section foo, then ld will create __start_foo and __stop_foo symbols which point to the start and end of the section, so all I really want is an easy way to get ld to use the contents of an arbitrary file (say, ui.xml) as a section.
Anybody know how to do this? Update: thanks to Daniel Jacobowitz for giving enough clues to a working, and clean, solution. I'll blog this shortly.
NP: The Sound Of A Handshake, cLOUDDEAD
Pimlico and Maemo Synergy Overdrive!
We've had Dates on Maemo for a long time now, but now and again people asked for Contacts. We never really bothered to build Contacts because it isn't ported to Maemo, so doesn't fit in to the environment. Well, yesterday I found myself with a clean Maemo 3.2 Scratchbox (quite unusual I assure you) so thought I'd build a package anyway. It's not integrated into Maemo, but it's in our repository now.
Hopefully this will cause a fanbase of programmers to spontaneously appear who will help us develop the next generation of Contacts, which is modular and thus far easier to port to various platforms.
Along with my recent Tasks on Maemo announcement, all of Pimlico is now available for Maemo. I'll have a N800 with the full suite on at GUADEC if anyone wants to see it.
NP: This Too Shall Pass, Breakage
Tasks 0.10
I'm pleased to announce that Tasks 0.10 is now available from the Pimlico Project. There are a few fixes here, but the big news is an initial port to Maemo (thanks to Rob Bradford for the bulk of this work).
- Basic Maemo port (currently for the N800 only, but should build for the 770)
- Internal refactoring of the grouping architecture
- Don't allow tabbing in the Notes field (#381)
- Make the Notes tab label bold if there is a note
The Maemo port of Tasks is a prime place for anyone who wants to learn about programming Maemo. The Maemo-specific code is currently 595 lines long (a chunk of which need to be factored out), so filling in the missing pieces (such as starting a web browser) is easy. If anyone wants to get their hands dirty, mail me.
NP: Burial, Burial