I'm working on the development plan for the next generation of the Perl6-in-Perl6 compiler "kp6". kp6 is implemented in mp6, a basic version of Perl 6 which is written in mp6 itself, and bootstrapped on Perl 5.
kp6, while incomplete, runs today and can already parse and compile a subset of Perl 6. * Accessing kp6: The kp6 directory (Pugs /v6/v6-KindaPerl6/) contains the tools you need for bootstrapping the compiler and for running programs. Compiler source code can be compiled with: $ perl mp6.pl < lib/Some/File.pl > lib5/Some/File.pl Programs written in Perl 6 can be compiled and run with: # run a test $ perl kp6-perl5.pl < t/kp6/01-tap.t | perl -Ilib5 # show the compiled code $ perl kp6-perl5.pl < hello.pl | perltidy # show the AST $ perl kp6-perl5.pl --ast < hello.pl | perltidy There are shortcut scripts for some common operations: $ perl recompile.pl # recompiles all kp6 source $ sh run_tests.sh # runs all kp6 tests Only the Perl 5 backend is fully implemented; Parrot (through Perl6-in-Parrot), JVM (through Groovy), and Python (possibly through RPython) are experimental. * Development Plan: The most up-to-date document for the kp6 architecture is this drawing: http://svn.pugscode.org/pugs/v6/docs/kp6.jpg # simplified version http://svn.pugscode.org/pugs/v6/docs/kp6-overview.jpg kp6 currently implements the compiler almost exactly as drawn. The current development plan can be accessed from here: http://pugs.blogs.com/pugs/2007/06/kindaperl6_proj.html I'm looking for comments on how to improve the compiler internals. For example: - One of my basic design principles was to implement AST transformations as "pluggable" modules, using a visitor pattern. Do you see potential problems with this approach? - BEGIN block side-effects are recorded in a hash. This adds an overhead to all assignment operations. Do you see a better way to check for side-effects? I'd appreciate if I can get a compiler architecture review. I'm available on #perl6 in freenode (my timezone is -03:00). You can find me there as 'fglock'. Please share your comments either here on the mailinglist or via IRC. I look forward to your feedback thanks! - Flavio S. Glock (fglock)