Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
davesnx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
davesnx
6y ago
Exactly I didn't claim to be faster in all the cases, since there's no feature parity and I won't make it that way. For the set of operations that I implement it it's faster, that's true.
32.
▲
by
davesnx
6y ago
Exactly! I wanted to contact him
33.
▲
by
davesnx
6y ago
I hope so!
34.
▲
by
davesnx
6y ago
There are a few good asumtions about why is faster, there are just speculations since I didn't profile jq or query-json. The feature that I think penalizes a lot jq is "def functions", the capacity of define any function that
35.
▲
by
davesnx
6y ago
but indeed, it's a nice workaround!
36.
▲
by
davesnx
6y ago
query-json --kind=inline would support reading from stdin, I didn't spend time on the Cmdliner enough!
37.
▲
by
davesnx
6y ago
I'm happy with the critics. Judging is free and I didn't consider stdin as something to spend time on yet. Will do, now that some people raise it. Thanks :D
38.
▲
by
davesnx
6y ago
Renamed :P
39.
▲
by
davesnx
6y ago
Sure, it's a missing feature "," creates 2 spins of the filter. I certantly didn't use it, but I see where it's useful, will implement it soon.
40.
▲
by
davesnx
6y ago
Renamed already :D
41.
▲
by
davesnx
6y ago
Nothing that can be fixed later?
42.
▲
by
davesnx
6y ago
Adding most of the jq operations shoudn't affect performance at all, in fact If I endup implementing streaming could be even faster. I have a issue to improve performance where I can push this forward: https://github.com
43.
▲
by
davesnx
6y ago
There's 4 alternatives to install query-json. Before doing any curl | bash, check what's on the install command, that's the entire point of it.
44.
▲
by
davesnx
6y ago
The documentation is a problem in the OCaml world and a problem with Reason Native as well. I found myself pretty lost some times, esy.sh should be a initial point in contact for most of Reason related stuff. Menhir/sedlex and others a
45.
▲
by
davesnx
6y ago
Will rename it to query-json. Thaaanks!
46.
▲
by
davesnx
6y ago
Just because jq is very well stablished doesn't mean their APIs are well designed and we shoudn't improved because will break existing scripts. There're a lot of quirks from the usage of it and people struggling with learning
47.
▲
by
davesnx
6y ago
Right, the explanation of Reason - BuckleScript - OCaml is always nebulous. I used Reason to compile to Native, so using OCaml's stdlib and OCaml's dependencies and compiling it with OCaml, but my source code is written in Reason
48.
▲
by
davesnx
6y ago
I'm not sure at which "we" do you refer. Reimplementing a piece of software that is 12 years old which mimics their UX and improves performance and error messages it's more than welcome in my opinion. My purpose was to l
49.
▲
by
davesnx
6y ago
Right, I found q cute... but I'm thinking to release new version with the name query-json or just change the name all-together. Any suggestion? ^^
50.
▲
by
davesnx
6y ago
One of the main ideas of query-json is to provide excelent errors. So, it would teach you by using the tool. and there are a few techniques to "discover" the schema of the json file, I trend to read with '.' or 'key
51.
▲
by
davesnx
6y ago
Nice! I will try to bring it to the brenchmark, thanks for sharing
52.
▲
by
davesnx
6y ago
Nobody said that jq is slow.
53.
▲
by
davesnx
6y ago
Right, q doesn't support streaming so it will manage a 90GB JSON. I should specify that on the performance section, Thanks!
54.
▲
by
davesnx
6y ago
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.
55.
▲
Q: A faster re-implementaiton of jq written in Reason Native/OCaml
(github.com)
250 points
by
davesnx
6y ago
|
192 comments
56.
▲
by
davesnx
6y ago
Sure, I worked with Elm before and I feel like they share the basics like immutability and types. Which makes a lot of sense, since Elm got very inspired by Haskell and Reason it's a syntax and a few beauties of OCaml. A good intro (at
57.
▲
by
davesnx
6y ago
There are a few differences between both, a lot of people mention the fast compilation and the type inference. I would add that the types from Reason are much "smaller" and concise, Option type or Result type and the immutability
58.
▲
by
davesnx
6y ago
That's not even true. It's still very early days for Reason VSCode tooling, since you might find a few extensions that support most of the cases but lacks a few key features that you might be used to while writing JS/TS.
59.
▲
by
davesnx
6y ago
Thanks, let me know if you are using it!
60.
▲
by
davesnx
6y ago
SC and the styled API from emotion are identical syntactic-wise and performance-wise. SC used to suffer from performance and big bundle size but these last 2 versions are very balanced. The same way as the sx prop from Emotion it's the
More ›