HNHacker News
TopNewBestAskShowJobs

svaarala

15 karma · joined December 5, 2014

submissionscomments
svaarala··on XS7 – A compact JavaScript engine for embedded applications
By default Duktape maintains the built-in objects purely in RAM, but for low footprint targets the built-in objects (and also custom user objects) can be made pure ROM objects which reduces memory usage quite a bit; the lowest startup RAM usage is around 1,5kB, see https://github.com/svaarala/duktape/blob/master/doc/low-memo....
svaarala··on Duktape: an embeddable JavaScript engine
Very little performance work has been done so far. Most of the effort has been in E5 compliance and more recently to support low memory environments (96-128 kB system RAM) better. But there's going to be performance work early next year.
svaarala··on Duktape: an embeddable JavaScript engine
These amount of flash/RAM are probably not realistic for a compliant engine. For instance, the Duktape regexp engine alone takes around 10kB flash compiled.

Luckily Javascript has a great ecosystem, so there are non-compliant subset engines targeting tiny devices. What other (higher level) language scales this way? :)

svaarala··on Duktape: an embeddable JavaScript engine
Thanks! At the moment no, but send me an e-mail if you use Duktape somewhere :)
svaarala··on Duktape: an embeddable JavaScript engine
Absolutely, the original motivation was to have a Lua-like implementation for Javascript.
svaarala··on Duktape: an embeddable JavaScript engine
Around 200kB of code (flash), and around 25kB of RAM after startup, with low memory optimizations in the master branch (for the upcoming Duktape 1.1 release). This doesn't include User Javascript, just what Duktape needs to start up.

You can run Duktape with 128kB RAM, and to some extent with 96kB, see e.g.: http://www.slideshare.net/seoyounghwang77/js-onmicrocontroll...