logoalt Hacker News

dataf3llast Wednesday at 10:56 PM12 repliesview on HN

I love this!

first time I see people use 'ed' for work!!!

I wonder who else has to deal with ed also... recently I had to connect to an ancient system where vi was not available, I had to write my own editor, so whoever needs an editor for an ancient system, ping me (it is not too fancy).

amazing work by the creators of this software and by the researchers, you have my full respect guys. those are the real engineers!


Replies

wpollocklast Wednesday at 11:34 PM

I remember using an ed-like editor on a Honeywell timeshare system in the 1960s, over a Teltype ASR-33. I don't remember much except you invoked it using "make <filename>" to create a new file. And if you typed "make love" the editor would print "not war" before entering the editor.

show 1 reply
pjmlplast Thursday at 9:00 AM

Not ed, but definilty inspired by it, I am old enough to have done typewriting school exam on MS-DOS 3.3 edlin.

And since then never used it ever again, nor ed when a couple of years later we had Xenix access, as vi was much saner alternative.

show 1 reply
relistanlast Thursday at 12:56 PM

In the mid 90s we had an AT&T 3B2 that only had ed on it. We used it via DEC VT-102 terminals. It (ed) works but it’s not fun by any modern standards. Must’ve been amazing on a screen compared to printout from a teletype though!

Side note: that ~1 MIP 3B2 could support about 20 simultaneous users…

wglblast Thursday at 2:41 AM

An early consulting gig was to write a tutorial for ed (on the Coherent system). I often use ed--in fact I used it yesterday. I needed to edit something without clearing the screen.

Earlier, I wrote an editor for card images stored on disks. Very primitive.

kragenlast Thursday at 12:34 PM

I used ed in Termux on my cellphone to write http://canonical.org/~kragen/sw/dev3/justhash.c in August. Someone, I forget who, had mentioned they were using ed on their cellphone because the Android onscreen keyboard was pretty terrible for vi, which is true. So I tried it. I decided that, on the cellphone, ed was a little bit worse than vi, but they are bad in different ways. It really is much easier to issue commands to ed than to vi on the keyboard (I'm using HeliBoard) but a few times I got confused about the state of the buffer in a way that I wouldn't with vi. Possibly that problem would improve with practice, but I went back to using vi.

kpslast Thursday at 2:46 PM

In my first computing job I used ed for about six months (we didn't have character-mode I/O yet). I learned to make good use of regular expressions.

WhyNotHugolast Wednesday at 11:44 PM

The keystokes are pretty much what you'd press in vim to perform the same actions. Except that append mode ends when they finished the line (apparently) rather than having to press Esc.

The feedback from the editor, however, is… challenging.

show 1 reply
lmmlast Thursday at 1:31 AM

I had to use ed to configure X on my alpha/vms machine back when I had it, there was something wrong with the terminfo setup so visual editors didn't work, only line-based programs.

jamesfinlaysonlast Thursday at 5:37 AM

Never had to use ed but I remember working with someone a fair bit older than me that remembered using ed.

S04dKHzrKTlast Thursday at 3:38 AM

Real Programmers use ed. https://xkcd.com/378/

show 1 reply
dborehamlast Thursday at 12:13 AM

Hmm. I still use ed now and then. It's an alias to vim I assume these days.

ajrosslast Wednesday at 11:16 PM

Interestingly it's actually a sort of degenerate use of ed. All it does is append one line to an empty buffer and write it to "hello.c". It's literally the equivalent of

    echo 'int main(void) { printf("hello!\n"); }' > hello.c
...EXCEPT...

It's not, because the shell redirection operators didn't exist yet at this point in time. Maybe (or maybe not?) it would work to cat to the file from stdin and send a Ctrl-D down the line to close the descriptor. But even that might have been present yet. Unix didn't really "look like Unix" until v7, which introduced the Bourne shell and most of the shell environment we know today.