by cbd1984 · 11y ago · 0 comments
Therefore, even if you were an old hand at GHC and GHCi and so on, you'd still be unable to run the code it shows at the top of the page.
This is probably bad website design. Especially since the website still lets randoms burn themselves by entering non-terminating code that makes their browsers slow.
I thought it was running on the browser, based on what the OP said, so that would entail opcode-counting or, if you can use multiple threads, watchdog timers. That is, don't try to solve the halting problem, just enforce an arbitrary limit to how long code can run.
However, if the code is being run on the server, you could enforce CPU and RAM quotas to do the same thing with the OS's help.