Closed rrose1 closed 9 years ago
We should make use of HTML5's web workers to enable interruptible evaluation without "setInterval". This would require maintaining the registers as a data structure separate from the DOM, unfortunately, during evaluation. But perhaps some intermittent message passing will allow the DOM still to be animated during evaluation.
I don't know what any of that stuff is about, sorry to say.
Larry
On Fri, Jan 30, 2015 at 5:21 PM, Robert Rose notifications@github.com wrote:
We should make use of HTML5's web workers to enable interruptible evaluation without "setInterval". This would require maintaining the registers as a data structure separate from the DOM, unfortunately, during evaluation. But perhaps some intermittent message passing will allow the DOM still to be animated during evaluation.
— Reply to this email directly or view it on GitHub https://github.com/rrose1/jsonesharp/issues/1#issuecomment-72280587.
v0.2 has a parser, uses an array as a registers object (instead of a branch of the DOM) and most importantly is multithreaded.
We can experiment with adding an option to slow down the computation and animate the registers in the DOM for pedagogical purposes in the future.
The interpreter is implemented along the same lines as the universal program itself that we have to write in 1#. This makes it much slower than it might be. For example, the program is not even parsed before execution.
So looking for various (easy) ways to optimize the interpreter's performance.