21 ms·
Things Every Hacker Once Knew
- erikb 10y agoFunny, had to learn all this stuff for my Master's thesis as it was a crucial part of my project to provide reliable shell command exchange via serial connection. It was really really hard to find anybody who knows anything about this lower network level and terminals. What I can add for everybody who feels the same disappointment as ESR: It's very common for a growing community that three things happen. A) The number of people with just a little knowledge over the holy grail of your community increases. B) The popular communication is taken over by great communicators who care more about their publicity than your holy grail. C) This gives the impression that the number of really cool people decreases. And that is depressing to old timers. But it's in fact often not true. Actually most often the number of cool people increases too! It's just that their voices are drowned in all the spam of what I like to call the "Party People" (see B). So yes, you can actually cheer. It's harder to find the other dudes, but there are more of them! Trust me, I'm not the oldest guys here but I've seen some communities grow and die till now, and it's nearly always like that.
- digi_owl 10y agoAnd these days D) the B)s use various "social" tactics to tar and feather A)s that get in their way...
- kosma 10y agoI've seen this kill entire companies in an extremely slow, painful death. I used to fight this... These days, as soon as I see a Chief Architect or a CTO start to social their way to some technical goal, I just leave the company - for it's a very clear signal that an engineer is a second-class citizen there. No point in waging that battle.
- i336_ 10y agoAs someone still learning about the finer points of social interaction (and sorely lacking in experience), what would you say are some of the signs that this sort of thing is happening?
- forgottenpass 10y agoSee also: https://meaningness.com/metablog/geeks-mops-sociopaths https://meaningness.com/metablog/geeks-mops-sociopaths
- rasjani 10y agoAs having seen and being part of the start, rise and fall of certain scene of genre of music, this article provided a great piece to reflect upon how and what really did happen :)
- kosma 10y agoThis was so entertaining & insightful to read I ended up buying the actual book [1]. Thank you. [1] https://www.amazon.com/dp/B00F9IV64W/ https://www.amazon.com/dp/B00F9IV64W/
- TheGrassyKnoll 10y agoBurning Man ?
- krylon 10y agoThe fact that Windows uses CR-LF as a line separator baffles me to this day (and I am not old enough to have ever used or even seen a teletype terminal!) - for a system that was developed on actual teletype terminals, it would have made perfect sense: To start a new line, you move the carriage back to the beginning of the line and advance the paper by one line. But DOS was developed on/for systems with CRT displays. It doesn't really bother me, but every now and then this strikes me as peculiar.
- wiredfool 10y agoAnd helpfully enough, EPS files can contain \r and \n as line feeds, singly or both, in either order.
- tonyedgecombe 10y agoI seem to remember the Acorn BBC used \n\r for line endings.
- vram22 10y agoRelated, Python has universal newlines support: https://www.google.com/search?q=python+universal+newlines+mode https://www.google.com/search?q=python+universal+newlines+mo... Edit: added the PEP (it's from 2002) and excerpt from it: https://www.python.org/dev/peps/pep-0278/ https://www.python.org/dev/peps/pep-0278/ This PEP discusses a way in which Python can support I/O on files which have a newline format that is not the native format on the platform, so that Python on each platform can read and import files with CR (Macintosh), LF (Unix) or CR LF (Windows) line endings.
- wiredfool 10y agoYeah, but it doesn't do \n \r, and iirc, it's not too happy when the line endings change midstream.
- vram22 10y agoInteresting, I had not checked it for those cases. Maybe it only reads a few lines at the start and assumes from the line endings for those, what it is going to be for the rest.
- davidwihl 10y agoFun fact about octal: every commercial and most non-commercial aircraft have a transponder to identify with Air Traffic Control. The squawk code is in octal. https://en.m.wikipedia.org/wiki/Transponder_(aeronautics) https://en.m.wikipedia.org/wiki/Transponder_(aeronautics)
- rplst8 10y agoA lot of the data buses on aircraft also use octal to identify the data words.
- privong 10y agoAnd the squawk codes are broadcast as part of the ADS-B system[0]. These packets can be received with the inexpensive USB software-defined radios (e.g., [1]). [0] https://en.wikipedia.org/wiki/Automatic_dependent_surveillance_%E2%80%93_broadcast https://en.wikipedia.org/wiki/Automatic_dependent_surveillan... [1] http://www.rtl-sdr.com/adsb-aircraft-radar-with-rtl-sdr/ http://www.rtl-sdr.com/adsb-aircraft-radar-with-rtl-sdr/
- dingaling 10y agoAnd the civilian SSR system was built on the released frequencies and protocols of Mode 3 of the military Mark X IFF system, which was adopted by civilian agencies in the mid-1950s after a particularly nasty airborne collision. Sixty years later and we're still bounded by legacy. As a result of shortage the general-use squawk codes are namespaced into each national ATC region, so aircraft have to constantly change squawks even in supposedly contiguous regions such as Eurocontrol. Squawk 4463 means a different thing in UK airspace than in French. Ironically, military aircraft still support Mode 3 in order to integrate with civilian ATC, who call it Mode-A, but all their special don't-shoot-me-I'm-friendly stuff is handled by more modern encrypted protocols.
- TorKlingberg 10y agoA lot of hardware still uses serial, and not just industrial stuff. Everything from sewing machines to remote controlled cameras. If you work on embedded devices you will still encounter serial/RS-232 all the time. Often through USB-to-serial chips, which only adds to the challenge because they are mostly unreliable crap. Then there are about 30 parameters to configure on a TTY. About half do absolutely nothing, a quarter completely breaks the signal giving you silence or line noise, the final quarter only subtly breaks the signal, occasionally corrupting your data. Still, there is nothing like injecting a bootloader directly to RAM over JTAG, running that to get serial and upload a better bootloader, writing it to flash and finally getting ethernet and TCP/IP up.
- gcp 10y agoArduino got so popular because it addressed those exact problems: realiable USB to serial built in, foolproof bootloader. Still, there is nothing like injecting a bootloader directly to RAM over JTAG, running that to get serial and upload a better bootloader, writing it to flash and finally getting ethernet and TCP/IP up. I'm happy to have gotten mostly rid of this. Gone are the days of choosing motherboards based on the LPT support, and praying that the JTAG drivers would work on an OS upgrade.
- kosma 10y ago> I'm happy to have gotten mostly rid of this. Gone are the days of choosing motherboards based on the LPT support, and praying that the JTAG drivers would work on an OS upgrade. It's still there, and not going anywhere - the only thing that's past is LPT. Last time I used a Linux-grade Atmel SoC, it had a USB-CDC interface but the chain was still the same: boot from mask ROM, get minimal USB bootloader, load a bootstrap binary to SRAM, use that to initialize external DRAM, then load a flashing applet to DRAM, run it, use that to burn u-boot to flash, and then fire up u-boot's Ethernet & TFTP client to start a kernel from an external server and mount rootfs over NFS. Considering the amount of magic, it worked amazingly well. The whole shebang was packaged into a zip file with a single BAT to double-click and let it do the magic. As for COM and LPT - FTDI and J-Link changed the embedded landscape forever, and thanks for that.
- rwallace 10y agoGood article, brought back memories! A small correction: > 56 kilobits per second just before the technology was effectively wiped out by wide-area Internet around the end of the 1990s, which brought in speeds of a megabit per second and more (200 times faster) That should read 20 times faster?
- cnvogel 10y ago> and more... probably refers to the first widely installed (with coaxial cables) 10 MBit Ethernet networks...
- TeMPOraL 10y agoI'm sad that "[FGRU]S ({Field|Group|Record|Unit} Separator)" didn't get much use, and instead we have to rely on tabs or commas (TSV / CSV), and suffer from the problem of quoting / escaping. BTW, I use Form Feed (CTRL+L) character in my code to divide sections, and have configured Emacs to display them as a buffer-wide horizontal line.
- rswail 10y agoForm Feed would actually cause the printer to feed to the top of the next page. Original line printers had a carriage control tape that indicated to the printer where the top of the page was. Also line printers using standard paper were 132 columns across and 66 lines down, which was 11 inches at 6 LPI. This matched the US portrait paper height and allowed for about 10 character per inch plus margins for the tractor feed and perforations.
- Turing_Machine 10y agoI remember when a common (and relatively harmless) prank was to send a file with several thousand form feeds to the high speed "tree killer" printer at a remote site. Newbie operators would have a coronary when the fan-fold paper started spewing across the room. ("relatively harmless" because the paper wasn't actually printed on or otherwise damaged -- the operator just had to refold it and move it back to the input side).
- thebelal 10y agoAgreed, if there was just a little more editor support and use early on the whole CSV mess could have been avoided. They actually display fairly well in vim
- leephillips 10y agoIt seems that so many programming headaches have the same root cause: the set of characters that compose "text" is the same set that we use to talk about text. Hence the nightmares with levels of quoting and escaping. The use of out-of-band characters like NULLs to separate pieces of text does help, but I don't think there is a complete solution. Because, eventually, we want to explain how to use these special characters, which means we must talk about them, by including them in text....
- cyberferret 10y agoThings that I still find hard to forget these days: * ASCII codes for those single and double box characters, so I could draw a fancy GUI on those old IBM text monitors * Escape codes for HP Laserjets and Epson printers for bold, compressed character sizes etc. * Batch file commands * Essential commands for CONFIG.SYS * Hayes modem control codes * Wordstar dot format commands * WordPerfect and DisplayWriter function keys * dBaseII commands for creating, updating and manupulating records I wish they would all move out of my head and leave room for me to learn some new stuff quicker!
- TorKlingberg 10y agoFun fact: Your smartphone is still using (extended) Hayes commands to control the cellular modem inside.
- SSLy 10y agoLTE smartphones too?
- kosma 10y agoYou'd be surprised how little has changed in that regard. Establishing a data session, from the early GPRS days until today's LTE, is still: ATD*99***1# Even if the underlying technology has completely changed, the interface has not.
- criddell 10y agoWhoa! I just dialed that on my Nexus 5x and got > USSD code running... then > Connection problem or invalid MMI code. So what was my phone just trying to do?
- kosma 10y agoHook your phone to your computer via USB and try to invoke that command on the serial port that appears; you'll get a PPP connection right away. It won't work with the dialpad app.
- ianaphysicist 10y ago,8,1
- Freak_NL 10y ago> It is now possible that the user has never seen a typewriter, so this needs explanation […] Aw man… I'm only 36, but now I feel old for growing up in a time where a typewriter was still common enough to run into (even if they were rapidly being displaced by personal computers). They still exist in the wild though as a hipster accessory — they probably do well on Instagram too I suppose.
- jcadam 10y agoI'm 36... back in the mid-00s when I was in the Army we were still using typewriters, mostly to fill in pre-printed government forms (and award certificates, etc). I even had to deal with carbon paper. My grandmother had an old manual typewriter, which I had to use once to type up some homework when I was in High School. I do not miss them.
- SixSigma 10y agoI'm work at a global logistics company. Manual typewriters are still somehow part of our workflow for filling in forms, not even carbon backed. It boggles my mind why that hasn't been replaced by a PDF form. Perhaps IT being siloed in another building keeps such legacy going.
- digi_owl 10y agoWith many of these things i suspect it comes down to laws and regulations more than anything else. Meaning that your typewritten document will be accepted as evidence during a lawsuit or similar, while a PDF of same may not.
- soneil 10y agoI always thought it was a shame the ascii table is rarely shown in columns (or rows) of 32, as it makes a lot of this quite obvious. eg, http://pastebin.com/cdaga5i1 http://pastebin.com/cdaga5i1 It becomes immediately obvious why, eg, ^[ becomes escape. Or that the alphabet is just 40h + the ordinal position of the letter (or 60h for lower-case). Or that we shift between upper & lower-case with a single bit. esr's rendering of the table - forcing it to fit hexadecimal as eight groups of 4 bits, rather than four groups of 5 bits, makes the relationship between ^I and tab, or ^[ and escape, nearly invisible. It's like making the periodic table 16 elements wide because we're partial to hex, and then wondering why no-one can spot the relationships anymore.
- bogomipz 10y ago>"It becomes immediately obvious why, eg, ^[ becomes escape. Or that the alphabet is just 40h + the ordinal position of the letter (or 60h for lower-case). Or that we shift between upper & lower-case with a single bit." I am not following, can you explain why ^[ becomes escape. Or that the alphabet is just 40h + the ordinal position? Can you elaborate? I feel like I am missing the elegance you are pointing out.
- nerdponx 10y agoESC is on the same row as [, just in another column. So Ctrl ends up being a modifier just like Shift, in that it changes column but not row. The 40h offset is 2 columns' worth.
- sarabob 10y agoif you press a letter and control, it generates the control character in the left-hand column. the letters in the third column are A = 1, B = 2 etc: 40h + the position in the alphabet. Awesome to see ^@ as null and laying it out this way makes it easier to see ^L (form-feed, as the article says: control-L will clear your terminal screen), ^G (bell), ^D, ^C etc etc
- kps 10y agoThis is so that control characters (and shifted characters — see https://en.wikipedia.org/wiki/Bit-paired_keyboard https://en.wikipedia.org/wiki/Bit-paired_keyboard) could be generated electromechanically. Remember a teletype of the era (e.g. Model 33) has no processing power.
- billpg 10y agoWasn't "{Field|Group|Record|Unit} Separator" meant to allow an alternative to using commas in CSV data?
- masklinn 10y agoIt has two more levels than CSV (which only has units and records) so no. And FS is file separator not field. These were used for serial data sources, not just network but punch cards or drums or magnetic tapes. GS, RS and US were intended for databases on serial data sources, "group" is a modern-day table. Lammert Bies has more: https://www.lammertbies.nl/comm/info/ascii-characters.html https://www.lammertbies.nl/comm/info/ascii-characters.html You can repurpose the final two (record and unit) for CSV, but that's not their original role, and you'll have to make sure they're never opened via user-controlled anything as these control codes are non-printable.
- wtbob 10y agoSince it predates CSV, it wasn't an alternative to it: it was the original. I suppose the Excel or 1-2-3 team either didn't know about the separator characters, or they did but then-current text editors weren't useful enough to do anything with them (and user-editability was important). It's a real shame: with a more integrated system, they could have added functionality to the editors to understand ASCII record encoding, and CSV need never have existed.
- decasia 10y agoEven in the last few years I've seen FileMaker systems that used this set of ASCII characters to delimit fields in plaintext data exports. Initially baffling since I was expecting CSV, it seemed like a sensible choice once I figured out what they were doing.
- my_ghola 10y agoI use them whenever I can :) Maybe a simple viewer would be nice.
- falsedan 10y agoAh the good old days, when hackers were hackers and quiches were quiches. Oh wait, this article is 'man ascii' & 'man kermit'.
- falsedan 10y agoAlthough interestingly enough from 'man ascii', it's clear why ^C is ETX: > Oct Dec Hex Char Oct Dec Hex Char > ──────────────────────────────────────────────────────────────────────── > 000 0 00 NUL '\0' 100 64 40 @ > 001 1 01 SOH (start of heading) 101 65 41 A > 002 2 02 STX (start of text) 102 66 42 B > 003 3 03 ETX (end of text) 103 67 43 C > 004 4 04 EOT (end of transmission) 104 68 44 D > 005 5 05 ENQ (enquiry) 105 69 45 E Holding Ctrl set bit 6 to '0', bit 7 to '1', and bit 8 to '0'. 'C' and 'c' differ by bit 6 only ('1' for 'c').
- jccc 10y agoI remember CLU said, "Acknowledge" but I can't remember if the MCP said, "End of transmission" or "End transmission." From now on every time I Ctrl-d I want to think the voice of the Master Control Program.
- OliverJones 10y agoThose DB9 and DB25 connectors are still kicking around the bottom of my toolbox. Why is DEL's bit value 0xff (or 0255)? Because there was a gadget out there for editing paper tape. Yes. You could delete a character by punching out the rest of the holes in the tape frame. I used it once. It was ridiculous.
- jobead 10y agoLOL, I swear it feels like the answer to every "why is this weird computer thing this way?" question I see is "because we used to do it this way on punch cards."
- kosma 10y agoWait until you find out that "coder" originally meant "someone who encodes messages into Morse". And if you start digging into the word "code", you'll find it comes from latin "codex" which is a mutation of "caudex" meaning, literally, "tree trunk". Because back then, people would write on wooden tablets covered with wax. So.. next time you see a kludge and think of "historical reasons", consider that "historical" goes back much farther than 20th century. :)
- yrro 10y agoHuh. I remembered from school that "caudex" was a reasonable translation for the insult "blockhead"... now I know why!
- OliverJones 10y agoAnd, what did the word "computer" mean back in the day? Hint: they were mostly women. And, they defeated the Nazis in World War Two, with the help of Alan Turing and his crew.
- w8rbt 10y agoOr teletype... https://en.wikipedia.org/wiki/Teleprinter https://en.wikipedia.org/wiki/Teleprinter
- 10y ago
- pjmorris 10y agoDoes anyone remember EBCDIC? IBM defined EBCDIC for the same purposes as ASCII, but ASCII took off with newer generations of machines. The last time I wrote an ASCII-EBCDIC conversion routine was the late 90's, part of generating a file for upload to a vendor's mainframe.
- denzil_correa 10y agoAs a young student of Electronics, we had to religiously perform conversions between EBCDIC and ASCII.
- tyingq 10y agoSome popular projects still have to support it: https://github.com/apache/httpd/blob/2.4.x/include/util_ebcdic.h https://github.com/apache/httpd/blob/2.4.x/include/util_ebcd...
- WorldMaker 10y agoThe .NET CLR has an EBCDIC text encoder/decoder in the base class library. I had to research this once when it was asked of me how easy it was to injest some COBOL-built files in C#. We ultimately didn't need to use that as the COBOL side had switched to ASCII at some point and its owners had forgot, but I suppose it is good to know that even modern .NET code can speak EBCDIC if need be.
- nvr219 10y agoesr is insufferable
- Spooky23 10y agoTrue, but the tone in this piece less noxious than average.
- brennen 10y agoYeah. If he stayed away from politics, race, sexuality, pop culture, and guns (and toned down the hyperbolic "community luminary" pose) he'd be in general a fairly entertaining writer. I'm certainly glad I read this bit and the attendant HN thread.
- Derbasti 10y agoIsn't BS used in combination with other characters to encode non-character terminal information, like text color changes? In some programs, `]\b` for example will change the text color. The `]` character itself will not be printed, since `\b` will delete it from the visual line, and this effectively creates a side-channel for communicating "invisible" information within the regular character stream. It's a pain to work with, though, since it makes things like `strlen` behave in very non-intuitive ways. Just imagine a string becoming longer when you delete the BS character. That's no fun.
- ksherlock 10y ago^[ (control-[) is how escape is rendered. VT100/ANSI uses escape sequences for terminal control sequences (like positioning the cursor or changing the color).
- akavel 10y agoHm, maybe that's the way how we can try fixing the "programmers don't know their ancestors' discoveries" issue? By "older" programmers blogging about things that are obvious to them, but apparently no longer to people? in a somewhat loose "old folk stories" style, but slightly more dense than the pure "funny folklore tales" like what did Jobs say to woz, or esr quip to ken?
- pjmlp 10y agoBlogging and story telling isn't enough, if the audience doesn't care. For example, there are lots of old papers from Xerox PARC, Burroughs, AT&T and many others freely accessible on the Internet. Some of them, we have to thank to the laborious work from people that bothered to digitize their original form, produced by plain typewriters. Yet, I doubt many youngsters bother to read them.
- akavel 10y agoIn my opinion, the problem with papers is different: that of high cognitive barrier to entry (they're too dense for casual reading, and tend to build on silent assumptions well known only in narrow circles of specialists), and number overload. That's extrapolated (sorry!) from my personal attitude and experience with them. For this part, maybe a kind of "pop-science" (i.e. popularization) articles could help, too. In fact, some of such do appear on HN occassionally (e.g. some data structure akin to bloom filters recently, from what I recall). But actually that's not exactly what I attempted to express in my comment above. What I tried to talk about was the other (if related) often repeated lament: that youngsters "forget" (in reality, never did know for starters) and reinvent stuff that was common knowledge/tech not long ago. I see this as something else than papers: I assume papers were more of a "bleeding edge" at the time they were written, and not all of them did spread to become well known (not to mention commonly understood) even at their time. For me (a tech mid-age?), the first realization of the trend came with some recent stories (a year or two ago?) about "a new app" for "woohoo, communication between mobile phones over audio!" I.e. modems, reinvented (not to mention the irony of phones now being more digital than analog, though still modem-ing over radio waves at lowest level... but I digress...). That's the thing I believe old masters (but also commoners, like me! or you, whichever category you find yourself in) could try to popularize, so it doesn't get forgotten. And that's what I found brilliant in the original article. Re-pollination of "age"-old ideas, once common and obvious, now forgotten because out of use. In a lightweight, easily consumable and approachable tale. That's the way of a wise old sage, telling young ones some lightweight and amusing stories by the campfire, but secretly hiding in them the good stuff he knew, or that he learnt the hard way in his own time. Engaging, amazing, and playing on curiosity, for the benefit of the new ones; not complaining and deriding. Playing with how to make the young ones care; tricking them into caring. That takes more effort, true; but then it may become a good proof whether one really cares about this stuff being remembered. [edit] By the way, thanks for writing down your argument, especially because it made me flesh out some of my vague thoughts better, and explore them further even for my own understanding.
- aap_ 10y agoAnd yet he doesn't know the PDP-11 is an octal machine even though it's 16 bits.
- baking 10y agoThis deserves a little more explanation. The PDP-11 had 8 registers and 8 addressing modes so in the days before debuggers you could dump the binary and pretty much debug straight from the octal without so much as referring to your handy-dandy pocket reference card. http://www.montagar.com/~patj/dec/pocket/pdp11_programmingcard_1975.pdf http://www.montagar.com/~patj/dec/pocket/pdp11_programmingca... EDIT: Also, the most significant bit was used for 3/4 of the instruction space as a flag for a byte vs. word operation (or add vs subtract) so having it alone in its own octal digit (0/1) made perfect sense. For example 01ssdd was MOV (word) and 11ssdd was MOVB. 06ssdd was ADD and 16ssdd was SUB.
- Waterluvian 10y agoWhen you find swaths of knowledge that younger people don't know, you've found success in the overall human goal of abstracting concepts and building on the shoulders of those who came before us. I'm not suggesting the article is a, "Gosh, Millenials!" conversation. I just get a warm tingle when reminded that I have absolutely no clue how to do something people did just a generation ago, and I don't need to. It's success!
- wtbob 10y ago> When you find swaths of knowledge that younger people don't know, you've found success in the overall human goal of abstracting concepts and building on the shoulders of those who came before us. Abstracting, yes, but I don't know about building-upon. The thing is, a lot of this stuff is still sitting around beneath the covers, and someone needs to understand it. Even worse, sometimes there's stuff that's abstracted over that's important, e.g. if the Excel or 1-2-3 teams had known about Field/Group/Record/Unit Separators, would they have ever come up with CSV? Or the fact that SYN can be used to self-syncronise, due to its bit pattern …
- masklinn 10y ago> Even worse, sometimes there's stuff that's abstracted over that's important, e.g. if the Excel or 1-2-3 teams had known about Field/Group/Record/Unit Separators, would they have ever come up with CSV? Neither team had anything to do with CSV which originates in Fortran's list-directed I/O. And there is no field separator (which would be redundant with unit separator), FS is the file separator, these codes were intended for data and databases over sequential IO, in modern parlance a group is a table.
- JoeAltmaier 10y agoStill, I have a strange feeling that our whole technological edifice is standing on the head of a pin. When the folks pass who know this stuff, and something breaks, it'll be a while before things get running again. Hopefully before the food riots.
- 10y ago
- cesarb 10y ago> SO (Shift Out), SI (Shift In): Escapes to and from an alternate character set. These are never interpreted in this fashion by Unix or any other software I know of [...] Aren't SO and SI used by the ISO-2022-JP character encoding?
- tyingq 10y agoLinux does do something with SI and SO, at least on the actual framebuffer console. It enables the VT100 alternate character set, for drawing things. The k,l,m,n,o,p,q,r,s,t,u,v,w keys then become useful for drawing lines If you have a linux desktop, switch to an actual console (Ctl-Alt-F1), then: echo -e \\x0E And type a bit of lowercase characters between k and w. To get the terminal back to normal: echo -e \\x0F
- kbob 10y agoThat's what the VT100 did with SI and SO. It's been 30? 35? years since I touched a VT100, but I think I recall there being a configuration bit to enable alternate character set on SI/SO.
- i336_ 10y agoHere you go: http://www.pcjs.org/devices/pcx86/machine/5170/ega/2048kb/rev3/vt100/ http://www.pcjs.org/devices/pcx86/machine/5170/ega/2048kb/re... Probably not what you used to use, but "ctty com2" (and a couple of Returns directed at the VT100) will make it "go." I'm not 100 on what the keymapping is when you're in the setup screen (virtual Setup key at bottom-left).
- kps 10y agoThey're used by ISO 2022 in general. Free version: https://www.ecma-international.org/publications/standards/Ecma-035.htm https://www.ecma-international.org/publications/standards/Ec... Of course Unix didn't interpret them; the terminal did.
- earthly10x 10y agoPretty soon we'll have to start telling them what a command line interface is, commonly known today as a foreign and abstract concept defined by an acronym, "CLI".
- wtbob 10y agoI don't think so: just as reading, writing & speaking are still our primary forms of communication (rather than pointing & grunting), so too will CLIs last.
- Yizahi 10y agoIt could be deprecated fast though if either big manufacturers decide to ship GUI only systems, or if GUI systems became way more reliable. Or could live forever. For example we ship a certain device that can be configured fully both from CLI, from web GUI and from Windows application. Customers internally have teams that are 100% polarized - some teams use GUI stuff only and some teams use CLI only. Both refuse to switch on principle. ANd in our case I think in 5-10 years CLI will die. It is just a mess - you can do fast configuration with userfriendly extras in CLI but only on small scale. It just doesn't allow userfriendly editing of kilometer long configs, especially on 100s and 1000s of devices. So if we'll continue improve GUI configuration CLI will eventually die I think. Same could happen in general IT systems, provided there is better alternative (or forced alternative).
- i336_ 10y agoRight, that makes a lot of sense. If you develop the CLI version more and made it easier to (for example) batch-apply patterns against many datasets, and added sufficient facility to fix the other configuration gripes that are currently harder than in the GUI, well, the CLI will win some more. I do have to agree, GUIs can be easier to use if they're well-designed. It's also arguably easier to build GUIs than CLIs in some situations, particularly where you don't need something to be fully Turing-complete.
- rocky1138 10y agoSeeing this reminds me of how things were and to be thankful for how far things have come.
- cafard 10y agoHa! The first technical book I ever bought was The RS-232 Solution. It is not impossible that I bought it at an airport bookstore--this was in the mid-1980s.
- coderjames 10y agoMany of the control codes are still in active use today in the air-ground communications protocol spoken between airplanes and Air Traffic Control. The ACARS[0] protocol I work with every day starts each transmission with an SOH, then some header data, then an STX to start the payload, then ends with either an ETX or an ETB depending on whether the original payload had to be fragmented into multiple transmissions or fits entirely into one. These codes aren't archaic and obsolete in the embedded avionics world. [0] ACARS: "Aircraft Communications Addressing and Reporting System" - see ARINC specification 618[1] [1]http://standards.globalspec.com/std/10037836/arinc-618 http://standards.globalspec.com/std/10037836/arinc-618
- Animats 10y agoHere's the origin of that - The Teletype Model 28 "stunt box".[1] This was a mechanical state machine, programmable by adding and removing metal levers with tines that could be broken off to encode bit patterns. These were used in early systems where a central computer polled mechanical Teletype machines in the field, and started and stopped their paper tape readers and other devices. Remote stations would punch a query on paper tape and put it in the reader, then wait until the central computer would poll them and read their tape. This was addressable, so many machines could be on the same circuit. Used in 1950s to 1970s, when mainframes were available but small computers were not. [1] https://www.smecc.org/teleprinters/28stuntbox001.pdf https://www.smecc.org/teleprinters/28stuntbox001.pdf
- i336_ 10y agoThanks so much for sharing this. This is exactly the kind of TTY history I've always been looking for.
- alphonsegaston 10y agoI always thought that instead of these lamentations about lost knowledge, people should just put together resource guides to maintain these skills. Hackers used to know these things? If they're still useful to know, how can I learn about them today? Otherwise, it just sounds like the worst combination of geek posturing and "kids these days."
- dualogy 10y ago> If they're still useful to know, how can I learn about them today? By reading the article instead of lamenting lamentations ;)
- alphonsegaston 10y agoYeah, no, I read it :) Some of that stuff piques my interest, but then it can be difficult to get started understanding it relative to other stuff that's more widely covered on the web. I guess I am just a little pampered when it's comparatively much easier to learn about a web framework. But that's probably part of the old school hacker ethos as well.
- crpatino 10y agoIt is more complex than that. Even if it isn't (and cannot) be literally true, I think Eliezer Yudkowski was on to something when he invented the "Merlin Interdict" in his fantasy work: Harry Potter and the Methods of Rationality. Every highly systemized art form requires a living tradition to pass its most advanced achievements. Documentation, no matter how extensive, cannot convey all the subtleties, mostly because the experts are not 100% aware of all the little details that set them appart from the merely competent. Some human endevours are best learned as a long process of deliverate practice under a wise mentor, who can help you steer the path and point your attention back to one apparently irrelevant detail or another. Self study is posible and effective, but it will only take you so far. And to rediscover some lost art from first principles requires a level of geniality on par with the first creators of the art in the first place.
- glhaynes 10y agoI was actually pleasantly surprised by how little lamenting esr did in this piece. I'd sort of expected it to be "Things Every Hacker Once Knew [But Kids Today Don't Learn Them And That's Awful And So Are The Kids]."
- nerdponx 10y agoWhy did the end-of-line indicator settle on LF and opposed to CRLF? Naively, the latter makes more sense to me by virtue of it being more explicit. Do Unix-alikes always inject a CR after a LF?
- JoeAltmaier 10y agoIt was complicated. Some early printer devices had automatic-CR (think of a typewriter). Also, 'lineprinters' had a chain torus of letters and hammers at every position on the line, so there was no carriage at all.
- jcrawfordor 10y agoThis is mostly coincidental history. A lot of teleprinters used to require that CR+LF was sent for largely mechanical reasons, and Windows was made similar to MS-DOS which was made similar to CP-M which had been built for these kinds of devices. Unix, on the other hand, was made similar to Multics which had the clever idea of on-the-fly replacing a line feed with whatever the printer required. So text files needed only the LF, and a CR was added automatically if the printer required it. This had its upsides and downsides, but the major upside was that you could print a text file on two different systems and reliably have it come out the same way! This is one of the reasons that in e.g. C, the '\n' character is somewhat awkwardly defined as "a one-byte number that will move the cursor to the start of the next line", when on some operating systems (Windows) this will end up actually being the two-byte CR+LF sequence (well, when output is in text mode...). Even around the time of C's development this was already an issue and newline translation magic was already required, the ancestors of Linux and the ancestors of Windows just happened to put that magic in a different place.
- gunnarde 10y agocopy con com2 atz atdt ath0
- quietriot 10y agoRead this. Or at least take a look for some historical insight. It is both dry and interesting. An annotated history of some character codes or ASCII: American Standard Code for Information Infiltration http://worldpowersystems.com/J/codes/ http://worldpowersystems.com/J/codes/ It describes how we got here in excruciating detail, starting with Morse. Military communication systems had great influence. Before the ASCII, as we know it today, there was an "ASCII-1963" that was a bit different. The long and winding path: Morse Baudot Murray ITA2 FIELDATA ASCII-1963 ASCII-1967
- deleted 10y ago[deleted]
- EvanAnderson 10y agoIf you want to geek-out further on ASCII have a look at Bob Bemer's site: https://www.bobbemer.com/ https://www.bobbemer.com/ Bob is colloquially known as the "father of ASCII" (among other things) and his writing is fun to read and interesting.
- deleted 10y ago[deleted]
- alblue 10y agoI gave a talk on the origins of Unicode a while ago (now published on InfoQ at https://www.infoq.com/presentations/unicode-history https://www.infoq.com/presentations/unicode-history if you're interested) where I talked about ASCII, and where that came from in the past (including baudot code and teletype). The slide pertaining to ASCII is here: https://speakerdeck.com/alblue/a-brief-history-of-unicode?slide=6 https://speakerdeck.com/alblue/a-brief-history-of-unicode?sl...
- kps 10y ago> ENQ (Enquiry), ACK (Acknowledge) In the days of hardware serial terminals, there was a convention that if a computer sent ENQ to a terminal, it should reply with terminal type identification followed by ACK. While this was not universal, it at least gave computers a fighting chance of autoconfiguring what capabilities it could assume the character to have. That's not quite right (the ACK part isn't right at all). See <https://en.wikipedia.org/wiki/Enquiry_character> https://en.wikipedia.org/wiki/Enquiry_character>.
- deleted 10y ago[deleted]
- zengid 10y agoIf it ain't baroque, don't fix it!
- tim333 10y agoIn fact maybe even if is baroque don't fix it... https://www.youtube.com/watch?v=uKiCphIiO6c https://www.youtube.com/watch?v=uKiCphIiO6c
- to3m 10y agoFreed from such constraints, the Windows console subsystem metaphor is a CGA-style text mode display from the early 1980s. That's the kind of progress you just don't ever get with POSIX.
- i336_ 10y agoIn 32-bit Windows (which you can still get). The NTVDM was removed from 64-bit Windows, and presumably the graphics hardware emulation was too since it's not used by anything else. On x86_64 cmd.exe is purely a console. [EDIT: I misunderstood; the exact component the parent commentator was referring to was not removed.] I say "presumably" because cmd.exe is a fair bit of a rats' nest due to its organic development over the years. One of its biggest issues is that you must use cmd.exe in order to read/write stdio while a program is running; there's no API to do it any other way. (So you have to open a hidden window then use a bunch of fancy tricks to poll it every so often per second. Yup.) However, this is being tracked and will (at last!) be fixed (apparently soonish): https://github.com/Microsoft/BashOnWindows/issues/111#issuecomment-238068283 https://github.com/Microsoft/BashOnWindows/issues/111#issuec... (that's the relevant comment, the whole thread is interesting - there's actually a carefully-shot photo of the whiteboard all of this is on!)
- to3m 10y agoThe console window is a grid of (char,attr) - see ReadConsoleOutput/WriteConsoleOutput - i.e., CGA text mode. It's only a metaphor. (As for standard handles, you can redirect them without needing cmd, but there's some fiddly stuff involved. I don't remember the exact details, but it's something like: redirect parent process's handles to appropriate pipes, spawn the child, retract the original redirection, access pipes as appropriate. The API implies that you can just supply the pipes directly, but it doesn't work that way, because Windows is stupid. Which everybody knows. (But what not everybody knows: it's still not as stupid as POSIX.))
- markbnj 10y agoI wrote code on a teletype connected to an HP3000 in the mid-70's, so its always a kick to see that technology mentioned here. Especially when it's described as "really old" which obviously it, and I, are :).
- eldavido 10y agoI'm working on a greenfield project at a hotel where we've had to interface with a Mitel PBX over RS-232. I was shocked how literally the ASCII codes were followed by the PBX. It sent an "ENQ" before each command, we had to send an ACK back, and then it sent us STX/ETX-delimited records. I'm 32 and working today, in 2017. I hope I make stuff that lasts this long.
- i336_ 10y agoIt's harder now, because any developer can make a fancy framework, draw some graphics, make a website, find a domain (on the .io TLD!) noone else has thought of yet, and look as good as (or better than) multimillion dollar companies. Anybody can compete now. And so, for the sake of landing a job, or networking/personal publicity, or even just for the experience, people do. The problem is, frameworks and libraries a) are both easy and fun to write, b) are really hard to comprehensively test with full architectural coverage, and c) suggest some form of standardized behavior. While (b) creates technical debt, the main issue is (c) vs (a): we're flooded with "do it this way!" from a thousand groups, even in situations where the developer(s) didn't really intend for that to be their predominant statement. With all this noise and chaos, it almost feels awkward to stick to old, icky, widely-hated legacy standards in the face of all this innovation. Or at least that's what it's felt like to me. Objectively thinking about it and comparing everything, though, nothing's perfect, but what's been around for a while has the combined benefit of a) having a fairly widespread mindshare, and b) having known solution patterns for a wide range of issues. I guess what I'm trying to say is that building software on top of tried-and-tested methodologies is likely to produce long-lived results (which is fairly logical). I'm also reminded of http://qdb.us/53151 http://qdb.us/53151 :D - I say "or better than" because large corporations often have standardized internal Web style guidelines and rendering toolkits/templating engines, and making sweeping changes in those is harder than for websites that are little more than a landing page and some documentation - so the bigger an enterprise is, the likelier it is that its website might look mildly dated.
- HeyLaughingBoy 10y agoNO CARRIER
- charles-salvia 10y agoNot to mention how the truly ubiquitous HTTP protocol uses CRLF in the headers. The mechanical origins of the CR/LF combo were so strongly ingrained in developer culture that line oriented protocols like HTTP inexplicably continued to use it - either that or Tim Berners Lee just copied it from earlier line oriented protocols like SMTP because it just seemed like the "right way to do things". It also doesn't help that most modern web servers also include logic to handle a single LF character to terminate lines anyway.
- digi_owl 10y agoWell it meant you could interact with a web server via telnet in a pinch.
- inlineint 10y agoThe article recalls teletype terminals. I'm just putting a video showing how it worked in close: https://www.youtube.com/watch?v=MikoF6KZjm0 https://www.youtube.com/watch?v=MikoF6KZjm0 . It hypnotizes IMO :) I'd like to see how looks editing and running BCPL/C programs using ed on such a terminal.
- fiddlerwoaroof 10y agoNow I want one of those for my desktop.
- VintageCool 10y agoWatching that video suddenly made it clear to me where the word "teletype" came from.
- i336_ 10y agoI went from amazed ("it's like a mechanical watch...") to bored/irritated ("oh, so THAT's what 110 baud was like... ouch") to amused ("...but I could put up with this, I guess.") as I watched this. Thanks so much. My conclusion is that I could probably put up with using one of these, but that I'd feel quite cramped if it was my main workstation. The mechanics of `ed' suddenly make a lot more sense now. The dialing bit at the end was awesome. Reminds me of relay-based lift motor rooms! (There are videos of those on YouTube.)
- jecel 10y agoThe following table describes ASCII-1965, the version in use today. It used to be common knowledge that the original 1963 ASCII had been sightly different (lacking tilde and vertical bar) but that version went completely extinct after ASCII-1965 was promulgated. Not quite true - early adopters like DEC kept using the 1963 version for a very long time, which prompted others to follow them. When the Smalltalk group decided to replace their own characters for ASCII in Smalltalk-80 to be compatible with the rest of the world, it was the 1963 version that they used. Due to this, since I use the Celeste program in Squeak Smalltalk to read my email, I see a left arrow whenever someone wrote an underscore. The other difference is that I have an up arrow instead of ^. But it did adopt the vertical bar and tilde from 1967 ASCII, so it was a mix.
- i336_ 10y agoFor anyone similarly curious what Celeste is, there are some screenshots at http://wiki.squeak.org/squeak/1467 http://wiki.squeak.org/squeak/1467, and it's included in http://files.squeak.org/3.7/unix-linux/ http://files.squeak.org/3.7/unix-linux/. No, it doesn't work in Squeak 5.1 :) To the OP, I'm very curious why you're using Celeste. I take it you've been using it for years?
- jecel 10y agoWhen switching from a KDE based Linux to a Gnome based one many years ago I had to find a replacement for KMail. Since I design Smalltalk computers, it seemed silly not to use Celeste even if I had to put up with some limitations and add a bunch of bug fixes (all dealing with tolerating broken emails). It is not something I would give to a "normal" person to use, but it is more than good enough to me. The main problem is that it does a reasonable job of showing incoming emails (though attachments show up as links at the end of the text) but when editing an email to send it shows the raw headers and MIME for any attachment.
- i336_ 10y agoWelp. I didn't see your comment until now. I wonder if you'll see/get this reply. What do you mean by "design Smalltalk computers"? That sounds really interesting. Do you mean you configure them to autoboot Linux into Squeak or similar? What are they used for? (...I'm guessing education-type environments...?) I can understand what you mean. I tried to get it working, as I said, and while I got the main window open I had no idea how to configure it (and I must admit I don't have much incentive to.)
- bfrog 10y agoRS-232 is alive and well in the micro controller space, thank you very much.
- alexeiz 10y agoThe FIX protocol uses the SOH control character to separate message fields.
- diebir 10y agoRS-232 is invaluable. Give me a new piece of hardware and as long as there are 2 wires for the serial port I can port Linux kernel to it. I have ported Linux to a custom ARM board many years ago. Started with a boot loader written in assembly and writing a single char into serial port for a debug console. It takes a single line of assembly or C. Infinitely easier than USB. From there on, I was able to unwind the whole system, develop USB drivers, TCP tunnels, etc.
- cpr 10y agoESR forgot to give the reason for XON/XOFF: physical terminals often couldn't keep up with an output stream even at a low 9600 baud, so they'd have to back-pressure the sender (usually a dial-up or direct-connect host) to let them know when to stop and when to start. Plus, people used them manually (control-S/control-Q) on systems to stop output scrolling by, and restart it when they've read what's on the screen, before built-in pagination filters (e.g., more(1) or less(1)) became common. (Specially back in the DECsystem-10/-20 days.)