4 ms·
Please stop spreading bs. It's not throwing away structure. Piping text doesn't even preclude sexps. It's just that they are seldom needed. Simpler encodings li
by jstimpfle 10y ago
Please stop spreading bs. It's not throwing away structure. Piping text doesn't even preclude sexps. It's just that they are seldom needed. Simpler encodings like space-separated are sufficient for many use cases, and better for interoperation.
It's misguided and inefficient to encode everything in the same way. Would you prefer to have your JPG or MP4 encoded in sexps?
And I say that as someone who is working on a serialization format for relational databases.
- TeMPOraL 10y agoPiping isn't the culprit. It's what you pipe that is, and Unix Philosophy says "pipe whatever the hell you want, and let the users upstream sort it out". It's not about encoding everything in exactly the same way. It's about providing the basic, shared protocol for representing structure. With typical Unix tools, you don't have "simpler encodings", you have no encoding at all. Each tool outputs whatever its particular author felt like (and this changes between Unix systems), each tool parses things in whatever way its author felt like, and as a user your job is to keep transforming unstructured blobs of text to glue them together.
- jstimpfle 10y agoThere exists a shared protocol. It's called "explain it". But that's typically not even needed, the user can just look at the data and figure it out. > With typical Unix tools, you don't have "simpler encodings", you have no encoding at all. You don't even believe this yourself, do you? That's so obviously wrong. Name a well-thought out text file format that can't correctly be parsed e.g. by a Python one-liner with basic string operations. And please don't include: JSON, XML, YAML, sexps, because it's not possible, at least not without a library. Not needing special infrastructure is why these formats (often) win. Very obvious practical reasons. If you have applications where you need one of the above - go ahead and do it. Instead of trolling with this abstract, vague nonsense, it is better to propose a concrete case where existing practice is bad. Show how it should be done better. (And prepare to get contradicted).
- JoeAltmaier 10y agoI call "No True Scotsman"
- jstimpfle 10y agoI don't understand (sorry). Could you explain?
- JoeAltmaier 10y ago"All things like A are in category X. Except this long list I wrote, but they aren't really A, because I need my syllogism to work."
- jstimpfle 10y agoYou missed my cynism. I was opposed to these formats in the first place.
- JoeAltmaier 10y agoWhich seems at odds with the thesis, at least as far as I can figure it out.
- jstimpfle 10y agoLook again. For example I wrote "space-separated" in multiple places.
- TeMPOraL 10y ago> Name a well-thought out text file format that can't correctly be parsed e.g. by a Python one-liner with basic string operations. And please don't include: JSON, XML, YAML, sexps, because it's not possible, at least not without a library. Well, because this library should be a part of the OS API. A set of conrete cases where existing practice is bad is Unix itself (and its descendants). Think of every time a script breaks, does something unexpected, or introduces a security vulnerability, because every program has to contain its own, half-assed parser for textual data.
- dang 10y ago> Please stop spreading bs. This breaks the HN guidelines: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html. Please edit out such bits. This would be a fine comment without it.