Parrot
From GPWiki
The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server. However, the GPWiki forums are still active! Come say hello. Parrot is the virtual machine that is being written to power the next major version of the Perl language, Perl 6. It is being designed to effectively execute dynamic languages compiled into bytecode. It will run both Perl 6 and 5, and it will also be able to run other languages such as Python, Ruby, Lua, Tcl, Forth and so on as well as custom made languages. Several at least partial implementations already exists for both common and new languages. Parrot will be easily embedded into other applications and it will run anywhere where C99 is supported. It is also Open Source and allowed to use in commercial applications. The interesting parts is that once you embed Parrot, you are supporting scripting via any language you can compile into Parrot bytecode. This is commonly done by compiling the script into Parrot Intermediate Representation (PIR), which is kind of a high level assembly language which Parrot can then compile into bytecode. Different languages are implemented via a kind of pseudo-objects, called Parrot Magic Cookies (PMC) which are using tables of function pointers to execute calls made into the objects. This way, a Perl Array and a Python Array can behave differently when asked to do some operation, such as adding a new element. To the interpreter it is all just PMCs tough, which means it is possible to mix and match languages, using a Perl built-in from Ruby and so on. The big win from this, apart from being able to use several different languages in the same project (if that is a win) is that the languages can use each others libraries. Python, Ruby and the others will be able to get the full benefit of CPAN and vice versa. Parrot is far from completed, but it is making steady progress. It is however already today well good enough for certain (small?) implementations, and can be fun to play with. The project can always use more people testing and playing with it, if not actively participating. There is a lot of experimenting going on right now, with many different languages being implemented, and there is a set of experimental SDL bindings that has been used to write a Tetris clone, among other things.
[edit] External Links
|


