7 ms·
I mostly just thought it was fun to write. Put my pain down on a page, get a little bit of catharsis. I actually had written out some "counterexamples or sugges
by donatj 10y ago
I mostly just thought it was fun to write. Put my pain down on a page, get a little bit of catharsis. I actually had written out some "counterexamples or suggestions" but decided to keep it terse and with the general style of the other similar posts.
I was not aware of the scorn for the style, I just knew I enjoy reading them.
As opposed to your μTSV may I suggest DSV. The Art of Unix Programming makes a strong case for how it's superior to CSV [1]
1. http://www.catb.org/esr/writings/taoup/html/ch05s02.html#id2901882 http://www.catb.org/esr/writings/taoup/html/ch05s02.html#id2...
- vram22 10y agoHeh, by coincidence, I had recently written two posts about DSV, and had mentioned the same TAOUP DSV link you gave above: Processing DSV data (Delimiter-Separated Values) with Python: https://jugad2.blogspot.in/2016/11/processing-dsv-data-delimiter-separated.html https://jugad2.blogspot.in/2016/11/processing-dsv-data-delim... The example program in the post lets you use either a "-c delimiter_char" or a "-n delimiter_ASCII_code" to specify the delimiter for your DSV data being processed by it. and [xtopdf] Publish DSV data (Delimiter-Separated Values) to PDF: https://jugad2.blogspot.in/2016/12/xtopdf-publish-dsv-data-delimiter.html https://jugad2.blogspot.in/2016/12/xtopdf-publish-dsv-data-d...
- groovy2shoes 10y agoYou're both wrong. EDN is the best. https://github.com/edn-format/edn https://github.com/edn-format/edn
- vram22 10y ago>You're both wrong. Bah. How am I wrong when I haven't even claimed DSV to be the best? Just quoting that section in ESR's book does not imply I endorse or agree with it. Logic ...
- vram22 10y agoPlus, just providing that EDN link is hardly proof that it is the best ... And further, "best" in many cases is subjective. You want to claim EDN is the best, you lay out an objective proof.
- zdkl 10y agoI get that the parent response about EDN isn't particularily enticing but you really shoild give it a look.
- vram22 10y agoI do intend to. Thank you for the comment though. I had starred EDN on github just now before replying to groovy2shoes, i.e., I took an initial brief look at it. Saw a commit by richhickey (Clojure creator). Since I'm into data / file formats, I will definitely check out EDN.
- groovy2shoes 10y agoSorry, my intent (beside bringing up EDN) was to be playful. Tone is often difficult to communicate in writing. I would have stuck in a `:p` if I hadn't been on mobile, but it slipped my mind. My apologies; I did not mean to insult or to otherwise be combative or critical. I don't have objective proof that it's the best. It's a mix of personal preference and empirical "evidence" based on past success with both EDN and its granddaddy s-expressions for data exchange and serialization. As for why I personally like EDN so much: 1. It offers the malleability, flexibility, and extensibility of XML, while being 2. even more concise than JSON, 3. straightforward to parse, and 4. precisely defined in a rigorous and language-independent specification. Traits 1-3 it shares with the traditional s-expressions of the Lisp family, but in contrast to s-expressions it's specifically designed as a data exchange format rather than as a lexical/syntactic format for programming languages. The reason this matters is because the traditional Lisp reader is itself extensible, and extensions can't be guaranteed to carry over from dialect to dialect or even from implementation to implementation. Many Lisp readers go so far as to even allow the execution of arbitrary code at read time, which is desirable for source code as it enables metaprogramming, but it's not so desirable when you're parsing data from an arbitrary source, due to security concerns. While EDN does have its roots in Clojure's reader, EDN is not exactly Clojure's external representation. Rather, it's a subset of Clojure's surface syntax in much the same way that JSON is a subset of JavaScript's. Like JSON, EDN works great outside of its "native language" (in fact, I've never used EDN from Clojure itself; I've only used it from Lua, Scheme, Python, C, C++, C#, Java, and JavaScript (not necessarily in that order)).