Live data from Hacker News

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

github.com

31–40 of 254 posts

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

#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://..."?

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

#33
post #14

Earlier quoted context omitted.

Have you tried `gron`? It converts your nested json into a line by line format which plays better with tools like `grep` From the project's README: ▶ gron " https://api.github.com/repos/tomnomnom/gron/commits?per_page... " | fgrep "commit.author" json[0].commit.author = {}; json[0].commit.author.date = "2016-07-02T10:51:21Z"; json[0].commit.author.email = "mail@tomnomnom.com"; json[0].commit.author.name = "Tom Hudson…

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

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

#36

Earlier quoted context omitted.

[flagged]

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

I think it's more the hand-in-handedness that seems to exist between "rewrite an existing, mature tool" and doing it in Rust. Half the time it's hard for me to know which caused which — the need for the tool, or the desire to rewrite something in Rust.

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

#37

Earlier quoted context omitted.

[flagged]

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.

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

#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 errors, for whatever it's worth, is that `jaq` lacks `strftime`.

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

#39
post #22

[flagged]

How would you pronounce `jaq` other than `Jaques`[1]? It seems to be the default pronunciation. [1] https://www.bing.com/videos/riverview/relatedvideo?q=Jacques...

My first instinct was to pronounce jaq as "jack".

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

#40

Earlier quoted context omitted.

How would you pronounce `jaq` other than `Jaques`[1]? It seems to be the default pronunciation. [1] https://www.bing.com/videos/riverview/relatedvideo?q=Jacques...

My first instinct was to pronounce jaq as "jack".

Did you watch the video? That's exactly how "Jaques" is pronounced. It's French: you ignore everything but the non-s-consonants and the first vowel.
Post reply on HN