10 ms·
I've done this. Everybody hated it. Most text editors don't display anything useful with these characters (either hiding them altogether or showing a useless
by Pxtl 13y ago
I've done this.
Everybody hated it. Most text editors don't display anything useful with these characters (either hiding them altogether or showing a useless "uknown" placeholder), and spreadhseet tools don't support the record separator (although they all let you provide a custom entry separator so the "unit" separator can work). Besides the obvious problem that there's no easy way to type the darned things when somebody hand-edits the file.
- 3JPLW 13y agoIt's a shame. The solution is in the charset, but tools never developed to use it so we don't use it. But I'd wager that if tools had historically supported them, then the situation would be no different than it is with tab. There are representational glyphs for tab, return, and others (⇥, ↵), and editors can show them in 'show whitespace' modes. There could be representational glyphs for these control characters, too. I'm not sure about the history of these symbols, but I imagine they were initially on keyboards. But if these control characters were on keyboards and had a representation in text then they'd be just as useless as the tab character is today. Precisely what makes them valuable is their difficulty to type or display.
- Pxtl 13y ago> Precisely what makes them valuable is their difficulty to type. Again, if they'd caught on you'd imagine there would be some eventual convention in text-editors for what keybind would be used to enter them. Too bad the AltGr key (intended for entering rarely-used glyphs) doesn't appear on pure-English keyboards.
- deleted 13y ago[deleted]
- wiredfool 13y agoI'd bet that they were on the eleventyzillion key IBM terminal keyboards.
- markeganfuller 13y agoI'm looking at my English keyboard and it has Alt Gr...
- Crito 13y agoQwerty keyboards intended specifically for the US market (opposed to the UK for instance) frequently do not have AltGr keys. The thinkpad I'm using right now doesn't have one, and the Das Professional I have next to me doesn't have it either. Come to think of it, I'm not sure if I've ever owned a keyboard with an AltGr key.. To get around this, I have taken to using xmodmap to turn my right alt key into altgr.
- markeganfuller 13y agoI'm surprised to learn that the Das doesn't have it.
- bruceboughton 13y agoHow would you tell…?
- Crito 13y agoHa. Only the Das Ultimate doesn't have printed keys. I got the Professional which has printed keys (http://www.daskeyboard.com/model-s-professional/ http://www.daskeyboard.com/model-s-professional/). I'm not that show-offy about touch-typing. ;)
- StavrosK 13y agoTip: I've got both, the blank one isn't worth the hassle. I can type fine on it, except when I need to find & or something. Then I have to press all the numeric keys to figure it out.
- hnal943 13y agoLiving in the US, I've never heard of an AltGr key until this discussion.
- jarrett 13y ago> Precisely what makes them valuable is their difficulty to type or display. Exactly. A naive[1] character-delimited format is only robust when its delimiter isn't on the keyboard. Which means it's practical to read and write only in specialized applications, not in a text editor. Which sort of defeats the point of a character-delimited format anyway. If your use cases are constrained to specialized applications, you may as well just use JSON or something similar, instead of a character-delimited format. (I'm imagining a world where we get to pick our ideal formats, not one where Excel happens to have an almost-working CSV implementation.) [1] By "naive" I mean one where the format specification describes record and line characters only. Thus the format has no escaping system.
- stingraycharles 13y agoIs this a problem that's solved with a "movement" ? I'm willing to contribute parsers and perhaps a text editor plugin if other people are willing to chip in. But indeed, this is a problem that's solvable by making the tools support it. Since most of the tools are OSS, this is mostly solvable.
- 3JPLW 13y agoYou're missing my point. If this were a "solved problem," then it would be no better than the status quo with TSV. Tabs are a similar kind of control character, except they can be typed and displayed easily. And TSV files are a mess because tabs end up in the fields themselves. It's a catch-22. (I'm exaggerating; this would still be somewhat better since there will never be a big key on your keyboard dedicated to these ASCII values.)
- jrochkind1 13y ago> but I imagine they were initially on keyboards I wouldn't be surprised if the last time they were on a keyboard, it was a teletype keyboard or a keyboard that punched cards! Although, actually, were they just typed using the control key from the start?
- Sami_Lehtinen 13y agoIf there isn't a glyph, you can always use text representation for control codes. Here's an example using Notepad++. http://i60.tinypic.com/nps3d1.png http://i60.tinypic.com/nps3d1.png
- leoc 13y agoYes, but nowadays this is just another bootstrap problem: editors don't support them because no documents use them, no documents use them because editors don't support them, and users scream and bawl because their cheese has moved. Using an editor with some good support for control-character-separated data would be pleasant, more pleasant than the usual experience of fiddling with CSV in a text editor. That said, another nasty aspect of the bootstrap process would be running control-character-separated documents through standard text-processing tools and pipelines and finding out how many of them strip non-tab control characters, turn them to spaces or mangle them pseudo-randomly. I think the more fundamental problem with using the ASCII control characters is that there's no way (or rather, no obvious and standard way AFAICS) to use them to define (most) recursive data structures. That's not a problem when you stick to simple CSV-like arrays-of-arrays, but it's enough of a restriction to make one wonder if bringing ASCII back is worth the battles.
- Pxtl 13y agoAbsolutely. Too bad they went for a flat format instead of a sexpr-like format. You wouldn't even need 4 characters - just start,end, and separator.
- deleted 13y ago[deleted]
- jimmaswell 13y agoif the object is given a UUID, the recursive data structure can just point to the UUID when it's serialized to this? what's the problem?
- stcredzero 13y agoThen you'd have 2 problems.
- jimmaswell 13y agoIf I'm serializing nodes to ascii, and the rows are objects of type Node, and their contents were their UUID then VAL then NEXT, NEXT being a UUID, I don't see how you have 2 problems now.
- scelerat 13y agoASCII 0-31 are called "control" characters so it should come as no surprise that you could type them using the Control key. Unit Separator is Control-_ (underscore) and Record Separator is Control-^ (caret), for instance. Most modern text editors won't pass through every control character. Vim lets me type the unit separator, but not the record separator, for instance. Control-C and Control-D, End of Text and End of Transmission, still have utility in most shells, and it goes back directly to these ASCII control characters. https://www.cs.tut.fi/~jkorpela/chars/c0.html https://www.cs.tut.fi/~jkorpela/chars/c0.html
- Pxtl 13y agoHuh. I wonder how many of those are completely disused, or would be meaningless in a file?
- npongratz 13y agoVim will let you type the record separator, but you may have to precede it with Ctrl-V. In other words, type the Ctrl-V Ctrl-^ key sequence. At least, that worked for me. Interesting that the unit separator does not have the same requirement to precede it with Ctrl-V. More info in the vim docs: http://vimdoc.sourceforge.net/htmldoc/insert.html#ins-special-keys http://vimdoc.sourceforge.net/htmldoc/insert.html#ins-specia...
- groovy2shoes 13y agoYes, Ctrl-V in {insert,command} mode lets you input literal control characters, as well as numeric codes (31 for unit separator, 30 for record separator). If you're using vim on Windows, however, note that the default vimrc loads mswin.vim which changes Ctrl-V to paste. In that case, you can simply remove mswin.vim from your vimrc or use Ctrl-Q instead. (See :h i_Ctrl-V). You can also use Ctrl-K to enter RFC1345 digraphs, in which case unit separator is 'Ctrl-K US' and record separator is 'Ctrl-K RS'. (See :h Ctrl-K). Emacs has similar features, as well as a nifty TeX input mode: http://stackoverflow.com/q/6269618 http://stackoverflow.com/q/6269618
- thwarted 13y agoUnit Separator is Control-_ (underscore) and Record Separator is Control-^ (caret), for instance. Most modern text editors won't pass through every control character. Vim lets me type the unit separator, but not the record separator, for instance. Vim has bindings for some control key combos, which is why you can't type them directly. I can type control-_ without issue, but to get an ASCII 30 (RS) to show up, I have to type control-v first (just like when at the shell prompt). Useful hint: if you look at the output of man ascii (at least on linux with man-pages-3.22) find the control character you want to type in the left column and look in the same row on in the right column to find the letter/key to use with the control key. For example, to type NAK, it's <control-u>. Vertical tab is <control-k>: $ echo <control-v><control-k> | od -c 0000000 \v \n This is useful for control characters that don't have backslash escape expansions.
- userbinator 13y agoIn the standard CP437 PC charset, those characters are up/down triangular arrows. The standard MS-DOS editor also easily supports entering them with Alt+30/31, so maybe 20 years ago a proposal to do this might've been more accepted than it is today.
- andrelaszlo 13y agoIt's pretty easy using Emacs. Just type C-q C-_ or C-q C-^, alternatively C-x 8 RET [037|036] RET. Emacs makes it really easy to insert arbitrary unicode as well, even if you don't remember the code point. C-x 8 RET s n o w m a n RET will insert a ☃ (snowman).