Q: A faster re-implementaiton of jq written in Reason Native/OCaml
61–70 of 196 posts
Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#62Earlier quoted context omitted.
Yes, I don't understand how people end up with assertions that the filename is a require argument. At least we've got /dev/stdin or /proc/self/fd/0 as workarounds.
files might be faster, because you can mmap them?
When using jq, I can do a lot of things:
aws s3 cp s3://bucket/file.json.gz - | zcat | head | jq .field | sortRe: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#63Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#64The speed is not concern for me. I am wondering if there something better than `jq` in terms of syntax. Whenever I want to get something more that just prettify json output in the console or simply get value by specific field name I have a problem, for me it is just difficult to remember jq syntax without looking into history. As well have in my notes links to examples like this one https://mosermichael.github.io/jq-…
Check out jql [ https://github.com/cube2222/jql ] and oj [ https://github.com/ohler55/ojg ]
Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#65I'd long for such a tool with a better comprehensible query language.
Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#66Earlier quoted context omitted.
files might be faster, because you can mmap them?
Most people work on compressed JSON lines files. Sometimes they are stored on s3. Files do not give flexibility. When using jq, I can do a lot of things: aws s3 cp s3://bucket/file.json.gz - | zcat | head | jq .field | sort
That's how Go's static file web server works. It serves streams, but if you happen to io.Copy to that stream with something that is also an ∗os.File on Linux, it can use the sendfile call in the kernel instead. (A downside of making it so transparent is that if you wrap that stream with something you may not realize that you've wrecked the optimization because it no longer unwraps to an ∗os.File but whatever your wrapper is, but, well, nothing's perfect.)
Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#67Earlier quoted context omitted.
files might be faster, because you can mmap them?
Most people work on compressed JSON lines files. Sometimes they are stored on s3. Files do not give flexibility. When using jq, I can do a lot of things: aws s3 cp s3://bucket/file.json.gz - | zcat | head | jq .field | sort
jq .field
which is more annoying to type but works.Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#68Slightly out of context here, I find the entire stack of bsb, bsb-native, ocaml and esy pretty cool. However, I just dont find enough resources, good tutorials etc on Google search. Is there a good set of beginner tutorials anyone can point to ? Thanks in advance.
Menhir/sedlex and others are pretty high accessibility barrier for new commers.
One of the nice things about all of it it's the discord, it's friendly and always helpful.
Hope it helps, just let me know if there's any specific!
Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#69This looks nice, but I was a bit dismayed at "friends don't let friends curl | bash, to install this run curl | bash".
Before doing any curl | bash, check what's on the install command, that's the entire point of it.
Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml
#70Great! Now improve the syntax!