A scrachpad to try out DM Script online.
First, host a webserver
$ python -m SimpleHttpServer # for Python 2
$ python -m http.server # for Python 3
Then, open http://localhost:8000 in a browser
The index.html
page contains a div with the id editor
, which is the input area where users may write code (using the handy ace library).
The js/main.js
script used by the index page connects the dependencies together to drive the webapp.
The js/dms-compiler.js
script is used by main.js
to compile code written in DM Script into DMPL-compliant JSON.
You can find more development information about the compiler in the dms-compiler repo.
The js/dm.js
script is the DMPL runtime. Some properties include:
- runs in the background, using a web worker
js/worker.js
. - compiled from C++ using Emscripten, currently to asm.js (but, will transition to WebAssembly).
- outputs messages to be received by the user.