Perl 6
Preludification Candidates: Revision 2
^^ About Prelude.pm

`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"[Mail Lists, IRC, Archives]

> want
> bool::true
> bool::false
> time
> times
> File::Spec::cwd
> File::Spec::tmpdir
> chop
> chomp
> Str::split
> lc
> lcfirst
> uc
> ucfirst
> capitalize
> sort
> reverse
> perl
> require_haskell
> require_parrot
> require_perl5
> eval_parrot
> use
> require
> eval
> evalfile
> eval_perl5
> eval_haskell
> eval_yaml
> Pugs::Safe::safe_print
> elems
> graphs
> codes
> chars
> bytes
> readdir
> slurp
> opendir
> IO::Dir::closedir
> IO::Dir::rewinddir
> IO::Dir::readdir
> detach *rename to Thread.detach
> kill *rename to Thread.kill and Process.kill
> join *rename to Thread.join
> async
> listen *rename to Socket.listen
> flush *rename to IO.flush
> close *rename to IO.close / make multi?
> chr
> ord
> hex
> grep
> map
> join
> reduce
> Scalar::split
> Scalar::as
> connect *Socket.connect
> sprintf
> exec *Process.exec
> system *Process.system
> chmod *File? System?
> splice
> index
> rindex
> splice
> substr

^^ Related Pages

* This page is meant to supercede "PreludificationCandidates"<http://pugs.kwiki.org/?PreludificationCandidates> from pugs.kwiki.org, on which it is based.


Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: