4 ms·
To me it's a good example of Opportunity Cost. We could spend the time and effort memorising jq's special snowflake language, but that time and effort would alm
by frou_dh 6y ago
To me it's a good example of Opportunity Cost. We could spend the time and effort memorising jq's special snowflake language, but that time and effort would almost certainly be better spent on something else. I deleted it a while back. Can't be bothered with it.
- knome 6y ago>jq's special snowflake language If you'll bother condescending to such, you'll find one of the most interesting languages I've encountered in years. jq's syntax and execution model is beautiful. It has some rough edges, leave no doubt. Some function names, date handling, and the obtuseness of some of the errors it returns can be frustrating. But its data streaming layers of nested closures are an extremely terse, readable, and powerful way of expressing operations over structured data.
- gen220 6y agoI usually use jq just to format the blob, and then some unholy combination of grep -A/-B, tr, and sed to get the output I want. It’s usually faster (for me) than relearning jq’s query language.
- deleted 6y ago[deleted]
- klibertp 6y ago> would almost certainly be better spent on something else. I'd would suggest to spend that time on learning how to effectively learn new languages. There's more than one way, and I guarantee that afterwards you'll conquer any given "snowflake" in no time at all.
- frou_dh 6y agoI deliberately wrote "memorise" rather than learn in the usual sense, because there's a higher than normal degree of familiarity needed to get working code flowing from the fingers, when the venue is between a pair of single quotes in a shell.
- kbrazil 6y agoThere are other tools like jq that instead use more common syntax. For example, jello[0] is just like jq except it uses python list and dictionary syntax. (disclaimer: I am the author) [0] https://github.com/kellyjonbrazil/jello https://github.com/kellyjonbrazil/jello