Present Perfect


Picture Gallery
Present Perfect


Filed under: Hacking — Thomas @ 8:54 pm

8:54 pm

Lots of fun hacks all through the weekend.

On Friday I hadn’t finished debugging some annoying bugs in our bundling code, and I really wanted it cleaned up. So I kept working on it at home and at some point I got into “the zone” and just went straight through and fixed it all. It was about five in the morning when I stopped. But now stuff Just Works, which is nice. After that I integrated both of Zaheer’s patches. It’s nice to have a contributor.

Andy’s here today for some hacking. We’re working on different things but it’s still nice to discuss ideas on our own projects. I don’t know exactly what he’s doing, but he cooked up a nice hack that uses generators to turn Twisted’s deferred model (where you have various callbacks that you chain) into a bloc k of code in a generator that *looks* linear, and where try/except can be used to handle failures instead of errbacks.

He had fun doing it, even though something like this already is in Twisted 2.0, which is very similar to what he did.

Zaheer wrote a tray icon for flumotion-admin indicating the mood of the planet. Awesome. I’m sure Matthias will like having this around.

I tried out Togra today because it can also use GStreamer. This cube is spinning and showing any of four GStreamer video streams being played. The one on the right is a stream generated using Flumotion on my laptop. The idea is to use this at a conference in a central location to show what’s happening in any of the rooms. Oh, and of course these cube faces are actually live video at the full framerate.

I worked on mach3 today, writing out some more of the intended design. I finally got over my hangup on proper configuration of “distributions” and “collections”. The idea was that I wanted to make it easy for people who mirror parts of vendor’s distributions locally to override the base URL for a vendor.

Initially I cooked up some object that you can .inherit() from and then any config variable not specified specifically on that object would look it up up the tree recursively. Now that works fine, but I can only use this if there’s only one axis people decide to mirror on. Like, I could make all Fedora Core 3 collections inherit from a generic FC3 object, and then changing the base URL on the generic one would change it for all inheritors.

But what If someone mirrors FC 1-3, but only i386 ? If you have more than one axis people can mirror on, this doesn’t work.

So I decided to just create a global object containing all collections, and you programatically set the new base url on all
of the ones you have mirrored. Since the base URL is normally the same for all of them, it means you still only have to specify this url once, and then loop along your chosen axes. So, a good middle-ground.

So I proceeded to implement this, and now I can ask any Distribution object to give me a chunk of configuration file data for an installer type. And I added some tests for that.

Back to work tomorrow, but that’s just fine.
It also means I will keep python for configuration files. It’s just not a TP if people complain.


No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.