Comparing Python and Parrot
mAriuZ writes "In many ways, it seems like Python and Parrot are from different planets. In Python, the general approach seems to be to reduce everything possible to a canonical form as early as possible, and then deal with everything consistently.
In Parrot, the general approach seems to be to leave everything in its original form as long as possible, and then deal with everything separately."
This Parrot is no more!
Python will be running on Parrot. So everything will be ok. ( i hope )
I don't feel like it...
mmm, Netcraft confirms that Parrot is dying..
Note: TFA compares the virtual machine of Python with Parrot; Parrot is a virtual machine designed for running bytecode of several languages, including Python and Perl (as far as I know - perhaps Parrot is more than that, now).
This isn't about differences of the language Python with another language, but about how the same language runs with completely different bytecode on the two systems.
I believe posters are recognized by their sig. So I made one.
More about Parrot here.
It's pretty interesting stuff. As I understand it, they're making a virtual machine that is better suited to running code from weakly-typed languages than, say, the JVM would be. I'd really like to see what comes out of the Python-Parrot combo, with or without the pies thrown.
Python is all over the place these days. It has its own bytecode format, and yet it was being used in .net in that light languages thingum a few days ago, now today we see it running on parrot... What next, a Smalltalk VM implementation?
*runs off*
*is run over by rotten tomatoes*
...for Ruby here.
Still lots to do but it's a start...
The Army reading list
Basically, TFA seems to highlight a few issues one has to deal with when porting Python to Parrot. These are both differences between the Python VM and the Parrot VM (these affect Python/Parrot vs. CPython) and differences between what Perl and Python (these affect Python/Parrot vs. Perl/Parrot).
The first category of differences is analogous to differences between various real machines. As long as a virtual machine provides a flexible enough instruction set, any language can be made to run well on it. If not, the VM is badly designed, even if you want to run just one language on it (because you cannot arbitrarily improve your language without having to improve the VM).
The second class of differences is more tricky. Ideally, languages that target Parrot would be able to use each other's objects. However, this requires consistent treatment of objects and methods across all languages that target the VM.
I believe that both of these challenges can be overcome. The key to keeping VMs flexible is to avoid making assumptions about the language they will be required to execute. As long as the VM does not impose any structure, its primitives can be arbitrarily combined, allowing any language to run efficiently.
The key to allowing languages to work with one another's objects is to provide a standard set of primitive types and to establish conventions on how to combine these types (e.g. each composed value contains a reference to a description of the contents of the type). I think a convention is better than a mechanism or requirement here, as the latter options would take too much flexibility out of the system.
Please correct me if I got my facts wrong.
I got an email about Python and Parrot, but I think it was just spam.
How ya like dat?
Ruby talking about Python and Parrot.
I'm confused already...