Live data from Hacker News

Jaq – A jq clone focused on correctness, speed, and simplicity

github.com

81–90 of 254 posts

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#81

Earlier quoted context omitted.

What would be your choice if you would need to write high performing CLI tool?

The other options are C, C++, Go, and maybe Ada or Zig, though I haven't seen many CLI tools written in those two in practice. In practice, it seems like Go, Rust, and C++ are the preferred languages for newer CLI tools, although I have no data; my conclusion is based on my general perception. Older ones, C and Perl.

I'm a lot happier with a fad for Rust-written CLI tools than the disappointment of reading install instructions for a simple CLI tool that starts with "First... npm... bower..."

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#82
post #6

I applaud this project's focus on correctness and efficiency, but I'd also really like a version of `jq` that's easy to understand without having to learn a whole new syntax. `jq` is a really powerful tool and `jaq` promises to be even more powerful. But, as a system administrator, most lot of the time that I'm dealing with json files, something that behaved more like grep would be sufficient.

[deleted]

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#87
post #38

I guess it's cute that there's some terminal line art library in Rust somewhere, but when I tried to invoke jaq it just pooped megabytes of escape codes into my iTerm and eventually iTerm tried to print to the printer. Too clever. I tried to do `echo *json | rush -- jaq -rf ./this-program.jq {} | datamash ...` and in that context I don't think it's appropriate to try to get artistic with the tty. The cause of the err…

[deleted]

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#88
post #14

Earlier quoted context omitted.

Thank you so much. This seems like a saner approach for some simpler use cases. It flattens the structure. And makes for easy diffing.

There's also this awesome tool to make JSON interactively navigable in the terminal: https://fx.wtf

https://jless.io/ is similar, and will give you jq selectors so the two combine very well. (fx might have that feature too, I dunno)

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#89
post #32

Somewhat off-topic, but is there a tool which integrates something like this/jq/fx and API requests? I’d like to be able to do some ETL-like operations and join JSON responses declaratively, without having to write a script.

Is there anything out there like "SELECT * FROM " http:// ..."?

I'm working on a project I call babeldb. It allows "select * from query_rest('https://api1.binance.com/api/v3/exchangeInfo#.symbols')" The #.symbols at the end is actually jq path expression, it's sometimes needed when the default json to table is suboptimal. You can see it in action by selecting babeldb in the dropdown, then clicking "Run All" here: https://pulseui.net/sqleditor?qry=select%20*%20from%20query_...
Post reply on HN