EuroPython Talk on Stackless.py and Questions

Hi Folks: I understand that stackless is not high on the pypy team priority list but here goes.... My talk "Prototyping Go's Select for Stackles Python in Stackless.py" was accepted. I have never been to Europe. To date, I have been able to implement the Go Select like capability in a number of ways. Most recently I emulated the Plan9 approach which is pretty straight forward. I need to add the code for channel preferences and the channel callback so it is on par with the old stackless.py Questions: Where should I put the new code? Are there regression tests for stackless.py Right now, I am taking Stephan Diehl and Carl Bolz's good advice and using stackless.py with greenlets. However for completeness, I would like to run through the exercise of using the translate tool chain. Right now, select is a function. I figure implementing Select as a language feature would be a good way to familarise myself better with the PyPy framework at a deeper level. However I am not sure where to start. Where is the parser? Do I create new opt codes? Is this doable for a newbie in a month? Cheers, Andrew

On Tue, Jun 1, 2010 at 11:57 AM, Andrew Francis <andrewfr_ice@yahoo.com> wrote:
Hi Folks:
I understand that stackless is not high on the pypy team priority list but here goes....
Completely not answering your question (I don't know), but clarifying. PyPy has no active developer working on stackless features. However, that does not mean that pypy's priority for stackless features is low. We're definitely going to support developments in that direction (at least those that make sense in our opinion of course :) Cheers, fijal

Hi Maciej: --- On Tue, 6/1/10, Maciej Fijalkowski <fijall@gmail.com> wrote:
Completely not answering your question (I don't know), but clarifying.PyPy has no active developer working on stackless features. However, that does not mean that pypy's priority for stackless features is low. We're definitely going to support developments in that direction (at least those that make sense in our opinion of course :)
I don't know if this clarifies things but my changes have been to stackless.py, the API. I added the ability to monitor many channels at once, a la Newsqueak/Limbo/Go. This should not break existing code (so far it doesn't but I need to write more tests). I also want to starting to play with join conditions (http://en.wikipedia.org/wiki/Join-calculus) and pattern matching. However I want to get deeper into PyPy. I would like to implement Select as a language feature as an exercise rather than an actual change to the language. I am looking the Javascript and Smalltalk VMs but I don't know where to start for Python itself. Also I wouldn't mind learning more about the stackless transform. Cheers, Andrew

On 06/02/2010 03:49 PM, Andrew Francis wrote:
Hi Maciej:
--- On Tue, 6/1/10, Maciej Fijalkowski<fijall@gmail.com> wrote:
Completely not answering your question (I don't know), but clarifying.PyPy has no active developer working on stackless features. However, that does not mean that pypy's priority for stackless features is low. We're definitely going to support developments in that direction (at least those that make sense in our opinion of course :)
I don't know if this clarifies things but my changes have been to stackless.py, the API. I added the ability to monitor many channels at once, a la Newsqueak/Limbo/Go. This should not break existing code (so far it doesn't but I need to write more tests). I also want to starting to play with join conditions (http://en.wikipedia.org/wiki/Join-calculus) and pattern matching.
However I want to get deeper into PyPy. I would like to implement Select as a language feature as an exercise rather than an actual change to the language.
What exactly do you mean by "language feature"? I assume that select is so far simply a function that lives in stackless.py, right? I don't really see what other form select could take, so I also don't see in what way you want to change the language.
I am looking the Javascript and Smalltalk VMs but I don't know where to start for Python itself.
The bytecode interpreter and the parser live in interpreter/, the object implementations in objspace/std/ and the modules in modules/.
Also I wouldn't mind learning more about the stackless transform.
Again, the stackless transformation doesn't really need to be touched to implement select. Cheers, Carl Friedrich

Hi Andrew, On Wed, Jun 02, 2010 at 03:59:21PM +0200, Carl Friedrich Bolz wrote:
However I want to get deeper into PyPy. I would like to implement Select as a language feature as an exercise rather than an actual change to the language.
What exactly do you mean by "language feature"?
More precisely, I should say that this kind of changes to the syntax and bytecode compiler are *really* uninteresting from our point of view. PyPy is indeed about language implementations, but not about the syntactic level. There are nice existing tools about generating parsers in various languages; and as each of them has some issues with the Python language, we just wrote the parser and compiler by hand and happily forgot about it. Instead, PyPy is about implementation features. Moreover, it focuses more on features that can be meta-programmed, like the stackless transformation (which works fine so far, and which does not need any change to support e.g. various kinds of Select). A bientot, Armin.
participants (4)
-
Andrew Francis
-
Armin Rigo
-
Carl Friedrich Bolz
-
Maciej Fijalkowski