Hacker News new | past | comments | ask | show | jobs | submit login

I thought the point is you don't need escapes?

If you still need to implement escape mechanism, might as well do CSV/TSV.




The point is ASCII DSV, which gives innately better hierarchy than CSV, but with visible tokens and stream accommodation. You should read the github readme. It's not that long.

https://github.com/SixArm/usv/tree/main/doc/faq#why-choose-u...

As for still needing escapes, using obscure symbols instead of ones that are extremely common in writing inherently means needing far far faaaaaaar fewer of them.


What's the point of visible tokens if it's all squished in one line? You are not going to be editing this in regular editor once you have non-trivial amount of data.

And yes, I read README and source code, so I know that newlines are optional, existing tools don't generate them, and multi-line examples are basically fake.


> What's the point of visible tokens if it's all squished in one line?

It doesn't have to be all squished in one line, it just doesn't hurt anything. Visually splitting squished lines for presentation or perusal is trivial because of the record separator.

> You are not going to be editing this in regular editor

I know (or at least I think) that you meant this in relation to squished lines getting very long, but maybe we can talk about it in a broader context, since record splitting is trivial...

One could easily say these same words about documents written in right-to-left languages. But people in Israel manage to create files too somehow, so that's clearly not an insurmountable barrier.


Editors generally support composing right-to-left languages that way? So I suppose the metaphor suggests that all editors should directly support the visible glyphs semantically?

And yet, that's explicitly not the semantic purpose of those glyphs. The actual delimiters already exist at a lower code point. If we're asking editors to semantically support delimiters we should be asking them to support the semantic delimiters.


Good point. I'm adding automatic record separator newlines to the crate now.


You shouldn't need escapes for separator characters precisely because they are not designed for data. Their entire purpose is to separate hierarchical data.

If it turns out that escaping is needed, it will still be far rarer than escaping commas and newlines.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: