[Python-Dev] VM and Language summit info for those not at Pycon (and those that are!)
Allison Randal
allison at python.org
Sun Mar 13 00:49:10 CET 2011
On 03/12/2011 05:13 PM, Glenn Linderman wrote:
> On 3/12/2011 10:42 AM, Allison Randal wrote:
>> I might convert it directly into a Q&A blog post.
>
> I'd like to see that, or a summary, posted here. As a Perl-to-Python
> convertee, I'm curious about the problematic semantic differences.
The short summary is that the Parrot VM is a very good semantic fit for
Python (AFAICT, a better fit than it is for Perl 6, though I haven't
done the feature-by-feature comparison). But, the initial implementation
of Pynie (Python-on-Parrot) used NQP for parsing Python syntax and
compiling it down to Parrot's AST. NQP is a library of Perl 6 regexes
plus a stripped-down version of Perl 6 syntax, roughly the same general
idea as PyPy's RPython. As with any Turing-complete system, it is
certainly possible to implement a Python parser in NQP, but it required
some ugly hacks, and it got to the point that I just hated working on it.
To be fair, the failure wasn't entirely technological, the project was
also slowed by my PhD work, and by my new very intense and very
interesting job.
I'd like to see Python-on-Parrot implementation work proceed in a more
naturally Pythonic way, possibly as an alternate backend for PyPy or as
an alternate output from the CPython grammar. I have a couple of
volunteers who I'll be mentoring in the coming months, so we'll see what
grows out of it.
Allison
More information about the Python-Dev
mailing list