Bob Miller
Sat, 22 Jan 2005 09:31:21 -0800
Jim K wrote: > I just did a man ex on a mandrake 10 community system and it > displayed the vim man page. Is ex just an alias for vim?
Okay, guys. Time for text editor history class. Emacs. I already alluded to the fact that it was from MIT. In 1960, MIT got one of the first PDP-1 computers made by the startup company, Digital Equipment Corporation (DEC). A group of nerds took it over and started developing software for it. One nerd, Alan Kotok, started writing TECo, for Text Editor and Corrector. (Alan later went to work at DEC and was the chief architect of the PDP-10.) TECo was a line oriented editor: you type a command, the computer responds with something. That's because the terminal was a Teletype machine, which prints on paper. TECo was probably the world's first text editor, as the idea of interactively using a computer was radical in the early 1960s. Anyway, TECo grew and evolved, and was ported to other platforms. In the early 1970s, DEC gave the MIT Lab for Computer Science four PDP-10 computers. MIT developed its own operating system for them, ITS. TECo was ported to ITS. By this time, TECo had grown into a fairly complex and ugly language. I used to be very fluent in it, but since I stopped using it in the early 1980s, I can't remember squat about it. Richard M. Stallman (RMS, yes, that RMS, who later founded the Free Software Foundation and the GNU project) took up maintenance of TECo on the PDP-10s. He also developed a set of personal TECo editing shortcuts, or macros, which got popular at the lab. He called them EMACS. It probably was short for "editing macros", though officially, EMACS doesn't stand for anything. That's why when RMS started the GNU project, the first program he wrote for it was GNU emacs, a port of emacs to the C language and Unix platform. I'll briefly mention some other emacses. An engineer at DEC reimplemented TECo for the PDP-11, and gave it a small fraction of the original's feature set. This was the most popular TECo, because it ran on thousands of PDP-11s and VAXes, and is the version I learned. Somebody did an emacs clone for Unix at Bell Labs around 1980. It was written in C and small enough (barely) to run on a PDP-11. Since it wasn't extensible in any way (couldn't even rebind keys) most people thought it didn't count as an emacs. James Gosling (who later created the Java language), while at CMU, wrote an emacs implementation for Unix, usually called Gosling emacs or gosmacs. Later, he made it into a commercial product, Unipress Emacs. I tried to find a copy of gosmacs screen.c which starts with the very best comment I've ever seen in a source file, but it seems to be lost to antiquity. Gosling also published a paper in the CACM about the algorithms in that file. There was a fork of gnu emacs called Lucid Emacs and later xemacs. I personally use the unforked version, sometimes called FSF emacs to disambiguate. They used to be horribly incompatible, but they've been evolving into greater compatibility lately. That's the Emacs family. Meanwhile, at Bell Labs, Unix was being born. In the mid 1970s, the way to interact with a Unix system was through a Teletype. Accordingly, ed was written. ed is a fairly powerful and regular editor, given the interface. Not as powerful as TECo, but a lot easier to learn. Bell Labs started giving away Unix licenses to universities in the mid 1970s. (One of the engineers of that era said the reason ed never prints a prompt is that the machines were so slow, they'd always be several commands behind you and when you finally issued a print command (p or l) to see what you'd done you'd wait and wait for it to catch up.) I remember using mini-Unix on a PDP-11/40, and can vouch that a context switch took about three seconds on that box. If another process ran during your editing session, the editor would be swapped out for a minimum of six seconds. Sometime in the late 1970s, an undergraduate at Berkeley, Bill Joy (who later became lead programmer in the DARPA-funded project to make Unix a suitable computer science research platform, Berkeley Unix (aka Berkeley Software Distribution, BSD), then later founded Sun Microsystems), started adding features to ed. He called his "extended ed" ex. Eventually he added "visual mode", or "vi", to display text on a CRT terminal while it's being edited. So ex and vi were the same editor, and both derived from ed. Since I'm primarily an emacs user, I don't know the history of various vi versions and clones. The dominant vi variant today seems to be vim, for "vi improved". Maybe somebody else would like to fill that part in? Steven Levy's book, Hackers, is the best published history of this era, especially the MIT bit. The O'Reilly book, Open Sources, has a good synopsis history of BSD written by Mike Karels. * ITS, the Incompatible Timesharing System, had the weirdest file naming convention I've ever seen. The machine had a 36 bit word, a character set called 6-Bit was devised to fit six characters per word. If I remember, it mapped ASCII characters 32 (space) through 95 (backslash), so it had the uppercase letters, the digits, and most of the punctuation, including space (which had code \00, suitable for NULL-padding short names. A filename was two 6-character words separated by a space. A common convention was to use the second word as a version number. So the TECo Manual, version 51, would have been named "TECORD 51". -- Bob Miller K<bob> kbobsoft software consulting http://kbobsoft.com [EMAIL PROTECTED] _______________________________________________ EUGLUG mailing list euglug@euglug.org http://www.euglug.org/mailman/listinfo/euglug