When there's only one

...there's only one choice
Everything here is my opinion. I do not speak for your employer.
February 2009
March 2009

2009-02-24 »

Postel's Law and Terminal Emulators

Unsurprisingly, my earlier comments about XML and Postel's Law caused a bit of a flamewar in the various places that have flamewars about these things.

What did surprise me, though, is that people have mostly heard of Postel's Law... they just think it's wrong. That's actually not what I expected; I naively assumed that people were doing things they way they do because they simply didn't know any better.

Oh well, live and learn.

As for me, I'm a huge Postel fan, and I have been for years. For example, a little over five years ago, I wrote my own replacement for the curses (text-mode display handling) library for the same reason that I recently wrote my own permissive (albeit incomplete) XML parser: because nobody else was following Postel's Law.

You can still read my original article about it. Probably people will flame me now for being stupid enough to write my own replacement for curses, just like I was stupid enough to write my own XML parser; however, the fact remains that my terminal management code remains in production to this day, and since day 1 of its deployment, it has greatly reduced the amount of time Nitix tech support people spend dealing with terminal emulator problems when people use our command-line interface. On the other hand, as far as I know, it has never caused a single problem.

A couple of years ago I started to revisit the problem in a more general way, when I made a patch to ncurses to let it use liberal input handling. However, I got sidetracked since then and never had time to fine-tune the patch to get it integrated. Oh well.

Next time you press DEL or HOME or END in a Unix program and it doesn't work, think of Jon Postel.

I'm CEO at Tailscale, where we make network problems disappear.

Why would you follow me on twitter? Use RSS.

apenwarr on gmail.com