This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Python transformer for Guile?
- To: sen_ml at eccosys dot com
- Subject: Re: Python transformer for Guile?
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 22 Jan 2000 09:58:19 +0100
- Cc: guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <E12BoUY-00045z-00@mdj.nada.kth.se> <20000122112422K.1000@eccosys.com>
sen_ml@eccosys.com writes:
> mdj> Is anyone interested in working on a Python translator for Guile?
>
> i am very interested, but doubt how useful i would be ;-) but i'd love
> to learn what might be involved. may be i can continue the trend of
> over-committing...
OK, good. I should warn you, though, that I won't have time to do
much else than answering questions.
> one thing i have wondered about in the past is whether the parsing
> code used to implement the source language (in this case python) can't
> be re-used for the task -- at least from a technical perspective.
This is an excellent idea. Please check if you can extract this code
from the Python sources. It might be a good idea to let it generate
an intermediate representation (Python with Scheme syntax) and then
use a translator, written in Scheme, to generate the Scheme code.
(The translator can have the shape of an evaluator (see e.g. SICP) but
instead of computing values, it computes code.) You'll also have to
write a library with basic Python procedure and data types.
> in python's case there might be licensing issues, i guess.
Python's license is compatible with GPL, so I don't think it'll be a
problem.
/mdj