Liblarch, a python library to handle trees and acyclic graphs

Lesson number one Some of you may be aware that Getting Things GNOME! 0.3 was released. What you may not know is that GTG is now using a python library called liblarch and that liblarch 2.1.0 was released today.

Liblarch is a python library specifically designed to handle complex trees (including directed acyclic graphs) and to display them. A liblarch-gtk component allows you to display different views of your tree in a GTK TreeView widget without any effort.

During the development of GTG, we faced major problems to handle our tree of tasks and our tree of tags. The features we wanted proved to be very complex to implement and very fragile : solving a bug would create two others. And the performance work was a nightmare.

We decided to abstract the whole concept of tree and to make it a standalone, well tested and optimized library. We are very proud of it and we are looking for more applications that would benefit from using liblarch.

How to be a lazy but successful Google SoC mentor

Each year, Google is sponsoring a Summer of Code (SoC). During three months, Google pay students to work on various opensource projects. Each student should be followed by a « mentor » from the original project but the mentor is not paid, he receives a tshirt.

Google SoC

3 years ago, I was a SoC student and developed the now abandoned Conseil but I learned a lot from that experience.

This year, one of the GNOME SoC projects was related to Getting Things GNOME!, the software I started with Bertrand. The project was to add the concept of geolocalization to your tasks list so you would be able to see where you can do tasks. The candidate, Paulo Cabido, seemed bright and skilled. I was the mentor. Strange to be on the other side of the fence.

Getting Things Gnome! 0.1 – « Just 5 minutes more »

GTG icon Bertrand and I are very proud to announce you the first release of Getting Thing Gnome!, a personal organizer and todo list manager for the GNOME desktop.

GTG allows you to add and edit tasks with nearly no fields at all. It support subtasks and tags that you can use the way you want. It aims for flexibility. Getting Things Gnome! goal is to adapt itself to your workflow, not the opposite. GTG also brings the concept of « workview », a display of tasks that can be done right now, right here.

The signals and threads flying circus

Disclaimer : if you don’t program in python and don’t know what a thread is, you probably want to skip this post as this is highly technically geekish loghorea which is not funny or even understandable in a remotely perverse way. Knowing some Flying Circus episodes might also help.

Say that you have two thread in your python application. One is « TV_speaker » and the other is « knight ». Those two threads live in parallel their own live and all is good. But sometimes you want the « TV_speaker » to stop. In order to do that, you will ask the knight to throw a chicken at him. And the first thing that comes to mind is using a « signal ».

You cant to call knight.send(« chicken ») and that, on the other side, tv_speaker.connect(« chicken ») handles things correctly.

Problem : using google, you find that, since 2.6, the python documentation is barely readable and unusable.

Hopefully, you find your way back to the good old and well organized 2.5 documentation only to discover that those signals are UNIX signals and have nothing in common with signals you can use in a GTK application.

Worse : those signals don’t work with threads !

You seat down, cry and wait that a giant foot quickly stops your pain.

Monty Foot

Le conte du mousse et des vingt-neuf navires.

Il était une fois un roi qui désirait étendre son empire. Ses conseillers lui affirmèrent que les terres par delà l’océan regorgeaient, du moins disait-on, de richesses. Notre bon roi pris la décision de construire un navire afin de s’en aller conquérir les pays sauvages. Le garde du trésor affirma que, étant donné les richesses que devrait ramener une telle expédition, l’opération serait plus que profitable. Armés de leur calculs complexes, les savants prédirent que l’équipée mettrait vingt-neuf ans à atteindre l’autre rive et autant à revenir. Fort de sa sapience légendaire, le roi ordonna l’ordre de construire vingt-neuf navires, afin que le délai soit réduit à deux minuscules années.

Et l’on décida de ne plus écouter les savants.

Le chantier était d’une telle ampleur que notre bon roi sentit ses forces le quitter bien avant que la première quille aie frôlé l’onde. Il fit venir son fils aîné et lui confia la tâche de terminer la construction des vaisseaux avant de rendre son dernier soupir.

Devenu roi, le fils aîné alla jusqu’à lever de nouveaux impôts afin de s’acquitter de sa tâche. Lors de l’inauguration des bateaux, il prononça un grand discours et chacun, du plus simple balayeur au maître de cérémonie du palais sentit une bouffée d’orgueil et de fierté à la vue des vingt-neuf magnifiques navires fendant les vagues dans une gerbe d’écume.

Les navires s’éloignèrent et nul n’y pensa plus. Le roi mourut quelques temps plus tard, heureux d’avoir respecté la volonté de son illustre géniteur.