Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Proofreading some POD
  • Loading branch information
Coleoid committed May 16, 2016
1 parent c10af6c commit 331bdb9
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 74 deletions.
16 changes: 8 additions & 8 deletions doc/Language/faq.pod
Expand Up @@ -541,13 +541,13 @@ them offer all.
=item react / whenever / supply keywords allows easy construction of interactive, event driven applications.
=item Lazy evaluation when possible, eager evaluation when wanted or necessary. This means, for example, lazy lists, and even infinite lazy lists, like the Fibonacci sequence, or all prime numbers.
=item Lazy evaluation when possible, eager evaluation when wanted or necessary. This means, for example, lazy lists, and even infinite lazy lists, like the Fibonacci sequence, or all prime numbers.
=item Native data types for faster, closer to the metal, processing.
=item Interfacing to external libraries in C / C++ are trivially simple with NativeCall.
=item Interfacing with Perl 5 (CPAN) / Python modules trivially simple with Inline::Perl5 resp. Inline::Python.
=item Interfacing with Perl 5 (CPAN) / Python modules trivially simple with Inline::Perl5 and Inline::Python.
=item Can have multiple versions of a module installed and loaded simultaneously.
Expand Down Expand Up @@ -575,7 +575,7 @@ them offer all.
=item Runs on small (e.g. Raspberry Pi) and large multi-processor hardware.
=item Garbage collect based: no timely destruction, so no ref-counting necessary. Use phasers for timely actions.
=item Garbage collection based: no timely destruction, so no ref-counting necessary. Use phasers for timely actions.
=item Methods can be mixed into any instantiated object at runtime, e.g. to allow adding out-of-band data.
Expand All @@ -595,8 +595,8 @@ features.
That depends on what you are doing. Rakudo has been developed with the
philosophy of "make it work right then make it work fast". It's fast for some
things already but needs work on others. After the Christmas 2015 release stabilizes
the definition of the language, we'll be spending much of our effort on optimizing in 2016.
things already but needs work on others. Since the Christmas 2015 release stabilized
the definition of the language, we're spending much of our effort on optimizing in 2016.
Since Perl 6 provides lots of clues to the JIT that other dynamic languages don't, we think
we'll have a lot of headroom for performance improvements. Some things already
run faster than Perl 5.
Expand All @@ -617,7 +617,7 @@ Examples:
# Perl 6 version
use v6;
class Foo { has $.i is rw};
class Foo { has $.i is rw };
for (1..1_000_000) -> $i {
my $obj = Foo.new;
Expand All @@ -628,7 +628,7 @@ Examples:
package Foo;
use Moose;
has i => ( is=> 'rw');
has i => (is => 'rw');
__PACKAGE__->meta->make_immutable;
Expand Down Expand Up @@ -659,7 +659,7 @@ Examples:
my ($prev, $current) = (1,0);
for ( 0..100_000) {
for (0..100_000) {
($prev, $current) = ($current, $prev + $current);
}
print $current;
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/io.pod
Expand Up @@ -5,7 +5,7 @@
=SUBTITLE File-related operations
Here we present a quick overview of the file-related input/output
operations, detailed documentation can be found in the documentation for the
operations. Details can be found in the documentation for the
L<IO|/type/IO> role, as well as the L<IO::Handle|/type/IO::Handle> and
L<IO::Path|/type/IO::Path> types.
Expand Down Expand Up @@ -35,7 +35,7 @@ the file for you.
=head2 Line by line
Of course, we also have the option to read a file line-by-line. The new line
separator (e.g. $*IN.nl-in) will be excluded.
separator (i.e., C<$*IN.nl-in>) will be excluded.
for 'huge-csv'.IO.lines -> $line {
# Do something with $line
Expand Down
14 changes: 7 additions & 7 deletions doc/Language/modules-extra.pod
Expand Up @@ -5,23 +5,24 @@
=SUBTITLE What can help you write/test/improve your module(s)
Here is a list of modules that you can find in the Perl 6 ecosystem
which aims to make the experiences of developing Perl 6 modules
which aim to make the experience of developing Perl 6 modules
more fun.
=head1 Modules builder and Authoring tools
Here some modules/tools that can help you with generating files that are part
of a module.
=head1 Module builder and Authoring tools
Some modules and tools to help you with generating files that are part
of a module distribution.
=item L<App::Mi6|http://modules.perl6.org/dist/App::Mi6> Minimal authoring tool for Perl6
=item L<META6|http://modules.perl6.org/dist/META6> Do things with Perl 6 META files
=item L<Module::Skeleton|https://bitbucket.org/rightfold/module-skeleton> Generate a skeleton module
=item L<p6doc|http://modules.perl6.org/dist/p6doc> Generate documentation end-products
=head1 Tests
Some tests related modules
=head1 Tests
Some tests of module quality.
=item L<Test::META|http://modules.perl6.org/dist/Test::META> Test your META6.json file
=item L<Test::Output|http://modules.perl6.org/dist/Test::Output> Test the output to STDOUT and STDERR your program generates
Expand All @@ -32,7 +33,6 @@ Some tests related modules
Here some modules to help you work with NativeCall.
=item L<NativeHelpers::Array|http://modules.perl6.org/dist/NativeHelpers::Array> Provides routines to deal with CArray
=item L<App::GPTrixie|http://modules.perl6.org/dist/App::GPTrixie> Generate NativeCall code from C headers file
=item L<NativeCall::TypeDiag|http://modules.perl6.org/dist/NativeCall::TypeDiag> Provides routines to test your CStruct
Expand Down
40 changes: 21 additions & 19 deletions doc/Language/modules.pod
Expand Up @@ -136,7 +136,7 @@ any argument list.
=end code
You can pass named parameters to C<is export> to group symbols for exporting
then the importer can pick and choose. There are three predefined
so that the importer can pick and choose. There are three predefined
tags: C<ALL>, C<DEFAULT> and C<MANDATORY>.
=begin code
Expand All @@ -161,7 +161,7 @@ tags: C<ALL>, C<DEFAULT> and C<MANDATORY>.
=head3 UNIT::EXPORT::*
Beneath the surface C<is export> is adding the symbols to a C<UNIT>
Beneath the surface, C<is export> is adding the symbols to a C<UNIT>
scoped package in the C<EXPORT> namespace. For example, C<is
export(:FOO)> will add the target to the C<UNIT::EXPORT::FOO>
package. This is what Perl 6 is really using to decide what to import.
Expand Down Expand Up @@ -247,7 +247,7 @@ the values are the desired values. The names should include the sigil
=end code
Note, C<EXPORT> can't be declared inside a package because
presently rakudo (2015.09) seems to treat C<EXPORT> as part of the
presently Rakudo (2015.09) seems to treat C<EXPORT> as part of the
compunit rather than the package.
Whereas C<UNIT::EXPORT> packages deal with the named parameters passed
Expand Down Expand Up @@ -299,7 +299,7 @@ L<Cool>s.
=begin code
use MakeQuestionable Cool;
say 0?,1?,{}?,{ a => "b"}?; # False True False True
say 0?, 1?, {}?, { a => "b" }?; # False True False True
=end code
=head2 Finding Modules
Expand Down Expand Up @@ -363,10 +363,12 @@ To share your module, do the following:
`-- Gargravarr.pm
=end item
=item If you have any additional files (such as templates or a dynamic library ) that you wish to have installed so you can access them at runtime they should be placed in a C<resources> sub-directory of your project.
=item If you have any additional files (such as templates or a dynamic
library) that you wish to have installed so you can access them at
runtime, they should be placed in a C<resources> sub-directory of your project.
=item The C<README.md> file is a L<markdown-formatted|https://help.github.com/articles/markdown-basics/> text file, which
will later be automatically rendered as HTML by GitHub.
=item The C<README.md> file is a L<markdown-formatted|https://help.github.com/articles/markdown-basics/>
text file, which will later be automatically rendered as HTML by GitHub.
=item Regarding the C<LICENSE> file, if you have no other preference,
you might just use the same one that Rakudo Perl 6 uses. Just
Expand Down Expand Up @@ -418,14 +420,14 @@ To share your module, do the following:
details). If the version number doesn't matter to you or your users
right now, you can just put in an asterisk (*) for the version.
The C<authors> section includes a list of all the module authors. In
the case there is only one author, a single element list must be
supplied.
The C<authors> section includes a list of all the module authors. In
the case there is only one author, a single element list must be
supplied.
In the C<provides> section, include all the namespaces provided by
your distribution and that you wish to be installed, only module
files that are explicitly included here will be installed and
available with C<use> or C<require> in other programs
available with C<use> or C<require> in other programs.
Set C<perl> version to the minimum perl version your module works with.
Expand All @@ -435,8 +437,8 @@ To share your module, do the following:
library files and their installed location can be determined through the
C<%?RESOURCES> Hash indexed on the name provided.
The L<Test::META module | https://github.com/jonathanstowe/Test-META/>
can help you check the correctness of the META6.json file.
The L<Test::META module | https://github.com/jonathanstowe/Test-META/>
can help you check the correctness of the META6.json file.
=end item
Expand All @@ -451,10 +453,10 @@ To share your module, do the following:
=item Push your project to GitHub.
=item Consider to setup automated testing (see L<https://docs.travis-ci.com/user/languages/perl6>).
=item Consider setting up automated testing (see L<https://docs.travis-ci.com/user/languages/perl6>).
=item Create a PR on L<ecosystem|https://github.com/perl6/ecosystem> adding
your module to META.list, or Ping someone on IRC (#perl6 at freenode) to
your module to META.list, or ping someone on IRC (#perl6 at freenode) to
get help having it added.
=item After the pull request has been accepted, wait for an hour. If
Expand Down Expand Up @@ -489,10 +491,10 @@ infrastructure. B<Volunteers needed!>
The rough plan is:
1. fix EVAL precomp bug (nine)
2. get Repository API straight
3. get zef up to speed
4. continue with the metacpan fork for perl6 (jdv79)
1. fix EVAL precomp bug (nine)
2. get Repository API straight
3. get zef up to speed
4. continue with the metacpan fork for perl6 (jdv79)
The repository with jdv's fork can be found at L<https://github.com/jdv/metacpan-web>
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/mop.pod
Expand Up @@ -47,7 +47,7 @@ uses such calls to meta objects.
These are introspective macros that resemble method calls.
Metamethods are generally named with ALLCAPS, and it is considered good
style to avoid using your own methods with ALLCAPS names. This will avoid
style to avoid creating your own methods with ALLCAPS names. This will avoid
conflicts with any metamethods that may appear in future versions of the
language. Note that if you really must use a method which has an ALLCAPS
name, use quotes around the method name to safely call it indirectly:
Expand Down Expand Up @@ -146,7 +146,7 @@ primitives that the virtual machine under NQP provides.
Since the object model is bootstrapped in terms of lower-level types,
introspection can sometimes return low-level types instead of the ones you
expect, like a NQP-level routine instead of normal L<Routine|/type/Routine>
expect, like an NQP-level routine instead of a normal L<Routine|/type/Routine>
object, or a bootstrap-attribute instead of L<Attribute|/type/Attribute>.
=head2 Composition time and static reasoning
Expand Down
68 changes: 34 additions & 34 deletions doc/Language/objects.pod
Expand Up @@ -572,7 +572,7 @@ providing a method of the same name in the class.
This is much safer than multiple inheritance, where conflicts are never
detected by the compiler, but are instead simply resolved to the superclass
that appears earlier in the method resolution order, which might or might not be what the
that appears earlier in the method resolution order, which might not be what the
programmer wanted.
For example, if you've discovered an efficient method to ride cows, and are
Expand Down Expand Up @@ -791,51 +791,51 @@ the normal rules of multi dispatch apply for choosing multi candidates.
=head2 Mixins of Roles
Roles can be mixed into objects. A roles given attributes and methods will be
added to the methods and attributes the object already got. Multiple mixins and
Roles can be mixed into objects. A role's given attributes and methods will be
added to the methods and attributes the object already has. Multiple mixins and
anonymous roles are supported.
role R { method Str() {'hidden!'} };
my $i = 2 but R;
sub f(\bound){ put bound };
role R { method Str() {'hidden!'} };
my $i = 2 but R;
sub f(\bound){ put bound };
f($i); # hidden!
Note that the object got the role mixed in, not the objects class or the
Note that the object got the role mixed in, not the object's class or the
container. Thus @-sigiled containers will require binding to make the role
stick. Some operators will return a new value, resulting in the mixin to be
stripped as well.
Mixins can happen at any time of your objects life.
# A counter for Table of Contents
role TOC-Counter {
has Int @!counters is default(0);
method Str () { @!counters.join: '.' }
method inc ($level) {
@!counters[$level - 1]++;
@!counters.splice($level);
self
}
}
my Num $toc-counter = NaN; # don't do maths with Not A Number
say $toc-counter; # NaN
$toc-counter does TOC-Counter; # now we mix the role in
$toc-counter.inc(1).inc(2).inc(2).inc(1).inc(2).inc(2).inc(3).inc(3);
put $toc-counter / 1; # NaN (because that's numerical context)
put $toc-counter; # 2.2.2 (put will call TOC-Counter::Str)
stick. Some operators will return a new value, which effectively strips
the mixin from the result.
Mixins can happen at any time of your object's life.
# A counter for Table of Contents
role TOC-Counter {
has Int @!counters is default(0);
method Str () { @!counters.join: '.' }
method inc ($level) {
@!counters[$level - 1]++;
@!counters.splice($level);
self
}
}
my Num $toc-counter = NaN; # don't do maths with Not A Number
say $toc-counter; # NaN
$toc-counter does TOC-Counter; # now we mix the role in
$toc-counter.inc(1).inc(2).inc(2).inc(1).inc(2).inc(2).inc(3).inc(3);
put $toc-counter / 1; # NaN (because that's numerical context)
put $toc-counter; # 2.2.2 (put will call TOC-Counter::Str)
Roles can by anonymous.
my %seen of Int is default(0 but role :: { method Str() {'NULL'} });
say %seen<not-there>; # NULL
say %seen<not-there>.defined; # True (0 may be False but is well defined)
say Int.new(%seen<not-there>); # 0
my %seen of Int is default(0 but role :: { method Str() {'NULL'} });
say %seen<not-there>; # NULL
say %seen<not-there>.defined; # True (0 may be False but is well defined)
say Int.new(%seen<not-there>); # 0
=head1 Meta-Object Programming and Introspection
Perl 6 has a meta object system, which means that the behavior of objects,
classes, roles, grammars, enums etc. are themselves controlled by other
classes, roles, grammars, enums, etc. are themselves controlled by other
objects; those objects are called I<meta objects>. Meta objects are, like
ordinary objects, instances of classes, in this case we call them I<meta
classes>.
Expand Down
4 changes: 2 additions & 2 deletions doc/Type/IO/Handle.pod
Expand Up @@ -36,7 +36,7 @@ Returns L<Bool::True> if the read operations have exhausted the content of the f
method lines($limit = Inf)
Return a lazy list of the file's lines read via L<get>, limited to C<$limit> lines.
The new line separator (e.g. $*IN.nl-in) will be excluded.
The new line separator (i.e., C<$*IN.nl-in>) will be excluded.
=for code :allow<B>
my @data;
Expand Down Expand Up @@ -106,7 +106,7 @@ characters.
method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence --> True)
Move the file pointer (that is the position at which any subsequent read
Move the file pointer (that is, the position at which any subsequent read
or write operations will begin,) to the byte position specified by
C<$offset> relative to the location specified by C<$whence> which may be
one of:
Expand Down

0 comments on commit 331bdb9

Please sign in to comment.