tag:blogger.com,1999:blog-8825992.post292539567855777331..comments2019-02-13T20:54:50.768-08:00Comments on Electric Duncan: Generators and CoroutinesUnknownnoreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8825992.post-72643177315412296282009-04-26T22:17:00.000-07:002009-04-26T22:17:00.000-07:00Very cool, Kirby :-) Thanks for sharing the links!...Very cool, Kirby :-) Thanks for sharing the links!Duncan McGreggorhttps://www.blogger.com/profile/17155270977759488515noreply@blogger.comtag:blogger.com,1999:blog-8825992.post-43201739208186269322009-04-26T19:28:00.000-07:002009-04-26T19:28:00.000-07:00So in reference to foolish Fibonacci numbers Sir D...So in reference to foolish Fibonacci numbers Sir David (= knight in <A HREF="http://mail.python.org/pipermail/edu-sig/2007-December/008377.html" REL="nofollow">Python Nation</A>) complains about, I've published a more <br /><A HREF="http://mail.python.org/pipermail/edu-sig/2009-April/009325.html" REL="nofollow">useful</A> intro to coroutines, based on his excellent slides.Kirby Urnerhttps://www.blogger.com/profile/12114860457655013242noreply@blogger.comtag:blogger.com,1999:blog-8825992.post-68964343436462344792009-04-26T18:26:00.000-07:002009-04-26T18:26:00.000-07:00Thanks for hyping David Beazley as a miracle man, ...Thanks for hyping David Beazley as a miracle man, I feel suitably awed having studied those slides. I also noticed his 'death to Fibonacci' refrain, shorthand for dumbing 'em down (generators) with trivial not-useful examples (in contrast to his sysadmin piping stuff, with yield generators a "pull train" and send coroutines a push train -- helpful to a noob like me (in this area, I admit my beginnger status)).Kirby Urnerhttps://www.blogger.com/profile/12114860457655013242noreply@blogger.comtag:blogger.com,1999:blog-8825992.post-15637134784705303272009-04-24T08:03:00.000-07:002009-04-24T08:03:00.000-07:00Hey JP!
I've always wondered about that, though. ...Hey JP!<br /><br />I've always wondered about that, though. Isn't a coroutine just something that allows for suspending and resuming execution in a function/method? Coroutines built with Python 2.5 generators seem to fit the bill, if that's the case.<br /><br />It seems like the distinction you're making is between two different types of coroutine.<br /><br />Regardless, I've always wanted to pin down the objections that people have had about using the term "coroutine" calling generator-based Python 2.5 coroutines. Maybe we could do another interview ;-)Duncan McGreggorhttps://www.blogger.com/profile/17155270977759488515noreply@blogger.comtag:blogger.com,1999:blog-8825992.post-81139723203528187302009-04-24T05:39:00.000-07:002009-04-24T05:39:00.000-07:00Hi Duncan!
As you know, the widely used definitio...Hi Duncan!<br /><br />As you know, the widely used definition of "coroutine" involves a construct which is capable of switching through multiple levels of call stack frames. As generators in Python are limited to switched through only a single level, they are not really coroutines. Enough people already make this mistake. Please don't encourage them. :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8825992.post-56687861214132469362009-04-23T19:48:00.000-07:002009-04-23T19:48:00.000-07:00Hi Duncan,
You may want to take a look at the Fib...Hi Duncan,<br /><br />You may want to take a look at the Fibra package, which I maintain.<br /><br />http://code.google.com/p/fibra/<br /><br />Fibra does most of the things David B. wrote about, and has been in production use for a few years now.Simon Wittberhttps://www.blogger.com/profile/02730025645144151014noreply@blogger.com