|
I was going to say something deep about deep learning but then I realized I am just have a shallow knowledge about deep learning.
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
So I have been out of the field for some time, and i don't do bizdev stuff mostly anyway.
But I've been building parser generators, and particularly with things like LALR it requires the construction of loads of intermediary tables and state machines.
Trying to track down bugs in these means printing them out. And I needed to figure out why my tables were off sometimes.
Trying to format these tables is non-trivial. CSV makes this so much easier.
So finally, after coding since 1986, i find a ready, real-world, non-business related programming need for CSV format
For some reason that made me really happy.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
CSV for the win!
|
|
|
|
|
|
The CSV is a lie?
|
|
|
|
|
No it's Concealed Stealthy Vessel
|
|
|
|
|
Your remark about a "non-business related" need for CSV format caught my attention, because I use CSV strings almost daily for many things that amount to internal storage. They are such a significant part of what I do that I eventually created a C# class library that is dedicated to parsing them in an incredibly robust manner. I first wrote about it in , with source code published on GitHub, and a NuGet package.
BTW, thanks for inspiring me to have a look at that article, which is nearly 4 years old, and discovering that it was missing links to the source and documentation repositories and the NuGet package.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
i use an extended json format for doing similar.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I'll stick with CSV; it's so much more compact than anything else. With a header row, it conveys everything that a JSON would.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
until you have to nest data. I've done that with CSV and SQL tables though, it's just not pretty.
Also with CSV you need a way to handle commas, and there's nothing standard, AFAIK - really that's the biggest sticking point for me because that makes the grammar ambiguous
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Quote: until you have to nest data. I've done that with CSV and SQL tables though, it's just not pretty.
I agree with that, so I save JSON for when I really need it. In that case, it beats the pants off its predecessor, XML.
Quote: Also with CSV you need a way to handle commas, and there's nothing standard, AFAIK - really that's the biggest sticking point for me because that makes the grammar ambiguous
That's easy: guard characters, which are a well-established industry practice, which is fully implemented by my AnyCSV library.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
but they aren't always the same, no?
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Quote: but they aren't always the same, no?
What aren't always the same? If you mean the label row and the data, they must match, of course.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
oh yeah. now i know what you mean by guard chars
sorry, it's been ages since i've seen that.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Quote: oh yeah. now i know what you mean by guard chars
That is fair enough since I coined the term.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
i don't do enough CSV apparently, because i forgot about that technique tho
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I use them regularly; I've even embedded them into .NET assemblies as resources that I read into memory streams and use WizardWrx.AnyCSV.dll to parse.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
CSV doesn't make me happy.
As I'm living an the much larger part of the world where the standard decimal separator happen to be a comma, CSV tends to create a displeasure in previously mentioned posterior.
|
|
|
|
|
|
I'm happily ignorant as to what that is.
|
|
|
|
|
and better to continue so
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
If it makes you feel better, I never trusted them in the business end of things precisely because of the comma.
but for debugging state tables it works like a charm - no globalization/localization required. no funny currency markers munging up the input.
i hear you though.
I tend to JSON usually. Historically I've only provided export/import to/from CSV if a client requests it explicitly. It's a godawful format.
The thing is, i just like finding a use for it that isn't evil.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
JSON, XML or TDV (Tab Delimited Values) usually works equally fine for me. But I try to make it a habit to avoid formats that might create bugs in the future.
|
|
|
|
|
When I think of CSV, I am usually referring to any character-delimited text, of which the comma ranks well down on the list of preferred delimiter characters. I much prefer the vertical bar, "|" ASCII code 0x7c, or the TAB character, ASCII code 0x09.
1) The advantage of the vertical bar that it almost never occurs in normal text.
2) The advantage of the tab is that it is trivially easy to export well-formed rows (lines) of tab-separated values from many databases and accounting applications, and they are the default import delimiter in Microsoft Excel.
I emphasized the import delimiter in connection with Excel to differentiate it from opening CSV files into Excel, since opening a CSV bypasses the import wizard, with frequently unwanted, if not outright distastrous, results.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
your point is taken, though for my needs this solution worked fine - with the caveat that it's only used in a very narrow context, and as a debug function at that. It's not needed to interoperate except to be able to be pasted into something and viewed. CSV works fine since I already know all of the data going into each cell and none of it will have commas. It can't.
So yeah, if i was doing a more general CSV export I'd definitely take your points. I've typically avoided CSV in favor of formats that allow for robust escaping/data delimiting, but sometimes we're stuck with what we have, rather than what we want =)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|