TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ed is the standard text editor (2014)

200 pointsby harporoederalmost 3 years ago

25 comments

aatharuvalmost 3 years ago
The humorous part of this is from 1991.<p><a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;fun&#x2F;jokes&#x2F;ed-msg.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;fun&#x2F;jokes&#x2F;ed-msg.html</a>
aasasdalmost 3 years ago
Perhaps it&#x27;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:&#x2F;&#x2F;youtu.be&#x2F;b6URa-PTqfA?t=100" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;b6URa-PTqfA?t=100</a> (BBC from &#x27;79, mentioning how people start working from home with the aid of newfangled microcomputers and network connectivity).<p>I&#x27;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&#x2F;Vim come from, as I regularly do the same thing as in the vid: %s&#x2F;something&#x2F;something else&#x2F;g and then wq.
评论 #32015991 未加载
评论 #32017881 未加载
评论 #32015132 未加载
评论 #32016872 未加载
评论 #32017481 未加载
einzelgangeralmost 3 years ago
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:&#x2F;&#x2F;github.com&#x2F;bojle&#x2F;edd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bojle&#x2F;edd</a>
评论 #32016890 未加载
ashton314almost 3 years ago
Not a &quot;viitor&quot;. Not a &quot;emacsitor&quot;. Those aren&#x27;t even WORDS!!!! ED! ED! ED IS THE STANDARD!!!<p><pre><code> TEXT EDITOR.</code></pre>
评论 #32014818 未加载
评论 #32015861 未加载
martttalmost 3 years ago
See also: Rob Pike&#x27;s sam editor for Plan 9: <a href="http:&#x2F;&#x2F;sam.cat-v.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;sam.cat-v.org&#x2F;</a><p>Less commands and a language where &quot;everything is a (huge) string&quot;. So its operations are not limited to lines like in ed. A tutorial of the command language: <a href="http:&#x2F;&#x2F;doc.cat-v.org&#x2F;bell_labs&#x2F;sam_lang_tutorial&#x2F;sam_tut.pdf" rel="nofollow">http:&#x2F;&#x2F;doc.cat-v.org&#x2F;bell_labs&#x2F;sam_lang_tutorial&#x2F;sam_tut.pdf</a><p>And Pike&#x27;s introductory paper: <a href="http:&#x2F;&#x2F;doc.cat-v.org&#x2F;plan_9&#x2F;4th_edition&#x2F;papers&#x2F;sam&#x2F;" rel="nofollow">http:&#x2F;&#x2F;doc.cat-v.org&#x2F;plan_9&#x2F;4th_edition&#x2F;papers&#x2F;sam&#x2F;</a><p>All in all, the terseness of the language can be quite addictive. :) <a href="http:&#x2F;&#x2F;sam.cat-v.org&#x2F;cheatsheet&#x2F;" rel="nofollow">http:&#x2F;&#x2F;sam.cat-v.org&#x2F;cheatsheet&#x2F;</a>
djhaskin987almost 3 years ago
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 &lt;&lt; COMMANDS g&#x2F;^#.\*$&#x2F;d &#x2F;yaml_key: s&#x2F;^&#x2F;#&#x2F; w q COMMANDS</code></pre>
评论 #32015622 未加载
评论 #32016740 未加载
评论 #32018367 未加载
评论 #32016620 未加载
russellbeattiealmost 3 years ago
For some reason it took me years to understand the need for a line editor. It didn&#x27;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&#x27;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&#x27;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&#x27;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 &quot;PRINT&quot;.<p>1. <a href="https:&#x2F;&#x2F;www.gatesnotes.com&#x2F;About-Bill-Gates&#x2F;Early-Days-as-a-Computer-Programmer" rel="nofollow">https:&#x2F;&#x2F;www.gatesnotes.com&#x2F;About-Bill-Gates&#x2F;Early-Days-as-a-...</a><p>2. <a href="https:&#x2F;&#x2F;youtu.be&#x2F;WYPNjSoDrqw" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;WYPNjSoDrqw</a>
评论 #32015395 未加载
评论 #32015443 未加载
评论 #32017627 未加载
评论 #32018196 未加载
fastaguy88almost 3 years ago
I hate to be that guy, but &#x27;ed&#x27; is very unix specific. In the mid-1970&#x27;s (and apparently as early as the 1960&#x27;s according to Wikipedia), those of us on TOPS&#x2F;10, TOPS&#x2F;20 (and perhaps other DEC systems) were using TECO (which of course became EMACS).
评论 #32017181 未加载
评论 #32017120 未加载
评论 #32017199 未加载
评论 #32017437 未加载
评论 #32017279 未加载
projektfualmost 3 years ago
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 &quot;segment&quot; 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.
评论 #32018441 未加载
PaulHoulealmost 3 years ago
I remember using an ed clone with a TRS-80 Color Computer running the OS&#x2F;9 operating system<p><a href="https:&#x2F;&#x2F;www.roug.org&#x2F;soren&#x2F;6809&#x2F;os9sysprog.html" rel="nofollow">https:&#x2F;&#x2F;www.roug.org&#x2F;soren&#x2F;6809&#x2F;os9sysprog.html</a><p>Previous to that I used the TECO editor on a PDP-11<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;TECO_(text_editor)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;TECO_(text_editor)</a>
bombcaralmost 3 years ago
People make fun of ed, but the command line is basically ed with the ability to execute.
评论 #32015159 未加载
评论 #32014964 未加载
评论 #32015418 未加载
评论 #32014336 未加载
ToddWBurgessalmost 3 years ago
I used to know a BSD kernel developer who wrote all his kernel code with ed
dborehamalmost 3 years ago
I&#x27;m still using it almost daily, since 1980, although I suppose today it&#x27;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 &#x27;11 in 1980 but I could never get along with it and still can&#x27;t.<p>Source if anyone&#x27;s interested. 1700 loc : <a href="https:&#x2F;&#x2F;github.com&#x2F;v7unix&#x2F;v7unix&#x2F;blob&#x2F;master&#x2F;v7&#x2F;usr&#x2F;src&#x2F;cmd&#x2F;ed.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;v7unix&#x2F;v7unix&#x2F;blob&#x2F;master&#x2F;v7&#x2F;usr&#x2F;src&#x2F;cmd&#x2F;...</a>
simonhalmost 3 years ago
When I started working on Sun systems back in 1991 the first terminal I used was an old model that didn&#x27;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.
workaccount21almost 3 years ago
?
评论 #32016298 未加载
评论 #32014774 未加载
layer8almost 3 years ago
<a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20140516191215&#x2F;http:&#x2F;&#x2F;c2.com&#x2F;cgi&#x2F;wiki&#x2F;wiki?EdIsTheStandardTextEditor" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20140516191215&#x2F;http:&#x2F;&#x2F;c2.com&#x2F;cgi...</a><p>I still lament that the C2 wiki switched to JS rendering.
评论 #32019083 未加载
评论 #32016241 未加载
dangalmost 3 years ago
Related:<p><i>“Ed is the standard text editor.” (1991)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14406846" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14406846</a> - May 2017 (8 comments)<p><i>Ed is the standard text editor (1991)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9936980" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9936980</a> - July 2015 (3 comments)<p>Lots more:<p><a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=true&amp;query=%22Ed%20is%20the%20standard%20text%20editor%22&amp;sort=byDate&amp;type=comment" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=true&amp;que...</a>
johncoltranealmost 3 years ago
Ed doubters might find this episode of Lambda Island enlightening (and fun): <a href="https:&#x2F;&#x2F;lambdaisland.com&#x2F;episodes&#x2F;ultimate-dev-setup" rel="nofollow">https:&#x2F;&#x2F;lambdaisland.com&#x2F;episodes&#x2F;ultimate-dev-setup</a>
jasonm23almost 3 years ago
My absolute favorite remedy for social media addiction.<p>Read entries from c2 wiki.<p>Don&#x27;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 &quot;10x&quot; dev just learned something about X ... Just don&#x27;t, go read c2 wiki.
hestefiskalmost 3 years ago
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 &#x2F; 90ies hacker culture.
unrznblalmost 3 years ago
I use ed for pretty much all editing. Have for a few years after I got tired of trying to debug emacs&#x2F;org mode :) YMMV of course. :) And so I have learned bash&#x2F;shell better because of it which I am thankful for.
taylodlalmost 3 years ago
The last edit was in 2014? Who&#x27;s worried about 2400 baud modems and terminals not having cursor positioning capabilities? It&#x27;s 2022, not 1992!<p>Is there some operating environment I&#x27;m not aware of?
评论 #32015263 未加载
评论 #32014757 未加载
评论 #32017357 未加载
评论 #32014731 未加载
snarfyalmost 3 years ago
If you use vi, you already know how to use ex.
scotty79almost 3 years ago
I always default to mcedit. I can&#x27;t shake off being raised in Norton Commander in primary school.
legalcorrectionalmost 3 years ago
There&#x27;s no reason to use ed. It&#x27;s a historical novelty at this point. Move on.
评论 #32014775 未加载
评论 #32014605 未加载
评论 #32015223 未加载
评论 #32014631 未加载
评论 #32015018 未加载
评论 #32015235 未加载
评论 #32014862 未加载