Earlier quoted context omitted.
Waiting for someone to write a love letter to the infamous Windows INI file format I actually miss that. It was nice when settings were stored right alongside your software, instead of being left behind all over a bloated registry. And the format was elegant, if crude. I wrote my own library for encoding/writing/reading various datatypes and structure into ini's, in a couple different languages, and it served me well…
I feel like YAML is a spiritual successor to the .ini, since it shares a notable ideal of simple human readability/writability.
A love letter to the CSV format
431–440 of 711 posts
Re: A love letter to the CSV format
#432Earlier quoted context omitted.
Depends on what you mean by "better". I would rather software not handle a piece of data at all, than handle it erroneously and changing the data without me realising and thus causing all sorts of issues after.
In practice, web browsers accept the tag soup that is sometimes called html and strict xml-based formats failed.
Re: A love letter to the CSV format
#433The post should at least mention in passing the major problem with CSV: it is a "no spec" family of de-facto formats, not a single thing (it is an example of "historically grown"). And omission of that meams I'm going to have to call this our for its bias (but then it is a love letter, and love makes blind...). Unlike XML or JSON, there isn't a document defining the grammar of well-formed or valid CSV files, and ther…
While CSV isn't exactly grammared or standardised like XML I think if it as more schema:d than JSON. There might be data corruption or consistency issues, but there is implicitly a schema: every line is exactly n fields, and the first line might contain field names. When a JSON API turns out to have optional fields it usually shows through trial and error, and unlike CSV it's typically not considered a bug you can ex…
Re: A love letter to the CSV format
#434Earlier quoted context omitted.
They could have just ignored the locale altogether though. Put dots on the numbers when using csv, and assume it has dots when importing
This exactly. Numbers in XLS(X) are (hopefully) not locale-specific – why should they be in CSV?
Microsoft Excel -> application/vnd.ms-excel
CSV is a text format, xls[x], json, and (mostly) xml are not.
Re: A love letter to the CSV format
#435The post should at least mention in passing the major problem with CSV: it is a "no spec" family of de-facto formats, not a single thing (it is an example of "historically grown"). And omission of that meams I'm going to have to call this our for its bias (but then it is a love letter, and love makes blind...). Unlike XML or JSON, there isn't a document defining the grammar of well-formed or valid CSV files, and ther…
People who say that CSV is "simpler" are talking about whatever format Excel exports. Also these people have only ever had to deal with the American Excel localization. So yeah, with the caveat of "only ever use Excel and only ever the American edition" CSV is pretty nice.
Re: A love letter to the CSV format
#436Re: A love letter to the CSV format
#437Earlier quoted context omitted.
I feel like YAML is a spiritual successor to the .ini, since it shares a notable ideal of simple human readability/writability.
YAML is readable? No way as there are too many ways to do the same thing and nested structures are unclear to the non trained eye (what is a list? What is nested?), let alone indentation in large files is an issue especially with the default 2 space unreadable standard so many people adhere to. YAML simple? It's sepc is larger than XML... Parsing of numbers and strings is ambiguous, leading zeros are not strings but…
Re: A love letter to the CSV format
#438Earlier quoted context omitted.
On the off chance you're not being facetious, why not ASCII 0 as a delimiter? (This is a rhetorical question.)
ASCII has characters more or less designed for this 0x1C - File Separator 0x1D - Group Separator 0x1E - Record Separator 0x1F - Unit Separator So I guess 1F would be the "comma" and 1E would be the "newline."
I am pretty sure you shifted the meaning, the decimal separator is part of the atomic data it does not need a control character.
You would use 1F instead of the comma/semicolon/tab and 1E to split lines (record means line just like in SQL).
You could then use 1D to store multiple CSV tables in a single file.
Re: A love letter to the CSV format
#439Items #6 to #9 sound like genuine trolling to me; item #8, reversing bytes because of course no other text encodings than ASCII exist, is particularly horrible.
Re: A love letter to the CSV format
#440I'm not really sure why "Excel hates CSV". I import into Excel all the time. I'm sure the functionality could be expanded, but it seems to work fine. The bit of the process I would like improved is nothing to do with CSV - it's that the exporting programs sometimes rearrange the order of fields, and you have to accommodate that in Excel after the import. But since you can have named columns in Excel (make the data in…
Excel is halfway decent if you do the 'import' but not if you just doubleclick on them. It seems to have been programmed to intentionally do stupid stuff with them if you just doubleclick on them.