6 ms·
> I think for this to be solved, the OS's primary communication system should be structured You mean the STDOUT format of all processes? I disagree. `npm list
by rootlocus 6y ago
> I think for this to be solved, the OS's primary communication system should be structured
You mean the STDOUT format of all processes? I disagree. `npm list --json` already does what you want. Your only argument is that ` | jq '<obscure commands>' | json:from | where {deduped==false}` is too obscure. The solution is (probably) a simplified `jq` that has the query format you want. Problem solved. Keep it simple.
- smitty1e 6y agoI kinda like the mystical feeling of jq. As with haskell, it'll feel as though I've arrived somehow, should I achieve real understanding.
- frou_dh 6y agoTo 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
- dkarl 6y agoThis is a very tempting feeling, but when I see someone else who feels this way about something that I do understand, I can see that it doesn't serve them. In a tool that you use every day, you should be able to quickly and confidently demystify anything, or you're not really in command of the tool. Your temporary uncertainty should "bottom out" on something you don't have to think about further. There are plenty of mysteries "out there" in the problem domain; you don't need them in your tools.