unionfs and diskless linux

Back to work, today I helped my coworkers setup a diskless linux system. As usual, it mounts root over NFS. But in our case, there's a nice twist; each host nfs-mounts both a shared readonly filesystem and a private writable one. We then use unionfs to overlay the two filesystems. I actually spent most of the afternoon tweaking initramfs to accomplish this effect, but the result pays off. We now can instantly boot any machine we want just by configuring the DHCP server, and each PC can customize its own filesystem, or else just inherit from the shared one. We get the best of both worlds: installing software once on the server makes it available to all clients, but clients can still be easily customized (unlike, say, lessdisks).


Play time over

Alas, today is my last day of vacations. Tomorrow I'll have to get back to work, and start writing my first year Ph.D. report. Ugh..

Yesterday night went to see the fireworks of the "popular party" here where I live. I found them most impressive, better than I've ever seen here.

I won't have much hacking time from now on, but luckily gNumExp is well advanced already. Besides the boring but easy job of porting the scatter and parametric plot objects to the new canvas system, one of the things that had me most worried was to render MathML inside a goocanvas widget, in order to present it in the legend. Thankfully, that part has just been solved. :-) It wasn't easy; I had to fix a couple of pygobject bugs first, and do some coding in pygoocanvas to support subclassing from goocanvas.ItemSimple and goocanvas.ItemViewSimple, including access to most fields.


Got the legend layout and item size working, then went for making the legend movable. Alas, hit another bug in goocanvas. Looks like some numerical instability in goo_canvas_view_convert_to_item_space() is affecting the coordinates of motion-notify-events.
As a workaround, calling goo_canvas_view_convert_from_item_space() makes the coordinates sane again. In the end, the legend is almost working, only preserving relative position during window resizes and during load/save is to be done. Then of course there's the MathML part waiting... :P

As planned, went for some biking in the afternoon, then out dinner. In the evening, finished the legend parts described above, that had been left unfinished by the time I had to go biking.


Yesterday I had another wonderful day at the beach. Went out for dinner. Got home, read email, sent a couple of goocanvas patches.

Alas, looks like today the weather is not as good at the beach, so I'm staying home, try to finish the legend in gnumexp, although I have to fight goocanvas/cairo bugs first :| Planning to do some biking near the end of the afternoon...


Spent a couple of hours in the morning/early afternoon trying to figure out why calling get_bounds() on a goocanvas.Group returned -32768 and 32767 as min/max x and y. My instincts told me it must be a bug in goo_canvas_text_item_update, but as it turns out my instincts deceived me; the item that returns wrong bounds is actually a GooCanvasPath. So I've narrowed where the bug must be, but it could still be a bug not only in goocanvas but also in cairo. Didn't have time to pursue the matter further as it was time to head for the beach.

Had a wonderful afternoon at the beach: nice and warm sun, light breeze, and really nice water. As usual, enjoyed some more reading of Miles Errant.

Got home, went to the gym, then late dinner.

Made a gnome-python release. Unfortunately my mind was not sharp anymore and couldn't stand more hacking. Just watch some TV, then a bit of reading, then bed.


gNumExp and GooCanvas

During my vacations, I've been slowly trying to convert my pet project gNumExp to GooCanvas. Previously it was using libnxplot (which I created years before cairo was available) and a my own canvas system. So I've been helping Gian Mario Tagliaretti on python bindings for goocanvas, since I also need them for gnumexp.

goocanvas has some good things:
  • It is fast (for instance it looked much faster than ccc, last time I tried both);
  • It has builtin accessibility and keyboard navigation features (though I haven't yet tapped into these features in my program);
  • It has a rich set of basic shapes that you can use;
  • It is very much language bindings friendly due to extensive use of GObject properties;
Unfortunately I also found some flaws:
  • The model/view split adds too much complexity with very little gain;
  • It doesn't make it easy to draw your own custom shapes, due to 1. model/view split, mandatory use of GInterfaces, lack of signals for customizing the drawing;
  • And the #1 problem, it is difficult or impossible to do proper layout. For instance, I'm stuck in drawing the legend of plots because I do not know how much space a legend items will take, but need to know in order to size the legend rectangle correctly.
The first two problems I can cope with, but I need to solve the third problem. Either I missed something in the API, or I'll have to make myself a new API and submit a patch and hope Damon will accept it. So much work just for a legend *sigh*