r27882 - docs/Perl6/Spec

2009-08-06 Thread pugs-commits
Author: lwall
Date: 2009-08-06 15:14:15 +0200 (Thu, 06 Aug 2009)
New Revision: 27882

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] Note that coercion to Nil provides "loop else" functionality
Define what we mean by the Parcel type.


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-08-06 05:34:41 UTC (rev 27881)
+++ docs/Perl6/Spec/S02-bits.pod2009-08-06 13:14:15 UTC (rev 27882)
@@ -13,8 +13,8 @@
 
 Created: 10 Aug 2004
 
-Last Modified: 17 Jun 2009
-Version: 171
+Last Modified: 6 Aug 2009
+Version: 172
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -980,9 +980,25 @@
 as a null list into list context, and an empty capture into slice
 context.  A C object may also carry failure information,
 but if so, the object behaves as a failure only in item context.
-Use C/C when you want to return a hard failure that
-will not evaporate in list context.
+Use C when you want to return a hard failure that
+will not evaporate in list context.  Casting to C is one
+way of evaluating an expression and throwing the result away:
 
+@inclist = map { $_ + 1 }, @list || Nil( warn 'Empty @list!' );
+
+@inclist = do for @list || Nil( warn 'Empty @list!' ) {
+$_ + 1;
+}
+
+Or if you want to test the how many results you got back from
+the C or C:
+
+@inclist = map { $_ + 1 }, @list or Nil( warn 'Empty @list!' );
+
+@inclist = do for @list {
+$_ + 1;
+} or Nil( warn 'Empty @list!' )
+
 =head2 Immutable types
 
 Objects with these types behave like values, i.e. C<$x === $y> is true
@@ -1399,7 +1415,7 @@
 
 C<@x> may be bound to an object of the C class, but it may also
 be bound to any object that does the C role, such as a
-C, C, C, C, or C.  The C
+C, C, C, C, C, or C.  The C
 role implies the ability to support C<< postcircumfix:<[ ]> >>.
 
 Likewise, C<%x> may be bound to any object that does the C
@@ -1571,6 +1587,27 @@
 
 =item *
 
+A list of one or more objects may be grouped together by parentheses
+into a "parenthesis cell", or C.  This kind of list should
+not be confused with the flattening list context.  Instead, this is
+a raw syntactic list; no interpretation is made of the list without
+knowing what context it will be evaluated in.  For example, when
+you say:
+
+(1,2,3,:mice)
+
+the result is a C object containing three C objects
+and a C object, that is, four positional objects.  When, however,
+you say something like:
+
+rhyme(1,2,3,:mice)
+
+the C is translated (at compile time, in this case)
+into a C with 3 positionals and one named argument
+in preparation for binding.
+
+=item *
+
 An argument list may be captured into an object with backslashed parens:
 
 $args = \(1,2,3,:mice)



Re: xml grammar

2009-08-06 Thread Raphael Descamps
Am Montag, den 03.08.2009, 11:04 +1000 schrieb Timothy S. Nelson:
> On Fri, 31 Jul 2009, Raphael Descamps wrote:
> 
> > Hi,
> >
> > I have seen that wayland76 was playing with an XML Grammar on #perl6, so
> > I think that it was maybe the time to send what I already have done.
> 
>   Raphael: I don't say any of this to discourage you,

Don't worry, you don't :)
I'm happy to see that there is already different implementations
available. In fact it's not surprising because the most blokers bugs and
missing features of PGE have been solved.

> but to present 
> alternatives to the list.

I knew that Francois was working on it, but last time that I checked it,
nothing was released. 

> http://github.com/krunen/xml/tree/master

> http://github.com/wayland/Tree/tree/master

> http://gist.github.com/161467

> Another version is at http://github.com/fperrad/xml/

So thanks for the pointers, I will have a look at the different
implementations.

Raphael



r27883 - docs/Perl6/Spec

2009-08-06 Thread pugs-commits
Author: jimmy
Date: 2009-08-06 18:07:31 +0200 (Thu, 06 Aug 2009)
New Revision: 27883

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[Spec/S02-bits.pod] fixed spec, see S12 for more.

Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-08-06 13:14:15 UTC (rev 27882)
+++ docs/Perl6/Spec/S02-bits.pod2009-08-06 16:07:31 UTC (rev 27883)
@@ -638,9 +638,9 @@
 metaclass instance managing it, regardless of whether the object
 is defined:
 
-'x'.HOW.methods;   # get available methods for strings
-Str.HOW.methods;   # same thing with the prototype object Str
-HOW(Str).methods;  # same thing as function call
+'x'.HOW.methods('x');   # get available methods for strings
+Str.HOW.methods(Str);   # same thing with the prototype object Str
+HOW(Str).methods(Str);  # same thing as function call
 
 'x'.methods;# this is likely an error - not a meta object
 Str.methods;# same thing
@@ -649,7 +649,7 @@
 
 =item *
 
-PerlĀ 6 intrinsically supports big integers and rationals through its
+Perl 6 intrinsically supports big integers and rationals through its
 system of type declarations.  C automatically supports promotion
 to arbitrary precision, as well as holding C and C values.
 Note that C assumes 2's complement arithmetic, so C<+^1 == -2>



r27889 - docs/Perl6/Spec/S32-setting-library

2009-08-06 Thread pugs-commits
Author: wayland
Date: 2009-08-07 06:07:53 +0200 (Fri, 07 Aug 2009)
New Revision: 27889

Modified:
   docs/Perl6/Spec/S32-setting-library/IO.pod
Log:
[S32/IO] Made some more mods to the filesystem due to interaction with 
finanalyst++


Modified: docs/Perl6/Spec/S32-setting-library/IO.pod
===
--- docs/Perl6/Spec/S32-setting-library/IO.pod  2009-08-07 03:02:42 UTC (rev 
27888)
+++ docs/Perl6/Spec/S32-setting-library/IO.pod  2009-08-07 04:07:53 UTC (rev 
27889)
@@ -623,7 +623,8 @@
 
 =head2 IO::FileSystems
 
-This represents the file systems mounted on the current machine.  
+This represents the file systems mounted on the current machine (ie. 
accessible via a 
+filesystem path).  
 
 class IO::FileSystem does IO::Streamable {
 has Str $.illegal-chars; # ie. /\x0
@@ -646,16 +647,6 @@
 
 =back
 
-=head2 IO::FileSystem
-
-This represents a specific filesystem, such as those listed in /etc/fstab on 
Unix, or the 
-specific drives on Windows.  
-
-class IO::FileSystem does IO::Streamable {
-has Str $.fstype; # ext3, ntfs, vfat, reiserfs, etc
-...
-}
-
 =head2 IO::FSNode
 
 class IO::FSNode {



Re: r27888 - docs/Perl6/Spec

2009-08-06 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote:
> Author: jimmy
> Date: 2009-08-07 05:02:42 +0200 (Fri, 07 Aug 2009)
> New Revision: 27888
> 
> Modified:
>docs/Perl6/Spec/S01-overview.pod
>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/S09-data.pod
>docs/Perl6/Spec/S10-packages.pod
>docs/Perl6/Spec/S11-modules.pod
>docs/Perl6/Spec/S12-objects.pod
>docs/Perl6/Spec/S13-overloading.pod
>docs/Perl6/Spec/S14-roles-and-parametric-types.pod
>docs/Perl6/Spec/S29-functions.pod
>docs/Perl6/Spec/S31-pragmatic-modules.pod
> Log:
> [Spec]fixed the wrong space, now it's \x20, not \xC2A0

What was wrong with the non-breaking spaces?
We use "Perl 5" and "Perl 6" as words, so it makes a lot of sense to
separate them by non-breaking spaces, IMHO.

Also note that this commit breaks 22 smartlinks.

Cheers,
Moritz