9 ms·
Diving into C++ internals of Node
- kyberias 11y agoI tried to read the article from the beginning. Had to stop since the language was incomprehensible.
- indutny 11y agoI'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/8409a9d98c44a24359b537065f63151c95c2f1e8 https://github.com/indutny/blog/commit/8409a9d98c44a24359b53... ? Thanks for giving a try ;)
- AlexeyBrin 11y agoI found your text quite comprehensible although I'm not a native English speaker.
- netvarun 11y agoNothing 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 11y agoOh, this is super cool! Thank you.
- apaprocki 11y agoI'm not the parent commenter, but I added some comments to the commit for you. Thanks for the article!
- indutny 11y agoWhoa, thank you! Fixed almost every of them. Hope it is better now.
- rwallace 11y agoTo be honest, your English looks absolutely fine to me, which is why I downvoted that comment for trolling. The content was also excellent; not often you get that sort of look at the internals of a project.
- proksoup 11y agoI find his accent heavy but tolerable --- but I wanted to clarify, could you (or someone) give an example of a place where it was incomprehensible? (perhaps the place where you had to stop). I'm not asking this in order to try to imply that it is perfect american english, but in order to better understand myself (maybe others perhaps) what could be improved. Thanks!
- AlexeyBrin 11y agoI find his accent heavy but tolerable Honest question, where did you found his accent in the text ?
- hammerandtongs 11y agoAccent is not just the actual tones and sound of actual speech but also the sentence construction, word selection and style that influence the voice heard in a reader's mind. As an example looking at your second sentence. "Honest question, where did you FIND his accent in the text". It might have been better phrased as "where did you hear/read/see/detect the accent in his text?" Find isn't quite the right choice to my eye. This was a minor error that could have been a simple typo but is also a typical error of a non-native english speaker. If you made mistakes like this repeatedly over a longer post it would influence the voice we heard as we read your post. This is not a huge issue or something you should worry about beyond just noticing and self improving over time. (I would not have particularly noticed or disapproved of your sentence if you hadn't asked.) The blog post was missing several words in the first few paragraphs and had some awkward constructions. It was largely ok reading for a technical post but there was definitely an "accent" that emerged from reading it.
- pcthrowaway 11y agoAlexeyBrin's 'second sentence' was really their first. The previous sentence was a quote from the person they were responding to. That person said "I find his accent heavy but tolerable" AlexeyBrin was specifically referring to the parent's choice of stating they found an accent in a text (which is why they italicized 'his accent', which you neglected to quote). AlexeyBrin was also using the root word 'find' (albeit in an improper conjugation) to parallel the same use of that word that they were responding to. I agree with your point about accent carrying over into text, but I think you misunderstood some of the intent of the person you were responding to.
- afandian 11y agoYou can use Google Translate to convert the page into your language.
- shocks 11y ago> Avoid gratuitous negativity. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- msvan 11y agoThanks 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 11y agoThank 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!
- softinio 11y agoCan you use just C for writing node.js addons?
- angersock 11y agoUnfortunately not. Node is bound tightly to V8, which is very C++. You can, though, use things like node-ffi.
- anon4 11y agoDoesn'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.
- angersock 11y agoEh, by that logic, we can write Node extensions in Fortran or Brainfuck.
- nawitus 11y agoYou 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
- indutny 11y agoI think it might be possible to do it with some sort of wrapping library written in C++ with C APIs. Technically, it will work this way for every kind of C++ library.
- SCHiM 11y agoIf you want to go a little overboard it's possible to use the C abi and write a thin wrapper in C++.
- martindale 11y agoI'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 11y agoCuriosity? :)
- guiomie 11y agoI'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.
- niix 11y agoI 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!