Live data from Hacker News

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

github.com

11–20 of 196 posts

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

#11
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.

It's very slow. It was immediately standing out in our automated tests when we've added a json protocol to our system and used jq to test some assertions.

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

#12
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.

I made the same argument to him on reddit. q even exists already.

He replied and thought about qj

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

#14
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.

Out of interest, what created a 90GB JSON file?

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

#16
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

I don't want to fight for name, q was a shortener.

Happy to rename it to qj instead, but the option of renaming the binary it's a good workaround.

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

#17
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.

Right, q doesn't support streaming so it will manage a 90GB JSON.

I should specify that on the performance section, Thanks!

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

#20
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".

I remember one of the first times I tried installing Linux software in the wild. The bash script asked for your password, sent it to their server using curl then returned you the script with the password hard coded into it, run itself with sudo, all over unencrypted http. I was 17 but even then I stopped to think if this was a good idea.

It wasn't.

Post reply on HN