9 ms·
A Mystery of Unix History
- jasoneckert 7y agoUNIX wasn't the only OS that those terminals were sold for. DEC had this crazy notion that people should be using VMS.
- mark-r 7y agoEven VMS wasn't the first. The PDP-11 had its own operating systems, RTS and RSTS.
- tyingq 7y agoI believe VT52 and VT100 terminals have a physical ESC key where you would expect it to be. On newer models, like VT220, etc, you can use the setup screen to put them in VT100 mode. Once you do that, the F11 key will function as an escape key. Also note it was viewed as a weird choice to omit the key at the time. Televideo, a competitor, called it out in their ads: https://imgur.com/a/u7KHRjQ https://imgur.com/a/u7KHRjQ Somewhat interesting that Apple recently took away, then gave back the ESC key on their pro laptops.
- GeorgeTirebiter 7y agoI still want my Meta key! How can we do Ctrl-Alt-Meta-Cokebottle? But, seriously, having three "control-like" keys gives us 8 'name-spaces' using different combinations of Ctrl / Alt / Meta. Pretty convenient.
- SolarNet 7y agoI still want arbitrary modifier keys. This is a feature of some game engines which allow people to use arbitrary keys (or combinations) as modifier keys. Which allow for less motion of the hand over the keyboard, by simply being able to hit the same keys (with some modifiers) quickly.
- zozbot234 7y agoYou would need an N-key-rollover keyboard to be able to do this, at least in the general case. Baseline keyboards do not register overlapping keypresses correctly, unless you are using the ordinary modifier keys.
- Reelin 7y agoI never knew about this. My laptop seems to have 8-key rollover for most (?) sequences that would be natural for your hands, but drops as low as 2-key for unlikely combinations. Any idea what's going on? http://gadzikowski.com/nkeyrollover.html http://gadzikowski.com/nkeyrollover.html
- SolarNet 7y agoSure, but a lot of gaming hardware supports this, and it's a hardware issue. If one is customizing their editor to the point of using arbitrary modifier keys, they will probably be willing to buy a custom keyboard. Also while on the subject 8 key rollover, which is pretty common, is probably more than enough.
- roberto 7y ago> Once you do that, the F11 key will function as an escape key. This photo seems to corroborate that: https://external-preview.redd.it/SiLVPTrm_c8MfLplX48AxZySG5xhACu8p3i1reo1_dM.jpg?auto=webp&s=26d297073cdd338eaa1454f8fd6dbbda4b2a043d https://external-preview.redd.it/SiLVPTrm_c8MfLplX48AxZySG5x...
- kps 7y agoSome of the LK201 function strip variants had it labelled, e.g. https://deskthority.net/wiki/File:LK201_top.jpg https://deskthority.net/wiki/File:LK201_top.jpg
- invsblduck 7y agoThat TeleVideo ad is amazing. Thank you!
- tyingq 7y agoSure. You can see the whole ad here: https://books.google.com/books?id=4Wgmey4obagC&lpg=RA1-PA68&ots=Yhxi7Fn9wC&dq=televideo%20corrects%20key%20mistakes&pg=RA1-PA68#v=onepage&q=televideo%20corrects%20key%20mistakes&f=false https://books.google.com/books?id=4Wgmey4obagC&lpg=RA1-PA68&...
- emmelaich 7y agoIn my many years of Unixing, I never used any vtxy0 with x greater than 2. The vast majority were vt100 or close. Especially compatibles; the few genuine DEC terminals that came with the machine were left in the machine room.
- rhinoceraptor 7y agoBill Joy used an ADM 3A[1] terminal, and looking at the keyboard layout explains vi's key mappings almost entirely. There are arrow keys printed on HJKL (accessed via control), escape is left of Q, control is left of A, and colon has a dedicated key rather than being shift+semicolon. Another tidbit is that the home key is also used for tilde, which explains its association with the home directory. 1: https://en.wikipedia.org/wiki/ADM-3A#/media/File:KB_Terminal_ADM3A.svg https://en.wikipedia.org/wiki/ADM-3A#/media/File:KB_Terminal...
- GaltMidas 7y agoThis makes so much sense, and now looking at this image, I wonder if it explains "tabs vs spaces".
- Reelin 7y agoIt does seem like an additional reason, but I'm convinced tabs were (are?) disliked primarily for historical and technological reasons. Historically the tab key worked with a tab stop; there's always friction when you switch paradigms. Technologically, accommodating a variable width non-printing character on an 80x25 character-mapped display for no particular reason must have seemed both gratuitous and wasteful when you consider the typical hardware of the time (monochrome terminals, CPUs on the order of 1-50 MHz, 1-5 MB RAM, < 1 MB ROM, etc).
- wahern 7y ago> disliked primarily for historical and technological reasons Huh? AFAIU, all the historical source code uses tabs for indentation. Both K&R and BSD style uses hard tabs, as does Linux kernel style and most older GNU project code for that matter. Various Unix programs assume tabs, for example indentation elision in shell heredoc syntax ("<<-") only works for tabs. Soft tabs (spaces) has been a relatively new thing in the C/Unix world. You may not notice it because, working as well as they do, hard tabs magically indent according to your local preference, so hard tabs aren't noticeable.[1] [1] What doesn't work is right-hand alignment. That's most noticeable in modern BSD code, where the style is to tab-align variable types and names into different columns. If your tab stop isn't set to 8 (the required tab stop), they don't line up. Most hard tabbers don't mix indentation and alignment, anymore. EDIT: Here's the earliest source code for vi I could quickly find: https://github.com/n-t-roff/ex-2.2/blob/220a2cfa/ex.c https://github.com/n-t-roff/ex-2.2/blob/220a2cfa/ex.c It uses hard tabs. It's also still using pre-ANSI function syntax, suggesting this code wasn't cleaned up before committing to Git.
- Isamu 7y ago> why would both of these editors be developed in such a way that they are downright inconvenient to use on the hardware on which they most frequently ran? As other comments note, they were developed on earlier models or non-Dec terminals. Also Emacs was not developed on Unix. The first Unix Emacs was created by James Gosling of Java fame.
- aap_ 7y agoCertainly not. The first emacs was created for the TECO editor on ITS by various people. It was further developed and maintained by RMS. Gosling's emacs came a few years later.
- invsblduck 7y agoThen there's this debacle I've never spent enough time getting to the bottom of... https://www.reddit.com/r/programming/comments/dhrcxw/james_gosling_on_how_richard_stallman_stole_his/ https://www.reddit.com/r/programming/comments/dhrcxw/james_g...
- bbanyc 7y agohttps://github.com/larsbrinkhoff/emacs-history https://github.com/larsbrinkhoff/emacs-history has the details... there's some Gosling code (notably display.c with the skull-and-bones warning) in Emacs 13, but none that I can find in 15 and later.
- messe 7y ago> Ctrl-3 and Ctrl-[ could send the character. However, this is downright terrible for both vi and Emacs (as this is the only way to trigger meta commands in Emacs). Anecdotal, but I use Ctrl-[ in vi all the time. More comfortable the escape key in my experience. I've tried jj and jk, but I inevitably end up on a system without my .exrc or init.vim at some point, and struggle. Ctrl-[ has the benefit of working everywhere.
- drfuchs 7y agoThe article is simply incorrect. The VT100 (and VT52 before it) had an ESC key, right where you'd expect it to be. Just about any terminal you might have bought in the 1970's had one. It's shown clearly in the document the article (indirectly) points to: https://vt100.net/docs/vt100-ug/chapter1.html https://vt100.net/docs/vt100-ug/chapter1.html
- pdw 7y agoThose have an escape key, but the VT220 doesn't.
- Animats 7y agoBecause EMACS wasn't developed for the PDP-11. It came from the MIT ITS and Stanford SAIL systems, which had real "meta" keys.[1] Those keyboards also had a "Top" key, an additional shift for extra symbols on top of the keys. See "MIT Space Cadet Keyboard", and Symbolics keyboards. The control-S/control-Q flow control only worked on UNIX in "line mode", which also did backspace and such. VI turned that off and ran in raw mode. Before BSD, UNIX mostly ran in line mode. The TCP/IP implementation we used, a heavily modified 3COM UNET, predated BSD networking. It normally ran in "line mode", and when running VI remotely, VI switched the pseudo-terminal to "raw mode", which caused the Telnet connection to send the options DON'T ECHO[2] and DO SUPPRESS GO AHEAD.[3] The connection was now transparent to special characters. This was necessary on the rather laggy links of the time. Exiting VI restored line mode. If VI crashed, or you killed it, or, when job control came in, you switched tasks, you were stuck in raw mode, and had to reset the terminal session by typing "stty saneLF". You actually had to type LF, because CR->LF translation was suppressed in that mode. BSD didn't bother with this, and ran terminals in remote echo mode all the time, which required lower lag connections. Berkeley was mostly IP over Ethernet at the time, without much long-haul, so that worked for them. [1] http://xahlee.info/kbd/iold51593/SAIL_keyboard_96232.jpg http://xahlee.info/kbd/iold51593/SAIL_keyboard_96232.jpg [2] https://tools.ietf.org/html/rfc857 https://tools.ietf.org/html/rfc857 [3] https://tools.ietf.org/html/rfc858 https://tools.ietf.org/html/rfc858
- Isamu 7y ago>you were stuck in raw mode, and had to reset the terminal session Man I forgot about all this terminal wrangling stuff. Thanks for the memories!
- tyingq 7y agoecho "<ctrl-v><ESC>c" ...is still in my memory.
- drfuchs 7y agoJust to not leave a misimpression: Emacs (and TECO) never ran on the Stanford Sail machine (which ran the Waits OS); The "E" editor that was native to Sail/Waits used combinations of the Meta and Control keys for commands, which perhaps helped inspire their use in Emacs (written originally ITS at MIT). It's worth noting that at Sail, the Meta and Control keys simply sent extra "bucky" bits on top of the 7-bit character code, resulting in a 9-bit input. And the actual ESC key was intercepted by the Waits for special commands from the user, and was never delivered to user-land programs (ESC-H tells the OS to hide your screen from others; ESC-I asks the OS to send an interrupt signal to your program; etc). The octal location 033, where ESC lives in Ascii, was instead used for the character "not-equals" on Sail; similarly, most of the other locations in the range 001-037 were used for other special characters that aren't in Ascii, and all were typically generated with a Top key-combination press. The whole notion of Control automatically stripping off the high-order bits of a character was foreign.
- simonblack 7y agoAll of the RS232 (serial i/o) VDUs had hardware handshaking. A common problem was that some serial cables lacked ALL the wires required. i.e. the bare minimum serial cable has only 3 wires (ground, in, out). Cables with more wires have greater capabilities (handshaking, modem control,etc,etc). https://en.wikipedia.org/wiki/RS-232 https://en.wikipedia.org/wiki/RS-232
- mark-r 7y agoI don't think that hardware handshaking was universal, but it's ancient enough history that I can't state it categorically. I do know that RS-232 wasn't designed symmetrically so there was some confusion on which lines would do what.
- zabzonk 7y agoPerhaps not "universal", but every RS232 interface I ever came across, starting in 1979, supported hardware flow-control, though you could also do it in software. One of the nice things about RS232 is that it was specified that you could scrunch up the individual wires of the cable and it wouldn't damage the interface circuitry (good for crappy solderers like me) and you could hot plug and unplug it. Oh, all right, TWO of the nice things :-)
- jgoerzen 7y agoI have a vt420, vt510, and IBM3151 and not one of them do RTS/CTS like we'd expect. The vt510 can apparently do that on the DTR/DSR pins, but the vt420 and below cannot, and neither can the 3151.
- therealcamino 7y agoThe VT220 had RTS/CTS. You had to turn it on in the menus, and you needed a cable with all the pins connected, but it worked fine. http://www.bitsavers.org/pdf/dec/terminal/vt220/EK-VT220-TM-001_VT220_Technical_Manual_Nov84.pdf http://www.bitsavers.org/pdf/dec/terminal/vt220/EK-VT220-TM-...
- devicetray0 7y agoIs there a good book on Unix history? Something accessible like "Where Wizards Stay Up Late: The Origins Of The Internet"?
- bch 7y agohttps://www.amazon.ca/UNIX-History-Memoir-Brian-Kernighan/dp/1695978552/ref=mp_s_a_1_1 https://www.amazon.ca/UNIX-History-Memoir-Brian-Kernighan/dp...
- yesenadam 7y agoAlso I found these fascinating: The Unix-Haters Handbook (1994) has a lot of history and takes you back in time.. http://gen.lib.rus.ec/search.php?req=unix+haters+handbook http://gen.lib.rus.ec/search.php?req=unix+haters+handbook Brian Kernighan 'interviews' Ken Thompson (2019) - Ken telling stories. They're both very funny, a very entertaining video, some stories I (and even Brian) hadn't heard. https://www.youtube.com/watch?v=EY6q5dv_B-o https://www.youtube.com/watch?v=EY6q5dv_B-o UNIX: Making Computers Easier To Use (1982) https://www.youtube.com/watch?v=XvDZLjaCJuw https://www.youtube.com/watch?v=XvDZLjaCJuw Also the other day I read in the AWK book that it was mainly inspired by SNOBOL4, so looked at some SNOBOL4 books from archive.org, from 1970-2 and just before, slightly earlier than Unix history takes you back. One tells you how to organize your punch cards to feed in the program.. Another had a bibliography with many dozens of SNOBOL books. It was widely used by people in the humanities apparently; like AWK it was at home dealing with words and text.
- enf 7y agoAlso A Quarter Century of Unix by Peter Salus, https://wiki.tuhs.org/lib/exe/fetch.php?media=publications:qcu.pdf https://wiki.tuhs.org/lib/exe/fetch.php?media=publications:q...
- l1k 7y agoThanks for this blast from the past. I bought the book in 1997 as a sophomore student at university. My favorite book at the time. Leafing through the PDF after all these years I came across some gems I hadn't appreciated back then: On page 161 the author mentions in passing that Eric Schmidt had been working on BerkNet. THE Eric Schmidt. The Google Eric Schmidt. Earlier the book mentions that Bill Joy was able to hire a developer with money they got from DARPA. That developer was Michael Toy and later Sam Leffler. There's a movie called Code Rush about the open-sourcing of Netscape's source code in 1998 (which begat Mozilla and Firefox) and Michael Toy was the project lead for the open source effort back then. Sam Leffler later developed TIFF.
- kazinator 7y ago> According to the EmacsOnTerminal page and other research, at least the vt100 through the vt420 lacked Esc by default. What? https://en.wikipedia.org/wiki/VT100#/media/File:DEC_VT100_terminal.jpg https://en.wikipedia.org/wiki/VT100#/media/File:DEC_VT100_te...
- jlv2 7y agoBack then I wouldn't use a DEC terminal newer than a VT-100 because of the lack of an ESC key. The 220s were physically great terminals, but the keyboard layout was horrific for using vi. Around 84 we started evaluating a purchase of hundreds of terminals for the university, and eventually settled on the Wyse WY-75, mostly because it was ANSI/VT-100 compatible and had an escape key. DEC didn't care, because they didn't use the ESC key in VMS.
- shahink015 7y agoprofessional hackers for hire : https://www.hackerslist.co/ https://www.hackerslist.co/
- Miner49er 7y agoHere's someone asking about it in an old newsgroup from 1993: https://groups.google.com/forum/#!topic/comp.terminals/a73kE6H6Cic https://groups.google.com/forum/#!topic/comp.terminals/a73kE...