

Diving into C++ internals of Node - anandsuresh
https://blog.indutny.com/c.cpp-in-node

======
msvan
Thanks for writing it up! Diving into a large production-level C++ library is
always going to be intimidating. I suppose projects like Node/io.js need as
many contributors as they can get, so anything that lowers the barriers to
entry for new contributors is a good thing.

With regards to the language mentioned below: the English is very good, albeit
a bit terse. I think the main issue is that the article tries to cover a lot
of ground in such a short time. My advice for @indutny is to narrow the focus
a bit and pick a clear structure for the article, with an introduction and a
conclusion.

~~~
indutny
Thank you for the kind words.

It is quite terse indeed, mostly because it was written as a basis for my 30
minutes talk on JSConf Budapest. I guess, I'm going to eventually cover this
topic in a greater detail.

Thank you for advice!

------
niix
I emailed Fedor awhile back about some tips on diving into C++ and he was
nothing but an amazing help on resources and places to start looking. This
article is great and written buy an awesome person. Thanks Fedor!

------
guiomie
I've been looking for something like this for a while. I find it extremely
hard to understand an open source project just by looking in the code. Where
to start? what are the flows? ...etc.

Nice post, as an ESL, your English didn't bother me at all, it seemed normal
to me. Maybe push a bit deeper on the technicalities.

------
martindale
I'm perpetually amazed by the breadth of your knowledge, Fedor. It's unique
that your attention spans traditional compiled code all the way to Node, and
even includes Bitcoin. What is it that drew you to the latter two?

~~~
indutny
Curiosity? :)

------
softinio
Can you use just C for writing node.js addons?

~~~
angersock
Unfortunately not. Node is bound tightly to V8, which is _very_ C++.

You can, though, use things like node-ffi.

~~~
anon4
Doesn't that make the answer "mostly yes, but you need to write the binding in
C++"? I.e. write all your code in C, then just call the C methods from the one
C++ class you must write.

~~~
nawitus
You can write the library/addon in C and then define the bindings with
JavaScript using various npm libraries. There's no need for C++.

Here's an example of such a wrapper over a C library:
[https://github.com/panuhorsmalahti/mtp](https://github.com/panuhorsmalahti/mtp)

------
kyberias
I tried to read the article from the beginning. Had to stop since the language
was incomprehensible.

~~~
indutny
I'm terribly sorry for this. English is not my native language.

If you have any particular suggestions - would you mind posting them as a
comment to this commit:
[https://github.com/indutny/blog/commit/8409a9d98c44a24359b53...](https://github.com/indutny/blog/commit/8409a9d98c44a24359b537065f63151c95c2f1e8)
?

Thanks for giving a try ;)

~~~
netvarun
Nothing to be sorry. I learned a lot! Thanks a lot for the article. And also,
we are production users of Bud - thanks for that too :)

~~~
indutny
Oh, this is super cool! Thank you.

