3 ms·
How wasteful, ed uses just ? for all errors, a 3x saving
by nikau 2y ago
How wasteful, ed uses just ? for all errors, a 3x saving
- ekidd 2y agoEd also uses "?" for "Are you sure?" If you're sure, you can type the last command a second time to confirm. The story goes that ed was designed for running over a slow remote connection where output was printed on paper, and the keyboard required very firm presses to generate a signal. Whether this is true or folklore, it would explain a lot. GNU Ed actually has optional error messages for humans, because why not.
- p_l 2y ago/bin/ed did in fact evolve on very slow teletypes that used roll paper. It made the option to print file content with line numbers very useful (personally only used very dumb terminals instead of physical teletype, but experience is a bit similar just with shorter scrollback :D)
- euroderf 2y agoCan confirm. Using ed on a Texas Instruments dial-up terminal (modem for phone handset) with a thermal printer. And taking a printed listing before heading home with the terminal.
- teraflop 2y agohttps://www.gnu.org/fun/jokes/ed-msg.en.html https://www.gnu.org/fun/jokes/ed-msg.en.html "Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity."
- fsckboy 2y ago>not to overwhelm the novice with verbosity that doesn't make complete sense, in unixland it's old-timers who understand the beauty of silence and brevity, while novices scan the screen/page around the new prompt for evidence that something happened
- deleted 2y ago[deleted]
- llm_trw 2y agoSo much of computer conventions evolved for very good reasons because of physical limitations. When each line of code was it's own punch card having a { stand alone on a line was somewhere between stupid and pointless. Also explains the reason why lisps were so hated for so long. By the same token today you can tell which projects use an IDE as the only way to code them because of the terrible documentation. It is after all not the end of the world to have to read a small function when you can just tab to see it. Which is true enough until you end up having those small functions calling other small functions and you're in a stack 30 deep trying to figure out where the option you passed at the top went.
- miohtama 2y agoHere is a good YT channel on such computers and terminals. Not only story, some of these running resurrected today. https://youtu.be/zeL3mbq1mEg?si=gUUO_nEsMtcZ5Z_A https://youtu.be/zeL3mbq1mEg?si=gUUO_nEsMtcZ5Z_A
- nine_k 2y agoThere are really few systems where you can save a part of a byte! And if you need to output a byte anyway, it doesn't matter which byte it is. So you can indulge and use "?", "!", "*", or even "&" to signify various types of error conditions. (On certain architectures, you could use 1-byte soft-interrupt opcodes to call the most used subroutine, but 8080 lacked it IIRC; on 6502 you could theoretically use BRK for that. But likely you had other uses for it than printing error diagnostics.)