News for hackers. Stuff that matters.
Re:By example: Continuation-passing style in JavaScript by viraptor on Tuesday November 09, 2010 @03:58PM (#1887877)
> python you can trick generators into turning synchronous-looking code into asynchronous

Example: http://dieselweb.org/lib/ or https://github.com/saucelabs/monocle

Although Diesel2 is much more interesting, with greenlets support. No more messing about with `yield`, since the blocking functions themselves force a context switch. https://github.com/jamwt/diesel

Re:By example: Continuation-passing style in JavaScript by tomn on Tuesday November 09, 2010 @04:55PM (#1888095)
That looks really interesting, though it seems a bit dangerous -- greenlet feels like a bit of a hack.

I wish I'd found diesel before twisted; it seems a lot more elegant if you don't need any of the built-in protocols. The twisted model is good, there's just too much of it.