diff --git a/S01-overview.pod b/S01-overview.pod index 971aea8b7..d7cf5b188 100644 --- a/S01-overview.pod +++ b/S01-overview.pod @@ -9,8 +9,8 @@ Synopsis 1: Overview Created: 10 Aug 2004 - Last Modified: 2 Mar 2012 - Version: 9 + Last Modified: 11 Feb 2015 + Version: 10 This document originally summarized Apocalypse 1, which covers the initial design concept. That original summary may be found below @@ -105,7 +105,6 @@ code in some other way, such as by: #!/usr/bin/perl6 use v6.0; - v6; Also, a file with a C<.p6> extension may be taken as indicative, as may any other extension containing the digit C<6>, such as C @@ -141,13 +140,14 @@ also choose to implement bug-for-bug compatibility. Scaling is one of those areas where Perl needs to be multiparadigmatic and context sensitive. Perl 5 code is not strict by default, while -Perl 6 code is. But it should be easy to relax with C<-e> or -a bare version number: +Perl 6 code is. But it should be easy to relax with C<-e> or the +'no strict' pragma: perl -e '$x = 1' #!/usr/bin/perl - v6; $x = 1; + no strict; + $x = 1; =item * diff --git a/S11-modules.pod b/S11-modules.pod index 9dbc1a15c..aa7fcfc83 100644 --- a/S11-modules.pod +++ b/S11-modules.pod @@ -8,8 +8,8 @@ Synopsis 11: Compilation Units Created: 27 Oct 2004 - Last Modified: 15 Mar 2014 - Version: 42 + Last Modified: 11 Feb 2015 + Version: 43 =head1 Overview @@ -598,17 +598,11 @@ To lock the semantics to 6.0.0, say one of: use v6.0.0; In any of those cases, strictures and warnings are the default -in your main program. But if you start your program with a bare -version number or other literal: +in your main program. To start it in I mode, start it with - v6.0.0; - v6; - 6; - "Coolness, dude!"; + no strict; -it runs Perl 6 in I mode, without strictures or warnings, since obviously -a bare literal in a sink (void) context I to have produced a "Useless use of..." warning. -(Invoking perl with C<-e '6;'> has the same effect.) +(Invoking perl with C<-e> has the same effect.) In the other direction, to inline Perl 5 code inside a Perl 6 program, put C at the beginning of a lexical block. Such blocks can nest arbitrarily diff --git a/S17-concurrency.pod b/S17-concurrency.pod index 9927da84b..1aaf3317d 100644 --- a/S17-concurrency.pod +++ b/S17-concurrency.pod @@ -346,7 +346,7 @@ The simplest Supply is a C class, which is punned from the role. It crea $s.emit(2); # 2\n my $t2 = $s.tap({ say 2 * $_ }, - { say "End" }); + :done({ say "End" })); $s.emit(3); # 3\n6\n The object returned by C represents the subscription. To stop subscribing, call C on it. diff --git a/S19-commandline.pod b/S19-commandline.pod index 0ffae9056..d475846a2 100644 --- a/S19-commandline.pod +++ b/S19-commandline.pod @@ -420,12 +420,11 @@ Note: The debugger needs further specification. =item --execute, -e *line* -Execute a single-line program. +Execute a single-line program in lax mode. -If you wish to run in lax mode, without strictures and warnings enabled, -pass a value of '6;' at the start of the -e on the command line, -like C<-e '6; $x = 42'>. -See L for details. +If you don't wish to run in lax mode, but with strictures and warnings enabled, +pass 'use strict;' at the -e on the command line, +like C<-e 'use strict; my $x = 42'>. =item --autoloop-delim, -F *expression* diff --git a/S32-setting-library/Numeric.pod b/S32-setting-library/Numeric.pod index 0879d5864..dc38f4732 100644 --- a/S32-setting-library/Numeric.pod +++ b/S32-setting-library/Numeric.pod @@ -8,14 +8,10 @@ DRAFT: Synopsis 32: Setting Library - Numeric Created: 19 Mar 2009 extracted from S29-functions.pod - Last Modified: 28 Dec 2013 - Version: 18 + Last Modified: 13 Feb 2015 + Version: 19 -The document is a draft. - -This documents Bit, Int, Numeric, Rat, Complex, and Bool. - -XXX So where are Bit, Int, and Rat +This documents Int, Numeric, Rat, Complex, and Bool. =head1 Function Packages @@ -237,7 +233,7 @@ number, so for example, the C C<5/4> is returned as C<"1.2">. =item base - multi method base(Cool $base as Int) + multi method base($base, $digits?) Returns a C representing the invocant in base C<$base>. Fails if C<$base> is smaller than C<2> or larger than C<36>. @@ -245,6 +241,14 @@ is smaller than C<2> or larger than C<36>. For bases above ten, the digit repertoire is enhanced with uppercase latin characters starting from C. +The optional C<$digits> argument asks for that many digits of fraction +(which may not be negative). If omitted, a reasonable default is chosen +based on type. For Int this default is 0. For Num, the default is 8. +For Rat, the number of places is scaled to the size of the denominator, +with a minimum of 6. + +The final digit produced is always rounded. + =item floor multi method floor ( Real $x: --> Int ) is export @@ -623,6 +627,21 @@ the form "C<< <3/5> >>", without internal spaces, and including the angles that keep the C from being treated as a normal division operator. +=item base-repeating + + multi method base-repeating($base) + +Returns two strings representing the invocant in base C<$base>. Fails if C<$base> +is smaller than C<2> or larger than C<36>. + +For bases above ten, the digit repertoire is enhanced with uppercase latin +characters starting from C. + +The first returned string is the non-repeating part of the representation. +The second is the repeating part. The precision is arbitrarily limited to 100000. +Above that, the repeating group will return '???'. If there is no repeating group, +the second returned string is C<''>. + =back =head1 AUTHORS