3 ms·
There cannot be a perfect solution; that much was proved by Turing back in the '30s, when he founded a branch of math we now call "Computer Science" - http://en
by beagle3 14y ago
There cannot be a perfect solution; that much was proved by Turing back in the '30s, when he founded a branch of math we now call "Computer Science" - http://en.wikipedia.org/wiki/Halting_problem http://en.wikipedia.org/wiki/Halting_problem (and http://simple.wikipedia.org/wiki/Halting_problem http://simple.wikipedia.org/wiki/Halting_problem) have the details.
The question is, what is a desirable solution?
It's easy enough to detect while(true){}, but it's impossible to detect longer equivalent pieces of code.
I'd be fine with a "pause/halt running js" button; unfortunately, it's up to the browser to provide. User-provided solutions are essentially guaranteed to cause horrible slowdown.
- yuchi 14y agoOh gosh. I just understood the problem. It's simply the fact that it runs the code. I thought it was somehow a problem of the editor. Shame on me.