Input Line Editing

Tony Luck aegl at root.co.uk
Fri Jul 29 19:52:05 AEST 1988


In article <1112 at ficc.UUCP> peter at ficc.UUCP (Peter da Silva) writes:
>To do it the way you want would basically require all programs to run in
>raw mode. This means that now you have: you hit a key, the lower half
>driver puts the key in the raw queue. Two context switches. Then your
>program wakes up, another context switch. Then it writes the character
>to the output stream, two more context switches. Finally your program
>goes away to wait for another key. Six context switches, at the minimum.
>Plus you execute in user mode. if your program requires swapping or paging
>to wake up, it's even worse.

Just what proportion of characters get into machines while terminals are in
'cooked' mode these days? In all the editor-wars people spend their time
declaring why their particular favourite dialect of EMACS is so much better
than VI (or DED, or NED) but very few people seem to stand up and say "But
I use /bin/ed all the time because I don't want to subject my poor little
computer to all those context switches". More and more programs have fancy
"user friendly" interfaces that are invariably character orientated (hands
up all those people using 'readnews' to read this? Now a vote from those
using 'rn', 'vnews', 'gnuemacs', (does 'notes' run in raw mode?)). Take a
database package (UNIFY, INFORMIX, INGRES, any package you like) ... look
for the fancy forms input - yes its got the terminal in raw mode. Perhaps
you have a word processing package ... bet it isn't line orientated. A
spreadsheet, oh look it uses curses and takes input one character at a time.
How about games (which is what all these computers are really for anyway).
Adventure! wow, cooked mode line at a time. But balance it against the
fifty versions of rogue, hack & nethack, moria and most of the other cookies
that come off comp.sources.games.

Me, I haven't typed a cooked mode character since the machine asked me for
my password. Everything I type goes though a window manager.

Tony Luck <aegl at root.co.uk>



More information about the Comp.unix.wizards mailing list