24 ms·
> Originally, if you typed an unknown command, it would just say "this is not a git command". Back in the 70s, Hal Finney was writing a BASIC interpreter to fi
by WalterBright 2y ago
> Originally, if you typed an unknown command, it would just say "this is not a git command".
Back in the 70s, Hal Finney was writing a BASIC interpreter to fit in 2K of ROM on the Mattel Intellivision system. This meant every byte was precious. To report a syntax error, he shortened the message for all errors to:
EH?
I still laugh about that. He was quite proud of it.
- WalterBright 2y agoI've been sorely tempted to do that with my compiler many times.
- nikau 2y agoHow 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.)
- nl 2y agoIt'd be interesting and amusing if he'd made the private key to his part of Bitcoin a variation on that. RIP.
- vunderba 2y ago> EH? I feel like that would also make a good response from the text parser in an old-school interactive fiction game. Slightly related, but I remember some older variants of BASIC using "?" to represent the PRINT statement - though I think it was less about memory and more just to save time for the programmer typing in the REPL.
- chuckadams 2y agoIt was about saving memory by tokenizing keywords: '?' is how PRINT actually was stored in program memory, it just rendered as 'PRINT'. Most other tokens were typically the first two characters, the first lowercase, the second uppercase: I remember LOAD was 'lO' and DATA was 'dA', though on the C64's default character glyphs they usually looked like L<box char HN won't render> and D<spade suit char>. All this being on a C64 of course, but I suspect most versions of Bill Gates's BASIC did something similar.
- egypturnash 2y agoC64 basic was tokenized into one byte, with the most significant bit set: https://www.c64-wiki.com/wiki/BASIC_token https://www.c64-wiki.com/wiki/BASIC_token Each command could be typed in two ways: the full name, or the first two letters, with the second capitalized. Plus a few exceptions like "?" turning into the PRINT token ($99, nowhere near the PETSCII value for ?) and π becoming $FF. The tokens were expanded into full text strings when you would LIST the program. Which was always amusing if you had a very dense multi-statement line that expanded as longer than the 80 characters the c64's tokenizer routine could handle, you'd have to go back and replace some or all commands with the short form before you could edit it.
- furyofantares 2y agoI run a wordle spinoff, xordle, which involves two wordle puzzles on one board. This means you can guess a word and get all 5 letters green, but it isn't either of the target words. When you do this it just says "Huh?" on the right. People love that bit.
- speerer 2y agoCan confirm. I loved that bit.
- dotancohen 2y ago> People love that bit. Add another seven Easter eggs, and people could love that byte.
- zubairq 2y agoPretty cool.. I had no idea Hal was such a hacker on the personal computers in those days... makes me think of Bitcoin whenever I hear Hal mentioned
- WalterBright 2y agoHe wasn't hacking. Hal worked for Aph, and Aph contracted with Mattel to deliver console game cartridges. There was once a contest between Caltech and MIT. Each was to write a program to play Gomoku, and they'd play against each other. Hal wrote a Gomoku-playing program in a weekend, and it trashed MIT's program. It was never dull with Hal around.
- euroderf 2y agoCanadians everywhere.
- cma 2y agoEarliest I've seen with 'Eh?' as an interpreter response is RAND's JOSS: https://en.wikipedia.org/wiki/JOSS#/media/File:JOSS_Session.jpg https://en.wikipedia.org/wiki/JOSS#/media/File:JOSS_Session.... https://en.wikipedia.org/wiki/JOSS https://en.wikipedia.org/wiki/JOSS They had about 5KB of memory but comparing to the Intellivision the machine weighed about 5,000lbs.
- dredmorbius 2y agoed (the standard editor) optimises that by a further 66.7%. <https://www.gnu.org/fun/jokes/ed-msg.html https://www.gnu.org/fun/jokes/ed-msg.html>