Stackless Python and PyPy Stackless.py

Hi Folks: Again as a part of my Stackless Python talk, I wanted to include a section on the "Future." I assume a part of Stackless Python's future is PyPy? Or am I being presumptuous? Regardless I would like to end the talk with a brief section on PyPy. I noticed the Stackless.py module in lib that contains the Stackless implementation in Python. What I plan to do in my talk is show how a rough approximation of Limbo's alt (selecting the first ready channel from a list) could be implemented. I am a newbie in regards to PyPy. However I have been reading the Stackless documentation. I thought it would be neat if I ended the talk with redoing this, but in PyPy as a part of how one could quickly prototype new Stackless Python features. Any thoughts? Is there anything gotchas? Cheers, Andrew

Hi Andrew, On Fri, Sep 25, 2009 at 03:25:23PM -0700, Andrew Francis wrote:
The future is not completely clear. PyPy does contain what is, as far as I know, a full stackless implementation. However it is incompatible with some of the most modern extensions of PyPy (notably the JIT), at least for now; it could be fixed in the future if there is interest.
Yes, this is an implementation of Stackless Python on top of some lower-level mechanism provided natively in PyPy. It might give good opportunities for changes and experimentation, definitely. However, if you end up needing new features from the lower-level mechanism, you might have to look into 'pypy/module/_stackless' or 'pypy/rlib/coroutine.py'. (Changes in these parts require re-translating the pypy-c you are using, whereas changes in 'pypy/lib/*' do not.) A bientot, Armin.

Hello Andrew, I'm currently experimenting with PyPy's implementation of Stackless to add new features for a university master degree project. I chose PyPy's implementation because it's easier to play with Python code than with C code. Also, since PyPy is "still experimental", it was the best implementation to choose to hack with and I don't regret my choice. What I'm trying to achieve is to add distributed features to Stackless: - Local and networked channels with automatic switch between both - Easy tasklet migration to a remote host, keeping the channel connections between tasklets. - Transparent/automatic dependencies migration when a tasklet is sent to a remote host. Most of the features are done and I'm currently working on the dependencies migration. The only bad part is that I'm doing this project part time since I have a full time job but I have to complete the programming part in the next two months (I've been working for too long on this). If you're interested to see what I've done, just ask! :) See ya, Gabriel 2009/9/25 Andrew Francis <andrewfr_ice@yahoo.com>:
-- Gabriel Lavoie glavoie@gmail.com

Hi Gabriel: I believe you are in Montreal? And yes I would be interested in knowing about your work! A quick note - I will be giving a talk on Stackless on Wednesday. The talk may be too elementary for you. http://montrealpython.org/ And yes I am very interested in using PyPy for experimenting with new Stackless features. In my case, I am chiefly interested in workflow constructs. So stuff like the Limbo alt statement, join/wait, event handlers. What particularly interests me is prototyping the features in PyPy to get the behaviour and interface correct. Then moving the features to Stackless. Of course, this would require me to improve my knowledge of Stackless internals. In terms of pickling (I am assuming you are delving into this for process migration), I have done some work with swapping. My experience so far has been to do swapping, one needs to introduce some notion of 'process.' Cheers, Andrew --- On Mon, 9/28/09, Gabriel Lavoie <glavoie@gmail.com> wrote:

Hi Andrew, On Fri, Sep 25, 2009 at 03:25:23PM -0700, Andrew Francis wrote:
The future is not completely clear. PyPy does contain what is, as far as I know, a full stackless implementation. However it is incompatible with some of the most modern extensions of PyPy (notably the JIT), at least for now; it could be fixed in the future if there is interest.
Yes, this is an implementation of Stackless Python on top of some lower-level mechanism provided natively in PyPy. It might give good opportunities for changes and experimentation, definitely. However, if you end up needing new features from the lower-level mechanism, you might have to look into 'pypy/module/_stackless' or 'pypy/rlib/coroutine.py'. (Changes in these parts require re-translating the pypy-c you are using, whereas changes in 'pypy/lib/*' do not.) A bientot, Armin.

Hello Andrew, I'm currently experimenting with PyPy's implementation of Stackless to add new features for a university master degree project. I chose PyPy's implementation because it's easier to play with Python code than with C code. Also, since PyPy is "still experimental", it was the best implementation to choose to hack with and I don't regret my choice. What I'm trying to achieve is to add distributed features to Stackless: - Local and networked channels with automatic switch between both - Easy tasklet migration to a remote host, keeping the channel connections between tasklets. - Transparent/automatic dependencies migration when a tasklet is sent to a remote host. Most of the features are done and I'm currently working on the dependencies migration. The only bad part is that I'm doing this project part time since I have a full time job but I have to complete the programming part in the next two months (I've been working for too long on this). If you're interested to see what I've done, just ask! :) See ya, Gabriel 2009/9/25 Andrew Francis <andrewfr_ice@yahoo.com>:
-- Gabriel Lavoie glavoie@gmail.com

Hi Gabriel: I believe you are in Montreal? And yes I would be interested in knowing about your work! A quick note - I will be giving a talk on Stackless on Wednesday. The talk may be too elementary for you. http://montrealpython.org/ And yes I am very interested in using PyPy for experimenting with new Stackless features. In my case, I am chiefly interested in workflow constructs. So stuff like the Limbo alt statement, join/wait, event handlers. What particularly interests me is prototyping the features in PyPy to get the behaviour and interface correct. Then moving the features to Stackless. Of course, this would require me to improve my knowledge of Stackless internals. In terms of pickling (I am assuming you are delving into this for process migration), I have done some work with swapping. My experience so far has been to do swapping, one needs to introduce some notion of 'process.' Cheers, Andrew --- On Mon, 9/28/09, Gabriel Lavoie <glavoie@gmail.com> wrote:
participants (3)
-
Andrew Francis
-
Armin Rigo
-
Gabriel Lavoie