[plt-scheme] Spy
Hi Jakub,
The code lives at SourceForge and the website is
http://plt-spy.sourceforge.net
The PyCon paper you mentioned and the accompanying Scheme Workshop
report give a good overview of the project. The Scheme Workshop
website hosts a PDF of the proceedings, including the paper itself:
http://scheme2003.flux.utah.edu/
You can also find a more detailed account in the documentation section
of the Spy website under "Implementing a Python to Scheme Compiler."
http://plt-spy.sourceforge.net/documentation.html
If you're interested in reading the source code, you can browse the CVS tree:
http://plt-spy.cvs.sourceforge.net/plt-spy/python/
The papers describe a native Scheme implementation of the Python
language. The approach did not work well when interacting with
Python's foreign function interface (C extensions). The Python
standard library also proved too large for us to implement and
maintain.
The second Spy implementation (still in CVS under python/c) consisted
of parts of a modified CPython interpreter hacked to act as a MzScheme
C extension and share C data types to avoid boxing between cpython and
mzscheme objects. In this case we got most of the standard library
for free, but mixing CPython's and MzScheme's automatic memory
managers was causing a lot of headaches.
A third approach was to embed CPython via an external MzScheme C
extension, give in to full object boxing, and keep the memory models
separate. You can find this code in the "python/embed" directory and
in the "python/c-bindings.ss" module. This embedding is meant to be
accessed via the scheme module language "full-spy-language.ss". You
can find examples of this in the files ending with ".spy" in the
"examples" directory. See the README and HACKING files for more
details.
The first approach might be what you really want when you have the
resources, and it's worked well for many groups: Jython, IronPython,
Mono, GCJ + GNU Classpath, and so on. Embedding is the quickest way
to get something up, and it's good enough when you don't mind running
an external interpreter. Take a look at Pedro Pinto's Dot-Scheme for
an example:
http://google.com/search?q=cache:rivendell.ws/dot-scheme/
Daniel
On 6/10/07, Jakub Piotr Cłapa <jpc at pld-linux.org> wrote:
> Does anybody know something about the Python in PLT Scheme project?
> There is one conference paper [1] and one defunct website [2] which had
> robots.txt blocking so it's unavailable even on archive.org.
>
> I was interested in the source code because Python was my top language
> before I got to learning Scheme and I would love to learn something from
> it (or even use some pieces in my own work). :)
>
> [1] http://www.python.org/pycon/dc2004/papers/25/
> [2] spyweb.hopto.org/
>
> --
> regards,
> Jakub Piotr Cłapa
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>