News for hackers. Stuff that matters.
Re:Show HN: ZSV (Zip Separated Values) columnar data format by hafthor on Saturday April 13, 2024 @05:05PM (#40026121)
yeah, this is a limitation from the TSV format this is based on - there is an extension to the format that supports storing binary blobs - ref: https://github.com/Hafthor/zsvutil?tab=readme-ov-file#nested...
Re:Show HN: ZSV (Zip Separated Values) columnar data format by inimino on Saturday April 13, 2024 @05:15PM (#40026230)
(Offtopic, but just FYI) it's tenet (principle) not tenant (building resident).
Re:Show HN: ZSV (Zip Separated Values) columnar data format by hafthor on Saturday April 13, 2024 @05:19PM (#40026255)
doh. fixed. thanks!
Re:Show HN: ZSV (Zip Separated Values) columnar data format by alexandreyc on Saturday April 13, 2024 @05:15PM (#40026224)
Basically it's the same limitations as CSV.

At least you could use something less likely to appear in data as record sepator (like 0x1E)

Otherwise it's an interesting idea!

Re:Show HN: ZSV (Zip Separated Values) columnar data format by tboerstad on Saturday April 13, 2024 @05:28PM (#40026320)
0x1E is the record separator, in ASCII precisely for this purpose. Too bad it’s not popular, here we’re stuck with inferior TSV/CSV
Re:Show HN: ZSV (Zip Separated Values) columnar data format by mattnewton on Saturday April 13, 2024 @05:31PM (#40026340)
I can't easily type that out - and once the format can't be read / editing in a simple text editor, I'm starting to lean towards a nice binary format like protobuf.
Re:Show HN: ZSV (Zip Separated Values) columnar data format by orf on Saturday April 13, 2024 @05:30PM (#40026331)
Strings can contain 0x1E, so it has exactly the same issues as a tab character but with all the downsides of it not being an easy, “simple” character.
Re:Show HN: ZSV (Zip Separated Values) columnar data format by bobbylarrybobby on Saturday April 13, 2024 @05:50PM (#40026480)
As far as I know, thanks to quoting it is possible to put basically any data you want in a CSV.
Re:Show HN: ZSV (Zip Separated Values) columnar data format by layer8 on Saturday April 13, 2024 @08:08PM (#40027457)
The problem is there is no uniform standard for quoting and escaping in CSV, and different software uses different variants.
Re:Show HN: ZSV (Zip Separated Values) columnar data format by Dylan16807 on Saturday April 13, 2024 @08:21PM (#40027521)
There is a standard, and it is very simple and easy to use.

Different software uses different variants because we're not allowed to have nice things and devs are too lazy to use something slightly more complicated than .split(',')

Though if you're going to ban some common characters anyway like TSV, you might as well use CSV and ban commas, newlines, and quotation marks.

Re:Show HN: ZSV (Zip Separated Values) columnar data format by nextaccountic on Saturday April 13, 2024 @05:27PM (#40026315)
can't you just do quoting?
Re:Show HN: ZSV (Zip Separated Values) columnar data format by olejorgenb on Saturday April 13, 2024 @05:45PM (#40026443)
https://github.com/Hafthor/zsvutil?tab=readme-ov-file#what-a...

> Any escaping or encoding of these characters would make the format less human-readable, harder to parse and could introduce ambiguity and consistency problems.

Found the wording of "could introduce ambiguity and consistency problems" a bit odd, but guess they mean that even if things are specified precisely (so there's no ambiguity) not everyone would follow the rules or something? And they want to play nice with other tools following the TSV "standard"

Re:Show HN: ZSV (Zip Separated Values) columnar data format by 8n4vidtmkvmk on Saturday April 13, 2024 @06:17PM (#40026660)
Please. I wrote a csv parser a couple weeks ago in an hour or two. It's not that hard to handle the quoting and edge cases. Yes, maybe different parsers will handle them differently, but just document your choices and that's that. How is ambiguity better than completely disallowing certain chars? That's a non-starter