Re: r29129 - docs/Perl6/Spec

2009-11-19 Thread Thom Boyer
I'm curious about the change from blorst to blast. I quickly figured out
that blorst was
derived from BLock OR STatement (as S04 used to say: In fact,
most of these phasers will take either a block or a statement (known as
a Iblorst in the vernacular)).

The best that I can figure for blast is BLock And STatement. But using
AND
seems less correct to me. Furthermore, blast is less likely to google up
the results I need.

So, what exactly _is_ the derivation of blast?

-- Forwarded message --
From: pugs-comm...@feather.perl6.nl
Date: Wed, Nov 18, 2009 at 9:34 PM
Subject: r29129 - docs/Perl6/Spec
To: perl6-language@perl.org


Author: lwall
Date: 2009-11-19 05:34:29 +0100 (Thu, 19 Nov 2009)
New Revision: 29129

Modified:
  docs/Perl6/Spec/S04-control.pod
Log:
[S04] as several folks have suggested, rename blorst to blast


Modified: docs/Perl6/Spec/S04-control.pod
===
--- docs/Perl6/Spec/S04-control.pod 2009-11-18 18:51:35 UTC (rev 29128)
+++ docs/Perl6/Spec/S04-control.pod 2009-11-19 04:34:29 UTC (rev 29129)
@@ -1226,8 +1226,8 @@
our $temphandle = START maketemp();

 In fact, most of these phasers will take either a block or a statement
-(known as a Iblorst in the vernacular).
-This can be particularly useful to expose a lexically scoped
+(known as a Iblast in the vernacular).  The statement form can be
+particularly useful to expose a lexically scoped
 declaration to the surrounding context.  Hence these declare the same
 variables with the same scope as the preceding example, but run the
 statements as a whole at the indicated time:


Re: r29129 - docs/Perl6/Spec

2009-11-19 Thread jerry gay
On Thu, Nov 19, 2009 at 08:17, Thom Boyer t...@boyers.org wrote:
 I'm curious about the change from blorst to blast. I quickly figured out
 that blorst was
 derived from BLock OR STatement (as S04 used to say: In fact,
 most of these phasers will take either a block or a statement (known as
 a Iblorst in the vernacular)).

 The best that I can figure for blast is BLock And STatement. But using
 AND
 seems less correct to me. Furthermore, blast is less likely to google up
 the results I need.

 So, what exactly _is_ the derivation of blast?

perhaps 'BLock or A STatement' or 'BLock, Alternatively, STatement',
or you can simply think of it as misspelled but nicer on the ears than
the eyes.
~jerry


Re: r29129 - docs/Perl6/Spec

2009-11-19 Thread Geoffrey Broadwell
I kinda like 'blorst'.  The word makes me think of a warm stew on a cold
winter night.  And I agree with the searchability advantage of 'blorst'
as well.

/bikeshed


-'f




Rakudo Perl 6 development release #23 (Lisbon)

2009-11-19 Thread Carl Mäsak
Announce: Rakudo Perl 6 development release #23 (Lisbon)

On behalf of the Rakudo development team, I'm pleased to announce the
November 2009 development release of Rakudo Perl #23 Lisbon.
Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine
(see http://www.parrot.org).  The tarball for the November 2009 release
is available from http://github.com/rakudo/rakudo/downloads

Due to the continued rapid pace of Rakudo development and the frequent
addition of new Perl 6 features and bugfixes, we recommend building Rakudo
from the latest source, available from the main repository at github.
More details are available at http://rakudo.org/how-to-get-rakudo.

Rakudo Perl follows a monthly release cycle, with each release code
named after a Perl Mongers group.  The November 2009 release is code
named Lisbon for Lisbon.pm, who did a marvellous job arranging this
year's YAPC::EU.

Shortly after the October 2009 (#22) release, the Rakudo team
began a new branch of Rakudo development (ng) that refactors
the grammar to much more closely align with STD.pm as well as
update some core features that have been difficult to achieve
in the master branch [1, 2].  Most of our effort for the past month
has been in this new branch, but as of the release date the new
version had not sufficiently progressed to be the release copy.
We expect to have the new version in place in the December 2009 release.

This release of Rakudo requires Parrot 1.8.0.  One must still
perform make install in the Rakudo directory before the perl6
executable will run anywhere other than the Rakudo build directory.
For the latest information on building and using Rakudo Perl, see the
readme file section titled Building and invoking Rakudo.

Some of the specific changes and improvements occuring with this
release include:

* Rakudo is now passing 32,753 spectests, an increase of 171 passing
  tests since the October 2009 release.  With this release Rakudo is
  now passing 85.5% of the available spectest suite.

* As mentioned above, most development effort for Rakudo in November
  has taken place in the ng branch, and will likely be reflected
  in the December 2009 release.

* Rakudo now supports unpacking of arrays, hashes and objects in
  signatures

* Rakudo has been updated to use Parrot's new internal calling conventions,
  resulting in a slight performance increase.

The development team thanks all of our contributors and sponsors for
making Rakudo Perl possible.  If you would like to contribute,
see http://rakudo.org/how-to-help , ask on the perl6-compi...@perl.org
mailing list, or ask on IRC #perl6 on freenode.

The next release of Rakudo (#24) is scheduled for December 17, 2009.
A list of the other planned release dates and codenames for 2009 is
available in the docs/release_guide.pod file.  In general, Rakudo
development releases are scheduled to occur two days after each
Parrot monthly release.  Parrot releases the third Tuesday of each month.

Have fun!

[1] http://use.perl.org/~pmichaud/journal/39779
[2] http://use.perl.org/~pmichaud/journal/39874


r29134 - docs/Perl6/Spec

2009-11-19 Thread pugs-commits
Author: lwall
Date: 2009-11-20 03:40:33 +0100 (Fri, 20 Nov 2009)
New Revision: 29134

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S04-control.pod
Log:
[S02,3,4] attempt to rename void context to sink context and see if it clogs


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-11-19 21:58:32 UTC (rev 29133)
+++ docs/Perl6/Spec/S02-bits.pod2009-11-20 02:40:33 UTC (rev 29134)
@@ -1105,21 +1105,21 @@
 
 Since the construct is in the form of a type cast, the parens are required.
 If that syntax is unappealing or you wish to run multiple statements
-in a block, it happens that the Cvoid statement prefix also converts
+in a block, it happens that the Csink statement prefix also converts
 any value to CNil, so the examples above can be expressed
 without parentheses:
 
-@inclist = map { $_ + 1 }, @list || void warn 'Empty @list!';
+@inclist = map { $_ + 1 }, @list || sink warn 'Empty @list!';
 
-@inclist = do for @list || void { warn 'Empty @list!'; $warnings++; } {
+@inclist = do for @list || sink { warn 'Empty @list!'; $warnings++; } {
 $_ + 1;
 }
 
-@inclist = do map { $_ + 1 }, @list or void warn 'Empty @list!';
+@inclist = do map { $_ + 1 }, @list or sink warn 'Empty @list!';
 
 @inclist = do for @list {
 $_ + 1;
-} or void { warn 'Empty @list!'; $warnings++; }
+} or sink { warn 'Empty @list!'; $warnings++; }
 
 =head2 Immutable types
 
@@ -3805,7 +3805,7 @@
 
 =item *
 
-Perl still has the three main contexts: void, item (scalar), and list.
+Perl still has the three main contexts: sink (void), item (scalar), and list.
 
 =item *
 

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-11-19 21:58:32 UTC (rev 29133)
+++ docs/Perl6/Spec/S03-operators.pod   2009-11-20 02:40:33 UTC (rev 29134)
@@ -2682,7 +2682,7 @@
 
 $a = 1, 2, 3;
 
-because the 2 and 3 will be seen as being in a void context, as if
+because the 2 and 3 will be seen as being in a sink (void) context, as if
 you'd said:
 
 ($a = 1), 2, 3;

Modified: docs/Perl6/Spec/S04-control.pod
===
--- docs/Perl6/Spec/S04-control.pod 2009-11-19 21:58:32 UTC (rev 29133)
+++ docs/Perl6/Spec/S04-control.pod 2009-11-20 02:40:33 UTC (rev 29134)
@@ -678,23 +678,23 @@
 
 A variant of Cdo is Cgather.  Like Cdo, it is followed by a
 statement or block, and executes it once.  Unlike Cdo, it evaluates
-the statement or block in void context; its return value is instead
+the statement or block in sink (void) context; its return value is instead
 specified by calling the Ctake list prefix operator one or more times
 within the dynamic scope of the Cgather.  The Ctake function's
 signature is like that of Creturn; it merely captures the CCapture
 of its arguments without imposing any additional constraints (in the
 absence of context propagation by the optimizer).  The value returned
 by the Ctake to its own context is that same CCapture object (which
-is ignored when the Ctake is in void context).  Regardless of the
+is ignored when the Ctake is in sink context).  Regardless of the
 Ctake's context, the CCapture object is also added to the list of
 values being gathered, which is returned by the Cgather in the form
 of a lazy slice, with each slice element corresponding to one Ctake
 capture.  (A list of CCaptures is lazily flattened in normal list context,
 but you may unflatten it again with a C@@() contextualizer.)
 
-Because Cgather evaluates its block or statement in void context,
-this typically causes the Ctake function to be evaluated in void
-context.  However, a Ctake function that is not in void context
+Because Cgather evaluates its block or statement in sink context,
+this typically causes the Ctake function to be evaluated in sink
+context.  However, a Ctake function that is not in sink context
 gathers its arguments Ien passant and also returns them unchanged.
 This makes it easy to keep track of what you last took:
 
@@ -727,8 +727,8 @@
 # @@$c produces (1,10),(2,20) -- list of Captures, a 2-D list.
 # $$c produces ((1,10),(2,20)) -- the saved Capture itself as one item in 
item context.
 
-Note that the Ctake itself is in void context in this example because
-the Cfor loop is in void context.
+Note that the Ctake itself is in sink context in this example because
+the Cfor loop is in sink context.
 
 A Cgather is not considered a loop, but it is easy to combine with a loop
 statement as in the examples above.
@@ -784,7 +784,7 @@
 Xdo
 
 Other similar forms, where a keyword is followed by code to be controlled by 
it, may also take bare statements,
-including Ctry, Cquietly, Ccontend, Casync, Clazy, and Cvoid.  
These constructs
+including Ctry, 

r29140 - docs/Perl6/Spec

2009-11-19 Thread pugs-commits
Author: lwall
Date: 2009-11-20 05:31:36 +0100 (Fri, 20 Nov 2009)
New Revision: 29140

Modified:
   docs/Perl6/Spec/S12-objects.pod
Log:
[S12] start process of distingishing abstract ~ from concrete .Str
(likewise for + vs .Num)


Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2009-11-20 04:24:48 UTC (rev 29139)
+++ docs/Perl6/Spec/S12-objects.pod 2009-11-20 04:31:36 UTC (rev 29140)
@@ -1889,7 +1889,7 @@
 
 Metamethods for objects are named with interrogative pronouns in uppercase:
 
-WHATthe type object of the type, stringifies to short name ~ '()'
+WHATthe type object of the type, .Str returns MyClass()
 WHICH   the object's identity value
 WHO the package supporting the object, stringifies to long name
 WHERE   the memory address of the object
@@ -1922,10 +1922,14 @@
 as the first argument to methods of the metaclass, while the other
 forms require you to pass this explicitly.
 
-Note that CWHAT appends C() to indicate emptiness.  Use C.perl to get the
-bare name from a type object.
+Note that CWHAT.Str appends C() to the name to indicate emptiness.
+Use C.perl to get the bare name from a type object.  Use one of
+C.Stringy, C prefix:~ , or C infix:~  to get the Perl5ish
+semantics of returning the empty string (with a warning) on any type
+object.  (There is no undef, in Perl 6; type objects provide typed
+undefs instead.)
 
-In general, use of these in ordinary code should be a red flag that
+In general, use of these uppercased accessors in ordinary code should be a red 
flag that
 Something Very Strange is going on.  (Hence the allcaps.)  Most code
 should use Perl 6's operators that make use of this information
 implicitly.  For instance, instead of



r29141 - docs/Perl6/Spec

2009-11-19 Thread pugs-commits
Author: lwall
Date: 2009-11-20 05:34:57 +0100 (Fri, 20 Nov 2009)
New Revision: 29141

Modified:
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S09-data.pod
Log:
[S06,S09] rename 'is ref' to 'is parcel' and make it synonymous with \


Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2009-11-20 04:31:36 UTC (rev 29140)
+++ docs/Perl6/Spec/S06-routines.pod2009-11-20 04:34:57 UTC (rev 29141)
@@ -16,8 +16,8 @@
 
 Created: 21 Mar 2003
 
-Last Modified: 12 Nov 2009
-Version: 123
+Last Modified: 19 Nov 2009
+Version: 124
 
 This document summarizes Apocalypse 6, which covers subroutines and the
 new type system.
@@ -480,9 +480,9 @@
 If you have a readonly parameter C$ro, it may never be passed on to
 a Crw parameter of a subcall, whether or not C$ro is currently
 bound to a mutable object.  It may only be rebound to readonly or
-copy parameters.  It may also be rebound to a Cref parameter (see
-Cis ref below), but modification will fail as in the case where
-an immutable value is bound to a Cref parameter.
+copy parameters.  It may also be rebound to a parcel parameter (see
+Cis parcel below), but modification will fail as in the case where
+an immutable value is bound to a Cparcel parameter.
 
 Aliases of C$ro are also readonly, whether generated explicitly with C:=
 or implicitly within a CCapture object (which are themselves immutable).
@@ -1593,7 +1593,7 @@
 other placeholders or signature.  Any bare block without placeholders
 really has a parameter like this:
 
-- $_ is ref = OUTER::$_ { .mumble }
+- \$_ = OUTER::$_ { .mumble }
 
 (However, statement control Cif notices this and passes no argument,
 so C$_ ends up being bound to the outer C$_ anyway.)
@@ -1997,14 +1997,28 @@
 (The variadic array as a whole is always modifiable, but such
 modifications have no effect on the original argument list.)
 
-=item Cis ref
+=item Cis parcel
 
-Specifies that the parameter is passed by reference (that is,
-as an CObject).  You may modify the argument, but only if
-argument is already a suitable lvalue.  Unlike Crw, no attempt
-at autovivification is made, so unsuitable lvalues will throw an
-exception if you try to modify them within the body of the routine.
+Specifies that the parameter is passed as a parcel, that is, as a
+raw reference to a parenthetical cell or parse list, an argument
+object that has not yet had a context imposed.  (It may or may not
+actually be of the CParcel type, since a CParcel containing only
+one object automatically unwraps itself to be that object directly.)
+In other words, this provides for lazy contextualization even through
+function calls.  This is important if you wish to pass the parameter
+onward to something else that will determine its context later.
 
+You may modify the argument, but only if argument is already a suitable
+lvalue since, unlike Crw, no attempt at autovivification is made,
+so unsuitable lvalues will throw an exception if you try to modify
+them within the body of the routine.  That is, if autovivification
+happens, it happens at the point of use, not at the point of binding.
+
+For better visual distinction, such a parameter is declared by
+prefixing with a backslash rather than by using Cis parcel directly.
+The backslash is also more succint; the trait is there primarily
+for introspection.
+
 =item Cis copy
 
 Specifies that the parameter receives a distinct, read-writable copy of the
@@ -2039,9 +2053,9 @@
   readonly   True if the parameter has Cis readonly trait
   rw True if the parameter has Cis rw trait
   copy   True if the parameter has Cis copy trait
-  refTrue if the parameter has Cis ref trait
   named  True if the parameter is to be passed named
   named_namesList of names a named parameter can be passed as
+  parcel True if the parameter is too lazy to contextualize
   slurpy True if the parameter is slurpy
   optional   True if the parameter is optional
   defaultA closure returning the default value

Modified: docs/Perl6/Spec/S09-data.pod
===
--- docs/Perl6/Spec/S09-data.pod2009-11-20 04:31:36 UTC (rev 29140)
+++ docs/Perl6/Spec/S09-data.pod2009-11-20 04:34:57 UTC (rev 29141)
@@ -829,7 +829,7 @@
 Within any kind of bracketing construct, semicolon notionally separates
 the sublists of a multidimensional slice, the interpretation of
 which depends on the context.  Such a semicolon list puts each of its
-sublists into a CCapture, deferring the context of the sublist until
+sublists into a CParcel, deferring the context of the sublist until
 it is bound somewhere.  The storage of these sublists is hidden in
 the inner workings of the list.  It does not produce a list of lists
 unless the list as a whole is bound into a slice context.
@@ -1245,8 +1245,8 

Re: r29111 - docs/Perl6/Spec

2009-11-19 Thread Darren Duncan

Darren Duncan wrote:

Moritz Lenz wrote:

FatRat.new(45207196, 10**37);

And note that a decimal-specific answer isn't what I want, since I 
want  something that would also work for this:


  45207196 * 11 ** -37


FatRat.new(45207196, 11**37);


Solomon Foster wrote:

What's your objection to FatRat.new(45207196, 11 ** 37)?


Well, for one thing, that's not the same value.  I had a -37 as the 
exponent, designating a small non-integer rational value, whereas the 
FatRat example had flipped this around to 37, not the same value.


Now I'm sure the format you showed looks great, but my concern is, does 
simply saying this:


  11 ** -37

... result in a FatRat and if not then how do I write 11^-37 in Perl 6 
such that the resulting object retains the full precision of the value?


Actually, I realize now what was going on with that suggestion, and that it 
actually was valid for the case I mentioned, being presumably equal to:


  45207196 * FatRat.new( 1, 11**37 )

However, the ideal situation would be a format I could use unchanged regardless 
of whether the exponent (-37) is positive or negative.


Unless there is one, it would seem I might have to do this in a generic setting, 
given 3 integers $mantis, $radix, $exp but $radix is always = 2:


  $exp  0 ?? FatRat.new( $mantis, $radix**$exp ) !! $mantis * $radix**$exp

What I think might be ideal though is if the FatRat.new() could be a multi that 
also has a 3-param variant, so that something like this would work:


  FatRat.new( $mantissa, $radix, $exponent )

I would be clear that this 3-param variant would be 3 integers, including the 
mantissa, because that guarantees that the new FatRat would be an exact multiple 
of $radix**$exponent.


-- Darren Duncan


r29142 - in docs/Perl6/Spec: . S32-setting-library

2009-11-19 Thread pugs-commits
Author: lwall
Date: 2009-11-20 07:12:28 +0100 (Fri, 20 Nov 2009)
New Revision: 29142

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S04-control.pod
   docs/Perl6/Spec/S05-regex.pod
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S10-packages.pod
   docs/Perl6/Spec/S11-modules.pod
   docs/Perl6/Spec/S16-io.pod
   docs/Perl6/Spec/S17-concurrency.pod
   docs/Perl6/Spec/S19-commandline.pod
   docs/Perl6/Spec/S28-special-names.pod
   docs/Perl6/Spec/S29-functions.pod
   docs/Perl6/Spec/S32-setting-library/IO.pod
Log:
[Spec] slaughter various confusing overloadings of the term 'context'
contextual variables are now dynamic variables
specific dynamic contexts are now just call frames
(for now we've left alone 'context' used as in 'context switching')


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-11-20 04:34:57 UTC (rev 29141)
+++ docs/Perl6/Spec/S02-bits.pod2009-11-20 06:12:28 UTC (rev 29142)
@@ -13,8 +13,8 @@
 
 Created: 10 Aug 2004
 
-Last Modified: 18 Nov 2009
-Version: 190
+Last Modified: 19 Nov 2009
+Version: 191
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -996,7 +996,7 @@
 (However, C@array[**] means the same thing because (as with C...
 above), the subscript operator will interpret bare C** as meaning
 all the subscripts, not the list of dimension sizes.  The meaning of
-CWhatever is always controlled by its immediate context.)
+CWhatever is always controlled by the first context it is bound into.)
 
 Other uses for C* and C** will doubtless suggest themselves
 over time.  These can be given meaning via the MMD system, if not
@@ -1640,7 +1640,7 @@
 $.foo   object attribute public accessor
 $^foo   self-declared formal positional parameter
 $:foo   self-declared formal named parameter
-$*foo   contextualizable global variable
+$*foo   dynamically overridable global variable
 $?foo   compiler hint variable
 $=foo   Pod variable
 $foo  match variable, short for $/{'foo'}
@@ -1740,9 +1740,7 @@
 force context, so these also work:
 
 @x[$(g())] # item context for g()
-@x[$ g()]  # item context for g()
 %x{$(g())} # item context for g()
-%x{$ g()}  # item context for g()
 
 But note that these don't do the same thing:
 
@@ -1779,17 +1777,26 @@
 into a CCapture with 3 positionals and one named argument
 in preparation for binding.
 
-=item *
+A parcel may be captured into an object with backslashed parens:
 
-An argument list may be captured into an object with backslashed parens:
-
 $args = \(1,2,3,:miceblind)
 
-Values in a CCapture object are parsed as ordinary expressions, then marked 
as
-positional or named.  If the first positional is followed by a colon instead of
-a comma, it is marked as the invocant in case it finds itself in a context
-that cares.
+Values in the CParcel object are parsed as ordinary expressions,
+and any functions mentioned are called, with their results placed
+as a single subparcel within the outer parcel.  Whether they
+are subsequently flattened will depend on the eventual binding.
 
+=item *
+
+If a CParcel is used as a list of arguments, it will be transformed
+into a CCapture objects, which is much like a CParcel but has its
+arguments divvied up into positional and named subsets for faster
+binding.  (Usually this transformation happens at compile time.)
+If the first positional is followed by a colon instead of a comma,
+it is marked as the invocant in case it finds itself in a context
+that cares.  It's illegal to use the colon in place of the comma
+anywhere except after the first argument.
+
 Like CList objects, CCapture objects are immutable in the abstract, but
 evaluate their arguments lazily.  Before everything inside a CCapture is
 fully evaluated (which happens at compile time when all the arguments are
@@ -1816,7 +1823,7 @@
 to operate on the current match object; similarly C@() and C%() can
 extract positional and named submatches.
 
-CCapture objects fill the ecological niche of references in Perl 6.
+CParcel and CCapture objects fill the ecological niche of references in 
Perl 6.
 You can think of them as fat references, that is, references that
 can capture not only the current identity of a single object, but
 also the relative identities of several related objects.  Conversely,
@@ -2030,13 +2037,13 @@
 print $( foo() )# foo called in item context
 print @@( foo() )   # foo called in slice context
 
-In declarative contexts bare sigils may be used as placeholders for
+In declarative constructs bare sigils may be used as placeholders for
 anonymous variables:
 
 my ($a, $, $c) = 1..3;
 print unless (state $)++;
 
-Outside of declarative 

r29143 - docs/Perl6/Spec

2009-11-19 Thread pugs-commits
Author: lwall
Date: 2009-11-20 08:10:40 +0100 (Fri, 20 Nov 2009)
New Revision: 29143

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[S03] tweaks from TheDamian++
Various coercion clarifications


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-11-20 06:12:28 UTC (rev 29142)
+++ docs/Perl6/Spec/S03-operators.pod   2009-11-20 07:10:40 UTC (rev 29143)
@@ -16,7 +16,7 @@
 Created: 8 Mar 2004
 
 Last Modified: 19 Nov 2009
-Version: 176
+Version: 177
 
 =head1 Overview
 
@@ -24,8 +24,8 @@
 
 =head1 Operator precedence
 
-Not counting terms and terminators, Perl 6 has 23 operator precedence
-levels (same as Perl 5, but differently arranged).  Here we list the
+Perl 6 has about the same number of precedence levels as Perl 5,
+but they're differently arranged in spots.  Here we list the
 levels from tightest to loosest, along with a few examples of
 each level:
 
@@ -613,9 +613,10 @@
 Unlike in Perl 5, where C+ is a no-op, this operator coerces to
 numeric context in Perl 6.  (It coerces only the value, not the
 original variable.)  For values that do not already do the
-CNumeric role, the narrowest appropriate type of CInt, CNum, or
+CNumeric role, the narrowest appropriate type of CInt, CRat, CNum, or
 CComplex will be returned; however, string containing two integers
-separated by a C/ will be returned as a CRat.  Exponential notation
+separated by a C/ will be returned as a CRat (or a CFatRat if the
+denominator overflows an Cint64).  Exponential notation
 and radix notations are recognized.
 
 =item *
@@ -750,22 +751,18 @@
 
 C infix:% , modulus
 
-$x % $mod
+$x % $y
 
-Coerces to CNum (or CInt as an optimization) before performing Cmod.
-That is, has results equivalent to:
+If necessary, coerces non-numeric arguments to an appropriate CNumeric type,
+then calculates the modulus, which is defines as:
 
-floor( Num($x) / Num($y) )
-
-Also preserves the identity:
-
 $x % $y == $x - floor($x / $y) * $y
 
 =item *
 
 C infix:mod , generic modulus
 
-$x mod $mod
+$x mod $y
 
 Dispatches to the C infix:mod  multi most appropriate to
 the operand types, typically returning a value of the same type.
@@ -912,7 +909,8 @@
 If the count is less than 1, returns the null string.
 The count may not be C* because Perl 6 does not support
 infinite strings.  (At least, not yet...)  Note, however, that an
-infinite string may be emulated with Ccat($string xx *).
+infinite string may someday be emulated with Ccat($string xx *),
+in which case C$string x * may be a shorthand for that.
 
 =item *
 
@@ -1020,22 +1018,17 @@
 
 C prefix:int 
 
-Coerces to type CInt.  Floor semantics are used for fractional
-values, including strings that appear to express fractional values.
-That is, Cint($x) must have the same result as Cint(+$x) in all
-cases.  All implicit conversions to integer use the same semantics.
+Deprecated, use the CInt() coercion or the Cfloor function.
 
-(Note that, despite the fact that Cint is a valid native type
-name, this function does not express conversion to that native type.
-Such subtype conversions are done automatically upon assignment to
-a subtyped container, and fail if the container cannot hold the value.)
-
 =item *
 
 C prefix:sleep 
 
-Suspends the current thread of execution for the specified number of seconds,
-which may be fractional.
+Coerces to an appropriate CReal type, then suspends the current
+thread of execution for the specified number of seconds, which
+may be fractional.  Remember that although a CRat is capable
+of attosecond precision, your computer is probably not capable of
+attosecond accuracy.
 
 =item *
 
@@ -1367,7 +1360,7 @@
 the appearance of being parsed as trailing unary operators at a
 pseudo-precedence level slightly tighter than item assignment.
 (They're not officially postfix operators
-because those require the absense of whitespace, and these allow whitespace.
+because those require the absence of whitespace, and these allow whitespace.
 These adverbs insert themselves in the spot where the parser is
 expecting an infix operator, but the parser continues to look for
 an infix after parsing the adverb and applying it to the previous
@@ -1559,6 +1552,10 @@
 explicitly if there is an explicit signature, or pull them out of C%_
 rather than C@_ if there is no explicit signature.
 
+[It's likely this operator will be removed from the core Perl 6 language
+and only supplied by the translator as a macro, so don't write any new
+code with it.]
+
 =item *
 
 C infix:: , the invocant marker
@@ -3192,7 +3189,8 @@
 Since use of CRange objects in item context is usually
 non-sensical, a CRange object used as an operand for scalar operators
 will generally attempt to distribute the operator to its endpoints and
-return another suitably modified CRange instead, much like a junction of two 
items.  (Notable exceptions
+return another 

deprecated (was Re: r29143 ...)

2009-11-19 Thread Darren Duncan

pugs-comm...@feather.perl6.nl wrote:

@@ -1020,22 +1018,17 @@
 
 C prefix:int 
 
-Coerces to type CInt.  Floor semantics are used for fractional

-values, including strings that appear to express fractional values.
-That is, Cint($x) must have the same result as Cint(+$x) in all
-cases.  All implicit conversions to integer use the same semantics.
+Deprecated, use the CInt() coercion or the Cfloor function.


Why would the Perl 6 spec contain anything deprecated rather than simply not 
having it at all?


Or do you mean deprecated as in the parser will explicitly recognize it and 
die with a helpful error message, such as it does for Perl 5's =~ to catch 
brainos?


If you mean the latter, is there some central place (say in Synopsis 2) that 
talks about this, such as in a terminology section?  When the Perl 6 spec 
uses the word ... it means ...


-- Darren Duncan