Older blog entries for raph (starting at number 146)

5 Nov 2001 (updated 5 Nov 2001 at 17:14 UTC) »
Mac OS X first impressions

The iMac came this week, and I've spent quite a bit of time playing with it. It's now landed in Alan's playroom, so at least I won't be tempted by it during the day.

Overall, they've done a great job. Alan (who's five and a half) is able to use the machine fairly fluently. Not only that, but the machine more or less worked out of the box. These are pretty strenuous tests, ones that a commodity PC running any version of Linux would fail pretty badly.

Underneath the hood, it's a pretty good Unix. I was able to compile Ghostscript, ircii, and a few other things with absolutely no difficulty. About the only thing I really miss so far is strace, and that's possibly because I just haven't found the BSD variant yet.

The expectations around Macs are just so different than what I'm used to. Consider this Mac user who feels that one kernel panic in a month is cause for "glowing pride" about stability. I also got a kernel panic doing userish things, but probably putting the machine under more stress than most users (I tend to do that). To me, this kind of stability record means that it needs some serious work. I wish the Darwin team well on this.

Raw hardware price/performance is another area where Mac and PC hardware diverge. I got the least expensive iMac (at $799), and it is obviously made with some of the cheapest parts possible. For one, the 500MHz G3 CPU is roughly equivalent to 600MHz in the x86 world. Try buying a new x86 machine that slow - it'll be a challenge (for contrast, the $599 Dell Dimension 2100 has a 1.1 Celeron, and twice as much RAM, to boot). There's also 64M of PC100 RAM in there, and a 20G hard drive. These aren't insane choices for a low-end system, but even their "high-end" dual 800MHz G4 clocks in with generic PC133 memory. Apple charges a pretty penny for this trailing-edge technology, as well. iMac RAM upgrades run $0.78/MB, while Crucial charges about $0.11/MB. PriceWatch has PC100 memory for $0.045/MB (and PC133 for the same price!), but to me the chance of compatibility or stability problems just wasn't worth it.

Of course, Apple users aren't buying megahertz and simm's, they're buying a system that just works. For the most part, I think they're getting their money's worth.

Diehard Mac enthusiasts will have you believe that Apple hardware comes with some mystical "Quality" missing in x86-based PC's, but I tend to doubt it. I've found a few minor irritants with the machine that you'd think Apple would have fixed. The most annoying to me is the fact the keyboard generates extra press events when you type with "rollover". The way I type "cd ", it comes out as "cdd ". The $11 Mitsumi keyboard that came with my cheapo dual 400MHz Celeron doesn't have any defects like this, and it's quieter and feels better to my fingers.

You get the development environment for free. That's cool. For native OS X applications, you want to use ProjectBuilder, which is a decent IDE based on Jam/MR for the actual build engine. The compiler is GCC, and the debugger is GDB, but the IDE does a pretty good job abstracting those away. You write your apps in Objective-C, on top of the Cocoa framework, which is all actually quite similar to NextStep. There's been a GNUstep project for a while, attempting to clone this environment, and they're no doubt hard at work on the OS X enhancements as well.

There's also Carbon, which is primarily for porting older Mac apps. That's much less interesting to the free software community. Lastly, there's Classic, which boots the actual MacOS 9 operating system in a virtual machine. It works, I suppose, but it feels clunky (even by Linux standards), and it's clear that its main function is to go away as OS X native applications become available.

I like the "app bundle" concept, in which applications are directories containing an executable, localization files, and other resources. I think it's easier for users than the Unix tradition of binaries in /usr/bin/appname, data under /usr/share/appname/, etc. Further, they've got libraries in bundles the same way (called "frameworks"), so your library and header files are together. Even better, it's pretty easy to create a bundle. We'll probably put make targets into the Ghostscript build to make it into an OS X framework.

OS X is visually quite appealing. With all the antialiasing and transparency, it feels "softer" than a comparable Linux, or even Win2k install. I also note that the aa font rendering seems to have changed radically between OS9 and OS X. The former is your standard algorithm of applying the TrueType hints intended for non-aa rendering to the outline, then rendering at 4x and subsampling. In MSIE5 (which is the default browser), a lot of glyphs end up not looking very good. The "2" in Times Roman is a classic case.

In OS X, the hinting is a lot more subtle, so it's quite a bit closer to a non-hinted aa render. It's a tough tradeoff. You get much more accurate rendering of the glyph shapes, but at the cost of lower edge contrast. I get the feeling there's still some hinting in there, but haven't investigated carefully yet. I'll post some screenshots when I do.

You'd think that an overall softer render would have been a good opportunity to crank up the resolution, but no. In fact, the default is 800x600. This is roughly the res I'd like to see on a handheld, not a desktop. Fortunately, it's easy enough to crank it up to 1024x768. Part of this, no doubt, is Apple's penchant for cheap components. While the video tube doesn't suck, it's only 15 inches, it's a plain shadow mask (as opposed to Trinitron), and it has a fairly high "black" reflectance.

I'm confused about whether the underlying software will support a move to higher resolutions or not. All the user interface guidelines are written in terms of pixels, and the UI builder tool (InterfaceBuilder) places components in absolute pixels, rather than the logical layout of Gtk+ and others. This will make it hard to change the resolution, but on the other hand, it might be possible to just apply a scale factor in the rendering engine. I sense some difficulty for Apple here in the future, as non-low-res displays become more common.

I encourage people in the free software community to take a careful look at OS X. They've largely succeeded in creating a usable desktop on top of Unix, which is a goal we're still striving for. They've done a lot of things right, and very few hopelessly wrong (that I can see), even though it's clear that they have a significant journey ahead of them to make the user experience totally seamless. It's worth learning from their experience.

Hi!

It's cool to see both forrest and mbp interested in Ghostscript. I'm really glad to be working on this project - a year ago, it may not have seemed all that sexy compared with other stuff that was happening, but today stability and maturity sound pretty good to me. There are cool things happening in Ghostscript development too. A lot of what interests me will be useful in the long haul, such as high quality font rendering. I'd like it if the Ghostscript graphics library had roughly the same relationship to the dream free desktop environment of the future as Quartz does to OS X.

Rich Tennant's Ghostscript cartoon is now up at ghostscript.com. Enjoy!

Interest in IJS has definitely picked up. This is likely to be very good news for people who want their inkjet printer to just work. A common interface would allow the various inkjet projects to compete on technical excellence, rather than (relative lack of) compatibility problems. Imagine that!

I've purchased an iMac, and will be experimenting with OS X. I'm looking forward to it.

Some more progress on the thesis, which makes me very happy!

26 Oct 2001 (updated 26 Oct 2001 at 16:09 UTC) »

I'm also at the printing summit. Grant has put up an excellent report, to which I have little more to add, except to nitpick the various flavors of interprocess communication between a rendering engine (eg Ghostscript) and a printer driver.

1. hpijs is shipping code from HP now, which works with a fairly wide range of HP printers. The license is MIT with an "HP printers only" exception, which makes it non-DFSG. The HP engineers are very clueful about why this restriction is a problem, but apparently it's been difficult to get it through corporate.

2. OmniPrint is the IBM effort to create a unified driver framework. It is also capable of running in an IPC mode.

3. ijs is a proposal for a very lightweight communications model, based on the ideas of hpijs. It hasn't seen much activity, although I suspect that's about to change, as the need for such a thing was fairly strongly expressed.

Of course, in the "open source" world, the need for something does not map at all into getting it done. I had fairly low expectations for the conference itself, and those have been (so far) met. It's been worthwhile to meet and chat with other people in the Linux printing world, but overall not very fun.

I'm taking advantage of yosh's generous hospitality, and last evening yosh, chema, yakk, nullity and I had dinner at an Ethiopian place. That was fun. My favorite quote is from yosh, discussing davem's taste for high end digital camera equipment: "i don't think he has more money than brains, but he does have a lot of brains".

I've been more or less under a rock for a while, trying to focus on getting stuff done. And, in fact, I have been getting quite a bit of stuff done.

For one, I've checked in a reasonable cut at the new libart intersector. This one is not only more robust, but quite a bit faster than the old one. There are still a few more bugs to wring out, but I'm confident - the concepts should support 100% robust intersection, even for the really nasty cases, even if the implementation currently has some flaws.

I've also integrated Bruce Q Hammond's aa rendering speedup, which keeps the steps list in sorted order as it renders a scanline, rather than just dumping the steps into an array and calling qsort later. Combined with the new improvements, this is at least a factor of two speed improvement. Now I get 6 tigers a second at 72 dpi on my 900MHz PIII laptop. When I started with libart, the tiger took about a second and a half.

I've also put out the 7.03 release of Ghostscript. This is a good one - lots of bugs fixed, and Jack's new automated regression testing should help us keep it that way.

I just bought a new server for Ghostscript and put it up in colocation at transbay.net yesterday. It's a 1.7G P4 with a gig of RDRAM. Performance is better than I expected - a full Ghostscript compile is about 128s.

Now that I've put out a bunch of fires, I'm going to spend some serious time finishing my thesis. That's been on hold for too long.

4 Oct 2001 (updated 4 Oct 2001 at 07:35 UTC) »
maelstorm: I took a look at Joy, and find myself slightly intrigued. It looks a lot like PostScript to me. In fact, I can't really find anything that Joy has that PostScript doesn't, except of course for being purely functional and having formal semantics written down.

All the usual functional programming tricks work just fine in PostScript:

GS>/map { [ 3 1 roll forall ] } bind def
GS>[ 1 2 3 ] { dup mul } bind map
[1 4 9]

Once you wrap your brain around the stack, PostScript is a surprisingly modern, powerful language. In addition to all the advanced "combinator" stuff seemingly rediscovered by Joy, it has the usual strings, lists, and maps (dictionaries in PS jargon) as first class data types. In fact, Joy doesn't have the map natively, so in some ways it's even more primitive than PostScript.

PostScript is even fairly well suited to object oriented programming, using the combination of code as first class objects and maps.

Even so, RPN makes readability worse, because you have to keep the stack in your head at all times. 3 1 roll, dup, exch, index, etc., are just poor substitutes for named variables. You can do named variables in PostScript, but it's not popular (or idiomatic), in part because of the nontrivial performance penalty on most implementations (the "activation records" need to be heap allocated and then garbage collected).

I think stack languages are destined to become curiosities, but well worth knowing about for any serious student of languages. I hope the Joy people have fun.

Bad patents

Apple has a patent on alpha compositing. I'm sure there are worse patents, but I don't come across them all that often. I have a short rant about it on my website now.

Incidentally, delphion.com, which used to be the wonderful womplex patent server at IBM, is now a really annoying site in which just about every link brings you to the paid subscription sign up screen. They would appear to be a model of how a company can make money selling free (in the case of US patents, public domain, even) information. Fortunately, the US PTO site is still moderately usable, and offer the bulk data at cost, as well.

12 Sep 2001 (updated 12 Sep 2001 at 07:44 UTC) »
Hope for peace

I was completely unable to concentrate today, not surprisingly. This was a very, very big thing that happened.

I am a Quaker, a member of the Religious Society of Friends. Quakers don't have much in the way of ideology, but peace is a very central testimony. I am praying for those who have died in this attack, and praying fervently that the aftermath doesn't kill too many more people.

And, frankly, I have high hopes for this. Ordinarily, I am not that big a fan of the American military and spy organizations, but in this case I am sure that the best and brightest, the most experienced and knowledgeable anti-terrrorist analysts in the world will be giving their full attention to finding those who are responsible for this attack and bringing them to justice.

As I see it, the greatest risk is the Israeli-Palestinian conflict, which has always been something of a tinderbox. Further, there doesn't seem to be much we can do about it (except to stop supplying them with weapons). These deep-seated religious conflicts have been so pervasive in human history that it seems likely to me they're simply part of human nature.

The images of Palestinians celebrating the attack have angered and enraged many Americans. I hope and believe that the majority of Palestinians decry the senseless loss of human life, as would any compassionate person. There is, of course, a segment whose zealotry outweighs their compassion, but then again there are probably many more Americans at this point who would be happy to see the deaths of all Palestinians.

I'm sure I'm not alone in wondering what I can do. I'm not eligible to give blood. I darkened this site for a while, but have now set it back. I will pray and remain open to any other ways in which I could help.

I notice quite a bit of spam in my mailbox today. I can totally understand wanting to get on with life, and the healing power of work, but for whatever reason sending spam today seems particularly offensive and disrespectful. Ah well, spammers are not known for being nice.

Also, while it's not hard to see why people are drawn to conspiracy theories and wild speculation, I don't have much tolerance for them myself. The attack must have been carried out by intelligent, educated people who embrace irrational beliefs. All this "nostradamus" crap simply serves to illustrate that this irrationality is not confined to the terrorist side. If it comforts you, fine. Just don't take any of it seriously.

I'm (for once) happy that the people in charge are holding back on key information. Eventually, it all has to come out, but for now there's a legitimate emergency. In normal circumstances, I consider myself one of the strongest advocates for free speech and full disclosure, but I do not believe these are normal circumstances.

I see that the "infowar" scare-mongers are at it again, such as this USA Today story. While it's plausible that terrorists do use encryption tools, this story strains credibility (especially with all its factual errors). While encryption protocols are ostensibly uncrackable, in practice they are so subject to human error that I doubt it will slow down a concerted effort to find the truth much at all. I hope the rest of the world has the common sense to see the infowar/cyberterrorism folks as they are, a bunch of opportunists who have read too many hi-tech spy thrillers.

At some point, I want to quibble with the phrasing of "an attack on freedom" and the usage of "coward", but not tonight.

Peace to all.

Raph

Back from Chicago

I just now got back from Chicago, where I played booth bunny for Artifex. I wasn't expecting much from the show, but it turned out to be surprisingly fun (and productive). It's always a thrill seeing your work actually being used by people, and I got quite a bit of that thrill at the show. For one, RipIt is now shipping my Even Toned Screening in their product line.

I did a number of fun things in the various bits of in-between time. I did some fun computational geometry to fix a longstanding performance bug in the Ghostscript shading renderer. I traced most of the Roman alphabet glyphs in the Guillaume LeBe contact sheet using pfaedit. I made a little prototype of a multilevel error diffusion dithering algorithm (which should be tasty on newer inkjet printers).

I find myself with a pretty big todo list to work through. No doubt, by the time I get done with that, it'll be time for Seybold. Ah well. At least I can look forward to a few months of relatively uninterrupted development time after that.

Is it time for some rocket science?

I've been playing around a bit with antialiased x-terms using the X render extension, with a particular eye toward font quality. It's not as good as it should be. Meanwhile, proprietary platforms such as the Macintosh have truly excellent font rendering. Check out this OmniWeb screen shot, for example.

Extremely high quality antialiased font rendering is a hard problem. It's also one with a somewhat limited span of interest - as soon as 200 dpi displays become ubiquitous, non-hinted aa will become the ideal solution. The big problem with non-hinted aa at lower resolutions is loss of contrast.

A long, long time ago, a group of rocket scientists did some serious rocket science, resulting in a very impressive font rendering system for hinted, non-aa fonts. However, as it was too difficult to use, very few fonts were made in this system, and the fonts that were made did not excite graphic designers. The proprietary world later adapted bits of this technology in stripped-down, but far more usable, form. TrueType carries forward the concept of using a programming language to compute the hinting, while Adobe Multiple Master fonts carry forward the concept of adjustable font-wide parameters. No current proprietary system implements all of the original rocket science vision.

At the time these rocket scientists did their work, nobody was really thinking about antialiased font rendering. The displays just didn't exist at the time. Heck, even mono-bit displays of sufficient resolution where you'd want to use proportionally spaced fonts were still a bit on the cutting edge. Thus, the original rocket science, while an impressive bit of technology, is not particularly suitable for today's needs.

Meanwhile, free software hasn't been standing still. FreeType is an impressive renderer for the proprietary font standards. However, Type 1 isn't particularly well suited for screen resolution fonts, and while TrueType is, it's saddled with a particularly nasty patent situation. Thus, US users can't legally use a free desktop with good quality fonts.

There is a solution: do some more rocket science. I recently dusted off an old prototype of mine, code-named "procedural screen fonts". It shares from the original rocket science the concept of using programs to determine the geometry of the glyph. I hacked up an interesting antialiased stroke renderer that can handle the (primitive) PSF stroke geometry, which is lines and 90 degree sections of elliptical arcs. The results, as a proof of concept, are encouraging. In particular, stroke contrast is quite near the non-aa case. These fonts don't look much like the "real" fonts they're supposed to represent, but that can be fixed.

Like all rocket science, there's quite a bit of work to be done to make it real, no matter how encouraging the proof of concept. I have a fairly clear vision of what needs to be done: generalizing and tuning the stroke renderer to handle arbitrary cubic splines and varying stroke weights, adapting the Hobby's global curvature optimizer so font designers don't have to fiddle with Bezier control points, actually drawing enough glyphs to be usable, and of course integrating with other applications out there.

Should I spend serious time on this? There are a lot of other things competing for my attention. Would I get significant help from the rest of the free software community? Past experiences have been mixed. To a large extent, I just don't know how important this work is. Perhaps everybody is happy with the status quo, happily ignoring the TrueType patents. If so, I should be spending my time on something else. And, as I mentioned before, as soon as 200 dpi displays come along, the work becomes a bit moot. I can buy an IBM T220 for far less than it would cost me in time to push this project forward. So I get a fabulous aa display soon no matter what. This affects the users, the poor huddled masses who can't afford 200 dpi displays. You can tell me how useful this work would be, but talk is cheap. Can you back it up with action?

motb: I think the best fix is to change the wrap in the HTML text entry fields from hard to soft. That will also fix the annoying spaces that show up in some links.

In any case, Advogato runs mod_virgule, not virgule. mod_virgule is hosted on Gnome CVS, not SourceForge.

I had a nice chat with Nick Moffitt at LinuxWorld about merging in the mod_virgule changes he and Neale Pickett have made. Right now, I'm up to my ears in things to do, but I hope to have some time to garden Advogato a bit soon. I find myself with a renewed sense of the importance of an independent site for free software developers, not vulnerable to the fortunes of a corporate sponsor.

Speaking of which, you may find it intriguing to compare the cash on hand with the market capitalization of LNUX. Ghostscript can't afford a sudden loss of hosting services, so I'll be putting a server in colo soon for our CVS, bts, etc.

Lots more I'd love to write about, but it's almost 2 in the morning.

27 Aug 2001 (updated 27 Aug 2001 at 07:42 UTC) »

I got a fair amount of interest from the teaser in my last entry, so I will write it up.

I'm tentatively planning on being at LWCE on Wednesday afternoon. I'm looking forward to touching base with hacker friends, even if the expo itself sucks rocks.

I briefly checked out dillo today, and was quite impressed. I think there is a niche for a stripped down, fast browser (the original gzilla plan), and it looks like the dillo folks are now doing a good job attaining that goal.

Yup, I doubled all the capacities on the certs, so the trust metric is no longer anywhere nearly as stingy. I found some silly performance problems in the mod_virgule code. At some point reasonably soon, I'll do some m/ maintenance, but not in the next couple of weeks, as there are more pressing things in the queue.

137 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!