You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.
If the user keeps entering the wrong password, this program does not reliably display "wrong password" on each iteration. The problem is that console.log involves DOM updates that only display when the turn ends. Neither console.log nor prompt end the turn, so the turn only ends when Stopify suspends the loop, which is nondeterministic.
So, we need either console.log or prompt to suspend and immediately resume execution. I propose we modify console.log, so that it always prints immediately. This will significantly slow down programs that display in a loop, but it will make them more responsive.
The text was updated successfully, but these errors were encountered:
Today I tried to run effectively this program:
If the user keeps entering the wrong password, this program does not reliably display "wrong password" on each iteration. The problem is that
console.log
involves DOM updates that only display when the turn ends. Neitherconsole.log
norprompt
end the turn, so the turn only ends when Stopify suspends the loop, which is nondeterministic.So, we need either
console.log
orprompt
to suspend and immediately resume execution. I propose we modifyconsole.log
, so that it always prints immediately. This will significantly slow down programs that display in a loop, but it will make them more responsive.The text was updated successfully, but these errors were encountered: