Introduction "Long-term Projects" are 1 year or more long. Long-term projects have several Phases or Versions. "Short-term Projects" are at most 3 months long. Short-term Projects may keep being maintained, or may be obsoleted. Each "Phase" should describe a major project. Ideally, it should be 2-3 months of work with a clear end product and a clear goal. Each "Milestone" should describe a 4-6 week project that results in a major new feature or functionality. The goal of phases and milestones here is really just to break the project down into bite-sized pieces that regular hackers can get their heads around. Inside each milestone, we should have an ordered list of tasks that should each take no more than 1-3 days of effort. (Sometimes this is impossible, but if it can get done for the next/current Phase, we'll give hackers a good place to start) Having tests to know when we finish a milestone might be a really cool way to make things move forward fast. Long-term Projects Parrot "perl6" Perl 6 over Parrot. Pugs "pugs" Perl 6 over Haskell, Perl 5, and C. Perl 6 in Perl 6 The "6-in-6" project is built out of a number of small projects, almost all of them in Perl. We're thrilled to invite Perl 5 hackers and Perl 6 hackers to contribute implementations of any of the projects for the next milestone. Short-term Project examples Perl6::Rules Perl 6 regex compiler. This is no longer maintained. PGE Perl 6 regex compiler in Parrot. TGE Tree Grammar Engine in Parrot. lrep A bootstrapped compiler for a subset of Perl 6. This is no longer maintained. Moose Perl 6 OO in Perl 5 Pugs::Compiler::Rule Perl 6 regex compiler v6.pm Perl6-in-Perl5 MiniPerl6 A bootstrapped compiler for a subset of Perl 6. KindaPerl6 Incremental development of a bootstrapped Perl 6 compiler. Perl-6.0.0-STD Provide a runnable "standard" Perl 6 grammar. Current state of "Perl 6 in Perl 6" "Perl-6.0.0-STD" provides a grammar and parser routines written in "full Perl 6"; Perl 6 over Perl 6 should be able to use this grammar. "pugs" can parse a "cheated" Perl-6.0.0-STD grammar. Pugs "Prelude.pm" implements Perl 6 runtime in Perl 6. "v6.pm" can parse most of "Perl-6.0.0-STD". v6.pm and pugs share the same regex engine (Pugs::Compiler::Rule). "KindaPerl6" provides a working bootstrapped compiler. The grammar, the parser engine, and most of the runtime are written in Perl 6. Short-term, single milestone "6-in-6" projects Regex engine experiments Piecewise Migrating technologies between 6-in-6 and other Perl 6 compilers Perl6-in-Parrot - Adding actions to the grammar Pugs - reuse the grammar parser and generate Haskell code v6.pm new OO AST v6.pm upgrade to Perl-6.0.0-STD Grammar v6.pm visitor-plugin architecture Allow the 'v6.pm' module to use different implementations Perl-6.0.0-STD "cheat" scripts KindaPerl6 "small projects" overview Architecture Migrate Perl 5 runtime to MiniPerl6, for reusability move the object metamodel to perl 6 land Merge the regex parser into the main compiler Implement $?PARSER Optimizer Quality control Running Test.pm Test coverage tools Debugger Backends Perl 5 Publish to CPAN Parrot (Perl6-Parrot, PIR) Perl6-Haskell (Pugs) JVM (Groovy, Java, bytecode) Javascript (plain javascript, PIL2JS) pypy (RPython) C, C++ (gcc with GOMP and Boehm GC) Semantics Implement Capture and Signature Migrate 'Code' to perl 6 land Implement Multis Syntax Fix the grammar to current specification Upgrade to Perl-6.0.0-STD Grammar first task -- add tests Phase I - bootstrap (MiniPerl6) Milestone 1: Architecture Define the minimal bootstrapping language Implement Regex engine in MiniPerl6 Spec the AST for MiniPerl6 Milestone 2: v6.pm bootstrap for compiler. Improve v6.pm to host the compiler... Be specific. What does it need? Milestone 3: Regex engine in MiniPerl6 Milestone 3: Implement compiler Break this down into 5-6 tasks Milestone 4: Self-hosting compiler Break this down into 5-6 tasks --- Bonus projects: (Not required to complete Phase 1) -- compile to a language supported by the Parrot VM -- compile to a language supported by the JVM -- compile to a standalone language, such as C, C++, D, Lisp -- compile to Javascript -- bootstrap in other language than Perl 5 -- have Perl6-in-parrot reuse parts of the MiniPerl6 architecture Phase II - improved compiler architecture (KindaPerl6) Milestone 5: Architecture Implement pluggable AST processors Implement AST processor for ________ Implement AST processor for ________ (name all) Implement precompilation phase Please describe Milestone 6: KindaPerl6 Implementation lexical subs object metamodel lexical classes BEGIN blocks compile-time state is restored at runtime containers Bonus projects for KindaPerl6: (Not required to complete Phase 2) -- test suite -- bootstrapped kp6 -- lazy containers -- runtime written in Perl 6 -- improved usability; packaged for CPAN Phase III - refactor the MP6 regex compiler to KP6 style Milestone 7: Regex compiler mergedown Merge the regex compiler into KindaPerl6 - Bonus projects (not required to complete Phase 3) -- string interpolation Phase IV - improved grammar - Architecture -- reorganized directories -- regex backtracking --- which backtracking model? - Implementation -- COMPILING::<$?PARSER> -- $?FILE, $?LINE -- finer-grained error messages -- grammar merged from Perl6-STD --- precedence parser from Perl6-STD -- lexically modifieable Grammar -- multis --- "Code", "Signature" -- "use" -- Type system - Bonus milestones -- subroutine prototypes -- clearly separate the backend code from the main compiler code -- compiler front-end written in Perl 6 -- usable as a "v6.pm" plugin -- optionally compile to "MiniPerl6" level (faster, smaller, but less features) -- parse Perl6-STD -- use ext/Test.pm -- integrated into the smoke system -- debugger -- interactive mode -- extended runtime; syntax sugar -- threads and parallelism -- coroutines -- macros -- junctions -- type checking on binding Phase V - optimizer - Implementation -- optimizer plugins -- use Perl6-STD as the compiler grammar -- compiler cache - Bonus milestones -- 'use' specific versions -- 'eval' Perl 5 -- 'use' Perl 5 Phase VI - aggressive optimizer Related Work - Perl6-in-Parrot -- TGE and PGE - Perl6-in-Haskell (Pugs) -- Javascript and Perl5 backends - v6.pm (Perl5 module) -- "lrep" bootstrapping compiler - Perl6-STD (official Perl 6 grammar) __END__ ------------------------------------------------ ** no particular order, yet - cut and pasted from the TODO - private method/sub/accessor - signatures with optional, named, slurpy arguments - user-clonable closures - $closure.clone - creates new pads with copies of lexicals + try(), eval() + 'Code' closure objects + 'Capture' objects + classes, methods, at compile-time + short-circuiting <&&>, <||>, (require macros, or laziness) - 'let' variables - 'our' variables - CATCH blocks - method hyperization is untested - immutables - Set, Seq, Bag - traits - is context, rw, readonly - containers, but no laziness, no slices - hash and array are under refactoring - P6opaque - GLOBAL importation should be lexical - method not found falls back to sub call - lvalue methods (rw) - call context - type system - for-loop, map, with several arguments - (FIXED) begin-blocks with side-effects - subroutine calls, data, are incompatible with perl 5 - no 'use v5' - declare our/state/temp/constant things - missing GLOBAL::import() at compile-time - 'our $x' should compile to 'my $x ::= $Pkgname::x' - 'use GLOBAL $x' should compile to 'my $x ::= $GLOBAL::x' - perl6-land 'use' - translate the COMPILER package to mp6 - translate Pad.pm and Type.pm to mp6 - create an AST node for INIT/END BEGIN blocks: - logging of array/hash element modifications is not implemented - binding to Value is not emitted - Method and Class doesn't have '.perl' Bugs: - missing compile-time methods - compile-time does not import GLOBAL - 'say' doesn't work inside BEGIN blocks - grammar: 'undefine($v)' is not parsed - structure binding/assign is untested Roles: - (FIXED) possible implementation: $Obj->{Role_bool} = sub { 1 }; at runtime: $Obj->{Role_bool} && $Obj->{Role_bool}() || $Obj->bool() - problem: objects based on p5-array (Array), p5-code (Code) - p5-land objects will only have Moose-based roles Perl5 compatibility: - mark closure blocks as p5 or p6 (kp6/mp6) Problems running the Perl6 test suite: - kp6 requires a 'compilation unit' declaration - '&&', '||' operators don't short circuit - (FIXED) 'if', 'sub' require ';' - prefix and postfix:<++> not implemented - 'use' doesn't accept parameters: use lib "."; - parameter list error in: if defined $var { ... requires: if defined($var) { ... - no END blocks Visitor modules: - deprecated modules: KindaPerl6::Visitor::LexicalSub KindaPerl6::Visitor::CreateEnv - MetaClass.pm - add class variables - test bootstrap - roles - alias Class::MOP's 'meta' to 'HOW' --- package Class::MOP::Class; sub meta { Class::MOP::Class->initialize(blessed($_[0]) || $_[0]) } --- - create BUILD, BUILDALL - OUTER namespace - ROUTINE - tail-calls For later: - desugar blocks into real subroutines, in support for the parrot backend - fixed by now, using p6parrot as an intermediate language - desugar closures into simple subroutines, in support for the C backend - temp/state desugaring, for perl5 - circular prelude - 6-on-6 design - full-ast