Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bit more piethon

1 view
Skip to first unread message

Dan Sugalski

unread,
Oct 5, 2004, 11:12:26 AM10/5/04
to perl6-i...@perl.org
Since Sam Ruby's been poking at it, and I'm waiting on the register
coloring function to churn, I figured I'd poke at the python
converter in CVS a bit. So I did. More ops are done, and things get a
bit further on his big list 'o tests than they did before, which is
nice. My translator handles a separate set of the tests, but still
fails on some of them too. (I've not given it a full shakeout yet)

Might be worth syncing up to CVS and poking at it if you're curious.
--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Leopold Toetsch

unread,
Oct 5, 2004, 11:44:23 AM10/5/04
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski <d...@sidhe.org> wrote:
> Since Sam Ruby's been poking at it, and I'm waiting on the register
> coloring function to churn, I figured I'd poke at the python
> converter in CVS a bit. So I did. More ops are done, and things get a
> bit further on his big list 'o tests than they did before, which is
> nice.

pie-thon.pl was a short-term hack to get Python bytecode running. Its
broken in several areas, mostly name handling and function calls. And I
still think that going via Python AST is the better way. Bytecode is
missing already a lot of information - or better its hidden too deeply.

> ... My translator handles a separate set of the tests, but still


> fails on some of them too. (I've not given it a full shakeout yet)

Running "make test" in languages/python is already using ast2past.py,
but most of the tests are just turned off. It would be rather simple,
though, to turn on either Python -> Parrot generation in
lib/Parrot/Test/Python.pm.

Having one set of tests in one place would be really good.

But before continuining seriously, we need the Python PMCs working -
after 0.1.1.

leo

Dan Sugalski

unread,
Oct 5, 2004, 12:33:08 PM10/5/04
to l...@toetsch.at, perl6-i...@perl.org
At 5:44 PM +0200 10/5/04, Leopold Toetsch wrote:
>Dan Sugalski <d...@sidhe.org> wrote:
>> Since Sam Ruby's been poking at it, and I'm waiting on the register
>> coloring function to churn, I figured I'd poke at the python
>> converter in CVS a bit. So I did. More ops are done, and things get a
>> bit further on his big list 'o tests than they did before, which is
>> nice.
>
>pie-thon.pl was a short-term hack to get Python bytecode running. Its
>broken in several areas, mostly name handling and function calls. And I
>still think that going via Python AST is the better way.

If we want to do it right we should just go from source -- the
language isn't that grammatically challenging.

I do realize this is a sub-optimal way to do it. Still, it's
workable, can be done now without fiddling with parsers, and people
have gotten interested enough in it to poke at it again. I don't see
any reason not to do the simple stuff that's outstanding if people
find it, or to apply patches to the system as it stands.

> > ... My translator handles a separate set of the tests, but still
>> fails on some of them too. (I've not given it a full shakeout yet)
>
>Running "make test" in languages/python is already using ast2past.py,
>but most of the tests are just turned off. It would be rather simple,
>though, to turn on either Python -> Parrot generation in
>lib/Parrot/Test/Python.pm.
>
>Having one set of tests in one place would be really good.
>
>But before continuining seriously, we need the Python PMCs working -
>after 0.1.1.

Absolutely, as well as any builtins that might need to be added.

Sam Ruby

unread,
Oct 5, 2004, 12:34:55 PM10/5/04
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski wrote:

> Since Sam Ruby's been poking at it, and I'm waiting on the register
> coloring function to churn, I figured I'd poke at the python converter
> in CVS a bit. So I did. More ops are done, and things get a bit further
> on his big list 'o tests than they did before, which is nice. My
> translator handles a separate set of the tests, but still fails on some
> of them too. (I've not given it a full shakeout yet)
>
> Might be worth syncing up to CVS and poking at it if you're curious.

The only test I see now passing that previously failed is: shift.

http://intertwingly.net/stories/2004/10/04/summary.html
http://intertwingly.net/stories/2004/10/05/summary.html

- Sam Ruby

Dan Sugalski

unread,
Oct 5, 2004, 12:38:19 PM10/5/04
to Sam Ruby, perl6-i...@perl.org

Bah, I'd hoped for better. :) Still, a number of the tests that did
fail to compile got further, which is something, though not enough.

Oddly some of the test failures are quoting issues -- the dict one
for example. We don't quote the b, for some reason.

0 new messages