[Stackless] Stackless for Palm Python port

Jeff Collins jcollins at endtech.com
Mon Oct 9 17:46:42 CEST 2000

On Mon, 9 Oct 2000, Lun Yuen wrote:

> > Python-1.5.2+ (post-string methods, pre-unicode) is the version ported to
> > the Palm and I will need Stackless for this;  an upgrade to 2.0 is
> > planned, but not for a couple of months.
> Sorry, I was a bit confused as to how to parse the above quote:
> - Does this mean there is a non-stackless 1.5.2+ version that has already
> been ported to the Palm?  If so, is this publicly available?

Sorry for the confusion.  Yes there is at
http://www.isr.uci.edu/projects/sensos/python/.  The Python VM exists as a
shareable library and an application is built analogously to Python
standard "freeze" mechanism.  The current front-end application simply
runs a test suite, but we plan a LispMe-like interface.  We also plan to
launch a web site to host the continuation of that project soon.

> - My assumption from the text is that a stackless version for the Palm is in
> the works, and it sounds like there will be a 1.5.2+ version, and then a few
> months later a 2.0 version.  Did I assume correctly?

Stackless will become a standard part of the Python to Palm port.  The
most likely approach will be to port standard Python first, then drop-in
the Stackless replacement.  

> Lun
> p.s. I'm curious as to the status of the Palm port, since I hope to
> eventually write some apps for the Palm, and would much prefer Python to
> C/C++.
> p.p.s.  Chris, thanks for putting this Stackless mailing list together!
> -----Original Message-----
> From: Jeff Collins [mailto:jcollins at endtech.com]
> Sent: Sunday, October 08, 2000 7:36 PM
> To: stackless at starship.python.net
> Subject: [Stackless] Stackless for Palm Python port
> On the Palm, stack and dynamic heap are very scarce.  The default stack of
> 4K is adjustable at the expense of dynamic heap.  Of course, for recursive
> C calls, no amount of stack tweaking can guarantee the prevention of stack
> overflows.  An overflow of the heap results in a MemoryError; an overflow
> of the stack causes the device to crash.
> The dynamic heap for devices running PalmOS 3.5 (eg, PalmIIIxe) is sized
> depending on the total RAM - 256K on a 4MB+ device.  Though this may sound
> relatively large, it can be quickly consumed by PalmOS libraries (such as
> the Network Library) and by the Python VM itself.  
> Obviously, Stackless Python will help to avoid the dreaded stack overflows
> at the expense of dynamic heap.  Uthreads are also needed for the Palm,
> since there is no threading currently available.  Before I begin the port,
> here are a few questions:
> 1)  What is the overhead imposed by the new/modified objects?
> 2)  The current uthread.py module is quite large (approx 1500 LOC) and
> will consume a large chunk of dynamic heap on import alone.  I read that
> there are plans to convert this to C.  Will this happen any time soon?
> 3)  I haven't thought much about using uthreads in an event-loop
> situation.  LispMe steps a thread along with each iteration of the event
> loop.  This is also remeniscent of Will Ware's original uthread
> implementation, where the scheduler is user defined.  What are the
> potential problems with uthreads in an event-loop environment?
> Python-1.5.2+ (post-string methods, pre-unicode) is the version ported to
> the Palm and I will need Stackless for this;  an upgrade to 2.0 is
> planned, but not for a couple of months.
> Thanks.

Jeffery D. Collins  
Sr. Software Developer
Endeavors Technology, Inc.

Stackless mailing list
Stackless at starship.python.net

More information about the Stackless mailing list