SmaCC/Babel & Python

Marcus Denker denker at iam.unibe.ch
Tue Feb 8 22:16:59 UTC 2005


Am 08.02.2005 um 15:55 schrieb Daniel B. Faken:

> Hi All,
>
>   I have the SmaCC-runtime & Babel categories installed, and they 
> contain
> an 'example' of a python class.
>   What exactly is this for?  Does this mean I can write Squeak classes 
> in
> python?  Import python classes..?  Interface with python?
>   I looked on the swiki & other places but wasn't able to figure out 
> how
> to use this stuff..
>

This is an experiment. It is not a complete python implementation. The
idea was this question: How little work is needed to make a scripting
environment that makes people feel at home?

So what this is: A compiler that compiles the syntax of a python-like 
language
(but based on the squeak object model) to Squeak bytecodes.

>   (Also, has anyone tried getting the Squeak & python 
> class-hierarchies to
> interoperate?)

No, for loading real python it's not good enough (that is: not real 
python).
Another problem of course  is that most python libs contains huge parts
written in C.

It is quite feasable to extend this to be a fairly good implementation 
of
Python. In the spirit of Jython: For that we would need a runtime to 
model
the python Object Model and a re-implementation of all primitives and 
all
the basic python libs in Squeak. Quite some work (Jython is *huge*)

There has been some interest form the PyPy Project to experiment with
targeting the Squeak VM in addition to Java. (to be able to use Croquet
with a real full blown python).

I think this could be an interesting  experiment.  But PyPy is in a 
fairly early stage
of development. They will know in ~6-8 Months if the  geral idea of 
PyPY will work,
and then it could be  that we see some develpment for PyPy/Squeak (or 
specifically
PyPy/Croquet).

     Marcus







More information about the Squeak-dev mailing list