Stackless python + official python ?

Christian Tismer tismer at tismer.com
Thu May 9 12:52:36 EDT 2002


Michael Chermside wrote:
>  [discussion of Stackless being accepted into the main Python distrib]

Cameron Laird wrote:
>> Maybe Guido'll decide Stackless belongs in.  Maybe
>> Christian will decide he wants to do whatever is
>> necessary to get Stackless in.  More likely, I
>> think, is that Christian continues to maintain
>> Stackless as an alternate implementation.

Exactly. Neither the old "sorcery" solution, nor the
new "assembly" solutions (just 5 lines) are likely
to get accepted. They are both work-arounds to
the fact that Python would need a complete re-design
of its innards to become stackless without "tricks".
It is Python that forces me to do strange things
in order to achieve my goal.
Anyway, the new version *might* get a way into the
distribution as a compiler option, since the
patches are very small, and they can be turned off
for unsupported platforms.

> I would just like to point out that NOT integrating Stackless into the 
> main Python distribution is NOT NECESSARILY BAD! It is also doesn't 
> necessarily reflect poorly on Christian or Guido.
> 
> It might make a LOT of sense to have TWO distributions, one which is 
> INCREDIBLY platform-independent, and one of which has some VERY advanced 
> and powerful multi-threading capabilities. To merge them would result in 
> loss or weakening of one (or both!) of those features -- a real shame.

In general, two versions do make sense.
On a given platform which is supported, it doesn't make
sense, since you only get more, Stackless won't do
anything less or perform poorer.
The only drawback is the problem of incompatible
Python software when using the multi-threading features.
This is now suddenly platform dependant.
But I'm confident that unsupported platforms will be
turned into the empty set, quickly.

> But having BOTH distributions satisfies EVERYONE. It might be a good 
> idea to distribute stackless from the main Python.org site (although I 
> don't think Christian is ready for that right this moment given where he 
> is in the re-write). It might be a good idea to work hard at keeping the 
> distributions up-to-date (ie, when 2.4.2 comes out for c-python it is 
> followed immediately (or simultaneously) with stackless 2.4.2. But we 
> don't have to merge Stackless into the main c-python distribution in 
> order to promote it... we can simply promote BOTH as closely-related 
> solutions to slightly different problems.

It isn't necessary any longer to work hard to keep up
with the current Python release boom. There are only
a few places where some code is inserted. Most of the
patches can be done via CVS merge automagically.
And this is only one process for each Python version.
The platform specific assembly is hidden inside of
Stackless and totally unrelated to Python.

The basic implementation has already been done and works.
What gave mea six week procrustination was the fact
that I decided to change the user interface drastically:
Away from too-powerful, too-complicated to understand
continuations, towards most easy-to-use tasklets
together with channels for task communication.
Finally, this will enable CSP programming for Python,
IMHO the state-of-the-art of concurrent programming.
I had to learn what this is and how it works, and
to find a layout useful for Python.

I'm nearly there now, and there will be an alpha release
next week.

cheers - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/







More information about the Python-list mailing list