Ah, figured it out. Translation of the scheme interpreter cannot possibly work; this is not RPython code. I've no clue why there is a targetscheme.py, but it was not finished. The next issue is all these "def new" methods in W_Root subclasses in object.py. They are completely ignored by RPython. As a result, "#f" returns W_Boolean(False), which in RPython really makes and returns an instance of W_Boolean.
Someone needs to fix it by removing the new methods (the sanest solution).
Thanks! I also got interactive.py to work. (hopefully below is the correct way?)
cnsgsz@ubuntu:/lang-scheme/scheme$ python interactive.py
PyPy Scheme interpreter
I am new to pypy and this scheme implementation, it would be great if you can help me out with some questions I have with this implementation:
1. how does pypy tools help with the interactive.py implementation? does pypy makes it faster than otherwise standard python implementation of scheme interpreter? I know how translation of rpython code with pypy can produce a faster interpreter, but the interactive.py isn't translated...
2. what are you referring to by "def new" in W_Root? is there a quick fix to make targetscheme.py and the translation work?
Thank you so much!
1. Indeed, interactive.py is not translated. It runs the scheme interpreter in regular Python. It's in this mode that we run most tests. To run them, use "python /path/to/pypy/test_all.py test/test_<filename>.py" or just "test/" to pick the whole directory.
2. That's bitbucket being unhelpful and eating underscopes from what I typed... I meant "def --new--()", where each "-" stands for an underscore. You have of course to know reasonably well Python (e.g. what the method --new--() does) in order to develop an interpreter with PyPy. Scheme is not yet ready to use --- as shown by this issue, and I'm sure there are more.