Remix.run Logo
jstanley 4 days ago

JSON has the major annoyance that grep doesn't work well on it. You need tooling to work with JSON.

re 4 days ago | parent | next [-]

As soon as you encounter any CSVs where field values may contain double quotes, commas, or newlines, you need tooling to work with CSV as well.

(TSV FTW)

IAmBroom 4 days ago | parent | next [-]

TSV is superior to CSVs, and it still angers me that Excel doesn't offer it as a standard input option, but your examples are fairly easily handled by eye in a text file.

Tools definitely make it faster and more reliable.

spicybbq 4 days ago | parent | prev | next [-]

One of my first tasks as a junior dev was replacing an incorrect/incomplete "roll your own" CSV parsing regex (which broke in production) with a library.

euroderf 3 days ago | parent | prev [-]

ASCII FS GS RS US ... just make decent font entries for them.

jstanley 3 days ago | parent [-]

And keys on the keyboard.

euroderf 3 days ago | parent [-]

Yes! But nobody ever came up with decent font entries that would look snappy on keys. Not even IBM (or Data General or Burroughs or whoever) I guess.

rogue7 3 days ago | parent | prev | next [-]

For this I use gron [0]. It's very convenient.

[0]: https://github.com/tomnomnom/gron

theknarf 4 days ago | parent | prev [-]

grep is a tool. jq is a good tool for json.

kergonath 4 days ago | parent [-]

grep is POSIX and you can count on it being installed pretty much anywhere. That’s not the case for jq.

whizzter 4 days ago | parent | next [-]

Do people contain themselvs to a POSIX conformant grep subset in practice, or do you mean GNU grep that probably doesn't behave according to spec unless POSIXLY_CORRECT is set?

IAmBroom 4 days ago | parent | prev [-]

"Anywhere" does not include Windows environments, which are over half the work computers out there.

krogenx 2 days ago | parent | next [-]

If a workstation has Git installed on it, which I’d think would be the case for substantial number of engineers out there (…not just software engineers), grep is there due to Git BASH.

3 days ago | parent | prev [-]
[deleted]