Skip to content

Commit 1fdc6ed

Browse files
committed
Extensive word substitution and reflow
1 parent 266d9f0 commit 1fdc6ed

File tree

8 files changed

+59
-53
lines changed

8 files changed

+59
-53
lines changed

doc/Language/5to6-perlfunc.pod6

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
77
=head1 DESCRIPTION
88
9-
A (hopefully) comprehensive list of Perl 5 builtin functions with their
10-
Perl 6 equivalents with notes on variations between them where
11-
necessary.
9+
A (hopefully) comprehensive list of Perl 5 builtin functions with their Perl 6
10+
equivalents with notes on variations between them where necessary.
1211
1312
=head1 NOTE
1413
@@ -52,8 +51,8 @@ readable using smartmatch:
5251
5352
'/path/to/file'.IO ~~ :r
5453
55-
You can, of course, use an already opened filehandle. Here, using the file
56-
handle C<$fh>, is an example, using the method syntax for the file test:
54+
You can, of course, use an already opened filehandle. Here, using the filehandle
55+
C<$fh>, is an example, using the method syntax for the file test:
5756
5857
=for code :preamble<my $fh;>
5958
$fh.r

doc/Language/exceptions.pod6

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
55
=SUBTITLE Using exceptions in Perl 6
66
7-
Exceptions in Perl 6 are objects that hold information about errors.
8-
An error can be, for example, the unexpected receiving of data or a
9-
network connection no longer available, or a missing file.
10-
The information that an exception objects store is, for instance,
11-
a human-readable message about the error condition, the backtrace
12-
of the raising of the error, and so on.
7+
Exceptions in Perl 6 are objects that hold information about errors. An error
8+
can be, for example, the unexpected receiving of data or a network connection no
9+
longer available, or a missing file. The information that an exception objects
10+
store is, for instance, a human-readable message about the error condition, the
11+
backtrace of the raising of the error, and so on.
1312
1413
All built-in exceptions inherit from L<Exception>, which provides some basic
1514
behavior, including the storage of a backtrace and an interface for the
@@ -61,9 +60,9 @@ Here, we are saying that if any exception of type C<X::IO> occurs, then the
6160
message C<some kind of IO exception was caught!> will be sent to I<stderr> and
6261
displayed.
6362
64-
A X<C<CATCH>|CATCH> block uses smartmatching similar to how C<given/when> smart
65-
matches on options, thus it's possible to catch and handle various categories of
66-
exceptions inside a C<when> block.
63+
A X<C<CATCH>|CATCH> block uses smartmatching similar to how C<given/when>
64+
smartmatches on options, thus it's possible to catch and handle various
65+
categories of exceptions inside a C<when> block.
6766
6867
To handle all exceptions, use a C<default> statement. This example prints out
6968
almost the same information as the normal backtrace printer.

doc/Language/faq.pod6

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ X<|Rakudo and Perl 6 (FAQ)>
1111
1212
Properly speaking, L<Rakudo|http://rakudo.org/> is an implementation of Perl 6.
1313
It's currently the most developed, but there have been other implementations in
14-
the past and there will likely be others in the future. Perl 6 is the
15-
definition of the language. Often, Rakudo and Perl 6 will be used
16-
interchangeably.
14+
the past and there will likely be others in the future. Perl 6 is the definition
15+
of the language. Often, Rakudo and Perl 6 will be used interchangeably.
1716
1817
=head2 Has Perl 6 been released?
1918
@@ -739,15 +738,22 @@ them offer all.
739738
740739
=item High level concurrency model, both for implicit as well as explicit multi-processing, which goes way beyond primitive threads and locks. Perl 6's concurrency offers a rich set of (composable) tools.
741740
742-
=item Multiple-core computers are getting used more and more, and with Perl 6 these can be used thanks to parallelism, both implicit (e.g., with the >>. method) and explicit ( start { code } ). This is important, because Moore's Law is ending.
741+
=item Multiple-core computers are getting used more and more, and with Perl 6
742+
these can be used thanks to parallelism, both implicit (e.g., with the C«>>».
743+
method) and explicit ( C<start { code }> ). This is important, because Moore's
744+
Law is ending.
743745
744746
=item Structured language support is provided to enable programming for asynchronous execution of code.
745747
746-
=item Supplies allow code to be executed when something happens (like a timer, or a signal, or a file-system event).
748+
=item Supplies allow code to be executed when something happens (like a timer,
749+
or a signal, or a filesystem event).
747750
748-
=item react / whenever / supply keywords allows easy construction of interactive, event driven applications.
751+
=item react / whenever / supply keywords allows easy construction of
752+
interactive, event driven applications.
749753
750-
=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.
754+
=item Lazy evaluation when possible, eager evaluation when wanted or necessary.
755+
This means, for example, lazy lists, and even infinite lazy lists, like the
756+
Fibonacci sequence, or all prime numbers.
751757
752758
=item Native data types for faster, closer to the metal, processing.
753759

doc/Language/objects.pod6

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ Perl 6 provides strong support for L<Object Oriented Programming (OOP)|https://
88
Although Perl 6 allows programmers to program in multiple paradigms,
99
Object Oriented Programming is at the heart of the language.
1010
11-
Perl 6 comes with a wealth of predefined types, which can be classified in
12-
two categories: normal and I<native> types.
13-
Everything that you can store in a variable is either a I<native value> or an
14-
I<object>. That includes literals, types (type objects), code and containers.
11+
Perl 6 comes with a wealth of predefined types, which can be classified in two
12+
categories: normal and L<I<native> types|/language/nativetypes>. Everything that
13+
you can store in a variable is either a I<native value> or an I<object>. That
14+
includes literals, types (type objects), code and containers.
1515
16-
17-
Native types are used for low-level types (like C<uint64>).
18-
Even if I<native> types do not have the same capabilities as objects,
19-
if you call methods on them, they are automatically I<boxed> into normal objects.
16+
Native types are used for low-level types (like C<uint64>). Even if I<native>
17+
types do not have the same capabilities as objects, if you call methods on them,
18+
they are automatically I<boxed> into normal objects.
2019
2120
Everything that is not a I<native> value is an <object>.
2221
Objects do allow for both L<inheritance|https://en.wikipedia.org/wiki/Object-oriented_programming#Inheritance_and_behavioral_subtyping> and L<encapsulation|https://en.wikipedia.org/wiki/Object-oriented_programming#Encapsulation>.
@@ -63,9 +62,8 @@ unambiguously a method call without an argument list:
6362
say 4.log: +2; # OUTPUT: «2␤» ( base-2 logarithm of 4 )
6463
say 4.log +2; # OUTPUT: «3.38629436111989␤» ( natural logarithm of 4, plus 2 )
6564
66-
Many operations that don't look like method calls (for example, smart
67-
matching, or interpolating an object into a string) result in method calls
68-
under the hood.
65+
Many operations that don't look like method calls (for example, smartmatching or
66+
interpolating an object into a string) result in method calls under the hood.
6967
7068
Methods can return mutable containers, in which case you can assign to the
7169
return value of a method call. This is how read-writable attributes to

doc/Language/regexes.pod6

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ character.
244244
245245
=head2 X«Unicode Properties|regex,<:property>»
246246
247-
The character classes mentioned so far are mostly for convenience;
248-
another approach is to use Unicode character properties. These come in
249-
the form C«<:property>», where C<property> can be a short or long
250-
Unicode General Category name. These use pair syntax.
247+
The character classes mentioned so far are mostly for convenience; another
248+
approach is to use Unicode character properties. These come in the form
249+
C«<:property>», where C<property> can be a short or long Unicode General
250+
Category name. These use pair syntax.
251251
252252
To match against a Unicode property you can use either smartmatch or L<C<uniprop>|/routine/uniprop>:
253253
@@ -746,7 +746,7 @@ X«C<\b>|regex deprecated,\b» of other languages.
746746
To match not a word boundary, use C«<!|w>» or C«<!wb>». This is similar to
747747
X«C<\B>|regex deprecated,\B» of other languages.
748748
749-
These are both zero width regex elements.
749+
These are both zero-width regex elements.
750750
751751
say "two-words" ~~ / two<|w>\-<|w>words /; # OUTPUT: «「two-words」␤»
752752
say "twowords" ~~ / two<!|w><!|w>words /; # OUTPUT: «「twowords」»
@@ -763,7 +763,7 @@ C«>>» matches a right word boundary. It matches positions where there
763763
is a word character at the left and a non-word character at the right, or
764764
the end of the string.
765765
766-
These are both zero width regex elements.
766+
These are both zero-width regex elements.
767767
768768
my $str = 'The quick brown fox';
769769
say so ' ' ~~ /\W/; # OUTPUT: «True␤»

doc/Language/unicode.pod6

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ L<MoarVM string documentation|https://github.com/MoarVM/MoarVM/blob/master/docs/
1616
X<|Normalization>
1717
=head2 Normalization
1818
19-
Perl6 applies normalization by default to all input and output except for
20-
file names which are stored as L<C<UTF8-C8>|#UTF8-C8>; graphemes, which are user-visible forms of the characters, will use a normalized representation.
21-
What does this mean? For example, the grapheme C<á> can be represented in two ways, either using
22-
one codepoint:
19+
Perl 6 applies normalization by default to all input and output except for file
20+
names which are stored as L<C<UTF8-C8>|#UTF8-C8>; graphemes, which are
21+
user-visible forms of the characters, will use a normalized representation. What
22+
does this mean? For example, the grapheme C<á> can be represented in two ways,
23+
either using one codepoint:
2324
2425
=for code :lang<text>
2526
á (U+E1 "LATIN SMALL LETTER A WITH ACUTE")
@@ -54,11 +55,12 @@ X<|UTF8-C8>
5455
=head2 UTF8-C8
5556
5657
X<UTF-8 Clean-8> is an encoder/decoder that primarily works as the UTF-8 one.
57-
However, upon encountering a byte sequence that will either not decode as
58-
valid UTF-8, or that would not round-trip due to normalization, it will use
59-
L<NFG synthetics|/language/glossary#NFG> to keep track of the original bytes involved. This means that
60-
encoding back to UTF-8 Clean-8 will be able to recreate the bytes as they
61-
originally existed. The synthetics contain 4 codepoints:
58+
However, upon encountering a byte sequence that will either not decode as valid
59+
UTF-8, or that would not round-trip due to normalization, it will use
60+
L<NFG synthetics|/language/glossary#NFG>
61+
to keep track of the original bytes involved.
62+
This means that encoding back to UTF-8 Clean-8 will be able to recreate the
63+
bytes as they originally existed. The synthetics contain 4 codepoints:
6264
6365
=item The codepoint 0x10FFFD (which is a private use codepoint)
6466
=item The codepoint 'x'
@@ -69,12 +71,14 @@ Under normal UTF-8 encoding, this means the unrepresentable characters will
6971
come out as something like C<?xFF>.
7072
7173
UTF-8 Clean-8 is used in places where MoarVM receives strings from the
72-
environment, command line arguments, and file system queries, for instance when decoding buffers:
74+
environment, command line arguments, and filesystem queries, for instance when decoding buffers:
7375
7476
say Buf.new(ord('A'), 0xFE, ord('Z')).decode('utf8-c8');
7577
# OUTPUT: «A􏿽xFEZ␤»
7678
77-
You can see how the two initial codepoints used by UTF8-C8 show up here, right before the "FE". You can use this type of encoding to read files with unknown encoding:
79+
You can see how the two initial codepoints used by UTF8-C8 show up here, right
80+
before the "FE". You can use this type of encoding to read files with unknown
81+
encoding:
7882
7983
my $test-file = "/tmp/test";
8084
given open($test-file, :w, :bin) {

doc/Type/IO/Path.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The workhorse of IO operations.
1111
1212
Conceptually, an C<IO::Path> object consists of a volume, a directory, and a
1313
basename. It supports both purely textual operations, and operations that access
14-
the file system, e.g. to resolve a path, or to read all content of a file.
14+
the filesystem, e.g. to resolve a path, or to read all content of a file.
1515
1616
At creation, each C<IO::Path> object is given information about the current
1717
working directory the path might be relative to using the C<$.CWD> attribute
@@ -170,7 +170,7 @@ cleaning up any extraneous path parts:
170170
IO::Path::Win32.new("foo/./././..////bar")
171171
.cleanup.say; "foo\..\bar".IO; # OUTPUT: «"foo\..\bar".IO␤»
172172
173-
Note that no file system access is made. See also
173+
Note that no filesystem access is made. See also
174174
L«C<resolve>|/routine/resolve».
175175
176176
=head2 method comb
@@ -450,7 +450,7 @@ Defined as:
450450
multi method parent(IO::Path:D: --> IO::Path:D)
451451
multi method parent(IO::Path:D: UInt:D $level --> IO::Path:D)
452452
453-
Returns the parent path of the invocant. Note that no file system access
453+
Returns the parent path of the invocant. Note that no filesystem access
454454
is made, so the returned parent is physical and not the logical parent of
455455
symlinked directories.
456456

doc/Type/Supply.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ L<RT #132012|https://rt.perl.org/Ticket/Display.html?id=132012>
789789
method watch-path($path --> Supply:D)
790790
791791
Creates a supply to which the OS will emit values to indicate changes on the
792-
file system for the given path. Also has a shortcut with the C<watch> method
792+
filesystem for the given path. Also has a shortcut with the C<watch> method
793793
on an IO object, like this:
794794
795795
=for code

0 commit comments

Comments
 (0)