These data-structure implementations make me feel that, even though it is crazy, it might just work. This seems to have come out very clean and easy to implement.
[0] - http://duktape.org/
These data-structure implementations make me feel that, even though it is crazy, it might just work. This seems to have come out very clean and easy to implement.
[0] - http://duktape.org/
[1] https://github.com/runtimejs/runtime [2] https://www.destroyallsoftware.com/talks/the-birth-and-death...
- Memory management can be simulated by have a fixed length array, representing your total RAM, and somehow marking index ranges as "reserved". - You can simulate some hardware devices by exposing browser capabilities. Each, you could print a character, by writing to a virtual port or register (actually implemented as an array), then later in your VM update loop, reading the values in the array, interpreting the instructions, and updating the DOM as approprite.
And all from the comfort of your browser!
You could check out some emulators that have been ported to JavaScript; these are simulating hardware like the NES, and have the capability to run operating systems.
JavaScript is great because you can learn it in the afternoon and master it in a few years and has a nice subset of lisp-like features.
It would be a toy to prototype in. Easy to use, and easy to modify. Nothing serious.
I looked around in there and have no idea how any of that works or how any of the modules relate.