Hacker News new | ask | show | jobs
by jnbiche 3928 days ago
I wonder why they didn't use Duktape[1]. It seems like the obvious choice for this kind of effort (e.g., if the 2 main Lua implementations have any counterpart in JS, it's probably Duktape).

It's possible that Duktape was still too early in its development to use when Nginx started this project, but even then it seems like they could have collaborated and saved a lot of man hours.

I wonder if there a good reason why Nginx didn't use Duktape, or could this be a case of NiH where some Nginx dev got excited about the opportunity to build a new superfast JavaScript implementation just for Nginx? Surely it would have been less work to integrate the two event loops and use Duktape's (well-documented) API to build whatever features they wanted?

That said, although I've built significant async programs in other languages, I've never done anything in C on this scale, so take my words with a grain of salt.

1. http://duktape.org/

1 comments

I've used duktape as an extension language and wholeheartedly recommend it. It does the job and caused me zero problems. I can't ask for more than that in software.