Live data from Hacker News

Ed is the standard text editor (2014)

wiki.c2.com

31–40 of 125 posts

Re: Ed is the standard text editor (2014)

#31
post #4

People make fun of ed, but the command line is basically ed with the ability to execute.

It is actually way more complex than that. Nowadays it doesn't get explained a lot anymore. Especially with every system coming with some fancy bash or zsh with somewhat sane defaults.

But in the past you may have got just some naked Bourne Shell with no defaults at all.

https://docstore.mik.ua/orelly/unix3/upt/ch30_14.htm explains a bit.

They don't make books like this anymore. ;)

Re: Ed is the standard text editor (2014)

#33

There's no reason to use ed. It's a historical novelty at this point. Move on.

ed is surprisingly usable (and useful, and fun to use), you should try it.

> no reason

This is like saying "There is no reason to use UNIX (now that we have Ubuntu, Gnome, and Wayland)." Personally, I tend to stick with the CLI for as long as it gets me where I need.

Re: Ed is the standard text editor (2014)

#35
post #12

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! Is there some operating environment I'm not aware of?

> Is there some operating environment I'm not aware of?

The answer to this question is always yes. In this case for example: plenty of old control devices in industrial settings are still operating and use this bitrate.

Re: Ed is the standard text editor (2014)

#36
post #18

Earlier quoted context omitted.

"oh no i reinstalled the os on my vps and now ssh has it on good authority (said authority is line 68) that someone is doing something nasty" ed .ssh/config 68d wq done, didnt fill my terminal with vim or emacs, didnt tab over to my gui editor then back again also it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions: postPatch = '' ed Makefile etc etc s…

> ed .ssh/config I think this is my ed use-case as well. I've noticed I need to "apt-get install ed" sometimes. The standard editor is not always standard, it seems.

yeah, unfortunately, despite literally being specified in posix (hell, macos bundles it)

one of these days i will go around pestering distro release engineers to include it; after all, it's less heavyweight than any one of their homespun lightdm greeters

Re: Ed is the standard text editor (2014)

#37
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.

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.

Of course, we had printed manuals back then, and you could learn EDLIN with the manual on your lap while you typed commands.

Re: Ed is the standard text editor (2014)

#39

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. 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, y…

Yeah, a lot of people would send their work to the line printer at the end of the day, and then start fresh the next day with a pencil to sketch out what they were going to change. Then using ed is a no-brainer.

I heard that a lot of people preferred fewer files and longer functions for the same reason--it was all there on the fanfold output and could be read at once, rather than working in 80x25 chunks. After that mode of working was replaced by interactive programming at the display terminal, we started to prefer functions that didn't span more than 1-2 screens.

Re: Ed is the standard text editor (2014)

#40
post #4

People make fun of ed, but the command line is basically ed with the ability to execute.

That's a neat way to think of it. Coming from the other direction, for emacs users, using the command line is like using the editor since the gnu readline lib offers keyboard navigation like emacs.
Post reply on HN