Version 22 of parrot

Updated 2005-10-17 19:00:50 by dkf

Parrot[L1 ] is a new runtime interpreter written in support of Perl 6 and other dynamic languages.

Try it out

To try out the Tcl interpreter that is currently available with parrot: (you'll need a C compiler, make, and perl, for now.)

First, get a copy of parrot: (see for instructions. You can use svn or grab a snapshot)

 cd parrot
 cd languages/tcl

From here, you can cd to examples and make hello. In the tcl directory, there is also a make test target, where you can run the limited test suite. There is also a "make tcl-test" target which will grab the latest copy of the tcl test suite out of CVS; convert the tests into a something that perl's test harness can run, and then run the tests.

You can also see the PIR that your tcl compiles to with the *--pir* option. Also, you can use *-e* to specify the tcl on the command line, ala perl.

 ../../parrot tcl.pbc --pir -e='puts [expr 2 + 2]'

Current Status:

This is a tcl compiler. Code is parsed out into words, which are handed off to objects that know how to compile themselves. Once we have an object containing the parsed code, we compile it to PIR, and then compile the PIR (Parrot intermediate representation, a step or two above assembler) to parrot bytecode. A new partcl-only option --pir allows you to dump the PIR that would be executed.

"New Features"

Since this is a brand new implementation on parrot, it would be nice to take advantage of parrot features like the Parrot Grammar Engine (see PerlSixGrammars)

Future Goals:

Make the compiler smart enough to know when it can no longer use cached versions of the builtins.

Pass most of tcl's test suite. With "make tcl-test", we can now run a (converted) version of the tcl suite using partcl. Currently at just over 10% (minus clock). Once we have enough of tcl running, we can drop the conversion and just run the test suite natively. However, since tcltest uses quite a few builtins, it'll be a while.

Provide the ability to call routines defined in other languages from inside Tcl. (There is already a parrot standard library; eventually this would allow us to call anything, say, written in perl, using native Tcl syntax.)


Currently, the Tcl on parrot effort is being coordinated by Will Coleda (will at coleda dot com), with much code and refactoring contributed by Matt Diephouse. If you're interested in helping out, there is C, PIR, Tcl and Perl code that needs writing.

See also perl and python.

[Category Language|Category Tcl Implementations (not exclusively, but inclusively)]