<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>Hi Benoit:</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; "> <div style="font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr" style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Benoit Chesneau <benoitc@gunicorn.org><br> <b><span style="font-weight: bold;">To:</span></b> Andrew Francis <andrewfr_ice@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "python-ideas@python.org" <python-ideas@python.org> <br> <b><span
 style="font-weight: bold;">Sent:</span></b> Tuesday, October 23, 2012 5:48 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Python-ideas] yield from multiple iterables (was Re: The async API of the future: yield-from)<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1825362583"><br><div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">On Oct 23, 2012, at 6:51 PM, Andrew Francis <<a rel="nofollow" ymailto="mailto:andrewfr_ice@yahoo.com" target="_blank" href="mailto:andrewfr_ice@yahoo.com">andrewfr_ice@yahoo.com</a>> wrote:</div></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><blockquote type="cite"><div style="background-color: rgb(255, 255, 255); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="color: rgb(54, 99, 136); font-size: 12px; background-color: transparent; font-style: normal; font-family: Arial, Helvetica, sans-serif; ">AF>This may be tangential to the discussion but in the past, I have used the <a target="_blank" href="http://stackless.py/">stackless.py</a> module in conjunction with AF>CPython and
 greenlets to rapidly <span style="background-color:transparent;">prototype parts of Go's model that are not present in Stackless, i.e. the select (ALT) AF>language feature. </span><span>Rob Pike and Russ </span>Cox were really helpful in answering my questions. Newer stackless.py AF>implementations use continuelets so look for an older PyPy implementation. </div></div></blockquote><blockquote type="cite"><div><div style="background-color: rgb(255, 255, 255); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="color: rgb(54, 99, 136); font-size: 12px; background-color: transparent; font-style: normal; font-family: Arial, Helvetica, sans-serif; "><span style="background-color:transparent;">AF>I have also prototyped a subset of Polyphonic C# join patterns.  After I got the prototype running, I had an interesting AF>discussion with the authors of "Scalable Join
 Patterns."</span></div></div></div></blockquote><div><br></div>>Yes saw that. And actually some part of the Task code is based on stackless.py  but using greenlets, >Channels have been slightly modified to be thread-safe and support buffering. Did you release your code >somewhere ? It could be interesting to put the experience further.</div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; ">You may be mistaking my work with someone else.</div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica,
 sans-serif; background-color: transparent; font-style: normal; ">I didn't add buffering but that t is relatively easy to do without altering Stackless Python's internals. However I believe that synchronous channels with buffering is a simple and powerful concurrency model. Go's implementers got it right. John Reppy (currently a NSF director) talks about synchronous channel's power in a Concurrent ML book. </div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; ">If  you go to to the Stackless repository example page</div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; "><br></div><div
 style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; "><a href="http://code.google.com/p/stacklessexamples/wiki/StacklessExamples">http://code.google.com/p/stacklessexamples/wiki/StacklessExamples</a></div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; ">you will find the code for a modified stackless.py that implements Go's select statement. </div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(54, 99, 136); font-size: 12px; font-family: Arial, Helvetica, sans-serif;
 background-color: transparent; font-style: normal; ">Since I am giving a talk in Toronto soon, I will soon release a new version of the join pattern version with documentation and examples. The code is about a year old and I have learnt new things.  I can mail you an archive and you are free to play with it and ask questions. </div><div style="font-family: 'times new roman', 'new york', times, serif; "><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; ">Since this is somewhat off-topic, the reason I mention all this is that if you want to experiment with a Go style system, I think it easiest to work from something like stackless.py and greenlets than start from scratch. </div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent;
 font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; ">Cheers,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; ">Andrew</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><span style="font-size: 12pt; "><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><span style="font-size: 12pt; "><br></span></div><br></div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div>  </div></body></html>