Re:Programmer's critique of missing structure of operating s...
by ratboy666 on Wednesday February 19, 2020 @10:15AM
(#22366141)
Text is structured: character, word, line, possibly field.
Even "bytes" (octets) have some structure. On top of text,
I usually layer, these days, usually JSON. Bytes? usually
sqlite3
Yes, creating a parser with grep isn't usually desired. But, "plain text" is quite useful. And, with JSON and sqlite3 in easy reach, I don't see the massive issue.
Please -- I would like examples where you had issues with doing something even slightly complicated with "just text", and had difficulty. I really want to examine this. Either the text toolkits are not adequate, or I will be convinced that I am wrong, and will investigate structured CLI and OS interfaces.
FredW
Unix utilities sound like a great thing, because how universal they are. Want to find something in text? Just use grep, or maybe with regexp. But what this really say is "use a parser made from simple condition", or "create parser using single character pattern matching language". And ok, this would be fine, if it really worked, but it can't really handle the structure. It may be great for admin, who just wants to quickly find something, but it is horrible and broken by design for anyone who really want to make something more permanent. So you end up with writing better parser / using library. And you are not working with text anymore, but with typed graphs / trees. And this happens every single time you actually do something even slightly complicated with "just text".