Stackless/microthreads merge news

Edward Jason Riedy ejr at lotus.CS.Berkeley.EDU
Wed May 10 12:44:34 EDT 2000


And Jeff Senn writes:
 - 
 - > Like a Virtual Virtual Machine? [...]
 - Hm... I'll look.

Note that it's related through main developer to the VM under Squeak.
It looks cool, but far off.

 - the Transmeta stuff is great but I heard about it many years ago --
 - why hasn't it taken over the world?  

Because they had to get the silicon working.  ;)  They got everything
together for full x86 emulation much more quickly than AMD did, which is
a good chunk of Transmeta's point (if it's complicated, do it in software).

I'm more interested in IBM's take, one that doesn't require a transactional 
write buffer.  Transmeta takes the must-exactly-emulate-x86 route, which is 
great for their intended market, but doesn't make as much sense for a VM-
like system on top of an OS.  I threw it out there as a note that you don't
_need_ x86 hardware to run x86 code efficiently.

 - What are we going to run on the "smart-dirt"?  Maybe x86 code, but 
 - probably not.

Right now they're working with Atmels.  See the MacroMotes:
  http://robotics.eecs.berkeley.edu/~pister/SmartDust/
By the end of the week, we should have basic MAC layers for the
radios, etc.  x86 code as a execution model might make sense
simply for the ease of use.  Doesn't matter what the low-level
hardware is.

Don't forget that the smart-dirt is smart because it's fully 
networked.  It can rely on someone else to translate the code for 
it.  Some folks are investigating similar tacts for Java, both for
itty devices (http://www.ri.silicomp.fr/adv-dvt/java/jcod/) and
for centralizing management (http://kimera.cs.washington.edu/).
This has serious potential in a pervasively networked environment.

 - > And yet other people might eschew virtual machines for intermediate
 - > representations that can be compiled quickly while keeping the

 - Indeed -- my goal is not performance.

My primary research area is high performance computing, and my 
particular viewpoint is that it's only worth while if you can
achieve it while keeping your sanity.  ;)  Most people in the field
disagree.  They still hack up one-off things in old Fortran dialects, 
not realizing that the _total_ time (development + runtime) is longer 
than the total time could have been...

 - It is to factor out the complexities of software development to make 
 - it more accessible to more people on more types of devices/platforms.

Exactly.  The whole point behind HPC is to support the scientists 
who need it.  They care about their sciences, not the language fad
of the month.  That's why I think a universal-ish VM-ish environment
is a great idea...  Other folks have taken a compilation-only view
and either haven't gotten very far or have gone too far (SUIF, Zephyr), 
which is why I tend to think that anything usable needs to be directly 
interpretable (or at least compilable in a millisecond)...

 - > And then there are those folks who have been working on a Scheme
 - > interpreter to serve precisely this role, Guile.
 - 
 - Yes.  But again I wonder why Lisp/Scheme/... never took over the world
 - and things like Python, the other-P, VB, and (perhaps) Java, do seem to
 - take hold...

Knowledge transfer and public posturing.  Java has sooo many negatives 
in both language and implementation, but Sun did a great job not only 
in evangelizing but also getting documentation and non-trivial, 
_popular_ example code out the door.  They were helped greatly by the
web explosion.  Perl is similar, and Python is starting to go that way.  
Java had the `advantage' of springing unto the world mostly formed 
after years of closed development, so it looks more revolutionary.  
People get less excited over evolutionary development.

The Lisp / Scheme crowd focuses on more esoteric topics, and the 
blatant mathematical background scares people (unfortunately).  As 
much as I used to deny that reasoning, it really seems true.  Even
the parentheses.  Having to re-map your keyboard to keep from holding
shift every few keystrokes is enough to make most people walk away.
(Having to re-map your whole keyboard is fun.  Wish I knew of a good
APL environment for Unices.)

(It's amusing that some of the main positives in the current top Java 
implementations came from a much more flexible and useful language,
Self.)

 - [M]y best guess is that Python is as close as anything I've seen to 
 - being the right balance of language features and power with user-
 - accesibility [...]

I tend to agree, although I do prefer many aspects of Dylan.  That's
my lisp-ish background shining through...  Some of the info about
P3K makes me think it'll be pretty close, although missing some of the
things I hold dear.  (I prefer CLOS-style objects, keeping methods
orthogonal to the object.  I really feel it can give much more flexible,
useful code and can be implemented efficiently.  I need to put some
code where my mouth is before I spout off too much, though.  And it
puts some interesting twists on introspection.)

 - [...] the VM implementation is quite good/simple and Chris's 
 - stackless makes it even better [...]

The VM is nice, but, as I said, I'm an HPC guy.  I need compiled 
code (minimal execution overhead), preferably recompilable to handle 
irregular problems.  I haven't dug through Python's core enough to 
say if this is sensible now, and I'm not likely to until P3K's 
development opens up a bit more...  I use Python more as a glue
language at the moment, but I'm starting to integrate it further to
allow rapid prototyping of sparse matrix partitioning heuristics.

And Chris's stackless + continuations is certainly great for Python, 
but I can't help feeling like it's the early-mid 90s all over again 
(and probably earlier eras).  The quest for efficient continuation 
support was taken up, semi-solved, and then vanished into the ether.
His patch makes it possible to bring it back from the dead and make
it useful, or at least so I hope.

 - [...] and if only I could run the core of it on a small, raw
 - microprocessor with modest memory (or a SmartCard ... or even my
 - Palm!) I believe it would take over the world.

Maybe not take over the world, but at least help out significantly
in making computing accessible.  And anything that makes the icky
PalmOS forms API usable would certainly be welcome.

Jason



More information about the Python-list mailing list