iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📝

Ed, man! !man ed

に公開

When you log into a Xenix system with a 110 baud teletype, vi and Emacs are so damn slow they're unusable[1][2]. Everyone and everything displays nothing but useless fluff. Stuff like ‘C-h for help’ or ‘“foo” File is read only’. So, I decided to use an editor that doesn't waste my precious, valuable time.

It's ed! Look at the manual!

ED(1)               Unix Programmer's Manual                ED(1)

NAME
     ed - text editor

SYNOPSIS
     ed [ - ] [ -x ] [ name ]
DESCRIPTION
     Ed is the standard text editor.

Computer scientists love ed not because it comes first alphabetically, but because ed is the standard. Others love ed because they feel a kinship with erectile dysfunction.

“ed is the standard text editor.”

Furthermore, ed doesn't waste capacity on my Timex Sinclair[3]. Look at this.

-rwxr-xr-x  1 root          24 Oct 29  1929 /bin/ed
-rwxr-xr-t  4 root     1310720 Jan  1  1970 /usr/ucb/vi
-rwxr-xr-x  1 root  5.89824e37 Oct 22  1990 /usr/bin/emacs

Naturally, on the systems I manage, vi is symbolically linked to ed. Meanwhile, Emacs has been replaced by a shell script like this:

  1. Generate a system log at the level of LOG_EMERG[4],
  2. reduce the user's available disk quota by 100 kB[5],
  3. and then start ed.

“ed is the standard text editor.”

Now, let's look at a common interaction between a novice and the great ed[6].

golem$ ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D

Note the consistent user interface and error reporting. ed is generous enough to let you know an error has occurred, while being careful not to crush the novice's spirit by displaying long-winded error messages that would make anyone lose interest in reading.

“ed is indeed the standard text editor.”

ed, the ultimate in WYIGIWYG editors[7].

ed is the true path to Nirvana. For centuries, ed has been the choice of both the wise and the foolish. ed shall never corrupt your blood. ed is the standard text editor. ed illuminates the sunlight, the song of the birds, and the lush greenery.

When I use an editor, I don't want a help screen that eats up 8 kB of RAM or any of that cursor positioning nonsense. What I want is an EDitor. Not a "viitor". Not an "emacsitor". They aren't even words! ed is the standard!

Text editor.

When the omnipotent IBM needed to make the edlin editor conform to the Unix standard[8], did they mimic vi? No, they did not. Was it Emacs? Don't be silly. IBM chose the editor with the deepest karma. The karma of being the standard.

ed is an editor for those who can remember what they are doing. If you are a fool, you should use Emacs; if you are Emacs, you should not become vi. If you are using ed, you are on the path to salvation. The so-called visual editors were placed on this earth by ed to smoke out the faithless. Do not succumb. Lo, the great ed has spoken!

?

脚注
  1. (110 baud) A speed of about 10 characters per second. ↩︎

  2. (Xenix) An ancient Unix implementation by Microsoft. ↩︎

  3. (Timex Sinclair) An ancient home computer. ↩︎

  4. (LOG_EMERG) The level at which the system is unusable. ↩︎

  5. (100 kB) This was a fairly substantial size back then. ↩︎

  6. (?) ed displays an error message consisting only of a ? when it receives an unknown command. ↩︎

  7. (WYIGIWYG) What You Give Is What You Get. ↩︎

  8. (IBM) Omnipotent (at the time). ↩︎

Discussion