News for hackers. Stuff that matters.
Re:A love letter to the CSV format by criddell on Wednesday March 26, 2025 @03:05PM (#43485702)
Do you ever have CSV data that has newlines within a string?
Re:A love letter to the CSV format by thesuitonym on Wednesday March 26, 2025 @03:12PM (#43485800)
I don't. If I ever have a dataset that requires newlines in a string, I use another method to store it.

I don't know why so many people think every solution needs to to be a perfect fit for every problem in order to be viable. CSV is good at certain things, so use it for those things! And for anything it's not good at, use something else!

Re:A love letter to the CSV format by kittoes on Wednesday March 26, 2025 @03:31PM (#43486092)
I don't think we do? It's more that a bunch of companies already have their data in CSV format and aren't willing to invest any effort in moving to a new format. Doesn't matter how much one extolls all the benefits, they know right? They're paying someone else to deal with it.
Re:A love letter to the CSV format by criddell on Wednesday March 26, 2025 @03:21PM (#43485954)
> use something else

You don't always get to pick the format in which data is provided to you.

Re:A love letter to the CSV format by thesuitonym on Wednesday March 26, 2025 @03:38PM (#43486194)
True, but in that case I'm not the one choosing how to store it, until I ingest the data, and then I will store it in whatever format makes sense to me.
Re:A love letter to the CSV format by LPisGood on Wednesday March 26, 2025 @03:17PM (#43485876)
No - that’s what I’m trying to say. If I have newlines I use something else.
Re:A love letter to the CSV format by 0x073 on Wednesday March 26, 2025 @03:23PM (#43485976)
Wouldn't work if csv is used as a exchange format with external companies.
Re:A love letter to the CSV format by LPisGood on Wednesday March 26, 2025 @04:03PM (#43486559)
Of course. I’m not saying I roll my own parser for every project that uses a CSV file, I’m just describing my criteria for using CSV vs some other format when I have the option.