4 Oct 2005 raph   » (Master)

Still under water

Wow, it's a long time between entries. The main problem has been an incredibly busy travel schedule - almost immediately after returning from the Netherlands trip, I'm on the east coast for a day for a potential customer visit, then tor arrives this evening, then next week is our staff meeting, then maybe there's a followup trip to Japan in early November (for which I want to see if I can hook up with some Advogatans in Japan if possible).

But life goes on anyway. I'm getting some pretty darn good looking color laser output from the Konica Minolta 5430 driver. I'll have all the goodies checked into CVS soon, and hopefully there will be some people in free software land who will want to play with it.

Also, you might notice that the certifications and diary ratings are working again. With some help from pphaneuf, I tracked the problem down to some zero-length profile.xml files in the database, which happened when casper's disk became full (a consequence of having spam^H^H^H^Hmail delivered to the same partition as Advo's db, a bad idea), then some of the virgule code segfaulted on the NULL pointers that were coming back. I'm hoping to get some time to add some new features, maybe by integrating StevenRainwater's code.

I'm also continuing to hack a bit on Ghilbert, and have also been participating in some of the discussion on AsteroidMeta. Ghilbert is still very much a stealth project, but I'm feeling closer to opening up browsing and posting on the web site. At some point, I'll need to decide between adapting existing wiki/web board software or crafting my own.

Cross-platform UI's

Another long-time fascination of mine has been tools for building cross-platform UI software. I've never been thrilled with any of the alternatives available, although of course wx comes close.

My main frustration stems from the difficulty of making really good cross-platform apps, which have a truly native look-and-feel on the three most important platforms: OSX, Windows, and X. I'm convinced that the Java philosophy of "write once, run anywhere" is wrong for desktop GUI apps. You want access to the goodies that the platform provides, and you need behavior to be different on different platforms. Writing for a lowest-common-denominator abstraction layer gets in the way. There's a tremendous amount of good knowledge encoded in the Apple Human Interface Guidelines, and I think it's far more important to design to those guidelines when running on the Mac platform than to be able to run the exact same source code on all your targets.

I've been experimenting with a somewhat different approach. You have a very thin layer on top of the native GUI toolkit, which gives a common interface to all the vanilla stuff like creating menus and buttons and so on, but ultimately you're building three different apps for the three platforms, with hopefully around 90% of the code shared. Much less than that and the duplication is onerous, and much more than that you're putting too much pressure on the abstraction layer without much benefit.

One reason, I think, for such an approach to work is that the design principles behind GUI toolkits are converging, not to mention the underlying system support. In the bad old days, a native Mac Classic, Xt, and Win 3.1 app would be very different beasts indeed. These days, you can rely on Unix-style processes and memory management. More to the point, I find Carbon HIViews and Gtk+ widgets to be strikingly similar. In both cases, you have a mainloop which uses callbacks to send events into the application, you have widgets implemented as objects-in-C, and in general what's different is details.

And I've got some specific ideas for smoothing over those differences in detail. For one, I think Tk has the right idea of using strings to communicate between the app and the UI toolkit, especially for callbacks into the app. It's really easy to deal with strings across platforms, languages, and so on, while the toolkits tend to have large, nasty, and opaque interfaces.

So far, my prototype seems to work nicely and the code is fun. Is there much interest in such a thing, or am I barking up a tree?

Latest blog entries     Older blog 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!