Live data from Hacker News

Q: A faster re-implementaiton of jq written in Reason Native/OCaml

github.com

1–10 of 196 posts

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#5
post #2

This looks nice, but I was a bit dismayed at "friends don't let friends curl | bash, to install this run curl | bash".

That is pretty amusing. I’ve seen some bootstrap scripts that pipe the curled output to the terminal for approval before executing it. That seems like an ergonomic alternative to curl | bash. It would be at least as useful as the terms of service warnings before you install something, anyway.

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#6
post #4

Is jq slow? I have only worked with datasets up to 1mb but I’ve never had a performance issue that wasn’t attributed to my error.

Yes

I often have to pluck out attributes from streams of json records (1 json object per line) - often millions/billions.

jq is almost always the bottleneck in the pipeline at 100% CPU - so much so that we often add an fgrep to the left side of the pipeline to minimize the input to jq as much as possible.

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#7
post #4

Is jq slow? I have only worked with datasets up to 1mb but I’ve never had a performance issue that wasn’t attributed to my error.

jq is pretty fast in my experience. But there have been cases where I've wanted it to be faster (dealing with a 90GB JSON file).

The main weakness seems to be streaming use cases (not having the whole file in memory at once). These are supported, but the syntax is quite awkward.

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#8
Are we sure it should get a single-letter 'q' binary name though? Docs seem to point that it's short for 'query-json'? Why not call it 'query-json' and let the user decide that as a shell alias or whatever. Even the ubiquitous 'ls' and 'cd' are two characters.

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#10
post #8

Are we sure it should get a single-letter 'q' binary name though? Docs seem to point that it's short for 'query-json'? Why not call it 'query-json' and let the user decide that as a shell alias or whatever. Even the ubiquitous 'ls' and 'cd' are two characters.

or at least qj
Post reply on HN