logoalt Hacker News

adiabatichottub • yesterday at 9:18 PM • 2 replies • view on HN

Text is wonderful, but note that the one keyword not found in this text is 'parse'. How much extra work is generated writing parers for text that would have been so much easier to deal with if it had just been generated in a structured binary format? You still get the pleasure of designing a new wheel with every format.


Replies

cranky908canuck • today at 12:06 AM

It's not about writing a parser, it's about figuring out what the content is supposed to be in the first place. With plain text you can see what's a number, what's a string, what's an expression, etc... I'd rather try to figure out how to parse "2 7 + 3 -" than see a file with

0x0 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x7 0x1 0x1 0x0 0x0 0x0 0x0 0x3 0x1 0x2

and try to figure out what that is all about.

zelphirkalt • yesterday at 10:44 PM

It does not have to be a binary format. Just a structured format, for which we can reuse an existing parser.