{"action":"created","issue":{"url":"https://api.github.com/repos/brownplt/pyret-lang/issues/508","labels_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/508/labels{/name}","comments_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/508/comments","events_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/508/events","html_url":"https://github.com/brownplt/pyret-lang/issues/508","id":82865294,"number":508,"title":"An infinite loop hangs big-bang","user":{"login":"blerner","id":918464,"avatar_url":"https://avatars.githubusercontent.com/u/918464?v=3","gravatar_id":"","url":"https://api.github.com/users/blerner","html_url":"https://github.com/blerner","followers_url":"https://api.github.com/users/blerner/followers","following_url":"https://api.github.com/users/blerner/following{/other_user}","gists_url":"https://api.github.com/users/blerner/gists{/gist_id}","starred_url":"https://api.github.com/users/blerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blerner/subscriptions","organizations_url":"https://api.github.com/users/blerner/orgs","repos_url":"https://api.github.com/users/blerner/repos","events_url":"https://api.github.com/users/blerner/events{/privacy}","received_events_url":"https://api.github.com/users/blerner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-30T17:19:36Z","updated_at":"2015-05-30T18:09:20Z","closed_at":null,"body":"The following program hangs big-bang:\r\n```\r\nimport image as I\r\nimport world as W\r\n\r\nfun omega():\r\n  omega()\r\nend\r\n\r\nfun world-scene(w):\r\n  I.empty-scene(50, 50)\r\nend\r\n\r\nfun next-world(w):\r\n  omega()\r\nend\r\n  \r\n# Starts the game\r\nfun main():\r\n  W.big-bang(0,\r\n    [list: W.to-draw(world-scene), \r\n      W.on-tick(next-world)])\r\nend\r\n```\r\nIf you run it, and then run `main()`, an empty window appears, as it should.  If you close the window, it closes... but the browser starts getting laggy.  Surely the program should have been stopped by now!  But if you go to the console, and put a breakpoint inside `iter()` at `val = next.fun(next)`...`omega` is still running.  Something seems to have broken the communications that cause the stack to be stopped and aborted permanently."},"comment":{"url":"https://api.github.com/repos/brownplt/pyret-lang/issues/comments/107072921","html_url":"https://github.com/brownplt/pyret-lang/issues/508#issuecomment-107072921","issue_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/508","id":107072921,"user":{"login":"jpolitz","id":119891,"avatar_url":"https://avatars.githubusercontent.com/u/119891?v=3","gravatar_id":"","url":"https://api.github.com/users/jpolitz","html_url":"https://github.com/jpolitz","followers_url":"https://api.github.com/users/jpolitz/followers","following_url":"https://api.github.com/users/jpolitz/following{/other_user}","gists_url":"https://api.github.com/users/jpolitz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpolitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpolitz/subscriptions","organizations_url":"https://api.github.com/users/jpolitz/orgs","repos_url":"https://api.github.com/users/jpolitz/repos","events_url":"https://api.github.com/users/jpolitz/events{/privacy}","received_events_url":"https://api.github.com/users/jpolitz/received_events","type":"User","site_admin":false},"created_at":"2015-05-30T18:09:20Z","updated_at":"2015-05-30T18:09:20Z","body":"Oh.  I see what's happening, interesting case.  I believe the runtime needs a new handler on restarter objects that does \"stop-all-with-value\", because neither \"break\" nor \"return\" handles this correctly."}}