Preludification Candidates

About Prelude.pm (in the pugs repository)

src/perl6/Prelude.pm contains some core functions for Perl 6...written in Perl 6.  Through a bootstrapping process, it is a available at runtime in an efficient, pre-compiled form. 

Being able to write some of Perl 6 in a Perl 6 is a benefit it itself, but an additional benefit is that functions in Prelude.pm are automatically available to all Perl 6 implementations, helping spend of their development, and providing some consistency between them. 

Hacking on Prelude.pm

Here's a rough shot at things that are implemented in src/Pugs/Prim.hs now and might be moved to src/perl6/Prelude.pm . 

Some (many) of those rely on internals support to do the actual low-level stuff, for example IO.  So it's (probably) okay to split up the work to a "myprim" sub in the Prelude and a sister "Pugs::Internals::myprim" in Prim.  For example, Pipe.open2 offers a simple Perl6 interface to Haskell's runInteractiveCommand. 

If your prim can be written efficiently in pure Perl6, that's great; by all means put it in the Prelude and mark it as such in a kwid block (FIXME: notation to be determined), so that it may be reused by non-pugsy Perl6 implementations :-)

If you have an questions about hacking on Prelude.pm, please ask on IRC