5 ms·
Control characters were essential back when ASCII was standardised. Please remember that ASCII wasn't just a text encoding standard, it was used for communicati
by laumars 8y ago
Control characters were essential back when ASCII was standardised. Please remember that ASCII wasn't just a text encoding standard, it was used for communication with external hardware as well.
In fact due to the teletype legacy on modern terminals, we still use ASCII control codes now. eg killing an application via ctrl+c - that's sent as an ASCII control code and the receiving pesudo-TTY then interprets that as an interrupt signal. Backspace is also an ASCII control code.
The point about cartridge return (CR) and line feed (LF) is an interesting one. From a purely text markup perspective it does seem insane to have two separate characters. However from the perspective of printing data on a teletype it makes total sense: you want one control character to bring the head back to the start of the line, and a second control character to feed the paper. In fact even on modern pseudo-TTYs (eg on Linux), you can still define whether you want CHR(10) to do both a CRLF or just LF - and in fact when programs do put the TTY into raw mode (eg readline, ncurses, etc) then preferred behaviour is to disable the auto-CR on CHR(10).
The interesting thing is your point seems focused on keyboard layouts - and there's nothing stopping a keyboard from having characters that are not part of ASCII. eg UK keyboards have a pound sign (GBP) and that's not included in ASCII. Neither is the Euro currency character and that appears on some keyboards as well. I have no idea what ¬ (next to the backtick button on my keyboard) is called but that's not an ASCII character either. Navigation buttons on keyboards (left, right, home, page up, etc) are not ASCII characters. Nor are the function keys (F1 et al). Escape is though - and has proven to be quite an important control character too as it's used heavily for inlining data into TTYs via ANSI escape sequences (eg colours, cursor movement, etc).
But getting back to the GBP and Euro point: there is no reason why you couldn't configure your own keyboard to map different keys to different code points outside of the ASCII range if you wanted to.
Honestly though, some of your examples of missing symbols don't really make a whole lot of sense. How would card suits having an ASCII code help developers (or anyone for that matter)? Arrows I could see a benefit of and they do appear on some of the competing character encodings of the 70s and 80s. The opposite direction of quotation marks is a valid point to as they might help make it easier to write nested strings. However in terms of written text I'm more than happy having editors auto-fix straight quotation marks with their angled counterparts.
- Symbiote 8y ago> I have no idea what ¬ is called That's the logical not symbol, companion to ∧ (and) and ∨ (or). It's in ISO-8859-1 (and presumably the British keyboard layout) while the others aren't, since they can be made with /\ and \/.
- yrro 8y agoHmm, what a shame that these three characters can't be typed with <Compose> /\, <Compose> \/ and <Compose> -|
- nybble41 8y agoSarcasm? If you set up a .XCompose file you can type them any way you want. In my case they're mapped to <Compose> <^> <^>, <Compose> <v> <v>, and <Compose> <-> <,> (plus a few minor variations). I always miss the programmable compose keys when I'm forced to use Windows. Charmap and alt-sequences are not an adequate substitute.
- kps 8y ago<Compose> <minus> <comma> is the shipped sequence for ‘¬’.
- kps 8y ago… which is the reason ‘\’ was invented.
- apenwarr 8y ago> Escape is though - and has proven to be quite > an important control character too Making the ASCII escape character the same as the keyboard escape key is one of the most annoying things in the history of terminals. It means terminal apps can't just react to your escape key directly; in theory they have to wait for the next character, to see if it's part of an escape sequence (because eg. arrow keys are escape sequences). This is why so many curses-based terminal apps don't use escape to go back a level or close a window, even though GUI apps do it all the time. Too hard to make it work predictably.