On Oct 17, 2008, at 3:31 PM, Greg Parker wrote: Terminal emulation is hard. It's a maze of twisty passages, all under-specified.
Indeed! Some people (who's names will not be mentioned, in order to protect the guilty, but anyone who really cares can just look at the source code) even went so far as to invent a FORTH-like language who's sole purpose was to define the state machine necessary to emulate terminal FOO after sucking FOO's definition out of the appropriate X resources entry, using a very generic terminal emulation harness.
We.. erm, I mean those people, actually got the whole thing working well enough to emulate a vt220 pretty much right down to the last bit of DEC-documented ("white book") behavior, and performance wasn't bad either considering that it was all going through an operation interpreter. Some other folks reportedly wrote an HP2641 emulation in that weird little language (even given the total lack of docs), though the larger problem of code hard-wired to display on specific terminal models kind of went away right around the same time that this thing got open-sourced in '92, so people should be thankful that xterm's vt100 parser is all they have to contend with. If this thing had caught on, it could have been the emacs of X terminal emulators! (thank god it did not - this thing was over-engineered and under-polished in every sense of the word :) ).
- Jordan
P.S. Oh yeah, code: emu-1.31.tar.gz Does not currently compile on MacOSX due to age.
|