-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why not wrap the C lib? #9
Comments
Hi @ptomasroos, Could you link me to the c lib that facebook provides? |
Hey @chris-ramon This is the library I meant. |
Thanks @ptomasroos ! Definitely we could had figure-out how and depend on the c parser lib and ofc gain all the advantages that brings it. I think having no dependencies it allow us to move faster, have light-weight lib, and do not have to deal with c-to-go, go-to-c trips. And we have already a working parser passing all the tests from |
I think the sad part is that you will loose all the benefits facebook will make to that c library which will receive updates from nodejs, ruby, python and all of the other languages who are doing wrappers around it, plus its a enormous waste of time for you. Not trying to bash on you, its more that: The moment you loose focus on this the entire community looses because now the entire community stands with a maintainability of something that might accelerate very fast on the source. I've seen this happen to a lot of projects when it comes to specially golang. Where ppl try to port wire formats and do it a "pure-way". CGO is seriously good and one of the biggest benefits i see with golang tbh. The ability to reuse. What kind of features would ever be needed thats not supported out of the spec? And why wouldnt that be possible to be added on higher level? There is nothing more reliable and lightweight than a c lib which does memory mgmt in the correct way. I can proove that the lib/pq is 4.000m after the wrapped c library which hasnt been updated for 6 years because there is no errors, no correct fault handling ect. Its def up to you. But rewriting something will almost never ever make something better if its constrained by the source project anyhow. Just my cents. Not trying to sound like a douche. CGO is no real problem to day. |
@ptomasroos you realize that lib is only a parser, right? Parsers don't change much. |
@ileitch Yes. "only" 6-8K ? lines of code covered with tests. I see that as a big value. |
@ptomasroos brought up some valid points on the benefits of wrapping the c-lib parser. Right now the implementation of the Give it a I helped @chris-ramon to quickly complete his work on the parser, but I was more interested in writing tests to ensure that it meets the spec, at least in comparison to I think right now this project has more parts to it than just the parser i.e, the validator, executor etc, (For me personally, to get a working Relay-compliant server in golang eventually.) I think if anyone could contribute a PR replacing the parser with a CGO version, that would be awesome. 👍🏻 The tests are already there, so it'll be relatively easy to verify the implementation. Cheers guys! |
I'm def looking forward to a good implementation in golang, no questions asked! I just hope that someone can get there in a reasonable amount of time before loosing its urge :) Good luck, guys. Will check back. |
A related update to keep this discussion productive: Someone just released a golang wrapper for Seems legit. Cheers! |
Merge latest changes from HEAD
Whats the purpose of not wrapping the c lib facebook provides?
The text was updated successfully, but these errors were encountered: