A parrot. Can i use it? And How?

I looked at Parrot for a while. I understand that this is a virtual machine designed to work with various dynamic languages ​​and provides a degree of compatibility (for example, calling the Perl function from a Python script). So my question has two parts:

  • Is Parrot ready for general use? I see releases being released, but it is not clear whether this is working well now or is still ongoing.
  • Is there any documentation on how to use Parrot? I looked through the links in previous questions, but in all the documentation I can find information about the different levels of code depending on parrots (PIR, PASM, etc.) Or how to add support for more languages. This is great, but how do I run code in existing Parrot languages? And how can I use code written in another language?

Finally, I do not want to run flamewar, but I know that Parrot is associated with Perl 6. I prefer Python. I understand that Python is a supported language, but is it realistically perceived as a multilingual virtual machine, or is it a Perl 6 interpreter with other languages ​​included as curiosities?

+6
parrot
source share
2 answers

I am primarily a Python developer, so I am biased. But probably in the same direction as you.

Parrot is designed for a multilingual virtual machine. Its Perl roots sometimes show ("0" is false, the NQP bootstrap language is a subset of perl), but at runtime it's pretty linguistic-agnostic.

However, the interaction between languages ​​will not be completely smooth. For example, the String type is likely to be used as the base for all languages, but a Ruby object will probably require wrappers (but not proxies) for pythonic to work. There is no history for the interaction of objects, at least so far.

The Python 3 compiler "Pynie" has a great way. Here's the repo http://bitbucket.org/allison/pynie . Maybe you want to help? Now he is quite young, not even a lens.

And to answer your real question:

  • Sorting. It is not fast, and the languages ​​that are aimed at it are not full, but it will not lead to a crash or damage to your memory.
  • Usually you write code in your favorite high-level language (Python) and compile your .py code for parrots (and from there you can compile it to your own code if you want). Another developer can write their own Perl (6) code and compile it for parrots, and if the compilers were written taking into account the interaction, you can call the Perl function from python
+9
source share
  • It still works, but is ripe enough for language developers and library developers. Caution: some subsystems are recycled (garbage collection, embedding), so there may be some bumps on the road.

  • Each language needs a compiler that generates code that Parrot understands. These compilers are released separately. (see http://trac.parrot.org/parrot/wiki/Languages ) Most Parrot-oriented languages ​​are in an early incomplete state, so interoperability is not a big problem right now. Parrot is not an interpreter of Perl 6, but Rakudo Perl 6 is one of the most developed parrot compilers.

+3
source share

All Articles