I like this. I have worked on a couple of things in a similar area.<p>This too suffers from the problem that has plagued me.<p>I tried to add this code to the program<p><pre><code> var x=2;
var y=1;
while (x>y) {
x+=2;
y+=1;
}
</code></pre>
Which is my usual check for what happens when you encounter an endless loop.
Of course, I didn't get the entire thing typed in because the user interface froze when I typed the close bracket of (x>y).<p>Javascript can't pre-empt. An endless loop is a killer. I'm going to write something long and detailed about this one day. It'll be a big rant.<p>I made a MediaWiki plugin for my approach. It uses a worker, which lets you do something about busy loops (you can kill it, not much else). The down side is that all of the drawing operations have to be passed through to the host as messages.<p>The other part of what I have been working on is a extremely simple API to use environments like this for novice programmers.<p>I made whio. <a href="https://github.com/Lerc/whio" rel="nofollow">https://github.com/Lerc/whio</a> and I'm slowly building up a wiki as a intro to programming. <a href="http://fingswotidun.com/code/index.php/Main_Page" rel="nofollow">http://fingswotidun.com/code/index.php/Main_Page</a><p>I teach some programming in a class of 10 year olds. I start off with
<a href="http://jsbin.com/tinydraw/1/edit" rel="nofollow">http://jsbin.com/tinydraw/1/edit</a>
Which is a program they can focus on in one view and lets them draw pictures.
Then I make suggestions and point them to the wiki. Where they go from there is amazing to see.<p>Just changing the number on the jsbin url shows where some of the kids have taken this.
<a href="http://jsbin.com/tinydraw/45/edit" rel="nofollow">http://jsbin.com/tinydraw/45/edit</a>
<a href="http://jsbin.com/tinydraw/130/edit" rel="nofollow">http://jsbin.com/tinydraw/130/edit</a>
<a href="http://jsbin.com/tinydraw/148/edit" rel="nofollow">http://jsbin.com/tinydraw/148/edit</a><p>This one appears to be by a someone who copied an example from the wiki then modified it
<a href="http://jsbin.com/tinydraw/48/edit" rel="nofollow">http://jsbin.com/tinydraw/48/edit</a><p>I like this one. Here a kid figured out from the wiki how to read the mouse.
<a href="http://jsbin.com/tinydraw/50/edit" rel="nofollow">http://jsbin.com/tinydraw/50/edit</a> Scattered through the versions are evolutions of this program until it ends up here, as a simple, but fairly complete game. <a href="http://jsbin.com/tinydraw/141/edit" rel="nofollow">http://jsbin.com/tinydraw/141/edit</a>