News for hackers. Stuff that matters.
Re:Coroutine Event Loops in Javascript by handler on Wednesday December 12, 2012 @03:59PM (#4912424)
so comprehensive!

i wouldn't mind a tl;dr ;?j

Re:Coroutine Event Loops in Javascript by politician on Wednesday December 12, 2012 @04:46PM (#4912648)
Coroutines are functions with bookmarks to remind them where they last left off. A bookmarked infinite loop permits a concise implementation of things like event processing loops.
Re:Coroutine Event Loops in Javascript by kilovoltaire on Wednesday December 12, 2012 @04:08PM (#4912466)
perhaps the easiest tl;dr is to try: http://syzygy.st/javascript-coroutines/#demo

but as for an explanation: it turns out coroutines let you "invert" memory/variable state into control/flow state!

Re:Coroutine Event Loops in Javascript by bonobo on Wednesday December 12, 2012 @09:37PM (#4913857)
Nice explanation, thank you. I was indeed wondering if having something like a statefull procedure (if I can call it this way, this is a fairly new concept to me) wouldn't make the code more complex; I didn't actually notice that the state is already there, it was just moved to another place.