The humorous part of this is from 1991.<p><a href="https://www.gnu.org/fun/jokes/ed-msg.html" rel="nofollow">https://www.gnu.org/fun/jokes/ed-msg.html</a>
Perhaps it's better to see for a minute how people used this kind of editors when they first appeared, than to keep reading about them for ages: <a href="https://youtu.be/b6URa-PTqfA?t=100" rel="nofollow">https://youtu.be/b6URa-PTqfA?t=100</a> (BBC from '79, mentioning how people start working from home with the aid of newfangled microcomputers and network connectivity).<p>I'm reminded most of all of the fdisk util, where the workflow is pretty much the same: print, modify, print, save. But also I can see where Vi/Vim come from, as I regularly do the same thing as in the vid: %s/something/something else/g and then wq.
I find ed to be the perfect program to test a new programming language. It demands good support for strings, regexes and data structures while being reasonably sized to be completed in under a week. I polished my C skills as I was learning it by writing this from scratch[1].<p>[1] Shameless plug, here it is: <a href="https://github.com/bojle/edd" rel="nofollow">https://github.com/bojle/edd</a>
Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED!
ED! ED IS THE STANDARD!!!<p><pre><code> TEXT EDITOR.</code></pre>
See also: Rob Pike's sam editor for Plan 9:
<a href="http://sam.cat-v.org/" rel="nofollow">http://sam.cat-v.org/</a><p>Less commands and a language where "everything is a (huge) string". So its operations are not limited to lines like in ed. A tutorial of the command language: <a href="http://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pdf" rel="nofollow">http://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pdf</a><p>And Pike's introductory paper: <a href="http://doc.cat-v.org/plan_9/4th_edition/papers/sam/" rel="nofollow">http://doc.cat-v.org/plan_9/4th_edition/papers/sam/</a><p>All in all, the terseness of the language can be quite addictive. :) <a href="http://sam.cat-v.org/cheatsheet/" rel="nofollow">http://sam.cat-v.org/cheatsheet/</a>
I have written several scripts -- some throwaway, some not -- that use ed. If you know what you need to do to edit a file and need it automated, ed is just super handy. Here is a shell script that deletes all comments from a yaml file, then comments out a particular key:<p><pre><code> ed $file << COMMANDS
g/^#.\*$/d
/yaml_key:
s/^/#/
w
q
COMMANDS</code></pre>
For some reason it took me years to understand the need for a line editor. It didn't make any sense in my head. Then one day I saw the famous picture of Bill and Allen as kids in front of a teletype [1] and it finally clicked.<p>The way it worked was like this: As you keyed in your program, letter by letter, it was printed out on the paper immediately like a typewriter. If you ran the program and there was a problem, you'd just read (or re-read) the printout, find the line with the bug, then use a line editor to fix just that line. You might mark the paper with pencil to keep track of the change. After a while if you needed to see the latest version, you'd just print the whole program out, or just the lines you needed.<p>This realization finally clued me into what was going on when I was 10yo and programming BASIC on a TRS-80 Color Computer. It was essentially simulating a teletype (which makes sense given BASIC's inception at Dartmouth [2]), where you would type each line individually, then if there was a problem, you would edit the program individual lines at a time. I always thought it was an odd until I understood how actually <i>using</i> a teletype actually worked. Also explains why the command to write letters to the screen is called "PRINT".<p>1. <a href="https://www.gatesnotes.com/About-Bill-Gates/Early-Days-as-a-Computer-Programmer" rel="nofollow">https://www.gatesnotes.com/About-Bill-Gates/Early-Days-as-a-...</a><p>2. <a href="https://youtu.be/WYPNjSoDrqw" rel="nofollow">https://youtu.be/WYPNjSoDrqw</a>
I hate to be that guy, but 'ed' is very unix specific. In the mid-1970's (and apparently as early as the 1960's according to Wikipedia), those of us on TOPS/10, TOPS/20 (and perhaps other DEC systems) were using TECO (which of course became EMACS).
I was never much of an ed user but I did a lot of stuff in EDLIN on PC DOS 3.1. Ed seems a little more powerful and useful.<p>With 512K of RAM on a 6MHz 80286, using an editor that fit into one "segment" and loaded quickly from a floppy was nice. The original DOS 1.0 edlin was just over 2K.<p>Of course, we had printed manuals back then, and you could learn EDLIN with the manual on your lap while you typed commands.
I remember using an ed clone with a TRS-80 Color Computer running the OS/9 operating system<p><a href="https://www.roug.org/soren/6809/os9sysprog.html" rel="nofollow">https://www.roug.org/soren/6809/os9sysprog.html</a><p>Previous to that I used the TECO editor on a PDP-11<p><a href="https://en.wikipedia.org/wiki/TECO_(text_editor)" rel="nofollow">https://en.wikipedia.org/wiki/TECO_(text_editor)</a>
I'm still using it almost daily, since 1980, although I suppose today it's an emulation inside vim not the real thing.<p>Not used for my code IDE or anything, but little config files etc.<p>We had vi on our '11 in 1980 but I could never get along with it and still can't.<p>Source if anyone's interested. 1700 loc : <a href="https://github.com/v7unix/v7unix/blob/master/v7/usr/src/cmd/ed.c" rel="nofollow">https://github.com/v7unix/v7unix/blob/master/v7/usr/src/cmd/...</a>
When I started working on Sun systems back in 1991 the first terminal I used was an old model that didn't support all the cursor controls, so my only option for editing was ed. I worked that way for a year, so for a long time I was more comfortable in ed than vi. Of course on most systems nowadays ed and vi are now different modes of the same editor, as the article notes.
<a href="https://web.archive.org/web/20140516191215/http://c2.com/cgi/wiki/wiki?EdIsTheStandardTextEditor" rel="nofollow">https://web.archive.org/web/20140516191215/http://c2.com/cgi...</a><p>I still lament that the C2 wiki switched to JS rendering.
Related:<p><i>“Ed is the standard text editor.” (1991)</i> - <a href="https://news.ycombinator.com/item?id=14406846" rel="nofollow">https://news.ycombinator.com/item?id=14406846</a> - May 2017 (8 comments)<p><i>Ed is the standard text editor (1991)</i> - <a href="https://news.ycombinator.com/item?id=9936980" rel="nofollow">https://news.ycombinator.com/item?id=9936980</a> - July 2015 (3 comments)<p>Lots more:<p><a href="https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=%22Ed%20is%20the%20standard%20text%20editor%22&sort=byDate&type=comment" rel="nofollow">https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...</a>
Ed doubters might find this episode of Lambda Island enlightening (and fun): <a href="https://lambdaisland.com/episodes/ultimate-dev-setup" rel="nofollow">https://lambdaisland.com/episodes/ultimate-dev-setup</a>
My absolute favorite remedy for social media addiction.<p>Read entries from c2 wiki.<p>Don't know what to do with yourself for a few minutes DO NOT open Reddit, Facebook, Instagram, TikTok, Twitter ... Whatever.<p>Read the original, classic group discussion on tech. With Ward Cunningham, Kent Beck, Rob Pike, and many many other luminaries contributing to this endless discussion, you cannot fail to be educated on some level.<p>So before you read another random article here, on medium or some other place where a "10x" dev just learned something about X ... Just don't, go read c2 wiki.
This, alongside BOFH, is worth its weight in gold in terms of humour. I can also recommend reading the jargon file by ESR to really tap 80ies / 90ies hacker culture.
I use ed for pretty much all editing. Have for a few years after I got tired of trying to debug emacs/org mode :) YMMV of course. :) And so I have learned bash/shell better because of it which I am thankful for.
The last edit was in 2014? Who's worried about 2400 baud modems and terminals not having cursor positioning capabilities? It's 2022, not 1992!<p>Is there some operating environment I'm not aware of?