Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!bbn!uwmcsd1!marque!uunet!mcvax!ukc!stc!root44!aegl From: aegl@root.co.uk (Tony Luck) Newsgroups: comp.unix.wizards Subject: Re: Input Line Editing Message-ID: <622@root44.co.uk> Date: 29 Jul 88 09:52:05 GMT References: <16456@brl-adm.ARPA> <9666@eddie.MIT.EDU> <9677@eddie.MIT.EDU> <1112@ficc.UUCP> Reply-To: aegl@root44.UUCP (Tony Luck) Organization: UniSoft Ltd, London, England Lines: 32 In article <1112@ficc.UUCP> peter@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