Message from JavaScript discussions

December 2018


process.stdin.on("data", code => {
const hzModule = new Function(
"return " + hzCompile("(function (){" + code.toString() + "})", false, false, true) + ";"

Message permanent page


hzCompile is a magical compiler pipeline that makes the code interruptible, and hzDisp is the runtime... called with runAsync(30) it schedules a chunk of the code in the regular JS event loop every 30ms, meaning other things which are scheduled in the loop (like the REPL input) can work every 30ms or so

β€” You mean, you can control execution pressing buttons in the console?🀀

β€” You could if I added the buttons

β€” I mean keyboard buttons🀀

β€” Ahh no

β€” There is no code stepping yet

β€” I need to do source mapping first

β€” The compiled code is quite hard to read

β€” Compiled:

β€” Original:

β€” Also, the stepping is between yields in the code