Live data from Hacker News

ASCII Delimited Text – Not CSV or TAB delimited text

ronaldduncan.wordpress.com

171–180 of 286 posts

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#171

Earlier quoted context omitted.

I'm looking at my English keyboard and it has Alt Gr...

Here in Belgium we have to AltGr-the hell out of our keyboard during development. These characters can only be entered using the AltGr key on a Belgian Azerty keyboard (be-latin1): '|' '@' '#' '^' '{' '}' '[' ']' '\' and '~' Its not realy a problem, as long as you're used to it :-)

Of those, |, @, #, ^, {, } and ~ are all keys that you need shift for on US Qwerty keyboards, so I imagine that the typing experience for those is relatively comparable.

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#174
post #4

My guess is that TSV/CSV won out simply because anyone can easily type those characters from any standard keyboard on any platform.

TSV/CSV characters were also pretty much guaranteed to exist no matter what kind of terminal was used, and not cause any side-effects. No doubt some teletypes & dumb terminals used those FS, GS, RS etc. characters for special features since they weren't likely to appear in printed data. And I know those characters are used for other things in PETSCII and ASCII. 0x1C, the File Separator in ASCII, is used to turn text red in PETSCII.

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#175
post #157
post #152

Earlier quoted context omitted.

Living in the UK, I've always seen it and for some reason never questioned what the Gr meant!

so.. what does it mean?

According to wikipedia:

The meaning of the key's abbreviation is not explicitly given in many IBM PC compatible technical reference manuals. However, IBM states that AltGr is an abbreviation for alternate graphic, and Sun keyboards label the key as Alt Graph.

Apparently, AltGr was originally introduced as a means to produce box-drawing characters, also known as pseudographics, in text user interfaces. These characters are, however, much less useful in graphical user interfaces, and rather than alternate graphic the key is today used to produce alternate graphemes.

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#176

How about everyone just started following the CSV spec? https://tools.ietf.org/html/rfc4180 Doesn't allow for tab-delimited or any-character-delimited text and handles "Quotes, Commas, and Tab" characters in fields.

Nah. Two split() calls are much easier.

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#177

Earlier quoted context omitted.

For CSV forbidding commas in data is not practical. For ASCII delimiters, forbidding ASCII delimiters in data is practical. Sure - you can't, say, nest ASCII tables into one another due to this limitation. But for simple structure, it doesn't hurt to have ASCII separators in the toolbox. The only big problem I see is that they're rendered as invisible characters, which will make debugging harder. If we wouldn't have…

For ASCII delimiters, forbidding ASCII delimiters in data is practical. Data formats that can't handle recursion are never practical. They only work until they don't, at which point they're entrenched and impossible to replace.

You may have heard about spreadsheets or relational databases...

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#178

Earlier quoted context omitted.

what about Ctrl-C to break out of stuff? Does that correspond to an ascii control character?

I was disappointed that Ctrl-S and Ctrl-Q don't correspond (at least on the first ASCII chart I googled) to anything, because Ctrl-S stops text on my Unix terminals the exact same way it did on my brother's Apple ][e in 1984.

I think you mean your brother's Apple //e - they switched from the original ][ to // for later models. That's what I started programming on too - except in my case it was my Dad's.

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#179

Earlier quoted context omitted.

> I was disappointed that Ctrl-S and Ctrl-Q don't correspond (at least on the first ASCII chart I googled) to anything I'm pretty sure every possible combination of 7-bits is assigned SOME name in ascii, and Ctrl-any-case-insensitive-letter is a defined 7bit value. This chart says control-s is `DC3 (Device Control, X-OFF)` and control-q is `DC1 (Device Control, X-ON)`. Yup, that's what they do alright. http://www.uni…

For anyone wondering, X-ON and X-OFF are flow control characters. A device sends X-OFF to say "my buffer is full, stop sending data" and X-ON when it's ready to resume. On most Unix terminals, these have the effect of pausing and resuming the display when a bunch of data is scrolling by.

...and they're helpfully disabled with stty -ixon

Re: ASCII Delimited Text – Not CSV or TAB delimited text

#180
post #57

Don't do this. Tsv has won this race, closely followed by Csv. Anything else will cause untold grief for you and fellow data scientists and programmers. I say this as someone who routinely parses 20gb text files, mostly Tsv's and occasionally Csv's for a living. The solution you are proposing is definitely superior but isn't going to get adopted soon.

yeah, so many people use horses, don't make the horses angry
Post reply on HN