What does HackerNews think of js.js?
js.js: A JavaScript JavaScript interpreter
There are JS-in-JS interpreters out there. They're just not allowed. https://github.com/jterrace/js.js/ https://github.com/marten-de-vries/evaljs
https://github.com/jterrace/js.js/
This shouldn't be surprising - many VMs have been compiled to the Web, like Lua, Python (both CPython and PyPy!), etc., and JS is just another VM.
There are many JS engines which are extremely small compared to the big guys used in browsers. Most of them tend to grab a subset of the language and implement that.
For example, the creators of nginx created their own specialized engine called nginScript that runs JS for their stuff https://www.nginx.com/resources/wiki/nginScript/
There is even a javascript interpreter written in javascript which can be a good starting point to learn a bit how it works https://github.com/jterrace/js.js/
asm.js-compiled JavaScript engine has been done already: https://github.com/jterrace/js.js.
[0]: https://github.com/jterrace/js.js/
[1]: https://developers.google.com/closure/compiler/ / https://github.com/google/closure-compiler
It's hard to sandbox python or lua and block I/O and all system calls. 1 mistake and player computers are compromised.
Even with JS in browser you can't just eval(), you need sandboxing like https://code.google.com/p/google-caja/ or https://github.com/jterrace/js.js/ (200 times slower than js).
This one is Spidermonkey compiled with Emscripten: https://github.com/jterrace/js.js/
And this one is a test-bed for new JS language features (or at least meant to be - don't know how far along it is): https://github.com/mozilla/narcissus