Older blog entries for pphaneuf (starting at number 179)

Festival d'Été de Québec

hub, mich and I went to Québec City this weekend. I mainly wanted to go see Violent Femmes, which turned out to be awesome, but going to the Old City once in a while is just a plain cool idea!

I asked my good friend Jean if he could lend me his 70-200mm/f2.8L USM lens. He offered to lend me a month ago or so but had to retract his offer because he had forgotten that he was going to need it for the Formula 1 racing in town, but I was just thinking that this would be a perfect lens for some concert photography. So I asked him.

He ended up lending me his Mini Trekker bag filled with the 70-200 lens, but also the 24-70mm/f2.8L USM lens, an ImageTank G2 and Joëlle's Canon EOS 10D. So Jean and Joëlle are probably going to make it to my very good friends list. ;-)

We first walked around the Old City a bit and went to eat some crêpe with cider (as hub tells us is the tradition, and is indeed an excellent idea, as the cider seems to diffuse when it contacts the hot food, try it!) at a wonderful place called "Casse Crêpe Breton", then we headed out to the show.

The show turned out to be excellent, with the previous band, Tarmac (from France, founded by a couple of the guys from Louise Attaque, but I'm not linking because their web site is evil) joining them for one of the encores, doing a spontaneous song in french (with Gordon singing, not one of the Tarmac guys!). I didn't take much pictures of the show at all after all, letting hub have some fun with the 10D and the 70-200.

Photo: Violent Femmes (shot by hub).

After the show, and pretty much running the 10D out of batteries, we switched to film for some night photography. I don't think this will yield too interesting stuff, but we had some fun walking on top of the Old City's fortifications (trivia: Québec City is the only fortified city left in North America), and we ended it up with a nice cool-off beer at a pub, where we had an extra-cheerful waitress.

The next day, we went to the Montmorency Fall Park. We had some pretty good weather, and decided to climb up the staircase leading to the top. Now, while all this fancy photo equipment Jean and Joëlle lent me is awesome, it is also equally heavy. I usually like to travel light, so this was quite the change, and I've got a few aching muscles now to remind me of how stupid carrying this much equipment up a cliff is.

Photo: Montmorency Fall.

Thankfully, after crossing the suspended bridge over the fall and amazing mich with the amazing powers of a polarizing filter, we awarded ourselves some ice cream. As the we heard some thunder in the distance, we thought it would be a good idea to get back down and not be stuck in a rainstorm.

Before getting back to the car, I wanted to give the platform that is right next to the bottom of the fall a try, so I left my stuff to hub and mich, and went there. Boy, that's a lot of water, I should have wore my swimsuit!

Photo: Escaping from the roaring waterfall (shot by hub).

We gave Orlean Island a try, but the weather was proving to be difficult and there was a lot of traffic headed out of the island's narrow bridge, so we didn't really stay long, just drove around one half of the island. It started pouring like crazy while we were waiting in traffic.

We tried going to the Place de la Capitale shopping mall, which is one of the largest in Québec, but silly us, we got there at 6 PM on a Sunday, it was closed. Back to the Old City for some good food at the St-Patrick Pub, followed by some wandering around town, mostly along the fortifications. We then left mich to head back to Montréal (the bastard is starting his vacations just now!)...

Diary of an Old Fart

One more birthday, making that the 27th one. Life is okay, taking some strange turns, but I suppose it would be boring otherwise. There was a ton of people at my birthday dinner, thanks to everyone for coming, that was really cool! We went at St-Hubert, nothing really fancy, but nice. Mélanie gave me Melissa Auf Der Maur's new solo album, which is pretty good, not the best I heard, but I like that particular style, personally. She and her mother also gave me a "super combo gift" of the newest Beastie Boys album, a small camera bag (really handy for travelling light!), an 80A filter (finally trying to get rid of that horrible orange tungsten cast!), a roll of the newish Fuji Astia 100F and a roll of good old Fuji Reala (rate it at 80, kids!).

Lots of action at my birthday!

A subset of us then went to Hurley's for one, two or three pints of good beer. Was nice talking to wlach, hub, pcolijn, andrewmp, sfllaw, ppatters and a others there. Stayed rather late, but hey, it's not your birthday everyday! Got to have a small night bus adventure with mcote, which unfortunately didn't actually involve a bus, but did involve talking to a nice guy at Atwater and watching our bus drive away in the night. Time for a shared cab ride, I guess...

20 May 2004 (updated 23 May 2004 at 16:01 UTC) »
Good bye, Lenin!

Pretty good movie, goes through a number of details in the transition from communist East Germany to the unified capitalist Germany, as you may expect. Probably has much more meaning for someone who was there, but it was still pretty exciting, and sometimes infuriating, the film passed on some of the feelings of being there rather well. Has a few good twists, I liked it a lot.

Rambling about Garbage Collection and Runtimes

I'm rather disappointed that people often forget that reference counting is a form of garbage collection for real. Of course, in most low-level languages, it doesn't help that it has to be done manually, and GCs are generally thought of as automatic, but even in semi-low-level C++, you can have smart pointers make it automatic, and some higher-level languages like Perl use automatic pure garbage collection without too much damage.

Note that when I think of smart pointers being able to make refcounting automatic in C++, I'm not talking about a smart pointer that adds shared ownership, like Boost's shared_ptr, but rather just making automating things. I think that GC should be a whole-system thing as much as possible, for example being in GObject and then having a smart pointer take care of the refs and unrefs for you.

This is one of the reasons why I'd choose the C/C++ option in the choice of a solid open source platform.

The idea that graydon mentioned not so recently of not allowing assignment of pointers, only initialization at construction time, is intriguing. It sounds like it could be overly restrictive (a bit like disallowing the use of malloc would also "solve" the problem), but it is not clearly so. I just finished my xplc_ptr rewrite, and I was thinking that I could try disabling the assignment operator and see how well I do, as an experiment. So while I'm not quite sure it will work out, things are not completely hopeless, it seems.

Another of the reasons is that I feel that a richer runtime like the CLR, the JVM or even Parrot is, well, higher level. What is wrong with that? Nothing at all, particularly when you're writing applications, but this is the bedrock of everything we are choosing here, and I feel that this needs to be as close to the metal as possible.

Why? This will be the lowest possible layer of our platform. By definition, anything that is lower than that won't be in our platform, and I find the choice of these runtimes to be rather high and excluding some interesting things. Also, I find it rather disappointing and not a good sign that things that are commonplace and that I consider like huge advances in my quality of life as a programmer, like deterministic destructors, are inexpressible in this new environment. You can generate "destructor friendly" code, but if you get passed a pointer to an object with a destructor, you can skip calling the destructor if you don't feel like it. This is a step backward! Runtimes like the C++ runtime, GObject, UNO, XPCOM or XPLC added that feature that is missing from the lower level platform, while still keeping us in contact with that platform.

Another thing is that this requires big sweeping changes, and everyone here should know what to do with these: "Oh, I know, we just need to change everything to use Foo instead, and it'll all work perfectly!"... Yeah, right. Not that it wouldn't work perfectly, but it will never all change. If we make the CLR our platform, then things will just stay out of the platform. With the C/C++-based approach, these things are already on our platform.

For example, code outside the CLR doesn't benefit from any help at all from the GC. If you picture yourself a world where we use XPLC (of course!), you could easily have a CLR inside your process (much like you can embed a Tcl, Perl or Python runtime inside any program), and all the code, inside and outside the CLR, would benefit from the better-than-raw-metal platform. For the managed code, there would be no visible refcounting, as the runtime itself would add a single reference to outside objects, and the GC would then release that single reference. There is potential for circular references, but then, all of the interoperation scheme do, even if you have the CLR as a starting point and call out into unmanaged code.

I have a strong feeling that ultimately, reference counting is the only universal garbage collection scheme that will work across runtimes. So my reasoning is that we'd be better off using the universal GC scheme as the "platform", and take advantage of its universality to provide fancier GC schemes on top of it.

Work

We've been really busy these days, being under the influence of a compressed schedule. Someone higher up has decided that disregarding the laws of physics would yield better profits, which is usually not a problem (as in "higher ups usually don't do that"). Sounds like a bit of growing pains, but I feel that communication in the company is actually good enough that the message we're sending here in R&D reminding management that the laws of physics aren't just for the looks is actually getting through.

Among other (related) things, dfcarney has been in the Toronto (non-R&D) office for the last two weeks. I was initially saying that they were brainwashing him, but dcoombs ended up declaring that they had eaten his brain. Makes sense: they washed it well before eating it. They're not savages, after all. No problem, we'll just stuff dfcarney's head with our R&D Special Hot Sauce when he comes back and see where that goes...

We even gave a job to this guy, so if you're looking for a cool job in Montreal, check us out!

By the way, hub: when should your temporary work visa be ready? It'd be lovely if you could come soon after GUADEC!

No Pants Day

Yesterday was No Pants Day. I celebrated.

XPLC

I finally got decent support for categories in XPLC, which is pretty critical to pretty much anything you'd want to do with components. So that's a good thing. I should make a release as soon as I have some time...

On the other hand, ppatters sent me an email saying that it doesn't actually work. Oops.

The Great (Sound) Wall of Germany

I saw Einstürzende Neubauten last week. I think I've never heard so much noise in my life. It's not that it was too loud (although it was actually pretty damn loud, but not significantly louder than most concerts), but there was no space left in the air, if you see what I mean. The genius of it was that it was still fully hearable and you could make out everything, it was just threading this weird area where you hear an awful lot of noise, but it's still music.

I was pretty amazed by the performance of Blixa Bargeld, the singer. There were some sounds on the album that I thought were samples of some metallic grating, possibly of trains breaking or something like that, that they would have had post-processed into making a melody line out of. No, that's him singing, in a really high-pitched tone (falsetto), but with amazing level of control, hitting notes smack on and sometimes having a well-executed slowish tremolo. It reminds me of opera singers, in a way.

They had all sort of strange instruments, including a flute made up of four plastic pipes of about 5 inches in diameter and 15 feet long, operated with compressed air. It was also "recycled" into a kind of percussion instrument, played quite delectably by Rudolph Moser.

That was very interesting and made me gain new insight on their studio work, but I don't think I would go again by myself. If someone goes, I might go, but I don't know, maybe it was too loud, or too weird all at once, for me. Maybe I'm getting old? I think that their live performance, while well done, lacked a level of purity and cleanliness that their studio work has, and while you always could recognize the songs very quickly, the flavour was completely different.

That said, I heartily recommend the two albums of theirs that I have, Ende Neu and Perpetuum Mobile, excellent piece of recording, quite lyrical at times (even though I don't understand most of it!).

Funny Story

While setting up a few machines for new coops at the office, someone was pointing out that we only have a single stick of memory that passed memtest86 without any errors. "This one?", I said, pointing at the stick. "Bzzzz!" said my finger to the memory stick. Hmm, well, it might not work anymore!

Should I Stay or Should I Go?

I'm thinking about whether I should attend the Linux Symposium this year. Last year was not very good for the NITI delegation, mostly because we stuck together too much and didn't stay much after the talks, so we didn't get to take advantage of the main attraction of such conferences: people.

I think that we were too many NITItes, and thus had little incentive to talk to other people, but even though there will be a good number of NITItes this year too, I have been promised that we wouldn't let this happen again. And there are quite a few good talks, and even though my talk on XPLC has been turned down, I might end up doing it (of sort!) to hp, who I think will be there...

There are talks on epoll(), X Window (by Jim Gettys, who I usually find interesting), AIO, user-space device drivers (why does visor.o exist again?), scaling both ways, lockless reference counting, kernel events layer and D-BUS...

People. Maybe it'd be worth going for that, as long as we remember that's why we're there!

Life

I'm super-busy these days, but I'm having a great time. I don't know how I manage, but somehow I do. I'm running a bit short on sleep, nothing too horrible, but I should try to recover...

Good News

I received my very first income tax refund check from the government last week! This is nothing special for most people, but until this job, I had a pretty low base salary that was padded with "standby duty" extra pay to a good salary, which meant that it threw off the income tax deduction calculation, meaning that I paid thousands of dollars in income tax every year, instead of getting a refund. But that time is gone now! It was slightly over CDN$300.

Bad News

I accidentally dropped my Palm Tungsten E on the hard flooring of the Complexe Desjardins while going to work. It fell perfectly face down, cracking the screen in a magnificent pattern. I have an extended warranty, I think it might cover that, but if it doesn't, maybe I could send it to hacker, so he can work on Tungsten E support in pilot-link. It was worth slightly over CDN$300.

Late-breaking news: I had another check coming, slightly bigger, so it's not so bad after all!

Contrast

Hmm, now I wish I had seen the movie that apenwarr saw recently. One of the top thing that annoys me the most when I look at photography or movies is the lack of contrast, possibly second only to bad focusing. People seem to be able to take a lot of crap when it comes to contrast, as proven by the popularity of flat-panel displays, but not me. The physical dimensions of flat-panel displays is really cool, I'd love to have a display of that size, but I can only stand the most expensive ones, and they wouldn't do too well compared to CRTs that are half the price...

A dull movie screen or dirty projection lenses (or window) could turn a movie with excellent photography work into a dullish work, visually speaking. Of course, most movies find a way to suck in the story, acting or directing department much earlier, but I have to say it is very gratifying to see a movie that is great on all these other aspects also have masterful photography work.

The Change of Guard

We got a fresh new batch of coop students to scare to death today.

Work

Pretty cool achievement last week, I finally made our build system less recursive (from the top-level), so that using make -jX is getting to be very effective. Hello distcc!

We also had the visit of our CTO, and he talked to me about how he wanted the product to become more modular and componentized, which galvanized me. I was, of course, already working in this direction, more or less covertly, but it's really cool to have the CTO come and tell me that.

I Saw The Robots

And they were incredible. True legends.

5th of the 23rd

Here's my contribution to clarkbw's 5th sentence of the 23rd page of a book idea:

Another related worry was that the paradoxes of logic, such as the Epimenides paradox, might turn out to be internal to mathematics, and thereby cast in doubt all of mathematics. -- Douglas R. Hofstadter, "Gödel, Escher, Bach: an Eternal Golden Braid"

XPLC

ppatters started using XPLC for his non-directional project. That has all the good of having more users and all the bad of having more users. He comes to me, telling me where the documentation has been lacking, asking me how to do something, and I answer him that there's a good news and a bad news. The good news is that categories do exactly what he wants to do. The bad news is that there's only unimplemented interfaces and a unit test (write tests first!) for categories. So I have to fill that in this, it seems!

I will also need some smart pointer goodness soon, the xplc_ptr I cooked up in a couple of minutes is rather junky in actual use.

20 Apr 2004 (updated 17 Sep 2004 at 19:52 UTC) »
Kill Bill: Vol. 2

Gut-stirring.

BBQ Idiocy

I'm a certified BBQ idiot. For the last 4 years, we've been using a cheapish BBQ that I rescued for free from being thrown in the garbage at my previous job (we moved office and lost access to the lawn and storage area). Recently, it broke down. Tried to see what was wrong, cleaning the pipes and doing all sorts of things, but couldn't repair it. I figured the burner must have had some problem, and since it's pretty old and crappy, the whole thing was rusted together, so I couldn't disassemble it.

So off we go and get a new BBQ. It's pretty nice, with a massive (as in heavy!) cast iron grille. There I am, amazed by the new technology of briquette-less BBQ and stuff, I build the thing, with some help from a friend. We go and remove the old BBQ, taking off the propane tank. To my dismay, it is very light. It doesn't make the sloshing sounds of liquid propane inside. It's empty.

Well, you don't need to be a BBQ expert to figure out that an empty propane tank leads to a non-working BBQ! I could have sworn that I had checked the bottle and that it wasn't empty, but apparently, I'm crazy. Maybe it wasn't empty, but that I didn't shut off the valve properly and it leaked after the fact?

Anyway, maybe it actually works, but I have a new BBQ now. I was getting tired of the old one (I had replaced the grille with a "universal grille" and it had the bad habit of falling off and having a big gap at one end), and I have found a friend to possibly pass it on, so it's not lost if it does work...

Resource Management and Garbage Collection

apenwarr recently pointed me at this article about resource management. It's pretty good, and I think it shows that C++ can in fact be used almost as nicely as a garbage collected language as far as resource management goes.

One of the key idea that I find is that you have to distinguish between a strong, owning reference and a weak, non-owning reference. 99% of the objects in most programs have a single owner, but flattening everything to normal pointers makes it impossible to distinguish. Some people then go and try using smart pointers everywhere, but this is wrong too, most smart pointers act as strong pointers, which I just said most objects should only have one pointing at them (so if you have smart pointers everywhere, you better have just as many objects!). For all the alledged smartness of the smart pointers, you still have some thinking to do.

Who owns what in your programs?

Runtimes and Platforms (again!)

async wrote two interesting diary entries.

I'm not a big fan of the fancier forms of garbage collection, because most of them are something that the whole system has to buy into, whereas with explicit reference counting, I can use fancy garbage collection (in which case, the refcount stays at 1 all the time even though there might be multiple references, because the GC is the one managing things), I can easily have automatic refcounting well-suited to the environment I'm using the object in (with C++ smart pointers, for example) or in the last resort, I can call the refcounting methods directly, without any kind of language or runtime support beside what is needed to call methods.

Their biggest downside is their susceptibility to circular references (especially if it spans more than one runtime), but I find these a relatively rare occurence that should be kept under control. Remember the difference between strong and weak references, and you increase the refcount only on strong references, the truth is that a strong circular reference is a bug, right up there with dereferencing NULL pointers.

Implementation inheritance is a bit trickier. Consider that this involves embedding the parent object in your object, and that in turn, this requires very intimate knowledge of the parent object. Can you say broken encapsulation? You can still use interface inheritance to be compatible, have a reference to your "parent" object and forward the calls (I wish C/C++ had tail calls here!). This could be automated, obviously.

I think that we need the runtime/platform (at the level of XPCOM/XPLC/UNO/.NET/Java, not at the level of GNOME libraries) to be at the lowest possible level, so that there can be as much on top as possible. Mono can use PInvoke to call into C/C++, but this is going out of the platform, where something like XPCOM/XPLC/UNO could be made to call between C, C++ and the .NET CLR as equals. You can use these component systems even from as low as your processor's native assembly, which is a tribute to the fact that everyone can join the party!

I also find the quote from hp that these solutions are "half-measures" rather distressing. This is engineering, he should know better. This is like saying "oh, this new language is so much better, we need to rewrite everything in it!". We all know this is not true. In real life engineering, it's about making the right compromise. Call them "half-measures" if you will, but thinking that we can switch the whole GNOME layer to a whole new lower-level platform isn't being very realistic. I know he doesn't really think that, you can have bindings like GTK# and such, but in the ends, these are bindings, will be lagging behind and someone will want to make a native version someday.

If you make Mono play well with a component system like XPCOM/XPLC/UNO/GObject, then you could just use the objects directly, without much in the way of bindings. It is probable that most platforms like these would probably gain from having thin wrapper helpers to make them "feel" more native, but you would still be able to use them directly, for example when a new widget would come out in GTK+, there would be no need to wait for a new version of your bindings that would include support for the new widget, you could upgrade GTK+ and use it right away.

Girl with a Pearl Earring

Very good movie, a nice slow pace and strong emotions without overacting them. It didn't leave a very strong mark on me though, it felt like an extract from someone's life, made in a rather non-dramatic way (for a movie, anyway!), but that seems fitting to the story of the movie, which is just the story of that painting. When Vermeer's wife yells at him, I think it woke up some people in the theatre!

The Last Samurai

Not great, but quite watchable, with some excellent battle sequences. I saw it dubbed in french (it was the last theatre that still had it, and I wanted to see it on a large screen, for the battles) at a rather poor theatre, maybe the acting comes out better in the original version (it always does...).

Software Pricing Models

RickMuller was (not so) recently discussing software pricing model.

I agree with his reasoning, and also would add that this might be a good way to reduce piracy (which I am against). With a subscription model, you can enforce licenses more easily, through activations and such things. Stealing software will be more involved, requiring "cracks" and other things like that, rather than just simply copying the CD that your friend has.

If the price of the subscription is not too high (which can be done, because renewals will keep bringing in revenue over time), this would allow people to get software more easily. Here, Microsoft Office XP Standard Edition is about 480 USD, and the Professional Edition is about 670 USD! No student, for example, can be expected to pay that! To be fair, there is a student edition at 170 USD, but we all know that strategy... They could price Office at something like 40 or 60 USD per year or so, and it would be that much more accessible for lower income customers, while making it harder to steal (through activation), generating more overall sales and having all the stability and bloat-avoidance advantages RickMuller mentioned.

Making people actually pay for their software is also an excellent way to level the playing field for open source software. In practice, I have often seen the case where someone asked me why they should use this slightly inferior open source software rather than keep using Windows or Office, and I told them that it was free, to which they matter-of-factly replied that Windows and Office were too, and they didn't suck for it. Ah, yes, of course, these are free, it's well-known...

170 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!