r24080 - docs/Perl6/Spec src/perl6

2008-11-26 Thread pugs-commits
Author: lwall
Date: 2008-11-27 08:21:32 +0100 (Thu, 27 Nov 2008)
New Revision: 24080

Modified:
   docs/Perl6/Spec/S03-operators.pod
   src/perl6/STD.pm
Log:
[STD] not() etc. is a function call
[S03] prefix:<^> no longer tries to get fancy with lists


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2008-11-27 06:14:03 UTC (rev 24079)
+++ docs/Perl6/Spec/S03-operators.pod   2008-11-27 07:21:32 UTC (rev 24080)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 8 Mar 2004
-  Last Modified: 7 Nov 2008
+  Last Modified: 26 Nov 2008
   Number: 3
-  Version: 146
+  Version: 147
 
 =head1 Overview
 
@@ -245,6 +245,14 @@
 
 a(1)
 
+In term position, any identifier followed immediately by a
+parenthesized expression is always parsed as a term representing
+a function call even if that identifier also has a prefix meaning,
+so you never have to worry about precedence in that case.  Hence:
+
+not($x) + 1 # means (not $x) + 1
+abs($x) + 1 # means (abs $x) + 1
+
 =item *
 
 Pair composers
@@ -2890,10 +2898,6 @@
 
 for ^4 { say $_ } # 0, 1, 2, 3
 
-If applied to a list, it generates a multidimensional set of subscripts.
-
-for ^(3,3) { ... } # (0,0)(0,1)(0,2)(1,0)(1,1)(1,2)(2,0)(2,1)(2,2)
-
 If applied to a type name, it indicates the metaclass instance instead,
 so C<^Moose> is short for C or C.  It still kinda
 means "what is this thing's domain" in an abstract sort of way.

Modified: src/perl6/STD.pm
===
--- src/perl6/STD.pm2008-11-27 06:14:03 UTC (rev 24079)
+++ src/perl6/STD.pm2008-11-27 07:21:32 UTC (rev 24080)
@@ -3271,7 +3271,7 @@
 token term:identifier ( --> Term )
 {
 :my $t;
-
+ 
 { $t = $.text; }
 
 {{



r24088 - docs/Perl6/Spec

2008-11-27 Thread pugs-commits
Author: ruoso
Date: 2008-11-27 14:20:22 +0100 (Thu, 27 Nov 2008)
New Revision: 24088

Added:
   docs/Perl6/Spec/S07-iterators.pod
Log:
[spec] Adding the first sketches on S07, thanks to wayland76++

Added: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   (rev 0)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-11-27 13:20:22 UTC (rev 24088)
@@ -0,0 +1,256 @@
+=encoding utf8
+
+=head1 Title
+
+Synopsis 7: Iterators and Laziness
+
+=head1 Version
+
+ Maintainer:???
+ Contributions: Tim Nelson <[EMAIL PROTECTED]>
+Daniel Ruoso <[EMAIL PROTECTED]>
+ Date:  27 Nov 2008
+ Last Modified: 27 Nov 2008
+ Version:   1
+
+=head1 Laziness and Eagerness
+
+As we all know, one of the primary virtues of the Perl programmer is
+laziness.  This is also one of the virtues of Perl itself.  However,
+Perl knows better than to succumb to false laziness, and so is eager
+sometimes, and lazy others.  Perl defines 4 levels of laziness for
+Iterators:
+
+=over
+
+=item Strictly Lazy
+
+Does not evaluate anything unless explictly required by the user,
+including not traversing non-lazy objects.
+
+=item Mostly Lazy
+
+Try to obtain available items without causing eager evaluation of
+other lazy objects.
+
+=item Mostly Eager
+
+Obtain all items, but does not try to eagerly evaluate when known to
+be infinite.
+
+=item Strictly Eager
+
+Obtain all items, fail in data structures known to be infinite.
+
+=back
+
+It's important to realize that the responsability of determining the
+level of lazyness/eagerness in each operation is external to each lazy
+object, the runtime, depending on which operation is being performed
+is going to assume the level of lazyness and perform the needed
+operations to apply that level.
+
+=head2 The lazyness level of some common operations
+
+=over
+
+=item List Assignment: my @a = @something;
+
+In order to provide p5-like behavior in list assignment, this
+operation is performed in the Mostly Eager level, meaning that if you do
+
+  my @a = grep { ... }, @b;
+
+the grep will be evaluated as long as @b is not infinite.
+
+  my @a = grep { ... }, 1, 2, 3, 4..*
+
+will give grep an infinite list (even if the first elements are
+known), therefore it will also be lazy. On the other hand
+
+  my @a = grep { ... }, 1, 2, 3, 4;
+
+will be eagerly evaluated. 
+
+=item Feed operators: my @a <== @something;
+
+The feed operator is strictly lazy, meaning that no operation should
+be performed before the user requests any element from @a. That's how
+
+  my @a <== grep { ... } <== map { ... } <== grep { ... }, 1, 2, 3
+
+is completely lazy, even if 1,2,3 is a fairly small known compact
+list.
+
+=back
+
+But it's important to notice that eagerness takes precedence over
+lazyness, meaning that
+
+  my @a = grep { ... } <== map { ... } <== grep { ... }, 1, 2, 3
+
+Will be eagerly evaluated, but that is still different from
+
+  my @d = 1,2,3;
+  my @c = grep { ... }, @d;
+  my @b = map { ... }, @c;
+  my @a = grep { ... }, @b;
+
+Because in the first, the processing would be made as a flow, avoiding
+the creation of the intermediary eager lists that the second example
+creates. On the other hand
+
+  my @d <== 1,2,3;
+  my @c <== grep { ... }, @d;
+  my @b <== map { ... }, @c;
+  my @a = grep { ... }, @b;
+
+provides the same lazyness level of the first example.
+
+=head1 The Iterator Role
+
+The iterator role represents the lazy access to a list, walking
+through a data structure (list, tree whatever), feeds (map, grep etc)
+or and, each time it is called, will return one (or more) of the nodes
+from the data structure.
+
+When an iterator runs out of items, it will throw an exception.  
+
+The iterator role has the following methods:
+
+=head2 method prefix:<=> {...}
+
+Returns something appropriate depending on the context:
+
+=head2 method new(Laziness => $laziness, Context => $context) {...}
+
+Creates the iterator, with appropriate laziness defaults.  
+
+=head2 method SetLaziness($laziness) {...}
+
+Set the Laziness
+
+=head2 method SetContext($context) {...}
+
+Set the Context (intended only for coercions, not user use)
+
+=head2 Iterator Summary
+
+=begin code
+
+role Iterator {
+has $!laziness;
+has $!context;
+
+# enforces item context
+method FETCH() {...}
+# returns a list
+method List() {...}
+# returns a slice
+method Slice() {...}
+# returns the capture of the next iteration
+method prefix:<=> {
+given $self.context {
+when 'Item'  { return self.FETCH() }   # called in item context
+when 'Slice' { return self.Slice() }   # called in slice context
+when *   { return self.List()  }   # called in list context 
(or any other context)
+}
+}
+# Creates a new iterator; can be called with no parameters, and chooses 
sensible defaults
+method new(Laziness => $laz

r24089 - docs/Perl6/Spec

2008-11-27 Thread pugs-commits
Author: ruoso
Date: 2008-11-27 14:49:24 +0100 (Thu, 27 Nov 2008)
New Revision: 24089

Modified:
   docs/Perl6/Spec/S07-iterators.pod
Log:
[spec] general S07 cleanup, I think that can be considered the first version.
Most of the cleanup is related to accepting that it is runtime s responsability 
to instantiate the GenericLazyList when needed, and not the Iterator itself

Modified: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   2008-11-27 13:20:22 UTC (rev 24088)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-11-27 13:49:24 UTC (rev 24089)
@@ -77,7 +77,7 @@
 The feed operator is strictly lazy, meaning that no operation should
 be performed before the user requests any element from @a. That's how
 
-  my @a <== grep { ... } <== map { ... } <== grep { ... }, 1, 2, 3
+  my @a <== grep { ... } <== map { ... } <== grep { ... } <== 1, 2, 3
 
 is completely lazy, even if 1,2,3 is a fairly small known compact
 list.
@@ -87,7 +87,7 @@
 But it's important to notice that eagerness takes precedence over
 lazyness, meaning that
 
-  my @a = grep { ... } <== map { ... } <== grep { ... }, 1, 2, 3
+  my @a = grep { ... } <== map { ... } <== grep { ... } <== 1, 2, 3
 
 Will be eagerly evaluated, but that is still different from
 
@@ -111,145 +111,52 @@
 
 The iterator role represents the lazy access to a list, walking
 through a data structure (list, tree whatever), feeds (map, grep etc)
-or and, each time it is called, will return one (or more) of the nodes
-from the data structure.
+or a stream (mostly for IO). Each time it is called, will return the
+elements produced at that iteration.
 
-When an iterator runs out of items, it will throw an exception.  
+It's important to realize that the iterator of a list can be accessed
+by the .Iterator() method (but only the runtime will be calling that
+most of the time), and the implemenation of each iterator is private
+to the list and implementation specific.
 
-The iterator role has the following methods:
+This is a minimal API that should allow custom iterator
+implemenations, but this spec should be expanded in the future to
+provide additional API for batch-aware iterators.
 
 =head2 method prefix:<=> {...}
 
-Returns something appropriate depending on the context:
+Returns the items for that iteration. The grouping of elements
+returned in each iteration is visible if this iterator is being used
+to build a slice. While building a List, the items will be flattened.
 
-=head2 method new(Laziness => $laziness, Context => $context) {...}
+When it runs out of items, it will throw an exception.  
 
-Creates the iterator, with appropriate laziness defaults.  
+=head1 Auxiliary Implementations
 
-=head2 method SetLaziness($laziness) {...}
-
-Set the Laziness
-
-=head2 method SetContext($context) {...}
-
-Set the Context (intended only for coercions, not user use)
-
-=head2 Iterator Summary
-
-=begin code
-
-role Iterator {
-has $!laziness;
-has $!context;
-
-# enforces item context
-method FETCH() {...}
-# returns a list
-method List() {...}
-# returns a slice
-method Slice() {...}
-# returns the capture of the next iteration
-method prefix:<=> {
-given $self.context {
-when 'Item'  { return self.FETCH() }   # called in item context
-when 'Slice' { return self.Slice() }   # called in slice context
-when *   { return self.List()  }   # called in list context 
(or any other context)
-}
-}
-# Creates a new iterator; can be called with no parameters, and chooses 
sensible defaults
-method new(Laziness => $laziness, Context => $context) {
-if(! $context) {
-given want {
-when :($)  { $context = 'Item';  }   # called in item context
-when :(@@) { $context = 'Slice'; }   # called in slice context
-when * { $context = 'List';  }   # called in list context 
(or any other context)
-}
-}
-$self.context = $context;
-self.SetLaziness($laziness);
-}
-method SetContext($context) {
-$context ~~ /^(Item|List|Slice)$/) or die "Invalid context $context\n";
-$self.context = $context;
-   self.SetLaziness();
-}
-method SetLaziness($laziness) {
-if($laziness) {
-$self.laziness = $laziness;
-} else {
-given $self.context {
-when 'Item' { self.laziness = 'Mostly Lazy';  }
-when *  { self.laziness = 'Mostly Eager'; }
-}
-}
-}
-}
-
-=end code
-
-=head1 Default Implementations
-
 Perl's built-ins require that a number of default iterators exist.  
 
-=head2 GenericIterator implementation
+=head2 Generic Item Iterator
 
-This is what is returned by default when an iterator is asked for, but no 
iterator type is known.  
+Operators like map requires one item at a time as 

r24090 - docs/Perl6/Spec

2008-11-27 Thread pugs-commits
Author: ruoso
Date: 2008-11-27 14:57:34 +0100 (Thu, 27 Nov 2008)
New Revision: 24090

Modified:
   docs/Perl6/Spec/S07-iterators.pod
Log:
[spec] Small text revisions on S07

Modified: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   2008-11-27 13:49:24 UTC (rev 24089)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-11-27 13:57:34 UTC (rev 24090)
@@ -11,14 +11,14 @@
 Daniel Ruoso <[EMAIL PROTECTED]>
  Date:  27 Nov 2008
  Last Modified: 27 Nov 2008
- Version:   1
+ Version:   2
 
 =head1 Laziness and Eagerness
 
 As we all know, one of the primary virtues of the Perl programmer is
 laziness.  This is also one of the virtues of Perl itself.  However,
-Perl knows better than to succumb to false laziness, and so is eager
-sometimes, and lazy others.  Perl defines 4 levels of laziness for
+Perl 6 knows better than to succumb to false laziness, and so is eager
+sometimes, and lazy others. Perl 6 defines 4 levels of laziness for
 Iterators:
 
 =over
@@ -46,7 +46,7 @@
 
 It's important to realize that the responsability of determining the
 level of lazyness/eagerness in each operation is external to each lazy
-object, the runtime, depending on which operation is being performed
+object, the runtime, depending on which operation is being performed,
 is going to assume the level of lazyness and perform the needed
 operations to apply that level.
 
@@ -75,7 +75,7 @@
 =item Feed operators: my @a <== @something;
 
 The feed operator is strictly lazy, meaning that no operation should
-be performed before the user requests any element from @a. That's how
+be performed before the user requests any element. That's how
 
   my @a <== grep { ... } <== map { ... } <== grep { ... } <== 1, 2, 3
 
@@ -111,8 +111,7 @@
 
 The iterator role represents the lazy access to a list, walking
 through a data structure (list, tree whatever), feeds (map, grep etc)
-or a stream (mostly for IO). Each time it is called, will return the
-elements produced at that iteration.
+or a stream (mostly for IO).
 
 It's important to realize that the iterator of a list can be accessed
 by the .Iterator() method (but only the runtime will be calling that
@@ -133,7 +132,7 @@
 
 =head1 Auxiliary Implementations
 
-Perl's built-ins require that a number of default iterators exist.  
+Perl's built-ins require that a number of auxiliary types.  
 
 =head2 Generic Item Iterator
 



r24091 - docs/Perl6/Spec

2008-11-27 Thread pugs-commits
Author: ruoso
Date: 2008-11-27 15:07:52 +0100 (Thu, 27 Nov 2008)
New Revision: 24091

Modified:
   docs/Perl6/Spec/S07-iterators.pod
Log:
[spec] small code examples on how to get the generic item iterator, lazy slice 
and lazy list

Modified: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   2008-11-27 13:57:34 UTC (rev 24090)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-11-27 14:07:52 UTC (rev 24091)
@@ -140,22 +140,34 @@
 they can use a generic item iterator to consolidate the access to the
 input iterator, doing additional iterators when an empty capture is
 returned and holding additional values if more than one item is
-returned.
+returned. The following code will result in getting a generic item
+iterator:
 
+  my $foo <== @a;
+
+You can later do:
+
+  my $item = =$foo;
+
 =head2 Generic Lazy List
 
 The generic lazy list accepts an iterator as input, and consumes the
 iterator as the elements of the list are accessed but flattening and
-storing the already-evaluated elements.
+storing the already-evaluated elements. To obtain a generic lazy list,
+just do:
 
+  my @a <== @b;
+
 =head2 Generic Lazy Slice
 
 The generic lazy slice accepts an iterator as input, and consumes the
 iterator as the elements of the list are accessed but storing the
 already-evaluated elements as a bi-dimensional list, where the first
 dimension holds each iteration, and the second contains the return of
-each iteration.
+each iteration. To obtain a generic lazy slice, do:
 
+  my @@a <== map { ... }, 1,2,3;
+
 =head1 Additions
 
 Please post errors and feedback to perl6-language.  If you are making



r24092 - docs/Perl6/Spec

2008-11-27 Thread pugs-commits
Author: ruoso
Date: 2008-11-27 15:58:55 +0100 (Thu, 27 Nov 2008)
New Revision: 24092

Modified:
   docs/Perl6/Spec/S07-iterators.pod
Log:
[spec] lazyness applies to every object 

Modified: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   2008-11-27 14:07:52 UTC (rev 24091)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-11-27 14:58:55 UTC (rev 24092)
@@ -18,8 +18,7 @@
 As we all know, one of the primary virtues of the Perl programmer is
 laziness.  This is also one of the virtues of Perl itself.  However,
 Perl 6 knows better than to succumb to false laziness, and so is eager
-sometimes, and lazy others. Perl 6 defines 4 levels of laziness for
-Iterators:
+sometimes, and lazy others. Perl 6 defines 4 levels of laziness:
 
 =over
 



r24098 - docs/Perl6/Spec

2008-11-27 Thread pugs-commits
Author: wayland
Date: 2008-11-27 23:40:00 +0100 (Thu, 27 Nov 2008)
New Revision: 24098

Modified:
   docs/Perl6/Spec/S07-iterators.pod
Log:
Cleaned up text a little bit, hopefully clarified things.  


Modified: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   2008-11-27 18:34:05 UTC (rev 24097)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-11-27 22:40:00 UTC (rev 24098)
@@ -18,8 +18,15 @@
 As we all know, one of the primary virtues of the Perl programmer is
 laziness.  This is also one of the virtues of Perl itself.  However,
 Perl 6 knows better than to succumb to false laziness, and so is eager
-sometimes, and lazy others. Perl 6 defines 4 levels of laziness:
+sometimes, and lazy others.  
 
+One thing that Perl understands is the difference between Laziness and
+Eagerness.  When something is Lazy, it says "just give me what you've 
+got; I'll get the rest later", whereas when it's eager, it says "More!  
+More!  Give me everything you can get!".  
+
+Perl 6 defines 4 levels of laziness:
+
 =over
 
 =item Strictly Lazy
@@ -108,12 +115,21 @@
 
 =head1 The Iterator Role
 
-The iterator role represents the lazy access to a list, walking
-through a data structure (list, tree whatever), feeds (map, grep etc)
-or a stream (mostly for IO).
+The iterator role represents the lazy access to a list, walking through 
+one of:
 
+=over
+
+=item Data structure (list, tree, table, etc)
+
+=item Feed (map, grep, etc) 
+
+=item Stream (mostly for IO)
+
+=back
+
 It's important to realize that the iterator of a list can be accessed
-by the .Iterator() method (but only the runtime will be calling that
+by the .iterator() method (but only the runtime will be calling that
 most of the time), and the implemenation of each iterator is private
 to the list and implementation specific.
 
@@ -121,6 +137,8 @@
 implemenations, but this spec should be expanded in the future to
 provide additional API for batch-aware iterators.
 
+The methods in this role are:
+
 =head2 method prefix:<=> {...}
 
 Returns the items for that iteration. The grouping of elements



r24104 - docs/Perl6/Spec

2008-11-28 Thread pugs-commits
Author: ruoso
Date: 2008-11-28 19:38:22 +0100 (Fri, 28 Nov 2008)
New Revision: 24104

Modified:
   docs/Perl6/Spec/S07-iterators.pod
Log:
[spec] anything that behaves like a list might implement .Iterator(). And the 
name is really .Iterator(), not .iterator();

Modified: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   2008-11-28 18:30:32 UTC (rev 24103)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-11-28 18:38:22 UTC (rev 24104)
@@ -115,8 +115,7 @@
 
 =head1 The Iterator Role
 
-The iterator role represents the lazy access to a list, walking through 
-one of:
+The iterator role represents the lazy access to a list, walking through:
 
 =over
 
@@ -126,15 +125,17 @@
 
 =item Stream (mostly for IO)
 
+=item In fact, any value that wants to behave like a list
+
 =back
 
 It's important to realize that the iterator of a list can be accessed
-by the .iterator() method (but only the runtime will be calling that
+by the .Iterator() method (but only the runtime will be calling that
 most of the time), and the implemenation of each iterator is private
 to the list and implementation specific.
 
 This is a minimal API that should allow custom iterator
-implemenations, but this spec should be expanded in the future to
+implementations, but this spec should be expanded in the future to
 provide additional API for batch-aware iterators.
 
 The methods in this role are:



r24318 - docs/Perl6/Spec

2008-12-12 Thread pugs-commits
Author: particle
Date: 2008-12-12 22:30:59 +0100 (Fri, 12 Dec 2008)
New Revision: 24318

Added:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] first incomplete draft of S19. needs fleshing out in many places, but 
it's at the point where more eyes are sorely needed and very welcome.

Added: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod (rev 0)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-12 21:30:59 UTC (rev 24318)
@@ -0,0 +1,482 @@
+=encoding utf8
+
+=head1 TITLE
+
+DRAFT: Synopsis 19: Command Line Interface
+
+
+=head1 Author
+
+Jerry Gay 
+
+
+=head1 Version
+
+  Maintainer: Jerry Gay 
+  Date: 12 Dec 2008
+  Last Modified: 12 Dec 2008
+  Version: 1
+
+This is a draft document. This document describes the command line interface.
+It has changed extensively from previous versions of Perl in order to increase
+clarity, consistency, and extensibility. Many of the syntax revisions are
+extensions, so you'll find that much of the syntax embedded in your muscle
+memory will still work.
+
+This interface to Perl 6 is special in that it occurs at the intersection of
+the compiler and the operating system's command line shell, and thus is not
+accessed via a consistent syntax everywhere. Perl is born of Unix, and as such
+the syntax presented in this document is expected to work in a Unix-style
+shell. To explore the particularities of other operating systems, see 
+
+{{ -jg
+need reference to 'porting' chapter or equivalent above
+}}
+
+
+=head1 Command Line Elements
+
+The command line is broken down into two basic elements: a I, and
+I. Each command line element is whitespace separated, so elements
+containing whitespace must be quoted. The I processes the arguments
+and performs the requested actions. It looks something like F,
+F, F, and is followed by zero or more I.
+Perl 6 does not do any processing of the I portion of the command
+line, but it is made available at run-time in the read-only C<$*VM> variable.
+
+Command line I are further broken down into I and
+I. Unlike Perl 5, I and I may be intermixed on the
+command line. This mirrors the Perl 6 argument syntax for Routines, which
+allows named and positional parameters to be intermixed. The recommendation
+for parameter ordering applies here as well, with a slight twist: keep all
+command line options together, even though this is not enforced, in order to
+avoid confusion.
+
+
+=head1 Backward (In)compatibility
+
+Muscles have a long memory. You may find yourself typing your favorite Perl 5
+options, even after Christmas arrives. {{TODO}}
+
+=head2 Unchanged Syntactic Features
+
+{{TODO}}
+
+=head2 Removed Syntactic Features
+
+{{ -jg
+need to tell a story about how perl 6 handles the migration from perl 5.
+for example, if -0 is not a valid perl 6 command line option, how does perl 6
+help the user realize and correct the mistake?
+}}
+
+
+=head1 Options and Values
+
+Command line options are parsed using the following rules:
+
+=over 4
+
+=item *
+
+Options are case sensitive. C<-o> and C<-O> are not the same option.
+
+=item *
+
+Single-letter options must not be clustered. C<-ab> never means C<-a -b>
+
+=item *
+
+Options must begin with the following symbols: C<< < -- - + : > >>
+
+=item *
+
+Option names follow Perl 6 identifier naming convention, but C<'>
+is not allowed.
+
+=item *
+
+Options may be negated with C or C, for example C<:/name>
+
+=item *
+
+The special option C<--> signals the parser to stop option processing,
+everything afterwards is parsed as a value.
+
+=back
+
+
+Delimited options are a special form of option that are specified by
+delimiters on either end, allowing options to be passed through for later
+processing, and are parsed with the following rules:
+
+=over 4
+
+=item *
+
+The opening delimeter begins with C<++>, the closing delimiter with C<-->.
+
+=item *
+
+Opening and closing delimited option names follow option identifier naming
+convention, defined above.
+
+=item *
+
+Delimited options take an optional parameter using the
+C<++option=param ... --option=param> syntax. This both allows disambiguation
+(in the case where the passthru options need to pass C<--option>), but
+may also be used to direct the compiler to pass the options to a particular
+run-time component. For example, C<++RTS=parser ... --RTS=parser> directs
+the delimited options to the parser (see L below).
+
+=item *
+
+When an optional parameter is given, it must be specified on both the opening
+and closing delimited options.
+
+=item *
+
+If the closing delimiter is omitted, the rest of the command line is consumed.
+
+=item *
+
+The C<--> option has no effect within a delimited option.
+
+=item *
+
+Delimited options cannot be negated.
+
+=back
+
+
+Values are parsed with the following rules:
+
+=over 4
+
+=item *
+
+Values containing whitespace must be enclosed in quotes, for example
+C<-O="spacy val">
+
+=

r24325 - docs/Perl6/Spec

2008-12-13 Thread pugs-commits
Author: moritz
Date: 2008-12-13 10:32:15 +0100 (Sat, 13 Dec 2008)
New Revision: 24325

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] List.sort with a unary or nullary code object does a Schwartzian
Transform. (Feel free to improve the wording)


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2008-12-13 00:57:48 UTC (rev 24324)
+++ docs/Perl6/Spec/S29-functions.pod   2008-12-13 09:32:15 UTC (rev 24325)
@@ -13,8 +13,8 @@
 Mark Stosberg 
 Carl Mäsak 
  Date:  12 Mar 2005
- Last Modified: 19 Nov 2008
- Version:   30
+ Last Modified: 13 Dec 2008
+ Version:   31
 
 This document attempts to document the list of builtin functions in Perl 6.
 It assumes familiarity with Perl 5 and prior synopses.
@@ -870,6 +870,10 @@
 comparisons. C<@by> differs from C<$by> in that each criterion is
 applied, in order, until a non-zero (tie) result is achieved.
 
+If C<$by> is a code object of arity zero or one, it is applied on each item
+of C<@values>, and C<@values> is sorted by comparing the result values with
+C<< &infix: >> (Schwartzian Transform).
+
 C is as described in L<"Type Declarations">.  Any
 C may receive either or both of the mixins C
 and C to reverse the order of sort, or



r24332 - docs/Perl6/Spec

2008-12-13 Thread pugs-commits
Author: mj41
Date: 2008-12-13 16:06:02 +0100 (Sat, 13 Dec 2008)
New Revision: 24332

Modified:
   docs/Perl6/Spec/S17-concurrency.pod
   docs/Perl6/Spec/S22-cpan.pod
Log:
[Synopses] - some formating

Modified: docs/Perl6/Spec/S17-concurrency.pod
===
--- docs/Perl6/Spec/S17-concurrency.pod 2008-12-13 14:09:57 UTC (rev 24331)
+++ docs/Perl6/Spec/S17-concurrency.pod 2008-12-13 15:06:02 UTC (rev 24332)
@@ -545,41 +545,41 @@
 =head2 Still more or less unorganized stuff
 
 
-### INTERFACE BARRIER ###
-module Blah;
-{
+### INTERFACE BARRIER ###
+module Blah;
+{
 
-is atomic;   # contend/maybe/whatever other rollback stuff
- # limitation: no external IO (without lethal warnings anyway)
- # can't do anything irreversible
+is atomic;   # contend/maybe/whatever other rollback stuff
+ # limitation: no external IO (without lethal warnings 
anyway)
+ # can't do anything irreversible
 
-is critical; # free to do anything irreversible
- # means "don't interrupt me"
- # in system with critical section, no interrupts from
- # other threads will happen during execution
- # you can't suspend me
+is critical; # free to do anything irreversible
+ # means "don't interrupt me"
+ # in system with critical section, no interrupts from
+ # other threads will happen during execution
+ # you can't suspend me
 
-my $boo is export;
-$boo = 1;
+my $boo is export;
+$boo = 1;
 
-# We decree that this part forms the static interface
-# it's run once during initial compilation under the
-# Separate Compilation doctrine and the syms sealed off
-# to form part of bytecode syms headers
-%CALLER::<&blah> = { 1 }; # work - adds to export set
-die "Eureka!" if %CALLER::<$sym>; # never dies
+# We decree that this part forms the static interface
+# it's run once during initial compilation under the
+# Separate Compilation doctrine and the syms sealed off
+# to form part of bytecode syms headers
+%CALLER::<&blah> = { 1 }; # work - adds to export set
+die "Eureka!" if %CALLER::<$sym>; # never dies
 
-# BEGIN { $boo = time };
+# BEGIN { $boo = time };
 
-sub IMPORT {
-# VERY DYNAMIC!
+sub IMPORT {
+# VERY DYNAMIC!
 
-our $i = time;
-%CALLER::<&blah> = { 1 }; # work - adds to export set
-die "Eureka!" if %CALLER::<$sym>; # probes interactively
+our $i = time;
+%CALLER::<&blah> = { 1 }; # work - adds to export set
+die "Eureka!" if %CALLER::<$sym>; # probes interactively
+}
 }
-}
-### INTERFACE BARRIER ###
+### INTERFACE BARRIER ###
 
 =head2 See also
 
@@ -605,3 +605,4 @@
 
 =cut
 
+=for vim:set expandtab sw=4:

Modified: docs/Perl6/Spec/S22-cpan.pod
===
--- docs/Perl6/Spec/S22-cpan.pod2008-12-13 14:09:57 UTC (rev 24331)
+++ docs/Perl6/Spec/S22-cpan.pod2008-12-13 15:06:02 UTC (rev 24332)
@@ -532,30 +532,50 @@
 
 =head3 Shortcomings to that approach, according to vasi:
 
-[4:13PM] vasi: the idea is basically, you have an object to represent the 
state-of-the-system
-[4:13PM] vasi: (all the packages that are installed, essentially)
-[4:13PM] vasi: and then you say "i have this state, i want to do operation X 
on it, what's the best way to achieve that?"
-[4:14PM] vasi: so you look at the state and say "what's WRONG with this state, 
wrt op X?"
-[4:15PM] vasi: and resolve the first wrong thing in every reasonable way, and 
now you have a list of (state, operations-remaining)
-[4:15PM] vasi: and a slightly smaller list of things wrong
-[4:15PM] vasi: and you keep doing that until nothing is wrong anymore, and you 
have a final list of states that satisfy all the requirements
-[4:15PM] vasi: then you pick the preferred one of those states, according to 
some heuristic
-[4:16PM] vasi: The naive approach, "get a list of the packages we need", falls 
down badly in the face of OR-depends and virtual-packages and conflicts
-[4:16PM] kane: i understand what you just said. how does that make my life 
better over a simple fifo, shortcircuit approach?
-[4:19PM] vasi: ok, here's a test case that normally fails with the simple 
approach
-[4:19PM] vasi: i'm using 'Dep' as a binary operator here, so 'a Dep b' means a 
depends on b
-[4:19PM] vasi: if you have 'parent Dep (child1 AND child2)', 'child1 Dep 
(grandchild1 OR grandchild2)', 'child2 Conf grandchild1'
-and then you do 'install parent'
-[4:20PM] vasi: the recursive algorithm says 'ok, i need child1...now i need 
one of gc1 or gc2, let's just pick gc1...now i need child2, oh shite gc1 is bad 
CRASH"
-[4:20PM] vasi:

r24368 - docs/Perl6/Spec

2008-12-14 Thread pugs-commits
Author: moritz
Date: 2008-12-14 21:18:22 +0100 (Sun, 14 Dec 2008)
New Revision: 24368

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] small clarification of @list.end


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2008-12-14 20:06:05 UTC (rev 24367)
+++ docs/Perl6/Spec/S29-functions.pod   2008-12-14 20:18:22 UTC (rev 24368)
@@ -12,9 +12,10 @@
  Contributions: Aaron Sherman 
 Mark Stosberg 
 Carl Mäsak 
+Moritz Lenz 
  Date:  12 Mar 2005
- Last Modified: 13 Dec 2008
- Version:   31
+ Last Modified: 14 Dec 2008
+ Version:   32
 
 This document attempts to document the list of builtin functions in Perl 6.
 It assumes familiarity with Perl 5 and prior synopses.
@@ -548,7 +549,7 @@
 Returns the final subscript of the first dimension; for a one-dimensional
 array this simply the index of the final element.  For fixed dimensions
 this is the declared maximum subscript.  For non-fixed dimensions (undeclared
-or explicitly declared with C<*>), the actual last element is used.
+or explicitly declared with C<*>), the index of the actual last element is 
used.
 
 =item elems
 



r24472 - docs/Perl6/Spec

2008-12-18 Thread pugs-commits
Author: ruoso
Date: 2008-12-18 19:26:20 +0100 (Thu, 18 Dec 2008)
New Revision: 24472

Modified:
   docs/Perl6/Spec/S11-modules.pod
Log:
[spec] Foo::Bar::.EXPORTALL instead of Foo::Bar.EXPORTALL

Modified: docs/Perl6/Spec/S11-modules.pod
===
--- docs/Perl6/Spec/S11-modules.pod 2008-12-18 18:02:36 UTC (rev 24471)
+++ docs/Perl6/Spec/S11-modules.pod 2008-12-18 18:26:20 UTC (rev 24472)
@@ -106,7 +106,7 @@
 }
 
 The C module will export C<&foo>, C<&bar> and C<&baz> by default;
-calling C will export C<&bar> and C<&baz> at runtime
+calling C will export C<&bar> and C<&baz> at runtime
 to the caller's package.
 
 Any proto declaration that is not declared "my" is exported by default.



r24474 - docs/Perl6/Spec

2008-12-18 Thread pugs-commits
Author: lwall
Date: 2008-12-18 22:20:36 +0100 (Thu, 18 Dec 2008)
New Revision: 24474

Modified:
   docs/Perl6/Spec/S12-objects.pod
   docs/Perl6/Spec/S29-functions.pod
Log:
[Spec] redefine WHAT to stringify to typename plus '()'


Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2008-12-18 20:44:04 UTC (rev 24473)
+++ docs/Perl6/Spec/S12-objects.pod 2008-12-18 21:20:36 UTC (rev 24474)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 27 Oct 2004
-  Last Modified: 7 Nov 2008
+  Last Modified: 18 Dec 2008
   Number: 12
-  Version: 65
+  Version: 66
 
 =head1 Overview
 
@@ -1865,7 +1865,7 @@
 
 Metamethods for objects are named with interrogative pronouns in uppercase:
 
-WHATthe prototype object of the type, stringifies to short name
+WHATthe protoobject of the type, stringifies to short name ~ '()'
 WHICH   the object's identity value
 WHO the package supporting the object, stringifies to long name
 WHERE   the memory address of the object
@@ -1898,12 +1898,15 @@
 as the first argument to methods of the metaclass, while the other
 forms require you to pass this explicitly.
 
+Note that WHAT appends C<()> to indicate emptiness.  Use C<.perl> to get the
+bare name from a protoobject.
+
 In general, use of these 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
 
-$obj.WHAT eq 'Dog'
+$obj.WHAT eq 'Dog()'
 $x.WHICH === $y.WHICH
 $obj.WHAT.bless(%args)
 

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2008-12-18 20:44:04 UTC (rev 24473)
+++ docs/Perl6/Spec/S29-functions.pod   2008-12-18 21:20:36 UTC (rev 24474)
@@ -14,8 +14,8 @@
 Carl Mäsak 
 Moritz Lenz 
  Date:  12 Mar 2005
- Last Modified: 14 Dec 2008
- Version:   32
+ Last Modified: 18 Dec 2008
+ Version:   33
 
 This document attempts to document the list of builtin functions in Perl 6.
 It assumes familiarity with Perl 5 and prior synopses.
@@ -2009,7 +2009,7 @@
 
 There is no ref() any more, since it was almost always used to get
 the type name in Perl 5.  If you really want the type name, you can
-use C<$var.WHAT>.  If you really want P5 ref
+use C<$var.WHAT.perl>.  If you really want P5 ref
 semantics, use C.
 
 But if you're just wanting to test against a type, you're likely better off



r24475 - docs/Perl6/Spec

2008-12-18 Thread pugs-commits
Author: particle
Date: 2008-12-19 01:05:41 +0100 (Fri, 19 Dec 2008)
New Revision: 24475

Modified:
   docs/Perl6/Spec/S06-routines.pod
Log:
[spec] whitespace after commas is not allowed when passing multiple values to a 
command-line option

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2008-12-18 21:20:36 UTC (rev 24474)
+++ docs/Perl6/Spec/S06-routines.pod2008-12-19 00:05:41 UTC (rev 24475)
@@ -2748,7 +2748,7 @@
 -name=value:name
 -name="spacy value":name«'spacy value'»
 -name='spacy value':name«'spacy value'»
--name=val1,'val 2', etc:name«val1 'val 2' etc»
+-name=val1,'val 2',etc :name«val1 'val 2' etc»
 
 --name :name# only if declared Bool
 --name=value   :name # don't care
@@ -2758,7 +2758,7 @@
 --name "spacy value"   :name«'spacy value'»
 --name='spacy value'   :name«'spacy value'»
 --name 'spacy value'   :name«'spacy value'»
---name=val1,'val 2', etc   :name«val1 'val 2' etc»
+--name=val1,'val 2',etc:name«val1 'val 2' etc»
 --name val1 'val 2' etc:name«val1 'val 2' etc» # only if declared @
 -- # end named argument processing
 
@@ -2766,7 +2766,7 @@
 +name=value:name but False
 +name="spacy value":name«'spacy value'» but False
 +name='spacy value':name«'spacy value'» but False
-+name=val1,'val 2', etc:name«val1 'val 2' etc» but False
++name=val1,'val 2',etc :name«val1 'val 2' etc» but False
 
 :name  :name
 :!name :!name   # potential conflict with ! histchar
@@ -2774,7 +2774,7 @@
 :name=value:name
 :name="spacy value":name«'spacy value'»
 :name='spacy value':name«'spacy value'»
-:name=val1,'val 2', etc:name«val1 'val 2' etc»
+:name=val1,'val 2',etc :name«val1 'val 2' etc»
 
 Exact Perl 6 forms are okay if quoted from shell processing:
 



r24477 - docs/Perl6/Spec

2008-12-18 Thread pugs-commits
Author: wayland
Date: 2008-12-19 01:07:24 +0100 (Fri, 19 Dec 2008)
New Revision: 24477

Modified:
   docs/Perl6/Spec/S22-package-format.pod
Log:
Removed stuff about repositories and build and install software.  


Modified: docs/Perl6/Spec/S22-package-format.pod
===
--- docs/Perl6/Spec/S22-package-format.pod  2008-12-19 00:05:41 UTC (rev 
24476)
+++ docs/Perl6/Spec/S22-package-format.pod  2008-12-19 00:07:24 UTC (rev 
24477)
@@ -2,77 +2,53 @@
 
 =head1 TITLE
 
-Synopsis 22: CPAN [DRAFT]
+Synopsis 22: Package Format [DRAFT]
 
 =head1 AUTHOR
 
 Jos Boumans 
 Audrey Tang 
 Florian Ragwitz 
+Tim Nelson 
 
 =head1 VERSION
 
-Maintainer: Jos Boumans 
+Maintainer: Tim Nelson 
 Date: 3 Nov 2005
-Last Modified: 28 Nov 2005
-Number: 0
-Version: 1
+Last Modified: 19 Dec 2008
+Number: 22
+Version: 2
 
 =head1 Overview
 
-- None of the known tools can do what we want
-- Will have to implement chain ourselves
-- Be inspired by dpkg, apt-get and debian policy
-- See: http://www.us.debian.org/doc/debian-policy
-- Start with the elementary things
-- See C for first steps
+=head2 What this isn't
 
+=over
 
-=head2 General Flow (Basic)
+=item * This does not specify repositories.  For information on that, see 
+http://cpan6.org/
 
+=item * This does not specify software for downloading, building, or 
installing packages.  
+For information on that, see build-and-install-notes.pod
 
-This describes the basic flow for installing modules using the new 6pan
-installer. This just deals with building a package from source and installing
-it. Not with the distribution of these files through the means of CPAN.
-That will be covered in the advanced flow.
+=back
 
-1.  Setup package directory
-* creates a directory for the project
-* includes all relevant default files
-* and default metadata setup
-* [ ... write code ... ]
-2.  Extract/Update metadata
-* done by giving project code to the compiler
-* extract the info given by the compiler about the code
-* update the metadata according
-* this involves 'use' statements, versions, packages, etc
-3.  Build package based on metadata
-* verify integrity of the code/metadata
-* create a source package called a '.jib' file
-See '.jib files' further down
-* contains source code
-* contains metadata
-4.  Install package from '.jib' file
-* Extract '.jib' to a temporary directory
-* Verify dependencies based on metadata
-* Build the source code to installable code
-* Move the installable code to it's final destination
-* Run appropriate hook-code
-* Perform appropriate linking
-* Update system metadata based on package metadata
-5.  Uninstall packages
-* Query metadata to verify dependencies
-* Remove the installed code
-* Run appropriate hook-code
-* Perform appropriate linking
-* Update system metadata based on package metadata
+=head2 Inspirations
 
+The following can be useful inspirations:
 
-=head2 Package Layout
+=over
 
+=item * Debian Policy: http://www.us.debian.org/doc/debian-policy
 
-=head3 Project directory
+=item * Software::Packager::Metadata: 
+http://perlsoftpackmet.svn.sourceforge.net/viewvc/perlsoftpackmet/main/doc/ 
(click ont he 
+link in the Rev. column next to Overview)
 
+=head1 Package Layout
+
+=head2 Project directory
+
 Step 1 of the general flow should ideally be done by an automated tool, like
 p5's current Module::Starter or somesuch. Suffice to say, it should produce
 a layout something along these lines (note, this is just an example):
@@ -94,7 +70,7 @@
 functionality.
 See the section on C< Metadata Spec > for details.
 
-=head3 .jib files
+=head2 .jib files
 
 These files are created in step 3 of the C
 
@@ -137,196 +113,6 @@
 There is room to ship more files alongside the 2 above mentioned archives.
 This allows us to ship an extra md5sum, version, signature, anything.
 
-=head3 Installing a C<.jib>
-
-As outlines in step 4 of the C, a C<.jib> will need a few
-steps on the client machine to be installed. Here are some important details
-about that installation.
-
-* Files will be installed in one base directory, prefixed with a
-user-defined prefix.
-By default this will be the C directory for this
-particular perl. I.e.:
-/sw/site_perl/5.8.3
-
-* The name of this base directory is the full name of the package,
-minus the extension. I.e.:
-p5-Foo-Bar-1.2-cpan+kane
-
-* The lib/, bin/ and docs/ directories, as well as the (generated)
-man/ directories, will be placed straight under this b

r24478 - docs/Perl6/Spec

2008-12-18 Thread pugs-commits
Author: particle
Date: 2008-12-19 01:08:34 +0100 (Fri, 19 Dec 2008)
New Revision: 24478

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] ideas on run-time system option and environment variables; minor updates 
and corrections

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-19 00:07:24 UTC (rev 24477)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-19 00:08:34 UTC (rev 24478)
@@ -30,8 +30,8 @@
 shell. To explore the particularities of other operating systems, see 
 
 {{ -jg
-need reference to 'porting' chapter or equivalent above
-}}
+need reference to 'porting' chapter or equivalent above -- S25?
+}
 
 
 =head1 Command Line Elements
@@ -56,7 +56,7 @@
 =head1 Backward (In)compatibility
 
 Muscles have a long memory. You may find yourself typing your favorite Perl 5
-options, even after Christmas arrives. {{TODO}}
+options, even after Christmas has arrived. {{TODO}}
 
 =head2 Unchanged Syntactic Features
 
@@ -87,7 +87,7 @@
 
 =item *
 
-Options must begin with the following symbols: C<< < -- - + : > >>
+Options must begin with one of the following symbols: C<< < -- - + : > >>
 
 =item *
 
@@ -170,8 +170,6 @@
 Multiple values are passed using commas without intervening whitespace,
 as in C<-option=val1,'val 2',etc>
 
-{{ -jg  S06 allows space after comma, which i think is wrong }}
-
 =back
 
 
@@ -241,7 +239,8 @@
 
 =back
 
-For more on options and their classifications, see section L.
+For more on options and their classifications, see section
+L.
 
 
 =head1 Option Services
@@ -390,7 +389,7 @@
 
 =item ++RTS options --RTS, ++RTS=string options --RTS=string
 
-Send options to the run-time system.
+Send options to the run-time system. See L below.
 
 Category: Dynamic
 
@@ -425,18 +424,54 @@
 
 =head1 Run-time System
 
-The run-time system delimited option allows options to be passed to an
-underlying component of Perl. Perl itself does not parse these options, but
-makes them available to run-time components.
+The run-time system delimited option (C<++RTS ... --RTS> or
+C<++RTS=string ... --RTS=string>) allows options to be passed to an underlying
+component of Perl. Perl itself does not parse these options, but makes them
+available to run-time components.
 
-{{TODO}}
+the C<=string> variation allows for disabmiguation when the run-time system
+also allows the parsing of an option named C<--RTS>. For example,
+C
+makes sure the run-time system receives C<-a :b +C --RTS foo bar>.
 
+Additionally, some implementations may use this variation to pass arguments
+to particular subsystems. For example, Rakudo Perl may choose to implement
+C
+to mean C<--runcore=gc-debug -t 7> gets passed to parrot, and
+C<--disable-keepall --optimize> gets passed to PGE.
 
+{{ -jg
+should certain string prefixes or perhaps uppercase strings be reserved
+for this purpose?
+}}
+
+
 =head1 Environment Variables
 
-{{TODO}}
+Environment variables may be used to the same effect as command-line
+arguments.
 
+=over 4
 
+=item PATH
+
+Used in executing subprocesses, and for finding the program if the -S switch
+is used.
+
+=item PERL6LIB
+
+A list of directories in which to look for Perl library files.
+
+Note: this is speculative, as library loading is not yet specified.
+
+=item PERL6OPT
+
+Default command-line arguments. Arguments found here are prepended to the
+list of arguments provided on the command-line.
+
+=back
+
+
 =head1 References
 
 =over 4



r24493 - docs/Perl6/Spec

2008-12-19 Thread pugs-commits
Author: pmichaud
Date: 2008-12-19 19:35:40 +0100 (Fri, 19 Dec 2008)
New Revision: 24493

Modified:
   docs/Perl6/Spec/S26-documentation.pod
Log:
Add note at top that the current S26 draft is known to be out-of-date
with respect to current design.


Modified: docs/Perl6/Spec/S26-documentation.pod
===
--- docs/Perl6/Spec/S26-documentation.pod   2008-12-19 16:52:36 UTC (rev 
24492)
+++ docs/Perl6/Spec/S26-documentation.pod   2008-12-19 18:35:40 UTC (rev 
24493)
@@ -22,7 +22,16 @@
 Date:   9 Apr 2005
 Last Modified:  25 Apr 2007
 
+=head1 NOTE TO IMPLEMENTORS AND CODERS (DRAFT!)
 
+ DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
+
+The information that is in this file is a draft specification that
+is known to be out of date and likely to undergo some substantial
+revision.  Until the document is updated, look at STD.pm
+(http://svn.pugscode.org/pugs/src/perl6/STD.pm) for the valid
+POD syntax.
+
 =head1 Perldoc
 
 Perldoc is an easy-to-use markup language with a simple, consistent



r24501 - docs/Perl6/Spec

2008-12-19 Thread pugs-commits
Author: particle
Date: 2008-12-19 23:06:58 +0100 (Fri, 19 Dec 2008)
New Revision: 24501

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] updates to notes, and minor clarifications

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-19 22:06:16 UTC (rev 24500)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-19 22:06:58 UTC (rev 24501)
@@ -27,13 +27,10 @@
 the compiler and the operating system's command line shell, and thus is not
 accessed via a consistent syntax everywhere. Perl is born of Unix, and as such
 the syntax presented in this document is expected to work in a Unix-style
-shell. To explore the particularities of other operating systems, see 
+shell. To explore the particularities of other operating systems, see
+L (TBD).
 
-{{ -jg
-need reference to 'porting' chapter or equivalent above -- S25?
-}
 
-
 =head1 Command Line Elements
 
 The command line is broken down into two basic elements: a I, and
@@ -100,8 +97,9 @@
 
 =item *
 
-The special option C<--> signals the parser to stop option processing,
-everything afterwards is parsed as a value.
+The special option C<--> signals the parser to stop option processing.
+Arguments following C<--> are always parsed as a list of values, even if
+they look like valid options.
 
 =back
 
@@ -278,6 +276,10 @@
 
 Service: Option
 
+Notes: When this option is parsed, it immediately triggers an action that
+could affect the remainder of the parse. Therefore, it's a good idea to put
+this option/value pair as early as possible in the argument list.
+
 {{ TODO more details needed }}
 
 =item -c
@@ -502,15 +504,10 @@
 
 do i need to address any unicode concerns?
 
-loading a switch parsing module by a switch, instead of using the default.
-maybe via ++RTS, since it needs to happen *before* switches are evaluated.
-
 sandboxing? maybe-r
 
 env var? maybe -E
 
-redefining services like -n or -p
-
 -e multiple args or multiple times, to affect later -e's
 }}
 



r24504 - docs/Perl6/Spec

2008-12-19 Thread pugs-commits
Author: lwall
Date: 2008-12-19 23:58:28 +0100 (Fri, 19 Dec 2008)
New Revision: 24504

Modified:
   docs/Perl6/Spec/S12-objects.pod
Log:
[S12] clarify $obje...@candidates for moritz_++


Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2008-12-19 22:20:18 UTC (rev 24503)
+++ docs/Perl6/Spec/S12-objects.pod 2008-12-19 22:58:28 UTC (rev 24504)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 27 Oct 2004
-  Last Modified: 18 Dec 2008
+  Last Modified: 19 Dec 2008
   Number: 12
-  Version: 66
+  Version: 67
 
 =head1 Overview
 
@@ -265,7 +265,7 @@
 
 $obj.$($foo ?? &bar !! &baz)(1,2,3)
 
-The variable must contain a Code object, that is, a closure of some
+The variable must contain a C object (usually of type C), that 
is, a closure of some
 sort.  Regardless of whether the closure was defined as a method or
 a sub or a block, the closure is called directly without any class
 dispatch; from the closure's point of view, however, it is always
@@ -306,14 +306,22 @@
 
 $o...@candidates(1,2,3)
 
-As with the scalar variant, each array element must be a Code object,
-but the list is treated as a list of candidates to call.  Note also that
-the 
+As with the scalar variant, string method names are not allowed, only
+C objects, The list is treated as a list of candidates to
+call.  After the first successful call the rest of the candidates are
+discarded.  Failure of the current candidate is indicated by calling
+C or C (see L below).
 
+Note also that the 
+
 $obj.$candidates(1,2,3)
 
-form may dispatch to a list of candidates if $candidates is a special
-C object representing a partial dispatch to a list of candidates.
+form may dispatch to a list of candidates if C<$candidates> is either
+a list or a special C object representing a partial dispatch to a
+list of candidates.  If C<$candidates> (or any element of C<@candidates>)
+is a List or Array object it is expanded out recursively until C
+candidates are found.  The call fails if it hits a candidate that is
+neither C nor expandable.
 
 Another form of indirection relies on the fact that operators are named
 using a variant on hash subscript notation, which gives you these forms:



r24506 - docs/Perl6/Spec

2008-12-19 Thread pugs-commits
Author: lwall
Date: 2008-12-20 03:06:20 +0100 (Sat, 20 Dec 2008)
New Revision: 24506

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] random annotations for [particle]++'s consideration


Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-19 23:21:32 UTC (rev 24505)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-20 02:06:20 UTC (rev 24506)
@@ -31,6 +31,8 @@
 L (TBD).
 
 
+[my notes/conjectures below are all in square brackets  --TimToady]
+
 =head1 Command Line Elements
 
 The command line is broken down into two basic elements: a I, and
@@ -41,6 +43,18 @@
 Perl 6 does not do any processing of the I portion of the command
 line, but it is made available at run-time in the read-only C<$*VM> variable.
 
+[ It seems wrong to call this a I when (from the Unix point
+of view) it's just a program to run, and the compilation may have
+happened long ago.  Maybe I or I instead.  Which
+phases are invoked may well depend on the nature of the file that is
+specified as a program to be interpreted, as well as the requested
+form of output.]
+
+[ $*VM is certainly wrong for the original compiler.  It would have to
+be $?VM, though that may be wrong too.  One could imagine a particular
+compiler that ran on multiple VMs, in which case some other variable
+would be needed to indicate the original compiler.]
+
 Command line I are further broken down into I and
 I. Unlike Perl 5, I and I may be intermixed on the
 command line. This mirrors the Perl 6 argument syntax for Routines, which
@@ -49,7 +63,9 @@
 command line options together, even though this is not enforced, in order to
 avoid confusion.
 
+[ This policy may be counter-intuitive to current comand-line cultures. ]
 
+
 =head1 Backward (In)compatibility
 
 Muscles have a long memory. You may find yourself typing your favorite Perl 5
@@ -82,6 +98,11 @@
 
 Single-letter options must not be clustered. C<-ab> never means C<-a -b>
 
+[Some systems allow clustering of - options but not of -- options.  Obviously
+such systems disallow multicharacter - options and require --foo instead of
+-foo.  Another option is to allow :a:b as a form of bundling since that's
+unambiguous from a p6 point of view.]
+
 =item *
 
 Options must begin with one of the following symbols: C<< < -- - + : > >>
@@ -95,12 +116,19 @@
 
 Options may be negated with C or C, for example C<:/name>
 
+[:/name reminds me more of an end tag than a negated, but I see
+why you want it, given the history of history characters...interestingly,
+:0name has the same effect in current p6, since we generalized :3x
+and such.]
+
 =item *
 
 The special option C<--> signals the parser to stop option processing.
 Arguments following C<--> are always parsed as a list of values, even if
 they look like valid options.
 
+[Distinguish here from --foo options?  "...with no identifier" or some such]
+
 =back
 
 
@@ -108,11 +136,13 @@
 delimiters on either end, allowing options to be passed through for later
 processing, and are parsed with the following rules:
 
+[ s/for later processing/to specified subsystems/ would be clearer, I think. ]
+
 =over 4
 
 =item *
 
-The opening delimeter begins with C<++>, the closing delimiter with C<-->.
+The opening delimiter begins with C<++>, the closing delimiter with C<-->.
 
 =item *
 
@@ -128,11 +158,28 @@
 run-time component. For example, C<++RTS=parser ... --RTS=parser> directs
 the delimited options to the parser (see L below).
 
+[This seems a bit bogus insofar as --RTS=parser is still officially
+ambiguous with switches inside.  Plus it's not at all clear why this
+isn't just ++PARSER ... --PARSER.  What's the parser got to do with
+the run-time system?
+
+Other options that keep the metasyntax further away from ordinary switch
+syntax:
+
+:+PARSER ... :-PARSER
+++BEGIN=PARSER ... ++END=PARSER
+++PARSER ... ++/PARSER
+
+The last one having reverberations of html tags.  But in any case
+I think I like the consistent ++ escape for metasyntax.]
+
 =item *
 
 When an optional parameter is given, it must be specified on both the opening
 and closing delimited options.
 
+[To me this just means you allow names with = in the middle.]
+
 =item *
 
 If the closing delimiter is omitted, the rest of the command line is consumed.
@@ -141,13 +188,22 @@
 
 The C<--> option has no effect within a delimited option.
 
+[How do you know?  That's up to the subprocessor, surely?  What if they
+want to treat the rest of the arguments as data even if they happen
+to start with '--'?  I think what you mean is that it does not suppress
+searching for the closer.]
+
 =item *
 
 Delimited options cannot be negated.
 
 =back
 
+[From the P6 viewpoint, these options should probably be shoved into
+context variables and be invisible to MAIN except as %+OPTS
+or @+PARSER_ARGS or some such.]
 
+
 Values are parsed with the following rules:
 
 =over 4
@@ -168,6 +224,10 @@
 M

r24508 - docs/Perl6/Spec

2008-12-19 Thread pugs-commits
Author: wayland
Date: 2008-12-20 04:44:08 +0100 (Sat, 20 Dec 2008)
New Revision: 24508

Modified:
   docs/Perl6/Spec/S22-package-format.pod
Log:
Added some definitions


Modified: docs/Perl6/Spec/S22-package-format.pod
===
--- docs/Perl6/Spec/S22-package-format.pod  2008-12-20 03:19:23 UTC (rev 
24507)
+++ docs/Perl6/Spec/S22-package-format.pod  2008-12-20 03:44:08 UTC (rev 
24508)
@@ -13,24 +13,33 @@
 
 =head1 VERSION
 
-Maintainer: Tim Nelson 
+Maintainer: Jos Boumans 
 Date: 3 Nov 2005
 Last Modified: 19 Dec 2008
 Number: 22
 Version: 2
 
-=head1 Overview
+=head1 OVERVIEW
 
-=head2 What this isn't
+=head2 Terminology and Scope
 
+I'll start by listing a few terms, and whether this document is supposed to 
cover them or 
+not.  
+
 =over
 
-=item * This does not specify repositories.  For information on that, see 
-http://cpan6.org/
+=item * .jib files; this is the source package format, and is specified in 
this document
 
-=item * This does not specify software for downloading, building, or 
installing packages.  
-For information on that, see build-and-install-notes.pod
+=item * CPAN6; this is a piece of software for managing an archive network 
(such as CPAN).  
+This is not specified in this document; see http://cpan6.org/
 
+=item * ???A; this is an actual network based on the cpan6 software (see 
above).  It also 
+is not documented here.  
+
+=item * ???B; this is a piece of software that starts with what it can get on 
???A, and 
+attempts to give you an installed perl module (this is a replacement for 
+CPANPLUS/cpan2dist)
+
 =back
 
 =head2 Inspirations
@@ -42,11 +51,13 @@
 =item * Debian Policy: http://www.us.debian.org/doc/debian-policy
 
 =item * Software::Packager::Metadata: 
-http://perlsoftpackmet.svn.sourceforge.net/viewvc/perlsoftpackmet/main/doc/ 
(click ont he 
+http://perlsoftpackmet.svn.sourceforge.net/viewvc/perlsoftpackmet/main/doc/ 
(click on the 
 link in the Rev. column next to Overview)
 
-=head1 Package Layout
+=back
 
+=head1 PACKAGE LAYOUT
+
 =head2 Project directory
 
 Step 1 of the general flow should ideally be done by an automated tool, like
@@ -113,7 +124,7 @@
 There is room to ship more files alongside the 2 above mentioned archives.
 This allows us to ship an extra md5sum, version, signature, anything.
 
-=head1 Metadata Spec
+=head1 METADATA SPEC
 
 - Define no more than needed to get started for now
 - Allow for future extensions
@@ -162,7 +173,7 @@
 
 [3] Steal more tags from debian policy
 
-=head1 Dependencies
+=head1 DEPENDENCIES
 
 =head2 Dependency Notation
 



r24558 - docs/Perl6/Spec

2008-12-22 Thread pugs-commits
Author: moritz
Date: 2008-12-22 17:23:57 +0100 (Mon, 22 Dec 2008)
New Revision: 24558

Modified:
   docs/Perl6/Spec/S12-objects.pod
Log:
[S12] fixed small typo


Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2008-12-22 16:14:10 UTC (rev 24557)
+++ docs/Perl6/Spec/S12-objects.pod 2008-12-22 16:23:57 UTC (rev 24558)
@@ -188,7 +188,7 @@
 Note that the C function is not context sensitive and thus always
 returns the current object as a single item even in list context.
 Hence if your current object happens to be an array but you did not
-declare it with an explicit array variable. you need to explicitly
+declare it with an explicit array variable, you need to explicitly
 access the elements of the array somehow:
 
 any(self) # WRONG



r24656 - docs/Perl6/Spec

2008-12-27 Thread pugs-commits
Author: lwall
Date: 2008-12-28 04:17:03 +0100 (Sun, 28 Dec 2008)
New Revision: 24656

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S13-overloading.pod
Log:
[Spec] get rid of some fossil uses of * spotted by masak++


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2008-12-27 23:47:44 UTC (rev 24655)
+++ docs/Perl6/Spec/S02-bits.pod2008-12-28 03:17:03 UTC (rev 24656)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 19 Nov 2008
+  Last Modified: 27 Dec 2008
   Number: 2
-  Version: 143
+  Version: 144
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -777,8 +777,7 @@
 
 =item *
 
-Ordinarily a term beginning with C<*> indicates a global function
-or type name, but by itself, the C<*> term captures the notion of
+The C<*> character as a standalone term captures the notion of
 "Whatever", which is applied lazily by whatever operator it is an
 argument to.  Generally it can just be thought of as a "glob" that
 gives you everything it can in that argument position.  For instance:
@@ -805,6 +804,28 @@
 is effectively immutable, the optimizer is free to recognize C<*>
 and optimize in the context of what operator it is being passed to.
 
+Most of the built-in numeric operators treat an argument of C<*> as
+indicating the desire to create a function of a single unknown, so:
+
+* - 1
+
+produces a result similar to:
+
+{ $^x - 1 }
+
+except that the result is still of type C.
+
+A value of type C may therefore be called as a function of
+one argument.  The bare C<*> form therefore represents the identify function:
+
+*(42) == 42
+(* + 1)(42) == 43
+
+Note that the final element of an array is subscripted as C<@a[*-1]>,
+which means that when the subscripting operation calls the C
+object, it supplies an argument indicating the number of elements in
+(that dimension of) the array.  See S09.
+
 A variant of C<*> is the C<**> term.  It is generally understood to
 be a multidimension form of C<*> when that makes sense.
 
@@ -1882,7 +1903,7 @@
 values into C<%*ENV> to change what subprocesses see:
 
 temp %*ENV{LANG} = $+LANG;  # may be modified by parent
-system "greet";
+run "greet";
 
 =item *
 

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2008-12-27 23:47:44 UTC (rev 24655)
+++ docs/Perl6/Spec/S06-routines.pod2008-12-28 03:17:03 UTC (rev 24656)
@@ -13,9 +13,9 @@
 
   Maintainer: Larry Wall 
   Date: 21 Mar 2003
-  Last Modified: 21 Nov 2008
+  Last Modified: 27 Dec 2008
   Number: 6
-  Version: 97
+  Version: 98
 
 
 This document summarizes Apocalypse 6, which covers subroutines and the
@@ -259,42 +259,35 @@
 =head2 Globally scoped subroutines
 
 Subroutines and variables can be declared in the global namespace, and are
-thereafter visible everywhere in a program.
+thereafter visible everywhere in a program via the GLOBAL package.  They
+may be made directly visible by importation.
 
-Global subroutines and variables are normally referred to by prefixing
-their identifiers with C<*> (short for "C").   The C<*>
-is required on the declaration unless the C namespace can be
-inferred some other way, but the C<*> may be omitted on use if the
-reference is unambiguous:
+Global subroutines and variables are normally referred to use of the C<*> 
twigil
+(short for "C").
 
 $*next_id = 0;
-sub *saith($text)  { print "Yea verily, $text" }
+sub GLOBAL::saith($text)  { print "Yea verily, $text" }
 
 module A {
-my $next_id = 2;# hides any global or package $next_id
-saith($next_id);# print the lexical $next_id;
-saith($*next_id);   # print the global $next_id;
+my $next_id = 2; # hides any global or package $next_id
+&*saith($next_id);   # print the lexical $next_id;
+&*saith($*next_id);  # print the global $next_id;
 }
 
 module B {
-saith($next_id);# Unambiguously the global $next_id
+use GLOBAL <$next_id>;
+&*saith($next_id);# Unambiguously the global $next_id
 }
 
-However, under stricture (the default for most code), the C<*> is required
-on variable references.  It's never required on sub calls, and in fact,
-the syntax
+=head2 Dynamically scoped subroutines
 
-$x = *saith($y);
+Similarly, you may define contextual subroutines:
 
-is illegal, because a C<*> where a term is expected is always parsed
-as the "whatever" token.  If you really want to use a C<*>, you must
-also use the sigil along with the twigil:
+my sub myfunc ($x) is context { ... }
 
-$x = &*saith($y);
+This may then be invoked via the syntax for contextual variables:
 
-Only the name is installed into

r24657 - docs/Perl6/Spec

2008-12-27 Thread pugs-commits
Author: lwall
Date: 2008-12-28 04:30:13 +0100 (Sun, 28 Dec 2008)
New Revision: 24657

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S04-control.pod
Log:
[Spec] differentiate $*ARGFILES from the $*ARGS capture, noticed by zev++


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2008-12-28 03:17:03 UTC (rev 24656)
+++ docs/Perl6/Spec/S02-bits.pod2008-12-28 03:30:13 UTC (rev 24657)
@@ -14,7 +14,7 @@
   Date: 10 Aug 2004
   Last Modified: 27 Dec 2008
   Number: 2
-  Version: 144
+  Version: 145
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -1958,7 +1958,7 @@
 =item *
 
 Standard input is C<$*IN>, standard output is C<$*OUT>, and standard error
-is C<$*ERR>.  The magic command-line input handle is C<$*ARGS>.
+is C<$*ERR>.  The magic command-line input handle is C<$*ARGFILES>.
 The arguments themselves come in C<@*ARGS>.  See also "Declaring a MAIN
 subroutine" in S06.
 

Modified: docs/Perl6/Spec/S04-control.pod
===
--- docs/Perl6/Spec/S04-control.pod 2008-12-28 03:17:03 UTC (rev 24656)
+++ docs/Perl6/Spec/S04-control.pod 2008-12-28 03:30:13 UTC (rev 24657)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 19 Aug 2004
-  Last Modified: 14 Oct 2008
+  Last Modified: 27 Dec 2008
   Number: 4
-  Version: 70
+  Version: 71
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -458,7 +458,7 @@
 
 which is short for
 
-for =$*ARGS {...}
+for =$*ARGFILES {...}
 
 Arguments bound to the formal parameters of a pointy block are by
 default readonly within the block.  You can declare a parameter



r24658 - docs/Perl6/Spec

2008-12-27 Thread pugs-commits
Author: lwall
Date: 2008-12-28 04:36:24 +0100 (Sun, 28 Dec 2008)
New Revision: 24658

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[Spec] remove fossil typecast noticed by masak++


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2008-12-28 03:30:13 UTC (rev 24657)
+++ docs/Perl6/Spec/S02-bits.pod2008-12-28 03:36:24 UTC (rev 24658)
@@ -704,7 +704,7 @@
 scoped Unicode abstraction level.  (Which defaults to graphemes.)
 Otherwise you'll need to coerce to the proper units:
 
-substr($string, 42.as(Bytes), 1.as(ArabicChars))
+substr($string, Bytes(42), ArabicChars(1))
 
 Of course, such a dimensional number will fail if used on a string
 that doesn't provide the appropriate abstraction level.



r24669 - docs/Perl6/Spec

2008-12-28 Thread pugs-commits
Author: ruoso
Date: 2008-12-28 19:11:12 +0100 (Sun, 28 Dec 2008)
New Revision: 24669

Modified:
   docs/Perl6/Spec/S07-iterators.pod
Log:
[spec] name OutOfItemsException in the DRAFT S07

Modified: docs/Perl6/Spec/S07-iterators.pod
===
--- docs/Perl6/Spec/S07-iterators.pod   2008-12-28 18:08:20 UTC (rev 24668)
+++ docs/Perl6/Spec/S07-iterators.pod   2008-12-28 18:11:12 UTC (rev 24669)
@@ -10,8 +10,8 @@
  Contributions: Tim Nelson 
 Daniel Ruoso 
  Date:  27 Nov 2008
- Last Modified: 27 Nov 2008
- Version:   2
+ Last Modified: 28 Dec 2008
+ Version:   3
 
 =head1 Laziness and Eagerness
 
@@ -146,7 +146,7 @@
 returned in each iteration is visible if this iterator is being used
 to build a slice. While building a List, the items will be flattened.
 
-When it runs out of items, it will throw an exception.  
+When it runs out of items, it will throw an OutOfItemsException.  
 
 =head1 Auxiliary Implementations
 



r24671 - docs/Perl6/Spec

2008-12-28 Thread pugs-commits
Author: tjp
Date: 2008-12-29 03:54:57 +0100 (Mon, 29 Dec 2008)
New Revision: 24671

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
Log:
Fixed typos/grammar in S02-S06.


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2008-12-28 18:21:49 UTC (rev 24670)
+++ docs/Perl6/Spec/S02-bits.pod2008-12-29 02:54:57 UTC (rev 24671)
@@ -1545,7 +1545,7 @@
 
 With multiple dispatch, C<&foo> may actually be the name of a set
 of candidate functions (which you can use as if it were an ordinary function).
-However, in that case C<&foo> by itself is not be sufficient to uniquely
+However, in that case C<&foo> by itself is not sufficient to uniquely
 name a specific function.  To do that, the type may be refined by
 using a signature literal as a postfix operator:
 

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2008-12-28 18:21:49 UTC (rev 24670)
+++ docs/Perl6/Spec/S03-operators.pod   2008-12-29 02:54:57 UTC (rev 24671)
@@ -2501,7 +2501,7 @@
 =item *
 
 List operators are all parsed consistently.  As in Perl 5,
-to the left a list operator look like term, while to the right it looks like
+to the left a list operator looks like a term, while to the right it looks like
 an operator that is looser than comma.  Unlike in Perl 5, the difference
 between the list operator form and the function form is consistently
 indicated via whitespace between the list operator and the first
@@ -4030,7 +4030,7 @@
 
 (Note that the semantics of C are different from Perl 5, where the
 initialization happens at the same time as a C.  To get the same
-effect in Perl 6 you'd have to say "c<(our $foo) = 1;>" instead.)
+effect in Perl 6 you'd have to say "C<(our $foo) = 1;>" instead.)
 
 If you do not initialize a container, it starts out undefined at the
 beginning of its natural lifetime.  (In other words, you can't use

Modified: docs/Perl6/Spec/S04-control.pod
===
--- docs/Perl6/Spec/S04-control.pod 2008-12-28 18:21:49 UTC (rev 24670)
+++ docs/Perl6/Spec/S04-control.pod 2008-12-29 02:54:57 UTC (rev 24671)
@@ -1298,7 +1298,7 @@
 sub foo {
# conceptual cloning happens to both blocks below
 my $x = 1;
-my sub bar { print $x } # already conceptualy cloned, but can 
be lazily deferred
+my sub bar { print $x } # already conceptually cloned, but can 
be lazily deferred
 my &baz := { bar(); print $x }; # block is cloned immediately, forcing 
cloning of bar
 my $code = &bar;# this would also force bar to be 
cloned
 return &baz;

Modified: docs/Perl6/Spec/S05-regex.pod
===
--- docs/Perl6/Spec/S05-regex.pod   2008-12-28 18:21:49 UTC (rev 24670)
+++ docs/Perl6/Spec/S05-regex.pod   2008-12-29 02:54:57 UTC (rev 24671)
@@ -1421,7 +1421,7 @@
 Note that C<<  >> is different from C<< <-alpha> >>.
 C<< /<-alpha>/ >> is a complemented character class equivalent to
 C<<< /> ./ >>>, whereas C<<  >> is a zero-width
-assertion equivalent to a />/ assertion.
+assertion equivalent to a C<<< />/ >>> assertion.
 
 Note also that as a metacharacter C doesn't change the parsing
 rules of whatever follows (unlike, say, C<+> or C<->).

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2008-12-28 18:21:49 UTC (rev 24670)
+++ docs/Perl6/Spec/S06-routines.pod2008-12-29 02:54:57 UTC (rev 24671)
@@ -535,7 +535,7 @@
 
 The C<:p> stands for "pairs", not "positional"--the C<:p> adverb may be
 placed on any Hash access to make it mean "pairs" instead of "values".
-If you want the pair (or pairs) to be interpreted a named argument,
+If you want the pair (or pairs) to be interpreted as a named argument,
 you may do so by prefixing with the C<< prefix:<|> >> operator:
 
 doit |%hash:p,1,2,3;



r24680 - docs/Perl6/Spec

2008-12-29 Thread pugs-commits
Author: lwall
Date: 2008-12-29 18:16:02 +0100 (Mon, 29 Dec 2008)
New Revision: 24680

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] derivatives of * are Code, not Whatever


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2008-12-29 16:31:58 UTC (rev 24679)
+++ docs/Perl6/Spec/S02-bits.pod2008-12-29 17:16:02 UTC (rev 24680)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 27 Dec 2008
+  Last Modified: 29 Dec 2008
   Number: 2
-  Version: 145
+  Version: 146
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -809,15 +809,18 @@
 
 * - 1
 
-produces a result similar to:
+produces a function of a single argument:
 
 { $^x - 1 }
 
-except that the result is still of type C.
+This closure is of type C, not C, so that constructs can 
distinguish
+via multiple dispatch:
 
-A value of type C may therefore be called as a function of
-one argument.  The bare C<*> form therefore represents the identify function:
+1,2,3 ... *
+1,2,3 ... *+1
 
+The bare C<*> form may also be called as a function, and represents the 
identify function:
+
 *(42) == 42
 (* + 1)(42) == 43
 



r24681 - docs/Perl6/Spec

2008-12-29 Thread pugs-commits
Author: schwarzer
Date: 2008-12-29 22:41:59 +0100 (Mon, 29 Dec 2008)
New Revision: 24681

Modified:
   docs/Perl6/Spec/S01-overview.pod
Log:
[docs/Perl6/Spec] typo: use lower case letters

Modified: docs/Perl6/Spec/S01-overview.pod
===
--- docs/Perl6/Spec/S01-overview.pod2008-12-29 17:16:02 UTC (rev 24680)
+++ docs/Perl6/Spec/S01-overview.pod2008-12-29 21:41:59 UTC (rev 24681)
@@ -80,8 +80,8 @@
 =item *
 
 RFCs are rated on "PSA": whether they point out a real Problem,
-whether they present a viable Solution, and whether that solution is
-likely to be Accepted as part of Perl 6.
+whether they present a viable solution, and whether that solution is
+likely to be accepted as part of Perl 6.
 
 =item *
 



r24682 - docs/Perl6/Spec

2008-12-29 Thread pugs-commits
Author: schwarzer
Date: 2008-12-29 22:43:47 +0100 (Mon, 29 Dec 2008)
New Revision: 24682

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[docs/Perl6/Spec] typos and minor style changes

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2008-12-29 21:41:59 UTC (rev 24681)
+++ docs/Perl6/Spec/S03-operators.pod   2008-12-29 21:43:47 UTC (rev 24682)
@@ -2256,9 +2256,9 @@
 The postfix interpretation of an operator may be overridden by
 use of a quoted method call, which calls the prefix form instead.
 So C is always the postfix operator, but C will always
-call C.  In particular, you can say things like C<$array.'@'>.
-and C<$fh.'='>, which
-because of the quotes will not be confused lexically with C<$fh.=new>.
+call C.  In particular, you can say things like C<$array.'@'>
+and C<$fh.'='>, which will not be confused lexically with C<$fh.=new>
+due to the quotes.
 
 =item *
 
@@ -2302,8 +2302,8 @@
 
 =item *
 
-C splits into two operators: C (which concatenates repetitions 
-of a string to produce a single string), and C (which creates a list of 
+C splits into two operators: C (which concatenates repetitions
+of a string to produce a single string), and C (which creates a list of
 repetitions of a list or item).  C<"foo" xx *> represents an arbitrary
 number of copies, useful for initializing lists.  The left side of
 an C is evaluated only once.  (To call a block repeatedly, use a C
@@ -2650,9 +2650,8 @@
  (1|2|3) + 4;# 5|6|7
  (1|2) + (3&4);  # (4|5) & (5|6)
 
-Note how when two junctions are applied through an operator, the result
-is a junction representing the operator applied to each combination of
-values.
+Note how the result is a junction representing the operator applied to each
+combination of values, when two junctions are applied through an operator.
 
 Junctions come with the functional variants C, C, C, and 
C.
 
@@ -2771,7 +2770,7 @@
 
 =item *
 
-The C operator (less than, equal, or greater) is defined
+The C operator (less than, equal or greater than) is defined
 in terms of C, so C<$a leg $b> is now defined as C<~$a cmp ~$b>.
 The sort operator still defaults to C rather than C.  The
 C<< <=> >> operator's semantics are unchanged except that it returns
@@ -2878,7 +2877,7 @@
 
 @array[0...@array], @array[*-1] xx *
 
-An empty Range cannot be iterated; it returns a C instead.  An empty
+An empty range cannot be iterated; it returns a C instead.  An empty
 range still has a defined min and max, but the min is greater than the max.
 
 If a range is generated using a magical autoincrement, it stops if the magical
@@ -2927,7 +2926,7 @@
 In particular, multiplicative operators not only multiply the endpoints
 but also the "by" of the C object:
 
-(1..11:by(2)) * 5   # same as 5..55:by(10) 
+(1..11:by(2)) * 5   # same as 5..55:by(10)
 5,15,25,35,45,45,55
 
 Conjecture: non-linear functions might even produce non-uniform "by" values!
@@ -3341,7 +3340,7 @@
  <== grep { /^ \d+ $/ }
  <== @data;
 
-Either form more clearly indicates the flow of data.  See S06 for 
+Either form more clearly indicates the flow of data.  See S06 for
 more of the (less-than-obvious) details on these two operators.
 
 =head1 Meta operators



r24689 - docs/Perl6/Spec

2008-12-30 Thread pugs-commits
Author: lwall
Date: 2008-12-30 21:15:36 +0100 (Tue, 30 Dec 2008)
New Revision: 24689

Modified:
   docs/Perl6/Spec/S01-overview.pod
Log:
[S01] revert correction of non-mistake


Modified: docs/Perl6/Spec/S01-overview.pod
===
--- docs/Perl6/Spec/S01-overview.pod2008-12-30 19:37:01 UTC (rev 24688)
+++ docs/Perl6/Spec/S01-overview.pod2008-12-30 20:15:36 UTC (rev 24689)
@@ -80,8 +80,8 @@
 =item *
 
 RFCs are rated on "PSA": whether they point out a real Problem,
-whether they present a viable solution, and whether that solution is
-likely to be accepted as part of Perl 6.
+whether they present a viable Solution, and whether that solution is
+likely to be Accepted as part of Perl 6.
 
 =item *
 



r24694 - docs/Perl6/Spec

2008-12-30 Thread pugs-commits
Author: particle
Date: 2008-12-31 00:03:32 +0100 (Wed, 31 Dec 2008)
New Revision: 24694

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
elaborate on concepts in introduction, and replace 'compiler' with 'program'

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-30 22:45:00 UTC (rev 24693)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-30 23:03:32 UTC (rev 24694)
@@ -14,17 +14,43 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 12 Dec 2008
-  Version: 1
+  Last Modified: 30 Dec 2008
+  Version: 2
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
 clarity, consistency, and extensibility. Many of the syntax revisions are
-extensions, so you'll find that much of the syntax embedded in your muscle
-memory will still work.
+extensions, so you'll find that much of the Perl 5 syntax embedded in your
+muscle memory will still work.
 
+Notable features described in the sections below include:
+
+=over 4
+
+=item *
+
+A much smarter default command-line processor in the core
+
+=item *
+
+All options have a long, descriptive name for increased clarity
+
+=item *
+
+Common options have a short, single-letter name, and allow bundling
+
+=item *
+
+Extended option syntax provides the ability to set boolean true/false
+
+=item *
+
+New C<++> metasyntax allows options to be passed through to subsystems
+
+=back
+
 This interface to Perl 6 is special in that it occurs at the intersection of
-the compiler and the operating system's command line shell, and thus is not
+the program and the operating system's command line shell, and thus is not
 accessed via a consistent syntax everywhere. Perl is born of Unix, and as such
 the syntax presented in this document is expected to work in a Unix-style
 shell. To explore the particularities of other operating systems, see
@@ -35,26 +61,15 @@
 
 =head1 Command Line Elements
 
-The command line is broken down into two basic elements: a I, and
+The command line is broken down into two basic elements: a I, and
 I. Each command line element is whitespace separated, so elements
-containing whitespace must be quoted. The I processes the arguments
+containing whitespace must be quoted. The I processes the arguments
 and performs the requested actions. It looks something like F,
 F, F, and is followed by zero or more I.
-Perl 6 does not do any processing of the I portion of the command
-line, but it is made available at run-time in the read-only C<$*VM> variable.
+Perl 6 does not do any processing of the I portion of the command
+line, but it is made available at run-time in the read-only C<$?PROGRAM>
+variable.
 
-[ It seems wrong to call this a I when (from the Unix point
-of view) it's just a program to run, and the compilation may have
-happened long ago.  Maybe I or I instead.  Which
-phases are invoked may well depend on the nature of the file that is
-specified as a program to be interpreted, as well as the requested
-form of output.]
-
-[ $*VM is certainly wrong for the original compiler.  It would have to
-be $?VM, though that may be wrong too.  One could imagine a particular
-compiler that ran on multiple VMs, in which case some other variable
-would be needed to indicate the original compiler.]
-
 Command line I are further broken down into I and
 I. Unlike Perl 5, I and I may be intermixed on the
 command line. This mirrors the Perl 6 argument syntax for Routines, which
@@ -154,7 +169,7 @@
 Delimited options take an optional parameter using the
 C<++option=param ... --option=param> syntax. This both allows disambiguation
 (in the case where the passthru options need to pass C<--option>), but
-may also be used to direct the compiler to pass the options to a particular
+may also be used to direct the program to pass the options to a particular
 run-time component. For example, C<++RTS=parser ... --RTS=parser> directs
 the delimited options to the parser (see L below).
 
@@ -282,12 +297,9 @@
 
 =item *
 
-B flags set the operational mode of the compiler (e.g. I<--doc>, I<-e>).
+B flags set Perl's operational mode (e.g. I<--doc>, I<-e>).
 Only one mode flag may be specified on the command line.
 
-[Again, we might be long gone from the "compiler" here, so a better word
-is needed.]
-
 =item *
 
 B flags may be set on the command line, via the I
@@ -300,7 +312,7 @@
 =item *
 
 B flags may be set only on the command line, and affect the entire
-run of the compiler.
+run of the program.
 
 [s/comiler/whatever/]
 
@@ -534,7 +546,7 @@
 
 =item -v, --version
 
-Display compiler name, version, patchlevel, etc.
+Display program name, version, patchlevel, etc.
 
 Category: Mode
 



r24695 - docs/Perl6/Spec

2008-12-30 Thread pugs-commits
Author: particle
Date: 2008-12-31 00:28:44 +0100 (Wed, 31 Dec 2008)
New Revision: 24695

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] allow option clustering; change delimited option syntax to ++foo ... 
++/foo; update notes

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-30 23:03:32 UTC (rev 24694)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-30 23:28:44 UTC (rev 24695)
@@ -15,7 +15,7 @@
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
   Last Modified: 30 Dec 2008
-  Version: 2
+  Version: 3
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -80,7 +80,11 @@
 
 [ This policy may be counter-intuitive to current comand-line cultures. ]
 
+{{ 'ack' is a notable exception to the old rule, and i like the freedom.
+besides, perl 6 is about looking forward, and creating a new culture. :)
+on the other hand, i won't fight to keep this if it doesn't get support. }}
 
+
 =head1 Backward (In)compatibility
 
 Muscles have a long memory. You may find yourself typing your favorite Perl 5
@@ -88,7 +92,7 @@
 
 =head2 Unchanged Syntactic Features
 
-{{TODO}}
+{{TODO short names, bundling, etc}}
 
 =head2 Removed Syntactic Features
 
@@ -107,20 +111,25 @@
 
 =item *
 
+Options must begin with one of the following symbols: C<< < -- - + : > >>.
+
+=item *
+
 Options are case sensitive. C<-o> and C<-O> are not the same option.
 
 =item *
 
-Single-letter options must not be clustered. C<-ab> never means C<-a -b>
+All options have a multi-character, descriptive name for increased clarity.
+Multi-character option names always begin with C<-->, C<+>, or C<:>.
 
-[Some systems allow clustering of - options but not of -- options.  Obviously
-such systems disallow multicharacter - options and require --foo instead of
--foo.  Another option is to allow :a:b as a form of bundling since that's
-unambiguous from a p6 point of view.]
+=item *
 
+Common options have a short, one-character name for speed.
+Single-character names always begin with C<->.
+
 =item *
 
-Options must begin with one of the following symbols: C<< < -- - + : > >>
+Single-letter options may be clustered. C<-ab> means C<-a -b>.
 
 =item *
 
@@ -136,29 +145,32 @@
 :0name has the same effect in current p6, since we generalized :3x
 and such.]
 
+{{ dunno how TIMTOWTDI i want to get here, so i haven't changed the text
+above, but have standardized on C below. }}
+
 =item *
 
 The special option C<--> signals the parser to stop option processing.
-Arguments following C<--> are always parsed as a list of values, even if
-they look like valid options.
+Arguments following a bare C<--> (with no identifier) are always parsed as
+a list of values, even if they look like valid options.
 
-[Distinguish here from --foo options?  "...with no identifier" or some such]
-
 =back
 
 
 Delimited options are a special form of option that are specified by
-delimiters on either end, allowing options to be passed through for later
-processing, and are parsed with the following rules:
+delimiters on either end, allowing options to be passed through to specified
+subsystems, and are parsed with the following rules:
 
-[ s/for later processing/to specified subsystems/ would be clearer, I think. ]
-
 =over 4
 
 =item *
 
-The opening delimiter begins with C<++>, the closing delimiter with C<-->.
+The opening and closing delimiters begin with two or more plus characters,
+for example C<++>. You'll usually use two plus characters, but more are
+allowed to disambiguate (more below).
 
+{{TODO put more below, or refer to somewhere with more}}
+
 =item *
 
 Opening and closing delimited option names follow option identifier naming
@@ -166,48 +178,13 @@
 
 =item *
 
-Delimited options take an optional parameter using the
-C<++option=param ... --option=param> syntax. This both allows disambiguation
-(in the case where the passthru options need to pass C<--option>), but
-may also be used to direct the program to pass the options to a particular
-run-time component. For example, C<++RTS=parser ... --RTS=parser> directs
-the delimited options to the parser (see L below).
-
-[This seems a bit bogus insofar as --RTS=parser is still officially
-ambiguous with switches inside.  Plus it's not at all clear why this
-isn't just ++PARSER ... --PARSER.  What's the parser got to do with
-the run-time system?
-
-Other options that keep the metasyntax further away from ordinary switch
-syntax:
-
-:+PARSER ... :-PARSER
-++BEGIN=PARSER ... ++END=PARSER
-++PARSER ... ++/PARSER
-
-The last one having reverberations of html tags.  But in any case
-I think I like the consistent ++ escape for metasyntax.]
-
-=item *
-
-When an optional parameter is given, it must be specified on both the opening
-and closing delimited options.
-
-[To me this just means you allow names

r24696 - docs/Perl6/Spec

2008-12-30 Thread pugs-commits
Author: particle
Date: 2008-12-31 00:30:54 +0100 (Wed, 31 Dec 2008)
New Revision: 24696

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
rename Awk service to Autoloop

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-30 23:28:44 UTC (rev 24695)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-30 23:30:54 UTC (rev 24696)
@@ -15,7 +15,7 @@
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
   Last Modified: 30 Dec 2008
-  Version: 3
+  Version: 4
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -330,11 +330,11 @@
 
 =item -a
 
-Sets input record separator.
+Turns on autosplit mode.
 
 Category: Dynamic
 
-Service: Awk
+Service: Autoloop
 
 Notes: Annotates function produced by -n | -p
 
@@ -425,7 +425,7 @@
 
 Category: Dynamic
 
-Service: Awk
+Service: Autoloop
 
 Notes: Substitutes a function for the default function which
 is { split ' ' } or whatever.
@@ -480,7 +480,7 @@
 
 Category: Dynamic
 
-Service: Awk
+Service: Autoloop
 
 Notes: Consumes the -e function, returns a new function and assigns to MAIN.
 
@@ -494,7 +494,7 @@
 
 Category: Dynamic
 
-Service: Awk
+Service: Autoloop
 
 Notes: Consumes the -e function, returns a new function and assigns to MAIN.
 



r24697 - docs/Perl6/Spec

2008-12-30 Thread pugs-commits
Author: particle
Date: 2008-12-31 00:55:46 +0100 (Wed, 31 Dec 2008)
New Revision: 24697

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] update option reference, including: longnames for all options; desugaring 
for some options; new options (-e6, -o, -O, -T)

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-30 23:30:54 UTC (rev 24696)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-30 23:55:46 UTC (rev 24697)
@@ -15,7 +15,7 @@
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
   Last Modified: 30 Dec 2008
-  Version: 4
+  Version: 5
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -328,88 +328,65 @@
 
 =over 4
 
-=item -a
+=item --autosplit, -a
 
 Turns on autosplit mode.
 
-Category: Dynamic
-
 Service: Autoloop
 
 Notes: Annotates function produced by -n | -p
 
-[confusingly different from p5's -a switch, which turns on autosplit.]
+=item ++argsproc [options, values] ++/argsproc
 
-=item --option-parser file
+{{TODO don't like this name, but don't like ++cmd either}}
 
-Add a command-line parsing module.
+Add a command-line processor.
 
-Category: Static
-
 Service: Option
 
 Notes: When this option is parsed, it immediately triggers an action that
 could affect the remainder of the parse. Therefore, it's a good idea to put
-this option/value pair as early as possible in the argument list.
+this option as early as possible in the argument list.
 
-{{ TODO more details needed }}
+{{TODO more details needed}}
 
-[maybe more like ++CMD --your_ad_here ++/CMD]
 
+=item --check-syntax, -c
 
-=item -c
+Check syntax, then exit.
 
-Check syntax.
-
-Category: Mode
-
 Service: Runtime
 
-Notes: exits early, before MAIN().
+Notes: Desugars to C<++compiler '--CHECK{ compiles_ok(); exit; }' ++/compiler>
 
-[exits long before MAIN(), at CHECK time.  Also, not exclusive
-with other "Modes".  All it does is suppress running.]
-
-[idea; maybe switches like -c should be documented to
-desugar to ++COMPILER --CHECK_compiles_ok ++/COMPILER or whatever.
-This might help clarify which "pass" commits to the value.]
-
 =item --doc
 
 perldoc
 
-Category: Mode
-
 Service: Doc
 
-[++COMPILER --CHECK_compiles_ok --CHECK_dump_perldoc ++/COMPILER]
+Notes: Desugars to
+C<++compiler '--CHECK{ compiles_ok(); }' '--CHECK{ dump_perldoc(); }' 
++/compiler>
 
-=item -Dletters, -Dnumbers
+{{TODO what do i pass to dump_perldoc? C<$+ARGS>, maybe?}}
 
+=item ++debugger [switches, flags] ++/debugger
+
 Set debugging flags.
 
-Category: ?
-
 Service: Debugger
 
-Notes: Should this load the debugger? No idea what should happen if the
-interpeter is built without debugging enabled. There are multiple levels:
-breaking into parrot, enabling flags of perl 6 introspection, enabling a
-perl level debugger. So... which one? Need a debugger spec to guide this.
+Notes: At least it's a start. Need a debugger spec for more.
 
-[little rhyme or reason to the p5 flags here, so maybe we can dehuffmanize
-debugging switches and hold -D in reserve.]
+=item --execute, -e commandline
 
-=item -e commandline
+Execute a single-line program. Multiple C<-e> options may be chained together,
+each one representing an input line with an implicit newline at the end.
 
-Execute a single-line program.
-
-Category: Mode
-
 Service: Runtime
 
-Notes: Returns a function that's executed unless otherwise modified by awk
-service's -p , -n, -a, -F.
+Notes: Returns a function that's executed unless otherwise modified by
+Autoloop service's -p , -n, -a, -F.
 Actually combines all source from all -e parameters, then compiles when
 there are no more -e. Assigns the generated function to MAIN.
 
@@ -417,38 +394,34 @@
 redirection of a vaguely here-docish flavor.  You could combine it
 with -c or --doc for instance, so not exclusive.]
 
-=item -F string
+=item --execute-lax, -e6
 
+Execute in lax mode, without strictures and warnings enabled.
+See L for details.
+
+Service: Runtime
+
+=item --autoloop-split, -F [string, closure, etc]
+
 Pattern to split on (used with -a). Accepts unicode strings (as long as your
 shell lets you pass them). Allows passing a closure
-(e.g. -F "{use Text::CSV}"). awk's not better any more :)
+(e.g. -F "{use Text::CSV}"). Awk's not better any more :)
 
-Category: Dynamic
-
 Service: Autoloop
 
 Notes: Substitutes a function for the default function which
 is { split ' ' } or whatever.
 
-[here it's assuming the original -a behavior, not what is
-specced for -a above.]
+=item --help, -h
 
-=item -h, --help
+Print summary of options. Desugars to C<++cmd --print-help --exit ++/cmd>.
 
-Print summary of options.
-
-Category: Mode
-
 Service: Usage
 
-[++CMD --printhelp --exit ++/CMD or some such]
+=item --include, -I
 
-=item -I
-
 Prepend directory to @*INC.
 
-Category: Dynamic
-
 Service: Lib
 
 Notes: this is unspecced els

r24698 - docs/Perl6/Spec

2008-12-30 Thread pugs-commits
Author: lwall
Date: 2008-12-31 03:14:08 +0100 (Wed, 31 Dec 2008)
New Revision: 24698

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] clarification of meaning of HyperWhatever


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2008-12-30 23:55:46 UTC (rev 24697)
+++ docs/Perl6/Spec/S02-bits.pod2008-12-31 02:14:08 UTC (rev 24698)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 29 Dec 2008
+  Last Modified: 30 Dec 2008
   Number: 2
-  Version: 146
+  Version: 147
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -813,7 +813,7 @@
 
 { $^x - 1 }
 
-This closure is of type C, not C, so that constructs can 
distinguish
+This closure is of type C, not C, so that constructs can 
distinguish
 via multiple dispatch:
 
 1,2,3 ... *
@@ -824,19 +824,44 @@
 *(42) == 42
 (* + 1)(42) == 43
 
-Note that the final element of an array is subscripted as C<@a[*-1]>,
-which means that when the subscripting operation calls the C
-object, it supplies an argument indicating the number of elements in
-(that dimension of) the array.  See S09.
+But note that this is I what is happening above, or
 
-A variant of C<*> is the C<**> term.  It is generally understood to
-be a multidimension form of C<*> when that makes sense.
+1,2,3 ... *
 
-Other uses for C<*> will doubtless suggest themselves over time.  These
-can be given meaning via the MMD system, if not the compiler.  In general
-a C should be interpreted as maximizing the degrees of freedom
-in a dwimmey way, not as a nihilistic "don't care anymore--just shoot me".
+would end up meaning:
 
+1,2,3,3,3,3,3,3...
+
+The C<...> operator is instead dispatching bare C<*> to a routine that
+does dwimmery, and in this case decides to supply a function { * + 1 }.
+
+The final element of an array is subscripted as C<@a[*-1]>,
+which means that when the subscripting operation discovers a C
+object for a subscript, it calls it and supplies an argument indicating
+the number of elements in (that dimension of) the array.  See S09.
+
+A variant of C<*> is the C<**> term, which is of type C.
+It is generally understood to be a multidimension form of C<*> when
+that makes sense.  When modified by an operator that would turn C<*>
+into a function of one argument, C<**> instead turns into a function
+with a slurpy argument, of type C.  That is:
+
+* - 1means-> $x { $x - 1 }
+** - 1   means   -> *...@x { map -> $x { $x - 1 }, @x }
+
+Therefore C<@array[^**]> represents C<< @array[{ map { ^* }, @_ }] >>,
+that is to say, every element of the array, no matter how many dimensions.
+(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
+C is always controlled by its immediate context.)
+
+Other uses for C<*> and C<**> will doubtless suggest themselves
+over time.  These can be given meaning via the MMD system, if not
+the compiler.  In general a C should be interpreted as
+maximizing the degrees of freedom in a dwimmy way, not as a nihilistic
+"don't care anymore--just shoot me".
+
 =back
 
 =head2 Native types



r24699 - docs/Perl6/Spec

2008-12-30 Thread pugs-commits
Author: lwall
Date: 2008-12-31 03:23:01 +0100 (Wed, 31 Dec 2008)
New Revision: 24699

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[S03] clean up some awkward phrasing


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2008-12-31 02:14:08 UTC (rev 24698)
+++ docs/Perl6/Spec/S03-operators.pod   2008-12-31 02:23:01 UTC (rev 24699)
@@ -2650,8 +2650,9 @@
  (1|2|3) + 4;# 5|6|7
  (1|2) + (3&4);  # (4|5) & (5|6)
 
-Note how the result is a junction representing the operator applied to each
-combination of values, when two junctions are applied through an operator.
+As illustrated by the last example, when two junctions are applied
+through a single operator, the result is a junction representing the
+application of the operator to each possible combination of values.
 
 Junctions come with the functional variants C, C, C, and 
C.
 
@@ -2770,7 +2771,7 @@
 
 =item *
 
-The C operator (less than, equal or greater than) is defined
+The C operator (less than, equal to, or greater than) is defined
 in terms of C, so C<$a leg $b> is now defined as C<~$a cmp ~$b>.
 The sort operator still defaults to C rather than C.  The
 C<< <=> >> operator's semantics are unchanged except that it returns



r24707 - docs/Perl6/Spec

2008-12-31 Thread pugs-commits
Author: particle
Date: 2008-12-31 19:50:40 +0100 (Wed, 31 Dec 2008)
New Revision: 24707

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] fix typo, s1n++

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-31 17:17:41 UTC (rev 24706)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-31 18:50:40 UTC (rev 24707)
@@ -467,7 +467,7 @@
 Compile to a file, rather than run immediately. If no filename is specified,
 STDOUT is used. Specify the output format with C<--output-format>.
 
-=item autoloop-print, -p
+=item --autoloop-print, -p
 
 Act like sed.
 



r24708 - docs/Perl6/Spec

2008-12-31 Thread pugs-commits
Author: particle
Date: 2008-12-31 19:53:43 +0100 (Wed, 31 Dec 2008)
New Revision: 24708

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] metasyntactic options should shout, to stand out. TimToady++

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-31 18:50:40 UTC (rev 24707)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-31 18:53:43 UTC (rev 24708)
@@ -336,9 +336,9 @@
 
 Notes: Annotates function produced by -n | -p
 
-=item ++argsproc [options, values] ++/argsproc
+=item ++ARGSPROC [options, values] ++/ARGSPROC
 
-{{TODO don't like this name, but don't like ++cmd either}}
+{{TODO don't like this name, but don't like ++CMD either}}
 
 Add a command-line processor.
 
@@ -357,7 +357,7 @@
 
 Service: Runtime
 
-Notes: Desugars to C<++compiler '--CHECK{ compiles_ok(); exit; }' ++/compiler>
+Notes: Desugars to C<++COMPILER '--CHECK{ compiles_ok(); exit; }' ++/COMPILER>
 
 =item --doc
 
@@ -366,11 +366,11 @@
 Service: Doc
 
 Notes: Desugars to
-C<++compiler '--CHECK{ compiles_ok(); }' '--CHECK{ dump_perldoc(); }' 
++/compiler>
+C<++COMPILER '--CHECK{ compiles_ok(); }' '--CHECK{ dump_perldoc(); }' 
++/COMPILER>
 
 {{TODO what do i pass to dump_perldoc? C<$+ARGS>, maybe?}}
 
-=item ++debugger [switches, flags] ++/debugger
+=item ++DEBUGGER [switches, flags] ++/DEBUGGER
 
 Set debugging flags.
 
@@ -414,7 +414,7 @@
 
 =item --help, -h
 
-Print summary of options. Desugars to C<++cmd --print-help --exit ++/cmd>.
+Print summary of options. Desugars to C<++CMD --print-help --exit ++/CMD>.
 
 Service: Usage
 
@@ -453,7 +453,7 @@
 
 Service: Autoloop
 
-Notes: Desugars to C<++parser --prelude=Perl6-autoloop-no-print ++/parser>.
+Notes: Desugars to C<++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER>.
 
 =item --output-format, -O [format]
 
@@ -473,7 +473,7 @@
 
 Service: Autoloop
 
-Notes: Desugars to C<++parser --prelude=Perl6-autoloop-print ++/parser>.
+Notes: Desugars to C<++PARSER --prelude=Perl6-autoloop-print ++/PARSER>.
 
 =item --search-path, -S
 



r24711 - docs/Perl6/Spec

2008-12-31 Thread pugs-commits
Author: particle
Date: 2008-12-31 20:37:46 +0100 (Wed, 31 Dec 2008)
New Revision: 24711

Modified:
   docs/Perl6/Spec/S06-routines.pod
Log:
[S06] update to shortname syntax in command-line examples

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2008-12-31 19:25:52 UTC (rev 24710)
+++ docs/Perl6/Spec/S06-routines.pod2008-12-31 19:37:46 UTC (rev 24711)
@@ -2735,13 +2735,14 @@
 Common Unix command-line conventions are mapped onto the capture
 as follows:
 
- On command line... $*ARGS capture gets...
+Assuming C<-n> is the shortname for C<--name>,
+On command line... $*ARGS capture gets...
 
--name  :name
--name=value:name
--name="spacy value":name«'spacy value'»
--name='spacy value':name«'spacy value'»
--name=val1,'val 2',etc :name«val1 'val 2' etc»
+-n :name
+-n=value   :name
+-n="spacy value"   :name«'spacy value'»
+-n='spacy value'   :name«'spacy value'»
+-n=val1,'val 2',etc:name«val1 'val 2' etc»
 
 --name :name# only if declared Bool
 --name=value   :name # don't care



r24712 - docs/Perl6/Spec

2008-12-31 Thread pugs-commits
Author: particle
Date: 2008-12-31 20:39:19 +0100 (Wed, 31 Dec 2008)
New Revision: 24712

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] update C<--CHECK{...}> syntax with more standard C<-e 'CHECK{...}'>

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-31 19:37:46 UTC (rev 24711)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-31 19:39:19 UTC (rev 24712)
@@ -357,7 +357,7 @@
 
 Service: Runtime
 
-Notes: Desugars to C<++COMPILER '--CHECK{ compiles_ok(); exit; }' ++/COMPILER>
+Notes: Desugars to C<++COMPILER -e 'CHECK{ compiles_ok(); exit; }' ++/COMPILER>
 
 =item --doc
 
@@ -366,7 +366,7 @@
 Service: Doc
 
 Notes: Desugars to
-C<++COMPILER '--CHECK{ compiles_ok(); }' '--CHECK{ dump_perldoc(); }' 
++/COMPILER>
+C<++COMPILER -e 'CHECK{ compiles_ok(); dump_perldoc(); }' ++/COMPILER>
 
 {{TODO what do i pass to dump_perldoc? C<$+ARGS>, maybe?}}
 



r24714 - docs/Perl6/Spec

2008-12-31 Thread pugs-commits
Author: particle
Date: 2008-12-31 21:16:50 +0100 (Wed, 31 Dec 2008)
New Revision: 24714

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] s/bundl/cluster/g; update date/version

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2008-12-31 20:00:53 UTC (rev 24713)
+++ docs/Perl6/Spec/S19-commandline.pod 2008-12-31 20:16:50 UTC (rev 24714)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 30 Dec 2008
-  Version: 5
+  Last Modified: 31 Dec 2008
+  Version: 6
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -37,7 +37,7 @@
 
 =item *
 
-Common options have a short, single-letter name, and allow bundling
+Common options have a short, single-letter name, and allow clustering
 
 =item *
 
@@ -92,7 +92,7 @@
 
 =head2 Unchanged Syntactic Features
 
-{{TODO short names, bundling, etc}}
+{{TODO short names, clustering, etc}}
 
 =head2 Removed Syntactic Features
 



r24732 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle
Date: 2009-01-02 14:36:54 +0100 (Fri, 02 Jan 2009)
New Revision: 24732

Modified:
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] get rid of ugly and confusing C<+option> syntax (bad unix memes)--

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2009-01-01 22:27:50 UTC (rev 24731)
+++ docs/Perl6/Spec/S06-routines.pod2009-01-02 13:36:54 UTC (rev 24732)
@@ -2735,15 +2735,17 @@
 Common Unix command-line conventions are mapped onto the capture
 as follows:
 
-Assuming C<-n> is the shortname for C<--name>,
+Assuming C<-n> is the short name for C<--name>,
 On command line... $*ARGS capture gets...
 
+# Short names
 -n :name
 -n=value   :name
 -n="spacy value"   :name«'spacy value'»
 -n='spacy value'   :name«'spacy value'»
 -n=val1,'val 2',etc:name«val1 'val 2' etc»
 
+# Long names
 --name :name# only if declared Bool
 --name=value   :name # don't care
 --name value   :name # only if not declared Bool
@@ -2756,15 +2758,16 @@
 --name val1 'val 2' etc:name«val1 'val 2' etc» # only if declared @
 -- # end named argument processing
 
-+name  :!name
-+name=value:name but False
-+name="spacy value":name«'spacy value'» but False
-+name='spacy value':name«'spacy value'» but False
-+name=val1,'val 2',etc :name«val1 'val 2' etc» but False
+# Negation
+--/name:!name
+--/name=value  :name but False
+--/name="spacy value"  :name«'spacy value'» but False
+--/name='spacy value'  :name«'spacy value'» but False
+--/name=val1,'val 2',etc   :name«val1 'val 2' etc» but False
 
+# Native
 :name  :name
-:!name :!name   # potential conflict with ! histchar
-:/name :!name   # potential workaround?
+:/name :!name
 :name=value:name
 :name="spacy value":name«'spacy value'»
 :name='spacy value':name«'spacy value'»

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-01 22:27:50 UTC (rev 24731)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-02 13:36:54 UTC (rev 24732)
@@ -29,7 +29,7 @@
 
 =item *
 
-A much smarter default command-line processor in the core
+A smart default command-line processor in the core
 
 =item *
 
@@ -111,7 +111,7 @@
 
 =item *
 
-Options must begin with one of the following symbols: C<< < -- - + : > >>.
+Options must begin with one of the following symbols: C<< < -- - : > >>.
 
 =item *
 
@@ -120,7 +120,7 @@
 =item *
 
 All options have a multi-character, descriptive name for increased clarity.
-Multi-character option names always begin with C<-->, C<+>, or C<:>.
+Multi-character option names always begin with C<--> or C<:>.
 
 =item *
 
@@ -138,16 +138,8 @@
 
 =item *
 
-Options may be negated with C or C, for example C<:/name>
+Options may be negated with C, for example C<--/name>, C<:/name>, C<-/n>.
 
-[:/name reminds me more of an end tag than a negated, but I see
-why you want it, given the history of history characters...interestingly,
-:0name has the same effect in current p6, since we generalized :3x
-and such.]
-
-{{ dunno how TIMTOWTDI i want to get here, so i haven't changed the text
-above, but have standardized on C below. }}
-
 =item *
 
 The special option C<--> signals the parser to stop option processing.
@@ -239,8 +231,8 @@
   token option {
   [
 [
-  $=[ '--' | '-' | '+' | ':' ]
-  $=[ '!' | '/' ]?
+  $=[ '--' | '-' | ':' ]
+  $=[ '/' ]?
   
 ]
 [ '='  [ ','  ]* ]?



r24734 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle
Date: 2009-01-02 15:15:35 +0100 (Fri, 02 Jan 2009)
New Revision: 24734

Modified:
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] options must appear before script name; update version/date metadata

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2009-01-02 13:46:16 UTC (rev 24733)
+++ docs/Perl6/Spec/S06-routines.pod2009-01-02 14:15:35 UTC (rev 24734)
@@ -13,9 +13,9 @@
 
   Maintainer: Larry Wall 
   Date: 21 Mar 2003
-  Last Modified: 27 Dec 2008
+  Last Modified: 2 Jan 2009
   Number: 6
-  Version: 98
+  Version: 99
 
 
 This document summarizes Apocalypse 6, which covers subroutines and the

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-02 13:46:16 UTC (rev 24733)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-02 14:15:35 UTC (rev 24734)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 31 Dec 2008
-  Version: 6
+  Last Modified: 2 Jan 2009
+  Version: 7
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -70,21 +70,12 @@
 line, but it is made available at run-time in the read-only C<$?PROGRAM>
 variable.
 
-Command line I are further broken down into I and
-I. Unlike Perl 5, I and I may be intermixed on the
-command line. This mirrors the Perl 6 argument syntax for Routines, which
-allows named and positional parameters to be intermixed. The recommendation
-for parameter ordering applies here as well, with a slight twist: keep all
-command line options together, even though this is not enforced, in order to
-avoid confusion.
+Command line I are broken down into I and I.
+Each option may take zero or more values. After all options have been
+processed, the remaining values (if any) generally consist of the name of a
+script, followed by arguments for that script.
 
-[ This policy may be counter-intuitive to current comand-line cultures. ]
 
-{{ 'ack' is a notable exception to the old rule, and i like the freedom.
-besides, perl 6 is about looking forward, and creating a new culture. :)
-on the other hand, i won't fight to keep this if it doesn't get support. }}
-
-
 =head1 Backward (In)compatibility
 
 Muscles have a long memory. You may find yourself typing your favorite Perl 5



r24735 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle
Date: 2009-01-02 16:42:53 +0100 (Fri, 02 Jan 2009)
New Revision: 24735

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] explain how script passed on command-line or via STDIN works

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-02 14:15:35 UTC (rev 24734)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-02 15:42:53 UTC (rev 24735)
@@ -73,7 +73,9 @@
 Command line I are broken down into I and I.
 Each option may take zero or more values. After all options have been
 processed, the remaining values (if any) generally consist of the name of a
-script, followed by arguments for that script.
+script for Perl to execute, followed by arguments for that script. If no
+values remain, Perl 6 reads the script from STDIN--you must specify the
+special C<-> option if you wish to pass arguments to a script read from STDIN.
 
 
 =head1 Backward (In)compatibility
@@ -305,9 +307,10 @@
 
 {{rename done}}
 
+
 =head1 Option Reference
 
-Perl 6 options, descriptions, categories, and services
+Perl 6 options, descriptions, and services.
 
 =over 4
 
@@ -458,15 +461,12 @@
 
 Notes: Desugars to C<++PARSER --prelude=Perl6-autoloop-print ++/PARSER>.
 
-=item --search-path, -S
+=item --search-path, -S path
 
-Use path to search for program.
+Use path to search for script specified on command-line.
 
 Service: Runtime
 
-[you need a story for when the first argument is treated as
-the program name. e.g. when you *don't* use -e to supply the program.]
-
 =item --taint, -T
 
 Turns on "taint" checking. See L<...> for details.



r24737 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle
Date: 2009-01-02 17:08:51 +0100 (Fri, 02 Jan 2009)
New Revision: 24737

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] add signature for perl6, and make --output-format entirely 
implementation-specific

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-02 15:50:03 UTC (rev 24736)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-02 16:08:51 UTC (rev 24737)
@@ -312,6 +312,30 @@
 
 Perl 6 options, descriptions, and services.
 
+=head2 Synopsis
+
+  multi sub perl6(
+Bool :a($autosplit),
+Bool :c($check-syntax),
+Bool :$doc,
+:e($execute),
+:$execute-lax,  #TODO fix illegal -e6 syntax. -6? not legal. -x? hrmm
+Bool :F($autoloop-split),
+Bool :h($help),
+:I(@include),
+#TODO -M,
+Bool :n($autoloop-no-print),
+:O($output-format) = 'exe',
+:o($output-file) = $*OUT,
+Bool :p($autoloop-print),
+:S(@search-path),
+Bool :T($taint),
+Bool :v($version),
+Bool :V($verbose-config),
+  );
+
+=head2 Reference
+
 =over 4
 
 =item --autosplit, -a
@@ -441,12 +465,11 @@
 
 Notes: Desugars to C<++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER>.
 
-=item --output-format, -O [format]
+=item --output-format, -O format
 
 Specify the file format for the output file requested with C<--output-file>.
-Defaults to 'exe', which represents the target platform's idea of an
-executable. Other valid values are implementation-specific, so consult the
-documentation for your compiler toolchain.
+This option is implementation-specific, so consult the documentation for your
+Perl 6 implementation.
 
 =item --output-file, -o [filename]
 



r24738 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle
Date: 2009-01-02 17:17:06 +0100 (Fri, 02 Jan 2009)
New Revision: 24738

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] add note about dangers of mixing -e and -e6

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-02 16:08:51 UTC (rev 24737)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-02 16:17:06 UTC (rev 24738)
@@ -647,6 +647,9 @@
 env var? maybe -E
 
 [could be posed in terms of substituting a different prelude]
+
+mixing -e and -e6 can lead to problems, for example:
+  perl -e "my $x = 1;" -e "print $x" -e6 "if $x"
 }}
 
 =for vim:set expandtab sw=4:



r24739 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle
Date: 2009-01-02 19:31:51 +0100 (Fri, 02 Jan 2009)
New Revision: 24739

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] C<-e6> isn't a separate item, it's a idiom meaning -e '6;'; format perl6 
signature, (geoff broadwell)++

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-02 16:17:06 UTC (rev 24738)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-02 18:31:51 UTC (rev 24739)
@@ -15,7 +15,7 @@
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
   Last Modified: 2 Jan 2009
-  Version: 7
+  Version: 8
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -318,17 +318,16 @@
 Bool :a($autosplit),
 Bool :c($check-syntax),
 Bool :$doc,
-:e($execute),
-:$execute-lax,  #TODO fix illegal -e6 syntax. -6? not legal. -x? hrmm
+ :e($execute),
 Bool :F($autoloop-split),
 Bool :h($help),
-:I(@include),
+ :I(@include),
 #TODO -M,
 Bool :n($autoloop-no-print),
-:O($output-format) = 'exe',
-:o($output-file) = $*OUT,
+ :O($output-format) = 'exe',
+ :o($output-file) = $*OUT,
 Bool :p($autoloop-print),
-:S(@search-path),
+ :S(@search-path),
 Bool :T($taint),
 Bool :v($version),
 Bool :V($verbose-config),
@@ -393,6 +392,10 @@
 Execute a single-line program. Multiple C<-e> options may be chained together,
 each one representing an input line with an implicit newline at the end.
 
+If you wish to run in lax mode, without strictures and warnings enabled,
+your first -e on the command line should be passed a value of '6', like C<-e6>.
+See L for details.
+
 Service: Runtime
 
 Notes: Returns a function that's executed unless otherwise modified by
@@ -404,13 +407,6 @@
 redirection of a vaguely here-docish flavor.  You could combine it
 with -c or --doc for instance, so not exclusive.]
 
-=item --execute-lax, -e6
-
-Execute in lax mode, without strictures and warnings enabled.
-See L for details.
-
-Service: Runtime
-
 =item --autoloop-split, -F [string, closure, etc]
 
 Pattern to split on (used with -a). Accepts unicode strings (as long as your



r24752 - docs/Perl6/Spec

2009-01-03 Thread pugs-commits
Author: particle
Date: 2009-01-04 03:26:39 +0100 (Sun, 04 Jan 2009)
New Revision: 24752

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] get rid of illustration grammar, it's in the revision history if i need 
it later.

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-03 23:27:16 UTC (rev 24751)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-04 02:26:39 UTC (rev 24752)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 2 Jan 2009
-  Version: 8
+  Last Modified: 3 Jan 2009
+  Version: 9
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -205,50 +205,6 @@
 =back
 
 
-These rules have been quantified in the following grammar, used solely for
-illustration purposes (this is *not* how options will be parsed by any shell).
-
-{{TODO update to current, move to non-published helper doc}}
-
-  grammar CommandLineArguments;
-
-  rule TOP {
-  *
-  '--'?
-  $=[.*]?
-  [ $ ||  ]
-  }
-
-  rule argument { [  |  |  ] {*} }
-
-  token option {
-  [
-[
-  $=[ '--' | '-' | ':' ]
-  $=[ '/' ]?
-  
-]
-[ '='  [ ','  ]* ]?
-  ]
-  }
-
-  regex passthru {
-  '++'  <.ws>
-  $=[.*?]
-  [ '--' $ || $ ]
-  }
-
-  token indicator {  [ '='  ]? }
-
-  token name { <.ident> [ '-' <.ident> ]* }
-
-  token value {
-  | (\w+)
-  | \' (<-[\']>*) \'
-  | \" (<-[\"]>*) \"
-  }
-
-
 =head1 Option Categories
 
 Perl's command line options fall into three categories:



r24759 - docs/Perl6/Spec

2009-01-04 Thread pugs-commits
Author: pmichaud
Date: 2009-01-05 08:03:29 +0100 (Mon, 05 Jan 2009)
New Revision: 24759

Modified:
   docs/Perl6/Spec/S12-objects.pod
Log:
typo fix.


Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2009-01-04 22:38:14 UTC (rev 24758)
+++ docs/Perl6/Spec/S12-objects.pod 2009-01-05 07:03:29 UTC (rev 24759)
@@ -251,7 +251,7 @@
 (It does not warn about non-identifier strings, but such strings are
 likely to produce missing method errors at run time in any case.)
 Also, if there is whitespace around an intended C<.> concatenation,
-it cannot be parsed as a method call at all; instead if fails at
+it cannot be parsed as a method call at all; instead it fails at
 compile time because standard Perl 6 has a pseudo C<< infix:<.> >> operator
 that always fails at compile time.]
 



r24774 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: particle
Date: 2009-01-05 20:29:06 +0100 (Mon, 05 Jan 2009)
New Revision: 24774

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] note behavior of clustered options with required values

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-05 19:21:25 UTC (rev 24773)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-05 19:29:06 UTC (rev 24774)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 3 Jan 2009
-  Version: 9
+  Last Modified: 4 Jan 2009
+  Version: 10
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -122,7 +122,9 @@
 
 =item *
 
-Single-letter options may be clustered. C<-ab> means C<-a -b>.
+Single-letter options may be clustered. C<-ab> means C<-a -b>. When a
+single-letter option which requires a value is clustered, the option may
+appear only in the final position of the cluster.
 
 =item *
 



r24768 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: particle
Date: 2009-01-05 17:53:12 +0100 (Mon, 05 Jan 2009)
New Revision: 24768

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] provide rules for negated single-character options; rearrange list items 
for clarity

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-05 16:39:14 UTC (rev 24767)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-05 16:53:12 UTC (rev 24768)
@@ -126,12 +126,14 @@
 
 =item *
 
-Option names follow Perl 6 identifier naming convention, but C<'>
-is not allowed.
+Options may be negated with C, for example C<--/name>, C<:/name>, C<-/n>.
+Each single-letter option in a cluster must be negated separately
+ (e.g. C<-a/n/o> is the same as C<-a -/n -/o>.)
 
 =item *
 
-Options may be negated with C, for example C<--/name>, C<:/name>, C<-/n>.
+Option names follow Perl 6 identifier naming convention, except C<'> is not
+allowed, and single-letter options may be any letter or number.
 
 =item *
 



r24779 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: particle
Date: 2009-01-05 21:29:32 +0100 (Mon, 05 Jan 2009)
New Revision: 24779

Modified:
   docs/Perl6/Spec/S06-routines.pod
Log:
[S06] add another command-line short name example; modify comment to line up 
visually with others

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2009-01-05 20:25:22 UTC (rev 24778)
+++ docs/Perl6/Spec/S06-routines.pod2009-01-05 20:29:32 UTC (rev 24779)
@@ -13,9 +13,9 @@
 
   Maintainer: Larry Wall 
   Date: 21 Mar 2003
-  Last Modified: 2 Jan 2009
+  Last Modified: 4 Jan 2009
   Number: 6
-  Version: 99
+  Version: 100
 
 
 This document summarizes Apocalypse 6, which covers subroutines and the
@@ -2741,6 +2741,7 @@
 # Short names
 -n :name
 -n=value   :name
+-nvalue:name # only if not declared Bool
 -n="spacy value"   :name«'spacy value'»
 -n='spacy value'   :name«'spacy value'»
 -n=val1,'val 2',etc:name«val1 'val 2' etc»
@@ -2756,7 +2757,7 @@
 --name 'spacy value'   :name«'spacy value'»
 --name=val1,'val 2',etc:name«val1 'val 2' etc»
 --name val1 'val 2' etc:name«val1 'val 2' etc» # only if declared @
--- # end named argument processing
+--  # end named argument processing
 
 # Negation
 --/name:!name



r24769 - docs/Perl6/Spec

2009-01-05 Thread pugs-commits
Author: moritz
Date: 2009-01-05 17:54:50 +0100 (Mon, 05 Jan 2009)
New Revision: 24769

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] document isa, can, does, perl and clone


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-05 16:53:12 UTC (rev 24768)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-05 16:54:50 UTC (rev 24769)
@@ -190,6 +190,22 @@
 
 =head1 Function Packages
 
+=head2 Object
+
+Every object conforms to the type C. The following methods are thusly
+available on every object.
+
+=over
+
+=item perl
+
+ our Str multi method perl (Object $o)
+
+Returns a perlish representation of the object, so that calling C
+on the returned string reproduces the object as good as possible.
+
+=back
+
 =head2 Any
 
 The following are defined in the C role:
@@ -206,6 +222,27 @@
 from C<$by> in that each criterion is applied, in order,
 until a non-zero (equivalent) result is achieved.
 
+=item can
+
+ our Bool multi method can ($self:, Str $method)
+
+If there is a multi method of name C<$method> that can be called on
+C<$self>, then closure is return has C<$self> bound to the position
+of the invocant.
+
+Otherwise an undefined value is returned.
+
+=item clone
+
+ our multi method clone (::T $self --> T)
+ our multi method clone (::T $self, *%attributes --> T)
+
+The first variant retuns  an independent copy of C<$o> that is equivlant
+to C<$o>.
+
+The second variant does the same, but any named arguments override an
+attribute during the cloning process.
+
 =item cmp
 
  our Order multi sub cmp (Ordering @by, $a, $b)
@@ -219,6 +256,19 @@
 (tie) result is achieved.  If the values are not comparable,
 returns a proto C object that is undefined.
 
+=item does
+
+ our Bool multi method does ($self:, $type)
+
+Returns C if and only if C<$self> conforms to type C<$type>.
+
+=item isa
+
+ our Bool multi method isa ($self:, $type)
+
+Returns true if a the invocant an instance of class C<$type>, or 
+of a subset type or a derived class (through inheritance) of C<$type>.
+
 =back
 
 =head2 Num



r24784 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: moritz
Date: 2009-01-06 11:14:50 +0100 (Tue, 06 Jan 2009)
New Revision: 24784

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] typos, thinkos and wording improvements, Brandon++, Tim++


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-06 01:12:13 UTC (rev 24783)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-06 10:14:50 UTC (rev 24784)
@@ -202,7 +202,7 @@
  our Str multi method perl (Object $o)
 
 Returns a perlish representation of the object, so that calling C
-on the returned string reproduces the object as good as possible.
+on the returned string reproduces the object as accurately as possible.
 
 =back
 
@@ -224,10 +224,10 @@
 
 =item can
 
- our Bool multi method can ($self:, Str $method)
+ our Callable multi method can ($self:, Str $method)
 
 If there is a multi method of name C<$method> that can be called on
-C<$self>, then closure is return has C<$self> bound to the position
+C<$self>, then a closure is return which has C<$self> bound to the position
 of the invocant.
 
 Otherwise an undefined value is returned.
@@ -237,7 +237,7 @@
  our multi method clone (::T $self --> T)
  our multi method clone (::T $self, *%attributes --> T)
 
-The first variant retuns  an independent copy of C<$o> that is equivlant
+The first variant returns  an independent copy of C<$o> that is equivalent
 to C<$o>.
 
 The second variant does the same, but any named arguments override an
@@ -266,7 +266,7 @@
 
  our Bool multi method isa ($self:, $type)
 
-Returns true if a the invocant an instance of class C<$type>, or 
+Returns C if a the invocant an instance of class C<$type>, or 
 of a subset type or a derived class (through inheritance) of C<$type>.
 
 =back



r24789 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: particle
Date: 2009-01-07 01:53:03 +0100 (Wed, 07 Jan 2009)
New Revision: 24789

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] rip out option categories and services until they prove useful

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-06 21:18:51 UTC (rev 24788)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-07 00:53:03 UTC (rev 24789)
@@ -209,65 +209,6 @@
 =back
 
 
-=head1 Option Categories
-
-Perl's command line options fall into three categories:
-
-=over 4
-
-=item *
-
-B flags set Perl's operational mode (e.g. I<--doc>, I<-e>).
-Only one mode flag may be specified on the command line.
-
-=item *
-
-B flags may be set on the command line, via the I
-environment variable, or within a file.
-
-[What file?  We need to be Very Careful not to delegate the identity of
-the current language to anything outside of P6.  I would very much hate
-to see anything resembling a .perl6rc file.]
-
-{{ TODO clarify that i mean "source file" here and not an rc-like file }}
-
-=item *
-
-B flags may be set only on the command line, and affect the entire
-run of the program.
-
-[I think this Static/Dynamic distinction is rather meaningless and
-confusing.  Certain commitments will be made by certain phases of
-compilation/linking/running, and every switch is dynamic before the
-commitment, static after.  And Mode flags are just the ones that
-commit so fast they exclude alternatives, seems like...]
-
-{{TODO very well, i'll shift the design to be more dynamic here}}
-
-=back
-
-For more on options and their classifications, see section
-L.
-
-
-=head1 Option Services
-
-Just because Perl 6 gives you a reasonable default command-line parser doesn't
-mean you don't want to extend it, or replace it with something else entirely.
-The command-line processor is organized into a set of services, each of which
-respond to a set of command-line options. These services live in the
-C<{{TODO}}> namespace, and may be overridden by loading a module with the
-C<--option-parser> option (see below).
-
-{{ TODO more details needed }}
-
-[Would like to see a use case for this mechanism.  The whole Services
-concept seems very nebulous, especially when you start giving services
-names like "Awk"..."Autoloop" would be more meaningful.]
-
-{{rename done}}
-
-
 =head1 Option Reference
 
 Perl 6 options, descriptions, and services.
@@ -301,18 +242,12 @@
 
 Turns on autosplit mode.
 
-Service: Autoloop
-
-Notes: Annotates function produced by -n | -p
-
 =item ++ARGSPROC [options, values] ++/ARGSPROC
 
 {{TODO don't like this name, but don't like ++CMD either}}
 
 Add a command-line processor.
 
-Service: Option
-
 Notes: When this option is parsed, it immediately triggers an action that
 could affect the remainder of the parse. Therefore, it's a good idea to put
 this option as early as possible in the argument list.
@@ -324,16 +259,12 @@
 
 Check syntax, then exit.
 
-Service: Runtime
-
 Notes: Desugars to C<++COMPILER -e 'CHECK{ compiles_ok(); exit; }' ++/COMPILER>
 
 =item --doc
 
 perldoc
 
-Service: Doc
-
 Notes: Desugars to
 C<++COMPILER -e 'CHECK{ compiles_ok(); dump_perldoc(); }' ++/COMPILER>
 
@@ -343,8 +274,6 @@
 
 Set debugging flags.
 
-Service: Debugger
-
 Notes: At least it's a start. Need a debugger spec for more.
 
 =item --execute, -e commandline
@@ -356,25 +285,12 @@
 your first -e on the command line should be passed a value of '6', like C<-e6>.
 See L for details.
 
-Service: Runtime
-
-Notes: Returns a function that's executed unless otherwise modified by
-Autoloop service's -p , -n, -a, -F.
-Actually combines all source from all -e parameters, then compiles when
-there are no more -e. Assigns the generated function to MAIN.
-
-[Not really a Mode in the sense you've defined it, but an input
-redirection of a vaguely here-docish flavor.  You could combine it
-with -c or --doc for instance, so not exclusive.]
-
 =item --autoloop-split, -F [string, closure, etc]
 
 Pattern to split on (used with -a). Accepts unicode strings (as long as your
 shell lets you pass them). Allows passing a closure
 (e.g. -F "{use Text::CSV}"). Awk's not better any more :)
 
-Service: Autoloop
-
 Notes: Substitutes a function for the default function which
 is { split ' ' } or whatever.
 
@@ -382,14 +298,10 @@
 
 Print summary of options. Desugars to C<++CMD --print-help --exit ++/CMD>.
 
-Service: Usage
-
 =item --include, -I
 
 Prepend directory to @*INC.
 
-Service: Lib
-
 Notes: this is unspecced elsewhere, so may not survive long.
 
 [at best, @*INC will only be the user's ad hoc libraries.  The API for
@@ -402,23 +314,10 @@
 
 use/no module.
 
-Service: Meta
-
-Notes: Maybe this happens before or affects which services are loaded.
-Or maybe there can be a UNIVERSAL service which knows about other services
-and is built into the interpreter. No looking at disk required?
-
-[I have no idea what you're talkin

r24790 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: particle
Date: 2009-01-07 01:56:43 +0100 (Wed, 07 Jan 2009)
New Revision: 24790

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] address concerns about mixing -e and -e6

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-07 00:53:03 UTC (rev 24789)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-07 00:56:43 UTC (rev 24790)
@@ -282,7 +282,7 @@
 each one representing an input line with an implicit newline at the end.
 
 If you wish to run in lax mode, without strictures and warnings enabled,
-your first -e on the command line should be passed a value of '6', like C<-e6>.
+pass a value of '6' to the first -e on the command line, like C<-e6>.
 See L for details.
 
 =item --autoloop-split, -F [string, closure, etc]
@@ -494,9 +494,6 @@
 env var? maybe -E
 
 [could be posed in terms of substituting a different prelude]
-
-mixing -e and -e6 can lead to problems, for example:
-  perl -e "my $x = 1;" -e "print $x" -e6 "if $x"
 }}
 
 =for vim:set expandtab sw=4:



r24791 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: lwall
Date: 2009-01-07 02:20:43 +0100 (Wed, 07 Jan 2009)
New Revision: 24791

Modified:
   docs/Perl6/Spec/S11-modules.pod
Log:
[S11] clarify the intent of the -e6 remark not to be special syntax, but
a natural outcome of -e and '6;'


Modified: docs/Perl6/Spec/S11-modules.pod
===
--- docs/Perl6/Spec/S11-modules.pod 2009-01-07 00:56:43 UTC (rev 24790)
+++ docs/Perl6/Spec/S11-modules.pod 2009-01-07 01:20:43 UTC (rev 24791)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 27 Oct 2004
-  Last Modified: 26 Feb 2008
+  Last Modified: 06 Jan 2009
   Number: 11
-  Version: 24
+  Version: 25
 
 =head1 Overview
 
@@ -467,7 +467,7 @@
 
 it runs Perl 6 in "lax" mode, without strictures or warnings, since obviously
 a bare literal in a void context I to have produced a warning.
-(Invoking perl with C<-e6> has the same effect.)
+(Invoking perl with C<-e '6;'> 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



r24792 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: masak
Date: 2009-01-07 06:43:05 +0100 (Wed, 07 Jan 2009)
New Revision: 24792

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] put the C function inside a list, for consistency


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-07 01:20:43 UTC (rev 24791)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-07 05:43:05 UTC (rev 24792)
@@ -14,8 +14,8 @@
 Carl Mäsak 
 Moritz Lenz 
  Date:  12 Mar 2005
- Last Modified: 18 Dec 2008
- Version:   33
+ Last Modified: 7 Jan 2009
+ Version:   34
 
 This document attempts to document the list of builtin functions in Perl 6.
 It assumes familiarity with Perl 5 and prior synopses.
@@ -402,11 +402,17 @@
 
 =head2 Complex
 
+=over 4
+
+=item polar
+
 our Seq multi method polar (Complex $nim:) is export
 
 Returns (magnitude, angle) corresponding to the complex number.
 The magnitude is non-negative, and the angle in the range C<-π ..^ π>.
 
+=back
+
 =head2 The :Trig tag
 
 The following are also defined in C but not exported without a C<:Trig>



r24793 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: masak
Date: 2009-01-07 06:59:42 +0100 (Wed, 07 Jan 2009)
New Revision: 24793

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] added mentions of getc, print, say and printf, with references to S16
for details

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-07 05:43:05 UTC (rev 24792)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-07 05:59:42 UTC (rev 24793)
@@ -15,7 +15,7 @@
 Moritz Lenz 
  Date:  12 Mar 2005
  Last Modified: 7 Jan 2009
- Version:   34
+ Version:   35
 
 This document attempts to document the list of builtin functions in Perl 6.
 It assumes familiarity with Perl 5 and prior synopses.
@@ -1742,6 +1742,41 @@
 
 =back
 
+=head2 IO
+
+=over 4
+
+=item getc
+
+our Bool method getc (IO $self: *...@list)
+
+See C for details.
+
+=item print
+
+our Bool method print (IO $self: *...@list)
+our Bool multi print (*...@list)
+our Bool method print (Str $self: IO $io)
+
+See C for details.
+
+=item say
+
+our Bool method say (IO $self: *...@list)
+our Bool multi say (*...@list)
+our Bool method say (Str $self: IO $io)
+
+See C for details.
+
+=item printf
+
+our Bool method printf (IO $self: Str $fmt, *...@list)
+our Bool multi printf (Str $fmt, *...@list)
+
+See C for details.
+
+=back
+
 =head2 OS
 
 =over



r24794 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: masak
Date: 2009-01-07 07:00:46 +0100 (Wed, 07 Jan 2009)
New Revision: 24794

Modified:
   docs/Perl6/Spec/S16-io.pod
Log:
[S16] slight disambiguation

Modified: docs/Perl6/Spec/S16-io.pod
===
--- docs/Perl6/Spec/S16-io.pod  2009-01-07 05:59:42 UTC (rev 24793)
+++ docs/Perl6/Spec/S16-io.pod  2009-01-07 06:00:46 UTC (rev 24794)
@@ -12,7 +12,7 @@
  Contributions: Mark Stosberg 
  Date:  12 Sep 2006
  Last Modified: 1 May 2007
- Version:   17
+ Version:   18
 
 This is a draft document. Many of these functions will work as in Perl
 5, except we're trying to rationalize everything into packages.  For
@@ -366,7 +366,7 @@
 our Bool multi printf (Str $fmt, *...@list)
 
 The function form works as in Perl 5 and always prints to $*DEFOUT.
-The method form uses IO handles as objects, not formats.
+The method form uses IO handles, not formats, as objects.
 
 =back
 



r24795 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: masak
Date: 2009-01-07 07:25:35 +0100 (Wed, 07 Jan 2009)
New Revision: 24795

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] added .succ/.pred for Num, Int and Bool

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-07 06:00:46 UTC (rev 24794)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-07 06:25:35 UTC (rev 24795)
@@ -15,7 +15,7 @@
 Moritz Lenz 
  Date:  12 Mar 2005
  Last Modified: 7 Jan 2009
- Version:   35
+ Version:   36
 
 This document attempts to document the list of builtin functions in Perl 6.
 It assumes familiarity with Perl 5 and prior synopses.
@@ -287,6 +287,22 @@
 
 =over
 
+=item succ
+
+ our Num multi method succ ( Num $x: ) is export
+ out Int multi method succ ( Int $x: ) is export
+
+Returns the successor of C<$x>. This method is used by C<< prefix:<++> >> and
+C<< postfix:<++> >> to increment the value in a container.
+
+=item pred
+
+ our Num multi method pred ( Num $x: ) is export
+ our Int multi method pred ( Int $x: ) is export
+
+Returns the predeccessor of C<$x>. This method is used by C<< prefix:<--> >>
+and C<< postfix:<--> >> to decrement the value in a container.
+
 =item abs
 
  our Num multi method abs ( Num $x: ) is export
@@ -458,6 +474,22 @@
 
 =back
 
+=head2 Bool
+
+=over 4
+
+=item succ
+
+ our Bool multi method succ ( Bool $b: ) is export
+
+Returns C.
+
+=item pred
+
+ our Bool multi method pred ( Bool $b: ) is export
+
+Returns C.
+
 =head2 Scalar
 
 B: L



r24796 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: masak
Date: 2009-01-07 09:34:18 +0100 (Wed, 07 Jan 2009)
New Revision: 24796

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] added any, all, one and none as subs and methods on List and Hash

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-07 06:25:35 UTC (rev 24795)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-07 08:34:18 UTC (rev 24796)
@@ -15,7 +15,7 @@
 Moritz Lenz 
  Date:  12 Mar 2005
  Last Modified: 7 Jan 2009
- Version:   36
+ Version:   37
 
 This document attempts to document the list of builtin functions in Perl 6.
 It assumes familiarity with Perl 5 and prior synopses.
@@ -1022,6 +1022,41 @@
 is used as an C then sort-specific traits such as C are allowed on the positional elements.
 
+=item any
+
+ our Junction multi method any( @values: ) is export
+ our Junction multi any( @values ) is export
+
+Returns a junction with all the values of the list C<|>-ed together. The
+junction will only match against another value if at least one of the
+values in the list matches.
+
+=item all
+
+ our Junction multi method all( @values: ) is export
+ our Junction multi all( @values ) is export
+
+Returns a junction with all the values of the list C<&>-ed together. The
+junction will only match against another value if all of the values in the
+list match.
+
+=item one
+
+ our Junction multi method one( @values: ) is export
+ our Junction multi one( @values ) is export
+
+Returns a junction with all the values of the list C<^>-ed together. The
+junction will only match against another value if exactly one of the values
+in the list matches.
+
+=item none
+
+ our Junction multi method none( @values: ) is export
+ our Junction multi none( @values ) is export
+
+Returns a junction which will only match against another value if none of
+the values in the list matches.
+
 =back
 
 =head2 Hash
@@ -1084,6 +1119,37 @@
 The lvalue form of C is not longer supported. Use the C<.buckets>
 property instead.
 
+=item any
+
+ our Junction multi method any( %hash: ) is export
+
+Returns a junction with all the keys of the hash C<|>-ed together. The
+junction will only match against another value if at least one of the 
+keys in the hash matches.
+
+=item all
+
+ our Junction multi method all( %hash: ) is export
+
+Returns a junction with all the keys of the hash C<&>-ed together. The 
+junction will only match against another value if all of the keys in the hash
+match.
+
+=item one
+
+ our Junction multi method one( %hash: ) is export
+
+Returns a junction with all the keys of the hash C<^>-ed together. The
+junction will only match against another value if exactly one of the keys
+in the hash matches.  
+
+=item none
+
+ our Junction multi method none( %hash: ) is export
+
+Returns a junction which will only match against another value if none of 
+the keys in the hash matches.
+
 =back
 
 



r24798 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: particle
Date: 2009-01-07 20:42:33 +0100 (Wed, 07 Jan 2009)
New Revision: 24798

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] flesh out most of option reference

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-07 18:03:45 UTC (rev 24797)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-07 19:42:33 UTC (rev 24798)
@@ -220,15 +220,15 @@
 Bool :c($check-syntax),
 Bool :$doc,
  :e($execute),
-Bool :F($autoloop-split),
+ :F($autoloop-split),
 Bool :h($help),
  :I(@include),
-#TODO -M,
+ :u($use),
 Bool :n($autoloop-no-print),
  :O($output-format) = 'exe',
  :o($output-file) = $*OUT,
 Bool :p($autoloop-print),
- :S(@search-path),
+Bool :S($search-path),
 Bool :T($taint),
 Bool :v($version),
 Bool :V($verbose-config),
@@ -242,129 +242,105 @@
 
 Turns on autosplit mode.
 
-=item ++ARGSPROC [options, values] ++/ARGSPROC
+=item ++CMD --command-line-parser *parser* ++/CMD
 
-{{TODO don't like this name, but don't like ++CMD either}}
+Add a command-line processor.  When this option is parsed, it immediately
+triggers an action that affects or replaces the the command-line parser.
+Therefore, it's a good idea to put this option as early as possible in the
+argument list.
 
-Add a command-line processor.
-
-Notes: When this option is parsed, it immediately triggers an action that
-could affect the remainder of the parse. Therefore, it's a good idea to put
-this option as early as possible in the argument list.
-
-{{TODO more details needed}}
-
-
 =item --check-syntax, -c
 
-Check syntax, then exit.
+Check syntax, then exit.  Desugars to C<-e 'CHECK{ compiles_ok(); exit; }'>.
 
-Notes: Desugars to C<++COMPILER -e 'CHECK{ compiles_ok(); exit; }' ++/COMPILER>
-
 =item --doc
 
-perldoc
+Lookup Perl documentation in Pod format.  Desugars to
+C<-e 'CHECK{ compiles_ok(); dump_perldoc(); }'>. C<$+ARGS> contains the
+arguments passed to C, and is available at C time, so
+C can respond to command-line options.
 
-Notes: Desugars to
-C<++COMPILER -e 'CHECK{ compiles_ok(); dump_perldoc(); }' ++/COMPILER>
+=item ++DEBUGGER [*switches*, *flags*] ++/DEBUGGER
 
-{{TODO what do i pass to dump_perldoc? C<$+ARGS>, maybe?}}
+Set debugging switches and flags.
 
-=item ++DEBUGGER [switches, flags] ++/DEBUGGER
+Note: This is speculative, for lack of a debugger specification.
 
-Set debugging flags.
+=item --execute, -e *line*
 
-Notes: At least it's a start. Need a debugger spec for more.
-
-=item --execute, -e commandline
-
-Execute a single-line program. Multiple C<-e> options may be chained together,
+Execute a single-line program.  Multiple C<-e> options may be chained together,
 each one representing an input line with an implicit newline at the end.
 
 If you wish to run in lax mode, without strictures and warnings enabled,
 pass a value of '6' to the first -e on the command line, like C<-e6>.
 See L for details.
 
-=item --autoloop-split, -F [string, closure, etc]
+=item --autoloop-split, -F *expression*
 
-Pattern to split on (used with -a). Accepts unicode strings (as long as your
-shell lets you pass them). Allows passing a closure
-(e.g. -F "{use Text::CSV}"). Awk's not better any more :)
+Pattern to split on (used with -a).  Substitutes an expression for the default
+split function, which is C<{split ' '}>.  Accepts unicode strings (as long as
+your shell lets you pass them).  Allows passing a closure
+(e.g. -F "{use Text::CSV}").  Awk's not better any more :)
 
-Notes: Substitutes a function for the default function which
-is { split ' ' } or whatever.
-
 =item --help, -h
 
-Print summary of options. Desugars to C<++CMD --print-help --exit ++/CMD>.
+Print summary of options.  Desugars to C<++CMD --print-help --exit ++/CMD>.
 
-=item --include, -I
+=item --include, -I *directory*[,*directory*[,...]]
 
-Prepend directory to @*INC.
+Prepend directories to @*INC, for searching ad hoc libraries.  Searching the
+standard library follows the policies laid out in L.
 
-Notes: this is unspecced elsewhere, so may not survive long.
+=item --use, -u *module*
 
-[at best, @*INC will only be the user's ad hoc libraries.  The API for
-searching the standard lib will not be defined in terms of @*INC so that
-we can enforce the standard library policies laid out in S11.]
+C<--use *module*> and C<-u *module*> desugars to C<-e 'use *module*'>.
+Specify version info and import symbols by appending info to the module name:
 
-=item -m[-]module, -M[-]module, -M[-]'module ...', -[mM][-]module=arg[,arg]...
+  -u'Sense:ver<1.2.1>:auth '
 
-{{TODO needs new or extended syntax}}
+You'll need the quotes so your shell doesn't complain about redirection.
+There is no special command-line syntax for C<'no *module*>, use C<-e>.
 
-use/no module.
-
 =item --autoloop-no-print, -n
 
-Act like awk.
+Act like awk.  Desugars to
+C<++PA

r24799 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: particle
Date: 2009-01-07 20:53:32 +0100 (Wed, 07 Jan 2009)
New Revision: 24799

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] describe unchanged syntax

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-07 19:42:33 UTC (rev 24798)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-07 19:53:32 UTC (rev 24799)
@@ -85,8 +85,36 @@
 
 =head2 Unchanged Syntactic Features
 
-{{TODO short names, clustering, etc}}
+Several features have not changed from Perl 5, including:
 
+=over 4
+
+=item *
+
+The most common options have a single-letter short name
+
+=item *
+
+Single-letter options may be clustered with the same syntax and semantics
+
+=item *
+
+Many command-line options behave similarly, such as
+  -a   # autosplit
+  -c   # check syntax
+  -e *line*# execute
+  -F *expression*  # specify autosplit value
+  -h   # display help
+  -I *directory*[,*directory*[,...]]   # add include paths
+  -n   # act like awk
+  -p   # act like sed
+  -S   # search PATH for script
+  -T   # Taint mode
+  -v   # display version info
+  -V   # display verbose config info
+
+=back
+
 =head2 Removed Syntactic Features
 
 {{ -jg



r24801 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: particle
Date: 2009-01-08 02:57:51 +0100 (Thu, 08 Jan 2009)
New Revision: 24801

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] preliminary musings on metasyntactic options

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-07 23:12:41 UTC (rev 24800)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-08 01:57:51 UTC (rev 24801)
@@ -372,53 +372,30 @@
 =back
 
 
-=head1 Run-time System
+=head1 Metasyntactic Options
 
-{{TODO total rewrite needed}}
+Metasyntactic options are a subset of delimited options used to pass arguments
+to an underlying component of Perl. Perl itself does not parse these options,
+but makes them available to run-time components via the C<%+META-ARGS> context
+variable.
 
-The run-time system delimited option (C<++RTS ... ++/RTS> or
-C<++RTS=string ... ++/RTS=string>) allows options to be passed to an underlying
-component of Perl. Perl itself does not parse these options, but makes them
-available to run-time components.
+Standard in Perl 6 are three underlying components, C, C,
+and C.  Implementations may expose other components via this
+interface, so consult the documentation for your Perl 6 implementation.
 
-[Note that with my proposed system you can still nest without the artificial =:
-++RTS ++GC -generational ++/GC ++/RTS
-]
+{{TODO more description and examples}}
 
-The C<=string> variation allows for disabmiguation when the run-time system
-also allows the parsing of an option named C<++RTS>. For example,
-C
-makes sure the run-time system receives C<-a :b +C --RTS foo bar>.
+  On command line...   Subsystem gets...
+   ++X a -b  ++/X  a -b
 
-Additionally, some implementations may use this variation to pass arguments
-to particular subsystems. For example, Rakudo Perl may choose to implement
-C
-to mean C<--runcore=gc-debug -t 7> gets passed to parrot, and
-C<--disable-keepall --optimize> gets passed to PGE.
+  # Nested options
+  +++X a -b   ++X -c ++/X -d e +++/X   a -b ++X -c ++/X -d e
 
-[perl ++PARROT --runcore=gc-debug -t 7 ++/PARROT ++PGE --disable-keepall 
--optimize ++/PGE>
+  # More than once
+   ++X a -b  ++/X -c  ++X -d e  ++/X   a -b -d e
+  +++X a -b +++/X -c  ++X -d e  ++/X   a -b -d e
 
-{{ -jg
-should certain string prefixes or perhaps uppercase strings be reserved
-for this purpose?
-}}
 
-[doesn't seem very necessary, if we make sure ++ has its own namespace.  
currently
-that namespace is quite barren.  we wouldn't even necessarily need to enforce 
uppercase,
-since
-
-perl ++parrot --runcore=gc-debug -t 7 ++/parrot ++pge --disable-keepall 
--optimize ++/pge
-
-is just about as readable, especially if written:
-
-perl ++parrot --runcore=gc-debug -t 7 ++/parrot \
-++pge --disable-keepall --optimize ++/pge \
-foo bar baz
-
-
-or some such.]
-
-
 =head1 Environment Variables
 
 Environment variables may be used to the same effect as command-line



r24802 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: particle
Date: 2009-01-08 03:08:39 +0100 (Thu, 08 Jan 2009)
New Revision: 24802

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] fix pod-o

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-08 01:57:51 UTC (rev 24801)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-08 02:08:39 UTC (rev 24802)
@@ -100,6 +100,7 @@
 =item *
 
 Many command-line options behave similarly, such as
+
   -a   # autosplit
   -c   # check syntax
   -e *line*# execute



r24803 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: particle
Date: 2009-01-08 03:19:31 +0100 (Thu, 08 Jan 2009)
New Revision: 24803

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] add a sentence on unchanged syntax features, fix some pod formatting 
errors, and remember to update document metadata

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-08 02:08:39 UTC (rev 24802)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-08 02:19:31 UTC (rev 24803)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 4 Jan 2009
-  Version: 10
+  Last Modified: 7 Jan 2009
+  Version: 11
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -99,21 +99,25 @@
 
 =item *
 
-Many command-line options behave similarly, such as
+Many command-line options behave similarly, for example:
 
-  -a   # autosplit
-  -c   # check syntax
-  -e *line*# execute
-  -F *expression*  # specify autosplit value
-  -h   # display help
-  -I *directory*[,*directory*[,...]]   # add include paths
-  -n   # act like awk
-  -p   # act like sed
-  -S   # search PATH for script
-  -T   # Taint mode
-  -v   # display version info
-  -V   # display verbose config info
+  Option...Still means...
+  -a   Autosplit
+  -c   Check syntax
+  -e *line*Execute
+  -F *expression*  Specify autosplit value
+  -h   Display help
+  -I *directory*[,*directory*[,...]]   Add include paths
+  -n   Act like awk
+  -p   Act like sed
+  -S   Search PATH for script
+  -T   Taint mode
+  -v   Display version info
+  -V   Display verbose config info
 
+All of these options have extended syntax, and some may have slightly
+different semantics, so see L below for the details.
+
 =back
 
 =head2 Removed Syntactic Features
@@ -302,7 +306,7 @@
 
 If you wish to run in lax mode, without strictures and warnings enabled,
 pass a value of '6' to the first -e on the command line, like C<-e6>.
-See L for details.
+See L for details.
 
 =item --autoloop-split, -F *expression*
 
@@ -318,7 +322,8 @@
 =item --include, -I *directory*[,*directory*[,...]]
 
 Prepend directories to @*INC, for searching ad hoc libraries.  Searching the
-standard library follows the policies laid out in L.
+standard library follows the policies laid out in
+L.
 
 =item --use, -u *module*
 
@@ -357,7 +362,7 @@
 
 =item --taint, -T
 
-Turns on "taint" checking. See L for details.
+Turns on "taint" checking. See L for details.
 Commits very early.  Put this option as early on the command-line as possible.
 
 =item --version, -v



r24805 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: masak
Date: 2009-01-08 07:11:11 +0100 (Thu, 08 Jan 2009)
New Revision: 24805

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] multiple changes:
* added Object.warn (to be moved in the next commit to Any)
* added invocant colon to Object.perl (to be moved in the next commit to Any)
* added `is export` to Object.perl

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-08 05:10:02 UTC (rev 24804)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-08 06:11:11 UTC (rev 24805)
@@ -199,11 +199,18 @@
 
 =item perl
 
- our Str multi method perl (Object $o)
+ our Str multi method perl ( Object $o: ) is export
 
 Returns a perlish representation of the object, so that calling C
 on the returned string reproduces the object as accurately as possible.
 
+=item warn
+
+ our multi method warn ( Object $o: ) is export
+
+Prints a warning to C<$*DEFERR>, which is usually bound to C<$*ERR>. See
+C for details.
+
 =back
 
 =head2 Any



r24806 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: masak
Date: 2009-01-08 07:15:11 +0100 (Thu, 08 Jan 2009)
New Revision: 24806

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] moved .perl and .warn from Object to Any. removed Object heading for now.

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-08 06:11:11 UTC (rev 24805)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-08 06:15:11 UTC (rev 24806)
@@ -190,29 +190,6 @@
 
 =head1 Function Packages
 
-=head2 Object
-
-Every object conforms to the type C. The following methods are thusly
-available on every object.
-
-=over
-
-=item perl
-
- our Str multi method perl ( Object $o: ) is export
-
-Returns a perlish representation of the object, so that calling C
-on the returned string reproduces the object as accurately as possible.
-
-=item warn
-
- our multi method warn ( Object $o: ) is export
-
-Prints a warning to C<$*DEFERR>, which is usually bound to C<$*ERR>. See
-C for details.
-
-=back
-
 =head2 Any
 
 The following are defined in the C role:
@@ -276,6 +253,20 @@
 Returns C if a the invocant an instance of class C<$type>, or 
 of a subset type or a derived class (through inheritance) of C<$type>.
 
+=item perl
+
+ our Str multi method perl ( Object $o: ) is export
+
+Returns a perlish representation of the object, so that calling C
+on the returned string reproduces the object as accurately as possible.
+
+=item warn
+
+ our multi method warn ( Object $o: ) is export
+
+Prints a warning to C<$*DEFERR>, which is usually bound to C<$*ERR>. See
+C for details.
+
 =back
 
 =head2 Num



r24807 - docs/Perl6/Spec

2009-01-07 Thread pugs-commits
Author: masak
Date: 2009-01-08 07:36:06 +0100 (Thu, 08 Jan 2009)
New Revision: 24807

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] added slice and hash contextualizers, reordered item and list

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-08 06:15:11 UTC (rev 24806)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-08 06:36:06 UTC (rev 24807)
@@ -1757,20 +1757,42 @@
 also knows its encoding preferences. (These are knowable in the
 lexical scope via the $?NF and $?ENC compile-time constants).)
 
+=item item
+
+ our Item multi item ( $item )
+
+Forces generic Item context on its argument, and returns it.
+
 =item list
 
  our List multi list ( *...@list )
 
 Forces List Context on it's arguments, and returns them.
 
+=item slice
 
-=item item
+ our List multi slice ( *...@list )
 
- our Item multi item ( $item )
+Forces the argument list to be evaluated in slice context.
+(Slices are considered to be potentially multidimensional in Perl 6.)
+A list of Cs will be transformed into a list of lists.
+Equivalent to C<@@()> (except that empty C<@@()> means C<@@($/)>, while
+empty C means a null slice).
 
-Forces generic Item context on its argument, and returns it.
+=item hash
 
+The C contextualizer
 
+ our Hash multi hash ( *...@list )
+
+Forces the argument list to be evaluated in hash context.
+The expression is evaluated in list context (flattening any Cs),
+then a hash will be created from the list, taken as a list of Cs.
+(Any element in the list that is not a C will pretend to be a key
+and grab the next value in the list as its value.)  Equivalent to
+C<%()> (except that empty C<%()> means C<%($/)>, while
+empty C means an empty hash).
+
 =item :16, :8, :2, :10
 
  our Num multi prefix:<:16> ( Str $hexstr )



r24809 - docs/Perl6/Spec

2009-01-08 Thread pugs-commits
Author: particle
Date: 2009-01-08 23:06:35 +0100 (Thu, 08 Jan 2009)
New Revision: 24809

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] address backward (in)compatibilities

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-08 19:20:06 UTC (rev 24808)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-08 22:06:35 UTC (rev 24809)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 7 Jan 2009
-  Version: 11
+  Last Modified: 8 Jan 2009
+  Version: 12
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -81,8 +81,14 @@
 =head1 Backward (In)compatibility
 
 Muscles have a long memory. You may find yourself typing your favorite Perl 5
-options, even after Christmas has arrived. {{TODO}}
+options, even after Christmas has arrived.  As you'll see below, common
+options are provided which behave similarly.  Less common options, however,
+may not be available or may have changed syntax.  If you provide Perl with
+unrecognized command-line syntax, Perl gives you a friendly error message.
+If the unrecognized syntax is a valid Perl 5 option, Perl provides helpful
+suggestions to allow you to perform the same action using the current syntax.
 
+
 =head2 Unchanged Syntactic Features
 
 Several features have not changed from Perl 5, including:
@@ -120,15 +126,96 @@
 
 =back
 
+
 =head2 Removed Syntactic Features
 
-{{ -jg
-need to tell a story about how perl 6 handles the migration from perl 5.
-for example, if -0 is not a valid perl 6 command line option, how does perl 6
-help the user realize and correct the mistake?
-}}
+Some Perl 5 command-line features are no longer available, either because
+there's a new and different way to do it in Perl 6, or because they're
+no longer relevant.  Here's a breakdown of what's been removed:
 
+=over 4
 
+=item -0 *octal/hex*
+
+Sets input record separator.  Missing due to lack of specification in
+L.  There is a comment about this in the L
+section at the end of this document.
+
+=item -C *number/list*
+
+Control unicode features.  Perl 6 has unicode semantics, and assumes a
+UTF-8 command-line interface (until proven otherwise, at which point this
+functionality may be readdressed).
+
+=item -d, -dt, -d:foo, -D, etc.
+
+Debugging commands.  Replaced with the C<++DEBUGGER> metasyntactic option.
+
+=item -E *line*
+
+Execute a line of code, with all features enabled.  This is specific to
+Perl 5.10, and not relevant to Perl 6.
+
+=item -i *extension*
+
+Modify files in-place.  Haven't thought about it enough to add yet, but
+I'm certain it has a strong following. {{TODO review decision here}}
+
+=item -l
+
+Enable automatic line-ending processing.  This is the default behavior.
+
+=item -M *module*, -m *module*, etc.
+
+use/no module.  Replaced by C<--use>.
+
+=item -P
+
+Obsolete.  Removed.
+
+=item -s
+
+Enable rudimentary switch parsing.  By default, Perl 6 parses the
+arguments passed to a script using the rules defined in this document,
+rendering this switch obsolete.
+
+=item -t
+
+Enable taint warnings mode.  Taint mode needs more thought, but it's
+much more likely that the C<-T> switch will take options rather than
+use a second command-line flag for similar behavior.
+
+=item -u
+
+Obsolete.  Removed.
+
+=item -U
+
+Allow unsafe operations.  This is extremely dangerous and infrequently
+used, and doesn't deserve its own command-line option.
+
+=item -w
+
+Enable warnings.  This is the default behavior.
+
+=item -W
+
+Enable all warnings.  This is infrequently used, and doesn't deserve its
+own command-line option.
+
+=item -x
+
+Run program embedded in ASCII text.  Infrequently used, and doesn't
+deserve its own command-line option.
+
+=item -X
+
+Disable all warnings.  This is infrequently used, and doesn't deserve its
+own command-line option.
+
+=back
+
+
 =head1 Options and Values
 
 Command line options are parsed using the following rules:



r24819 - docs/Perl6/Spec

2009-01-08 Thread pugs-commits
Author: lwall
Date: 2009-01-09 02:00:04 +0100 (Fri, 09 Jan 2009)
New Revision: 24819

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] clarify that Pairs and Mappings are mutable in value, but not in key


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-01-09 00:41:20 UTC (rev 24818)
+++ docs/Perl6/Spec/S02-bits.pod2009-01-09 01:00:04 UTC (rev 24819)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 30 Dec 2008
+  Last Modified: 8 Jan 2009
   Number: 2
-  Version: 147
+  Version: 148
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -954,8 +954,6 @@
 Set Unordered collection of values that allows no duplicates
 Bag Unordered collection of values that allows duplicates
 JunctionSet with additional behaviors
-PairA single key-to-value association
-Mapping Set of Pairs with no duplicate keys
 Signature   Function parameters (left-hand side of a binding)
 Capture Function call arguments (right-hand side of a binding)
 BlobAn undifferentiated mass of bits
@@ -982,6 +980,8 @@
 KeyHash Perl hash that autodeletes values matching default
 KeySet  KeyHash of Bool (does Set in list/array context)
 KeyBag  KeyHash of UInt (does Bag in list/array context)
+PairA single key-to-value association
+Mapping Set of Pairs with no duplicate keys
 Buf Perl buffer (a stringish array of memory locations)
 IO  Perl filehandle
 Routine Base class for all wrappable executable objects
@@ -1034,6 +1034,12 @@
 replicated the number of times specified by its corresponding value.
 (Use C<.kv> or C<.pairs> to suppress this behavior in list context.)
 
+As with C types, C and C are mutable in their
+values but not in their keys.  (A key can be a reference to a mutable
+object, but cannot change its C<.WHICH> identity.  In contrast,
+the value may be rebound to a different object, just as a hash
+element may.)
+
 =head2 Value types
 
 Explicit types are optional. Perl variables have two associated types:



r24822 - docs/Perl6/Spec

2009-01-08 Thread pugs-commits
Author: particle
Date: 2009-01-09 03:07:28 +0100 (Fri, 09 Jan 2009)
New Revision: 24822

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] delimited options use eager matching semantics, are invisible to MAIN, 
but are available via %+OPTS<...>

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-09 01:02:25 UTC (rev 24821)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-09 02:07:28 UTC (rev 24822)
@@ -275,8 +275,8 @@
 =item *
 
 The opening and closing delimiters begin with two or more plus characters,
-for example C<++>. You'll usually use two plus characters, but more are
-allowed to disambiguate (more below).
+for example C<++>.  You'll usually use two plus characters, but more are
+allowed to avoid ambiguity.
 
 {{TODO put more below, or refer to somewhere with more}}
 
@@ -296,17 +296,24 @@
 
 =item *
 
+Eager matching semantics are used, so the first closing delimeter found
+completes the match.
+
+=item *
+
 Delimited options cannot be negated.
 
 =back
 
-[From the P6 viewpoint, these options should probably be shoved into
-context variables and be invisible to MAIN except as %+OPTS
-or @+PARSER_ARGS or some such.]
+These options are made available in context variables matching their name,
+and are invisible to C except as C<< %+OPTS >>.  For example:
 
-{{TODO %+OPTS it is. explain this.}}
+  ++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER
 
+is available inside your script as C<< %+OPTS >>, and contains
+C<--prelude=Perl6-autoloop-no-print>.
 
+
 Values are parsed with the following rules:
 
 =over 4



r24823 - docs/Perl6/Spec

2009-01-08 Thread pugs-commits
Author: particle
Date: 2009-01-09 03:20:40 +0100 (Fri, 09 Jan 2009)
New Revision: 24823

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] incorporate more of TimToady++'s notes, and format Notes section as 
proper Pod

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-09 02:07:28 UTC (rev 24822)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-09 02:20:40 UTC (rev 24823)
@@ -15,7 +15,7 @@
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
   Last Modified: 8 Jan 2009
-  Version: 12
+  Version: 13
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -510,13 +510,12 @@
 
 =item PERL6LIB
 
-A list of directories in which to look for Perl library files.
+A list of directories in which to look for ad hoc Perl library files.
 
-Note: this is speculative, as library loading is not yet specified.
+Note: this is speculative, as library loading is not yet specified,
+except insofar as S11 mandates various behaviors incompatible with
+mere directory probing.
 
-[except insofar as S11 mandates various behaviors incompatible with
-mere directory probing...]
-
 =item PERL6OPT
 
 Default command-line arguments. Arguments found here are prepended to the
@@ -548,16 +547,14 @@
 
 =head1 Notes
 
-{{ -jg
-i'd like to be able to adjust the input record separator from command line,
-for instance to specify the equivalent of perl 5's C<$/ = \32768;>. so far,
-i don't have a solution, but perhaps pass a closure that evaluates to an int?
+I'd like to be able to adjust the input record separator from command line,
+for instance to specify the equivalent of perl 5's C<$/ = \32768;>. So far,
+I don't have a solution, but perhaps pass a closure that evaluates to an Int?
+This should try to use whatever option does the same thing to a new
+filehandle when S16 is further developed.
 
-[this should try to use whatever option does the same thing to a new
-filehandle when S16 is further developed.]
+Do I need to address any unicode concerns?
 
-do i need to address any unicode concerns?
-
 [You can try "all command line arguments are assumed to be in unicode
 unless proven otherwise" and see how well it flies. :)  but this starts
 to get into filenames-are-blobs kind of issues...maybe we need a way
@@ -565,16 +562,9 @@
 we must try to settle on unicode as the default expectation.  I hope POSIX
 dies before Perl 6 does...]
 
-loading a switch parsing module by a switch, instead of using the default.
-maybe via ++RTS, since it needs to happen *before* switches are evaluated.
+Sandboxing? maybe-r
 
-[suggest ++CMD --use_cmd_module ++/CMD]
+Env var? maybe -E.
+Could be posed in terms of substituting a different prelude.
 
-sandboxing? maybe-r
-
-env var? maybe -E
-
-[could be posed in terms of substituting a different prelude]
-}}
-
 =for vim:set expandtab sw=4:



r24844 - docs/Perl6/Spec

2009-01-09 Thread pugs-commits
Author: particle
Date: 2009-01-09 21:57:14 +0100 (Fri, 09 Jan 2009)
New Revision: 24844

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] a little copy-editing

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-09 19:36:48 UTC (rev 24843)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-09 20:57:14 UTC (rev 24844)
@@ -80,13 +80,13 @@
 
 =head1 Backward (In)compatibility
 
-Muscles have a long memory. You may find yourself typing your favorite Perl 5
-options, even after Christmas has arrived.  As you'll see below, common
-options are provided which behave similarly.  Less common options, however,
-may not be available or may have changed syntax.  If you provide Perl with
-unrecognized command-line syntax, Perl gives you a friendly error message.
-If the unrecognized syntax is a valid Perl 5 option, Perl provides helpful
-suggestions to allow you to perform the same action using the current syntax.
+You may find yourself typing your favorite Perl 5 options, even after
+Christmas has arrived.  As you'll see below, common options are provided
+which behave similarly.  Less common options, however, may not be available
+or may have changed syntax.  If you provide Perl with unrecognized command-
+line syntax, Perl gives you a friendly error message.  If the unrecognized
+syntax is a valid Perl 5 option, Perl provides helpful suggestions to allow
+you to perform the same action using the current syntax.
 
 
 =head2 Unchanged Syntactic Features



r24846 - docs/Perl6/Spec

2009-01-09 Thread pugs-commits
Author: particle
Date: 2009-01-09 22:05:46 +0100 (Fri, 09 Jan 2009)
New Revision: 24846

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] describe how to avoid ambiguity when nesting delimited options

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-09 21:03:17 UTC (rev 24845)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-09 21:05:46 UTC (rev 24846)
@@ -276,10 +276,8 @@
 
 The opening and closing delimiters begin with two or more plus characters,
 for example C<++>.  You'll usually use two plus characters, but more are
-allowed to avoid ambiguity.
+allowed to avoid ambiguity when nesting delimited options.
 
-{{TODO put more below, or refer to somewhere with more}}
-
 =item *
 
 Opening and closing delimited option names follow option identifier naming
@@ -311,9 +309,26 @@
   ++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER
 
 is available inside your script as C<< %+OPTS >>, and contains
-C<--prelude=Perl6-autoloop-no-print>.
+C<--prelude=Perl6-autoloop-no-print>.  Since eager matching is used, if you
+need to pass something like:
 
+  ++foo -bar ++foo baz ++/foo ++/foo
 
+you'll end up with
+
+  %+OPTS = '-bar ++foo baz';
+
+which is probably not what you wanted. Instead, add extra C<+> characters
+
+  +++foo -bar ++foo baz ++/foo +++/foo
+
+which will give you
+
+  %+OPTS = '-bar ++foo baz ++/foo';
+
+allowing you to properly nest delimited options.
+
+
 Values are parsed with the following rules:
 
 =over 4



r24847 - docs/Perl6/Spec

2009-01-09 Thread pugs-commits
Author: particle
Date: 2009-01-09 22:13:19 +0100 (Fri, 09 Jan 2009)
New Revision: 24847

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] add notes for further design review

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-09 21:05:46 UTC (rev 24846)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-09 21:13:19 UTC (rev 24847)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 8 Jan 2009
-  Version: 13
+  Last Modified: 9 Jan 2009
+  Version: 14
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -215,7 +215,10 @@
 
 =back
 
+{{TODO for the removed Perl 5 options, address how the same functionality
+can be expressed with the command-line syntax}}
 
+
 =head1 Options and Values
 
 Command line options are parsed using the following rules:
@@ -402,6 +405,9 @@
 arguments passed to C, and is available at C time, so
 C can respond to command-line options.
 
+{{TODO may create a ++DOC subsystem here. also, may use -d for short name,
+even though it clashes with perl 5}}
+
 =item ++DEBUGGER [*switches*, *flags*] ++/DEBUGGER
 
 Set debugging switches and flags.



r24848 - docs/Perl6/Spec

2009-01-09 Thread pugs-commits
Author: particle
Date: 2009-01-09 22:17:42 +0100 (Fri, 09 Jan 2009)
New Revision: 24848

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] a note on assumptions

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-09 21:13:19 UTC (rev 24847)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-09 21:17:42 UTC (rev 24848)
@@ -15,7 +15,7 @@
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
   Last Modified: 9 Jan 2009
-  Version: 14
+  Version: 15
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -51,14 +51,14 @@
 
 This interface to Perl 6 is special in that it occurs at the intersection of
 the program and the operating system's command line shell, and thus is not
-accessed via a consistent syntax everywhere. Perl is born of Unix, and as such
-the syntax presented in this document is expected to work in a Unix-style
-shell. To explore the particularities of other operating systems, see
-L (TBD).
+accessed via a consistent syntax everywhere. A few assumptions are made here,
+which will hopefully stand the test of time: All command-line arguments are
+assumed to be in Unicode unless proven otherwise; and Perl is born of Unix,
+and as such the syntax presented in this document is expected to work in a
+Unix-style shell. To explore the particularities of other operating systems,
+see L (TBD).
 
 
-[my notes/conjectures below are all in square brackets  --TimToady]
-
 =head1 Command Line Elements
 
 The command line is broken down into two basic elements: a I, and
@@ -574,15 +574,6 @@
 This should try to use whatever option does the same thing to a new
 filehandle when S16 is further developed.
 
-Do I need to address any unicode concerns?
-
-[You can try "all command line arguments are assumed to be in unicode
-unless proven otherwise" and see how well it flies. :)  but this starts
-to get into filenames-are-blobs kind of issues...maybe we need a way
-of marking arguments as needing to be encoded into a Buf.  but for sanity
-we must try to settle on unicode as the default expectation.  I hope POSIX
-dies before Perl 6 does...]
-
 Sandboxing? maybe-r
 
 Env var? maybe -E.



r24895 - docs/Perl6/Spec

2009-01-13 Thread pugs-commits
Author: lwall
Date: 2009-01-13 20:30:15 +0100 (Tue, 13 Jan 2009)
New Revision: 24895

Modified:
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S06-routines.pod
Log:
[S03] remove .contains fossil


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-01-13 18:40:10 UTC (rev 24894)
+++ docs/Perl6/Spec/S03-operators.pod   2009-01-13 19:30:15 UTC (rev 24895)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 8 Mar 2004
-  Last Modified: 26 Nov 2008
+  Last Modified: 13 Jan 2009
   Number: 3
-  Version: 147
+  Version: 148
 
 =head1 Overview
 
@@ -3018,10 +3018,10 @@
 
 Hash  Hash  hash keys same set  $_.keys === X.keys
 Set   Hash  hash keys same set  $_ === X.keys
-Array Hash  hash slice existenceX.contains(any @$_)
+Array Hash  hash slice existenceX.{any @$_}:exists
 Regex Hash  hash key grep   any(X.keys).match($_)
-ScalarHash  hash entry existenceX.contains($_)
-Any   Hash  hash slice existenceX.contains(any @$_)
+ScalarHash  hash entry existenceX.{$_}:exists
+Any   Hash  hash slice existenceX.{any @$_}:exists
 
 Str   Regex string pattern match.match(X)
 Hash  Regex hash key "boolean grep" .any.match(X)
@@ -3179,9 +3179,9 @@
 Array   Seqarray contains seq *,X,*
 Array   Seqarray ends with seq*,X
 HashStrhash element truth .{X}
-HashStrhash key existence .contains(X)
+HashStrhash key existence .{X}:exists
 HashNumhash element truth .{X}
-HashNumhash key existence .contains(X)
+HashNumhash key existence .{X}:exists
 Buf Intbuffer contains int.match(X)
 Str Char   string contains char   .match(X)
 Str Strstring contains string .match(X)
@@ -3189,14 +3189,14 @@
 Str Array  array contains string  X.any
 Num Array  array contains number  X.any
 Scalar  Array  array contains object  X.any
-HashArray  hash slice exists  .contains(X.all) .contains(X.any)
-Set Setsubset relation.contains(X)
-Set Hash   subset relation.contains(X)
-Any Setsubset relation.Set.contains(X)
-Any Hash   subset relation.Set.contains(X)
-Any Setsuperset relation  X.contains($_)
-Any Hash   superset relation  X.contains($_)
-Any Setsets intersect .contains(X.any)
+HashArray  hash slice exists  .{X.all}:exists .{X.any}:exists
+Set Setsubset relation.{X}:exists
+Set Hash   subset relation.{X}:exists
+Any Setsubset relation.Set.{X}:exists
+Any Hash   subset relation.Set.{X}:exists
+Any Setsuperset relation  X.{$_}:exists
+Any Hash   superset relation  X.{$_}:exists
+Any Setsets intersect .{X.any}:exists
 Set Array  subset relationX,*  # (conjectured)
 Array   Regex  match array as string  .Cat.match(X)  cat(@$_).match(X)
 

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2009-01-13 18:40:10 UTC (rev 24894)
+++ docs/Perl6/Spec/S06-routines.pod2009-01-13 19:30:15 UTC (rev 24895)
@@ -2558,7 +2558,7 @@
 
 Hence, while the quasiquote itself is being parsed, the syntactic
 interpolation of a unquoted expression into the quasiquote always
-results in the expectation of an operator following the variable.
+results in the expectation of an operator following the unquote.
 (You must use a call to a submacro if you want to expect something
 else.)  Of course, the macro definition as a whole can expect
 whatever it likes afterwards, according to its syntactic category.



r24926 - docs/Perl6/Spec src/perl6 t/operators t/run

2009-01-15 Thread pugs-commits
Author: lwall
Date: 2009-01-16 08:42:00 +0100 (Fri, 16 Jan 2009)
New Revision: 24926

Modified:
   docs/Perl6/Spec/S03-operators.pod
   src/perl6/STD.pm
   t/operators/adverbial_modifiers.t
   t/run/02-dash-n.t
   t/run/03-dash-p.t
Log:
[STD] alignment with S03 on associativity noted by mtnviewmark++
[STD] added various missing functions and types
[t/spec] remove my() function calls  :)


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-01-16 06:07:31 UTC (rev 24925)
+++ docs/Perl6/Spec/S03-operators.pod   2009-01-16 07:42:00 UTC (rev 24926)
@@ -45,7 +45,7 @@
 C  Chaining infix!= == < <= > >= eq ne lt le gt ge ~~ === eqv !eqv
 X  Tight and &&
 X  Tight or  || ^^ // min max
-L  Conditional   ?? !! ff fff
+R  Conditional   ?? !! ff fff
 R  Item assignment   = := ::= => += -= **= xx= .=
 L  Loose unary   true not :by(2)
 X  Comma operator, p5=>
@@ -53,7 +53,8 @@
 R  List prefix   : print push say die map substr ... [+] [*] any $ @
 X  Loose and and andthen
 X  Loose or  or xor orelse
-N  Terminator; <==, ==>, <<==, ==>>, {...}, unless, extra ), ], }
+L  Sequencer <==, ==>, <<==, ==>>
+N  Terminator; {...}, unless, extra ), ], }
 
 Using two C symbols below generically to represent any pair of operators
 that have the same precedence, the associativities specified above

Modified: src/perl6/STD.pm
===
--- src/perl6/STD.pm2009-01-16 06:07:31 UTC (rev 24925)
+++ src/perl6/STD.pm2009-01-16 07:42:00 UTC (rev 24926)
@@ -97,7 +97,7 @@
 bit bool
 
 Order Increasing Decreasing
-Ordered Callable Positional Associatve
+Ordered Callable Positional Associative Abstraction
 Ordering KeyExtractor Comparator OrderingPair
 
 IO
@@ -124,8 +124,9 @@
 # XXX likewise for routine defs
 
 my @baseroutinenames = qw[
-WHAT WHICH VAR
+WHAT WHERE HOW WHICH VAR WHO WHENCE new
 any all none one
+not true
 
 die exit warn
 caller want
@@ -136,7 +137,7 @@
 cat classify
 quotemeta
 chr ord
-p5chop chop p5chomp chomp
+p5chop chop p5chomp chomp trim
 index rindex substr
 join split comb pack unpack
 uc ucfirst lc lcfirst
@@ -148,6 +149,7 @@
 
 say print open close printf sprintf slurp unlink link symlink
 elems grep map first reduce sort uniq push reverse take splice
+lines getc
 
 zip each roundrobin caller
 return leave pop shift unshift reduce
@@ -224,14 +226,14 @@
 constant %multiplicative  = (:prec, :assoc,  :assign);
 constant %additive= (:prec, :assoc,  :assign);
 constant %replication = (:prec, :assoc,  :assign);
-constant %concatenation   = (:prec, :assoc,  :assign);
+constant %concatenation   = (:prec, :assoc,  :assign);
 constant %junctive_and= (:prec, :assoc,  :assign);
 constant %junctive_or = (:prec, :assoc,  :assign);
 constant %named_unary = (:prec);
 constant %nonchaining = (:prec, :assoc);
 constant %chaining= (:prec, :assoc, :bool);
-constant %tight_and   = (:prec, :assoc,  :assign);
-constant %tight_or= (:prec, :assoc,  :assign);
+constant %tight_and   = (:prec, :assoc,  :assign);
+constant %tight_or= (:prec, :assoc,  :assign);
 constant %conditional = (:prec, :assoc);
 constant %item_assignment = (:prec, :assoc);
 constant %loose_unary = (:prec);
@@ -239,8 +241,8 @@
 constant %list_infix  = (:prec, :assoc,  :assign);
 constant %list_assignment = (:prec, :sub, :assoc);
 constant %list_prefix = (:prec);
-constant %loose_and   = (:prec, :assoc,  :assign);
-constant %loose_or= (:prec, :assoc,  :assign);
+constant %loose_and   = (:prec, :assoc,  :assign);
+constant %loose_or= (:prec, :assoc,  :assign);
 constant %sequencer  = (:prec, :assoc, :nextterm);
 constant %LOOSEST = (:prec);
 constant %terminator  = (:prec, :assoc);

Modified: t/operators/adverbial_modifiers.t
===
--- t/operators/adverbial_modifiers.t   2009-01-16 06:07:31 UTC (rev 24925)
+++ t/operators/adverbial_modifiers.t   2009-01-16 07:42:00 UTC (rev 24926)
@@ -31,7 +31,7 @@
   my $bar = 123;
   my @many = (4,5);
   sub dostuff(){"stuff"}
-  my($v,$e);
+  my ($v,$e);
   $e = (foo => $bar);
   $v = :foo($bar);
   is ~$v, ~$e, ':foo($bar)';

Modified: t/run/02-dash-n.t
===
--- t/run/02-dash-n.t   2009-01-16 06:07:31 UTC (rev 24925)
+++ t/run/02-dash-n.t   2009-01-16 07:42:00 UTC (rev 24926)
@@ -37,7 +37,7 @@
 ";
 
 sub nonce () { return (".{$*PID}." ~ (1..1000).pick) }
-my($in_fn, $out_fn) =  >>~<< nonce;
+my ($in_fn, $out_fn) =  >>~<< nonce;
 my $h = open("$in_fn", :w);
 $h.print($str);
 $h.close();

Modified: t/run/

r24991 - docs/Perl6/Spec

2009-01-21 Thread pugs-commits
Author: moritz
Date: 2009-01-21 20:54:56 +0100 (Wed, 21 Jan 2009)
New Revision: 24991

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] changed outdated notice about document location, noticed by Coke++


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-21 18:36:08 UTC (rev 24990)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-21 19:54:56 UTC (rev 24991)
@@ -17,19 +17,12 @@
  Last Modified: 7 Jan 2009
  Version:   37
 
-This document attempts to document the list of builtin functions in Perl 6.
-It assumes familiarity with Perl 5 and prior synopses.
+The document is a draft.
 
-The document is now the official S29.  It's still here in the pugs
-repository temporarily to allow easy access to pugs implementors,
-but eventually it will be copied over to svn.perl.org.  Despite its
-being "official", feel free to hack on it as long as it's in the pugs
-space.  -law
+If you read the HTML version, it is generated from the pod in the pugs 
+repository under /docs/Perl6/Spec/Functions.pod so edit it there in the
+SVN repository if you would like to make changes.
 
-This document is generated from the pod in the pugs repository under 
-/docs/Perl6/Spec/Functions.pod so edit it there in the SVN repository 
-if you would like to make changes.
-
 =head1 Notes
 
 In Perl 6, all builtin functions belong to a named package (generally a



r24993 - docs/Perl6/Spec

2009-01-21 Thread pugs-commits
Author: lwall
Date: 2009-01-21 21:49:51 +0100 (Wed, 21 Jan 2009)
New Revision: 24993

Modified:
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S12-objects.pod
Log:
[S03] more alignment with STD
[S12] monkey patching now requires a special "use MONKEY_PATCHING" at the top


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-01-21 20:25:19 UTC (rev 24992)
+++ docs/Perl6/Spec/S03-operators.pod   2009-01-21 20:49:51 UTC (rev 24993)
@@ -31,7 +31,7 @@
 =  = 
 N  Terms 42 3.14 "eek" qq["foo"] $x :!verbose @$array
 L  Method postfix.meth .+ .? .* .() .[] .{} .<> .«» .:: .= .^ .:
-L  Autoincrement ++ --
+N  Autoincrement ++ --
 R  Exponentiation**
 L  Symbolic unary! + - ~ ? | +^ ~^ ?^ \ ^ =
 L  Multiplicative* / % +& +< +> ~& ~< ~> ?& div mod
@@ -53,7 +53,7 @@
 R  List prefix   : print push say die map substr ... [+] [*] any $ @
 X  Loose and and andthen
 X  Loose or  or xor orelse
-L  Sequencer <==, ==>, <<==, ==>>
+X  Sequencer <==, ==>, <<==, ==>>
 N  Terminator; {...}, unless, extra ), ], }
 
 Using two C symbols below generically to represent any pair of operators
@@ -76,6 +76,10 @@
 R   right !($a!)
 N   non   ILLEGAL
 
+(In standard Perl there are no unaries that can take advantage of
+associativity, since at each precedence level the standard operators
+are either consistently prefix or postfix.)
+
 Note that list associativity (X) only works between identical operators.
 If two different list-associative operators have the same precedence,
 they are assumed to be left-associative with respect to each other.

Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2009-01-21 20:25:19 UTC (rev 24992)
+++ docs/Perl6/Spec/S12-objects.pod 2009-01-21 20:49:51 UTC (rev 24993)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 27 Oct 2004
-  Last Modified: 19 Dec 2008
+  Last Modified: 21 Jan 2009
   Number: 12
-  Version: 67
+  Version: 68
 
 =head1 Overview
 
@@ -1816,6 +1816,11 @@
 replace a definition, use "C" instead of "C"...but
 don't do that.)
 
+In order to discourage casual misuse of these traits, they are not
+allowed on global classes unless you put a special declaration at the top:
+
+use MONKEY_PATCHING;
+
 For optimization purposes, Perl 6 gives the top-level application the
 right to close and finalize classes by the use of C, a pragma for
 selecting global semantics of the underlying object-oriented engine:



r24994 - docs/Perl6/Spec

2009-01-21 Thread pugs-commits
Author: lwall
Date: 2009-01-22 00:35:56 +0100 (Thu, 22 Jan 2009)
New Revision: 24994

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S03-operators.pod
Log:
[S02,S03] delete some .pos fossils


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-01-21 20:49:51 UTC (rev 24993)
+++ docs/Perl6/Spec/S02-bits.pod2009-01-21 23:35:56 UTC (rev 24994)
@@ -685,9 +685,7 @@
 changes to a mutable string.  For instance, if you ask for the positions
 of matches done by a substitution, the answers are reported in terms of the
 original string (which may now be inaccessible!), not as positions within
-the modified string.  (However, if you use C<.pos> on the modified string,
-it will report the position of the end of the substitution in terms
-of the new string.)
+the modified string.
 
 The subtraction of two C objects gives a C object,
 which is also not an integer, because the string between two positions

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-01-21 20:49:51 UTC (rev 24993)
+++ docs/Perl6/Spec/S03-operators.pod   2009-01-21 23:35:56 UTC (rev 24994)
@@ -3279,8 +3279,6 @@
 by the C so that the element numbers remain correct.  Strings,
 arrays, lists, sequences, captures, and tree nodes can all be pattern
 matched by regexes or by signatures more or less interchangably.
-However, the structure searched is not guaranteed to maintain a C<.pos>
-unless you are searching a C or C.
 
 =head1 Invocant marker
 



r25017 - docs/Perl6/Spec

2009-01-24 Thread pugs-commits
Author: masak
Date: 2009-01-24 22:17:56 +0100 (Sat, 24 Jan 2009)
New Revision: 25017

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] documented .i method in Num


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-24 18:16:21 UTC (rev 25016)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-24 21:17:56 UTC (rev 25017)
@@ -14,8 +14,8 @@
 Carl Mäsak 
 Moritz Lenz 
  Date:  12 Mar 2005
- Last Modified: 7 Jan 2009
- Version:   37
+ Last Modified: 24 Jan 2009
+ Version:   38
 
 The document is a draft.
 
@@ -344,7 +344,6 @@
 Logarithm of base C<$base>, default Natural. Calling with C<$x == 0> is an
 error.
 
-
 =item log10
 
  our Num multi method log10 (Num $x:) is export
@@ -404,6 +403,13 @@
 
 Returns a complex number specified in polar coordinates.  Angle is in radians.
 
+=item i
+
+ our Num multi method i ( Num $x: )
+
+Returns a complex number representing the parameter multiplied by the imaginary
+unit C.
+
 =back
 
 



r25031 - docs/Perl6/Spec src/perl6 t/spec/S02-names_and_variables t/spec/S29-hash

2009-01-25 Thread pugs-commits
Author: lwall
Date: 2009-01-26 05:06:43 +0100 (Mon, 26 Jan 2009)
New Revision: 25031

Modified:
   docs/Perl6/Spec/S03-operators.pod
   src/perl6/Cursor.pmc
   src/perl6/STD.pm
   t/spec/S02-names_and_variables/names.t
   t/spec/S29-hash/exists.t
Log:
[STD, S03] more operator alignment and cleanup


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-01-26 01:45:30 UTC (rev 25030)
+++ docs/Perl6/Spec/S03-operators.pod   2009-01-26 04:06:43 UTC (rev 25031)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 8 Mar 2004
-  Last Modified: 13 Jan 2009
+  Last Modified: 24 Jan 2009
   Number: 3
-  Version: 148
+  Version: 149
 
 =head1 Overview
 
@@ -33,7 +33,7 @@
 L  Method postfix.meth .+ .? .* .() .[] .{} .<> .«» .:: .= .^ .:
 N  Autoincrement ++ --
 R  Exponentiation**
-L  Symbolic unary! + - ~ ? | +^ ~^ ?^ \ ^ =
+L  Symbolic unary! + - ~ ? | +^ ~^ ?^ ^ =
 L  Multiplicative* / % +& +< +> ~& ~< ~> ?& div mod
 L  Additive  + - +| +^ ~| ~^ ?| ?^
 L  Replication   x xx
@@ -48,9 +48,9 @@
 R  Conditional   ?? !! ff fff
 R  Item assignment   = := ::= => += -= **= xx= .=
 L  Loose unary   true not :by(2)
-X  Comma operator, p5=>
+X  Comma operator, p5=> :
 X  List infixZ minmax X X~X X*X XeqvX ...
-R  List prefix   : print push say die map substr ... [+] [*] any $ @
+R  List prefix   print push say die map substr ... [+] [*] any $ @
 X  Loose and and andthen
 X  Loose or  or xor orelse
 X  Sequencer <==, ==>, <<==, ==>>
@@ -82,7 +82,7 @@
 
 Note that list associativity (X) only works between identical operators.
 If two different list-associative operators have the same precedence,
-they are assumed to be left-associative with respect to each other.
+they are assumed to be right-associative with respect to each other.
 For example, the C cross operator and the C zip operator both
 have a precedence of "list infix", but:
 
@@ -90,10 +90,10 @@
 
 is parsed as:
 
-(@a X @b) Z @c
+@a X (@b Z @c)
 
 Similarly, if the only implementation of a list-associative operator
-is binary, it will be treated as left associative.
+is binary, it will be treated as right associative.
 
 If you don't see your favorite operator above, the following
 sections cover all the operators in precedence order.  Basic operator
@@ -669,18 +669,6 @@
 
 =item *
 
-C<< prefix:<\> >>, Capture constructor
-
-\$x
-\...@x
-\%x
-\($invocant: $pos1, $pos2, :named($arg))
-
-Defers the contextualization of its argument or arguments till it is
-bound into some other context.
-
-=item *
-
 C<< prefix:<^> >>, upto operator
 
 ^$limit
@@ -1557,6 +1545,71 @@
 explicitly if there is an explicit signature, or pull them out of C<%_>
 rather than C<@_> if there is no explicit signature.
 
+=item *
+
+C<< infix:<:> >>, the invocant marker
+
+say $*OUT: "howdy, world"
+say($*OUT: "howdy, world")
+push @array: 1,2,3
+push(@array: 1,2,3)
+\($object: 1,2,3, :foo, :!bar)
+
+The colon operator parses just like a comma, but marks the argument to its 
left as an
+invocant, which has the effect of turning what would otherwise be a function
+call into a method call.  It may only be used on the first argument of
+an argument list or capture, and will fail to parse if used in any other 
position.
+When used within a capture, it is not yet know what signature the capture will
+be bound to; if bound to a non-method's signature, the invocant merely turns
+into the first positional argument, as if the colon had been a comma.
+
+To avoid confusion with other colon forms, the colon infix operator
+must be followed by whitespace or a terminator.  It may optionally
+have whitespace in front of it.
+
+Note: distinguish this infix operator from the colon in
+
+@array.push: 1,2,3
+@array.push(1,2,3): 4,5,6
+push(@array, 1,2,3): 4,5,6
+
+which is a special form that turns an ordinary function or method
+call into a list operator.  The special form is recognized only after
+a dotty method call, or after the right parenthesis of a method or
+function call.  The special form does not allow intervening whitespace,
+but requires whitespace before the next argument.  In all other
+cases a colon will be parsed as the start of an adverb if possible,
+or otherwise the invocant marker (the infix described above).
+
+Another way to think of it is that the special colon is allowed to
+add listop arguments to a parenthesized argument list only after
+the right parenthesis of that argument list, with the proviso that
+you're allowed to shorten C<.foo(): 1,2,3> down to C<.foo: 1,2,3>.
+(But only for method calls, since ordinary functions don't need the
+colon in the first place to turn into a listop, just whitespace.
+If you try to extend a function name with a colon, it's l

r25044 - docs/Perl6/Spec

2009-01-26 Thread pugs-commits
Author: lwall
Date: 2009-01-26 20:11:42 +0100 (Mon, 26 Jan 2009)
New Revision: 25044

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] clarify that .perl always represents an object as an item


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-01-26 16:12:14 UTC (rev 25043)
+++ docs/Perl6/Spec/S02-bits.pod2009-01-26 19:11:42 UTC (rev 25044)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 8 Jan 2009
+  Last Modified: 26 Jan 2009
   Number: 2
-  Version: 148
+  Version: 149
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -1413,7 +1413,12 @@
 Like the C module in Perl 5, the C<.perl> method will put
 quotes around strings, square brackets around list values, curlies around
 hash values, constructors around objects, etc., so that Perl can evaluate
-the result back to the same object.
+the result back to the same object.  The C<.perl> method will return
+a representation of the object on the assumption that, if the code is
+reparsed at some point, it will be used to regenerate the object as a
+scalar in item context.  If you wish to interpolate the regenerated
+object in a list context, it may be necessary to use C< >>
+to force interpolation.
 
 =item *
 



r25048 - docs/Perl6/Spec src/perl6

2009-01-26 Thread pugs-commits
Author: lwall
Date: 2009-01-27 01:08:23 +0100 (Tue, 27 Jan 2009)
New Revision: 25048

Modified:
   docs/Perl6/Spec/S05-regex.pod
   src/perl6/STD.pm
Log:
[STD, S05] converge spec and parse of character classes


Modified: docs/Perl6/Spec/S05-regex.pod
===
--- docs/Perl6/Spec/S05-regex.pod   2009-01-26 22:33:20 UTC (rev 25047)
+++ docs/Perl6/Spec/S05-regex.pod   2009-01-27 00:08:23 UTC (rev 25048)
@@ -14,9 +14,9 @@
Maintainer: Patrick Michaud  and
Larry Wall 
Date: 24 Jun 2002
-   Last Modified: 17 Nov 2008
+   Last Modified: 26 Jan 2009
Number: 5
-   Version: 86
+   Version: 87
 
 This document summarizes Apocalypse 5, which is about the new regex
 syntax.  We now try to call them I rather than "regular
@@ -1399,7 +1399,8 @@
 
 
 However, in order to combine classes you must prefix a named
-character class with C<+> or C<->.
+character class with C<+> or C<->.  Whitespace is required before
+any C<-> that would be misparsed as an identifier extender.
 
 =item *
 

Modified: src/perl6/STD.pm
===
--- src/perl6/STD.pm2009-01-26 22:33:20 UTC (rev 25047)
+++ src/perl6/STD.pm2009-01-27 00:08:23 UTC (rev 25048)
@@ -3758,7 +3758,7 @@
 || [   ]?   # still get all the pod 
goodness, hopefully
 }
 
-token sigspace {
+token normspace {
  [ :lang($¢.cursor_fresh($+LANG)) <.ws> ]
 }
 
@@ -3832,7 +3832,7 @@
 # "normal" metachars
 
 token metachar:sigwhite {
-
+
 }
 
 token metachar:sym<{ }> {
@@ -3988,23 +3988,25 @@
 ]?
 }
 
-token assertion:sym<[> {   ** < + - > }
-token assertion:sym<+> {   ** < + - > }
-token assertion:sym<-> {   ** < + - > }
+token assertion:sym<[> {  + }
+token assertion:sym<+> {  + }
+token assertion:sym<-> {  + }
 token assertion:sym<.> {  }
 token assertion:sym<,> {  }
 token assertion:sym<~~> {  [ '> | \d+ |  ] }
 
 token assertion:bogus { <.panic: "Unrecognized regex assertion"> }
 
+token sign { '+' | '-' |  }
 token cclass_elem {
-<.ws>
 :dba('character class element')
+
+<.normspace>?
 [
 | 
 |   # XXX 
parse as q[] for now
 ]
-<.ws>
+<.normspace>?
 }
 
 token mod_arg { :dba('modifier argument') '(' ~ ')'  }
@@ -4044,7 +4046,7 @@
 token quantifier:sym<*>  {   }
 token quantifier:sym<+>  {   }
 token quantifier:sym  {   }
-token quantifier:sym<**> {  :: ?  ?
+token quantifier:sym<**> {  :: ?  ?
 [
 | \d+ [ '..' [ \d+ | '*' ] ]?
 | 
@@ -4057,7 +4059,7 @@
 | '!' 
 | 
 ]
-  }
+  }
 
 token quantmod { ':'? [ '?' | '!' | '+' ]? }
 



r25049 - docs/Perl6/Spec

2009-01-26 Thread pugs-commits
Author: lwall
Date: 2009-01-27 01:44:28 +0100 (Tue, 27 Jan 2009)
New Revision: 25049

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] expand on use of * in orderings
sort, min, and max shouldn't have an optional positional before a slurpy
junctional functions take *...@array, not a single @array parameter
hence the corresponding methods are not exported


Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2009-01-27 00:08:23 UTC (rev 25048)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-27 00:44:28 UTC (rev 25049)
@@ -14,8 +14,8 @@
 Carl Mäsak 
 Moritz Lenz 
  Date:  12 Mar 2005
- Last Modified: 24 Jan 2009
- Version:   38
+ Last Modified: 26 Jan 2009
+ Version:   39
 
 The document is a draft.
 
@@ -121,7 +121,7 @@
  subset Comparator   of Code where { .sig === :(Any, Any --> Int ) };
  subset OrderingPair of Pair where { .left ~~ KeyExtractor && .right ~~ 
Comparator };
 
- subset Ordering where Signature | KeyExtractor | Comparator | OrderingPair;
+ subset Ordering where Signature | KeyExtractor | Comparator | OrderingPair | 
Whatever;
 
 Used to handle comparisons between things.  Generally this
 ends up in functions like C, C, C,
@@ -156,6 +156,13 @@
 Internally the result of the KeyExtractor on a value should
 be cached.
 
+Note that it is very easy to generate a simple C
+using C<~*> for strings and C<+*> for numbers, since with most
+simple operators C<*> returns a closure of one argument.
+
+@sorted = sort +*, @unsorted;  #ascending numeric
+@sorted = sort -*, @unsorted;  #descending numeric
+
 =item OrderingPair
 
 A combination of the two methods above, for when one wishes
@@ -177,6 +184,12 @@
 performed if an early one determines an increasing or decreasing
 order.  For equivalence the list is reduced as if using [&&].
 
+=item Whatever
+
+An ordering of C<*> does the default comparison for the operator:
+
+@sorted = sort *, @unsorted;
+
 =back
 
 =back
@@ -950,7 +963,7 @@
  our Array multi method sort( @values: Ordering $by = &infix: )
 
  our List multi sort( Ordering @by,  *...@values )
- our List multi sort( Ordering $by = &infix:, *...@values )
+ our List multi sort( Ordering $by, *...@values )
 
 Returns C<@values> sorted, using criteria C<$by> or C<@by> for
 comparisons. C<@by> differs from C<$by> in that each criterion is
@@ -984,7 +997,7 @@
  our Array multi method min( @values: Ordering $by = &infix: )
 
  our List multi min( Ordering @by,  *...@values )
- our List multi min( Ordering $by = &infix:, *...@values )
+ our List multi min( Ordering $by,  *...@values )
 
 Returns the earliest (i.e., lowest index) minimum element
 of C<@values> , using criteria C<$by> or C<@by> for
@@ -998,6 +1011,9 @@
 is used as an C then sort-specific traits such as C are allowed on the positional elements.
 
+For a C function that does not require an ordering, see the
+C<[min]> reduction operator.
+
 =item max
 
  our Array multi method max( @values: *&by )
@@ -1005,7 +1021,7 @@
  our Array multi method max( @values: Ordering $by = &infix: )
 
  our List multi max( Ordering @by,  *...@values )
- our List multi max( Ordering $by = &infix:, *...@values )
+ our List multi max( Ordering $by,  *...@values )
 
 Returns the earliest (i.e., lowest index) maximum element
 of C<@values> , using criteria C<$by> or C<@by> for
@@ -1019,10 +1035,13 @@
 is used as an C then sort-specific traits such as C are allowed on the positional elements.
 
+For a C function that does not require an ordering, see the
+C<[max]> reduction operator.
+
 =item any
 
- our Junction multi method any( @values: ) is export
- our Junction multi any( @values ) is export
+ our Junction multi method any( @values: )
+ our Junction multi any( *...@values ) is export
 
 Returns a junction with all the values of the list C<|>-ed together. The
 junction will only match against another value if at least one of the
@@ -1030,8 +1049,8 @@
 
 =item all
 
- our Junction multi method all( @values: ) is export
- our Junction multi all( @values ) is export
+ our Junction multi method all( @values: )
+ our Junction multi all( *...@values ) is export
 
 Returns a junction with all the values of the list C<&>-ed together. The
 junction will only match against another value if all of the values in the
@@ -1039,8 +1058,8 @@
 
 =item one
 
- our Junction multi method one( @values: ) is export
- our Junction multi one( @values ) is export
+ our Junction multi method one( @values: )
+ our Junction multi one( *...@values ) is export
 
 Returns a junction with all the values of the list C<^>-ed together. The
 junction will only match against another value if exactly one of the values
@@ -1048,8 +1067,8 @@
 
 =item none
 
- our Junction multi method none( @values: ) is export
- our Junction multi none( @values ) is export
+ our Junction multi method none( @values: )
+ our Junction multi none( *...@v

r25060 - docs/Perl6/Spec src/perl6

2009-01-27 Thread pugs-commits
Author: lwall
Date: 2009-01-27 18:43:18 +0100 (Tue, 27 Jan 2009)
New Revision: 25060

Modified:
   docs/Perl6/Spec/S03-operators.pod
   src/perl6/STD.pm
Log:
[STD] more operator hacking inspired by mtnviewmark++
[S03] added comparison-reversion metaoperator


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-01-27 10:11:54 UTC (rev 25059)
+++ docs/Perl6/Spec/S03-operators.pod   2009-01-27 17:43:18 UTC (rev 25060)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 8 Mar 2004
-  Last Modified: 24 Jan 2009
+  Last Modified: 27 Jan 2009
   Number: 3
-  Version: 149
+  Version: 150
 
 =head1 Overview
 
@@ -1472,7 +1472,7 @@
 $a < 1 && $b == 2 :carefully
 
 does the C<&&> carefully because C<&&> is of
-tighter precedence than "loose unary".  Use
+tighter precedence than "comma".  Use
 
 $a < 1 && ($b == 2 :carefully)
 
@@ -3400,7 +3400,7 @@
 operators yourself.  Similarly, the carets that exclude the endpoints
 on ranges are there by convention only.
 
-In contrast to that, Perl 6 has five standard metaoperators for
+In contrast to that, Perl 6 has six standard metaoperators for
 turning a given existing operator into a related operator that is
 more powerful (or at least differently powerful).  These differ from a
 mere naming convention in that Perl automatically generates these new
@@ -3483,8 +3483,9 @@
 
 =head2 Negated relational operators
 
-Any infix relational operator may be transformed into its negative
-by prefixing with C.  A couple of these have traditional shortcuts:
+Any infix relational operator returning type C may be transformed
+into its negative by prefixing with C.  A couple of these have
+traditional shortcuts:
 
 Full form   Shortcut
 -   
@@ -3506,6 +3507,23 @@
 
 The precedence of any negated operator is the same as the base operator.
 
+Note that logical operators such as C<||> and C<^^> do not return a Bool,
+but rather one of the operands.
+
+=head2 Reversed comparison operators
+
+Any infix comparison operator returning type C may be transformed into 
its reversed sense
+by prefixing with C<->.
+
+-cmp
+-leg
+-<=>
+
+To avoid confusion with the C<-=> operator, you may not modify
+any operator already beginning with C<=>.
+
+The precedence of any reversed operator is the same as the base operator.
+
 =head2 Hyper operators
 
 The Unicode characters C<»> (C<\x[BB]>) and C<«> (C<\x[AB]>) and

Modified: src/perl6/STD.pm
===
--- src/perl6/STD.pm2009-01-27 10:11:54 UTC (rev 25059)
+++ src/perl6/STD.pm2009-01-27 17:43:18 UTC (rev 25060)
@@ -150,7 +150,7 @@
 chars graphs codes bytes
 
 say print open close printf sprintf slurp unlink link symlink
-elems grep map first reduce sort uniq push reverse take splice
+elems grep map first reduce sort min max uniq push reverse take splice
 lines getc
 
 zip each roundrobin caller
@@ -233,7 +233,7 @@
 constant %junctive_or = (:dba('junctive_or') , :prec, 
:assoc,  :assign);
 constant %named_unary = (:dba('named_unary') , :prec, 
:assoc, :uassoc);
 constant %nonchaining = (:dba('nonchaining') , :prec, :assoc);
-constant %chaining= (:dba('chaining'), :prec, 
:assoc, :bool);
+constant %chaining= (:dba('chaining'), :prec, 
:assoc, :returns); # XXX Bool string, not type
 constant %tight_and   = (:dba('tight_and')   , :prec, 
:assoc,  :assign);
 constant %tight_or= (:dba('tight_or'), :prec, 
:assoc,  :assign);
 constant %conditional = (:dba('conditional') , :prec, 
:assoc);
@@ -272,7 +272,7 @@
 
 } # end role
 
-class Hyper does PrecOp {
+class Transparent does PrecOp {
  our %o = (:transparent);
 } # end class
 
@@ -1031,6 +1031,7 @@
 }
 
 token infixish {
+:my $infix;
 
 
 :dba('infix or meta-infix')
@@ -1050,7 +1051,7 @@
 | 
 { $ = $;
   $ = $; }
-|   )>
+|   ; }> 

{ $ = $.; $ = 
$.; }
 ]
 }
@@ -1129,20 +1130,32 @@
 
 token postfix_prefix_meta_operator:sym< » >{  | '>>' }
 
-token infix_prefix_meta_operator:sym ( --> Chaining) {
+token infix_prefix_meta_operator:sym ( --> Transparent) {
   
 
  = $; }>
 
 
 [
-||  eq 'chain'}>
-||  and $ }>
-|| <.panic: "Only boolean infix operators may be negated">
+||  // '') eq 'Bool' }>
+|| <.worry: "Only boolean infix operators may be negated"> 
 ]
 
  and $¢.panic("Negation of hyper operator not allowed") }>
+}
 
+token infix_prefix_meta_operator:sym<-> ( --> Transparent) {
+  
+
+ = $; }>
+
+
+[
+||  // '') eq 'Order' }>
+|| <.worry: "Only comparison infix operators may be negated"> 
+]
+
+ and $¢.panic("Negation of hyper operator not allowed") }>
 }
 
 method lex1 (Str $s) {
@@ -1160,7 +1173,7 @@
 
 }
 
-token infix_circumfix_meta_operat

r25102 - docs/Perl6/Spec

2009-01-28 Thread pugs-commits
Author: lwall
Date: 2009-01-29 02:53:54 +0100 (Thu, 29 Jan 2009)
New Revision: 25102

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] reserve PERL and FILE lexical scope names


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-01-28 19:59:07 UTC (rev 25101)
+++ docs/Perl6/Spec/S02-bits.pod2009-01-29 01:53:54 UTC (rev 25102)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 26 Jan 2009
+  Last Modified: 28 Jan 2009
   Number: 2
-  Version: 149
+  Version: 150
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -1752,24 +1752,32 @@
 
 =item *
 
-The following pseudo-package names are reserved in the first position:
+The following pseudo-package names are reserved at the front of a name:
 
-MY  # Lexical variables declared in the current scope
-OUR # Package variables declared in the current package
-GLOBAL  # Builtin variables and functions
-PROCESS # process-related globals
-OUTER   # Lexical variables declared in the outer scope
-CALLER  # Contextual variables in the immediate caller's scope
-CONTEXT # Contextual variables in any context's scope
-SUPER   # Package variables declared in inherited classes
-COMPILING   # Lexical variables in the scope being compiled
+MY  # Lexical symbols declared in the current scope
+OUR # Package symbols declared in the current package
+FILE# Lexical symbols in this file's outermost scope
+PERL# Lexical symbols in the standard "perlude"
+GLOBAL  # Interpreter-wide package symbols
+PROCESS # Process-related globals (superglobals)
+SUPER   # Package symbols declared in inherited classes
+COMPILING   # Lexical symbols in the scope being compiled
 
+The following relative names are also reserved but may be used
+anywhere in a name:
+
+OUTER   # Lexical symbols declared in the outer scope
+CALLER  # Contextual symbols in the immediate caller's scope
+CONTEXT # Contextual symbols in any context's scope
+
 Other all-caps names are semi-reserved.  We may add more of them in
 the future, so you can protect yourself from future collisions by using
 mixed case on your top-level packages.  (We promise not to break
 any existing top-level CPAN package, of course.  Except maybe ACME,
 and then only for coyotes.)
 
+Note that FILE::OUTER is usually, but not always PERL.
+
 =item *
 
 You may interpolate a string into a package or variable name using



r25105 - docs/Perl6/Spec

2009-01-28 Thread pugs-commits
Author: lwall
Date: 2009-01-29 02:59:56 +0100 (Thu, 29 Jan 2009)
New Revision: 25105

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
missing comma


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-01-29 01:57:15 UTC (rev 25104)
+++ docs/Perl6/Spec/S02-bits.pod2009-01-29 01:59:56 UTC (rev 25105)
@@ -1776,7 +1776,7 @@
 any existing top-level CPAN package, of course.  Except maybe ACME,
 and then only for coyotes.)
 
-Note that FILE::OUTER is usually, but not always PERL.
+Note that FILE::OUTER is usually, but not always, PERL.
 
 =item *
 



r25113 - docs/Perl6/Spec src/perl6

2009-01-29 Thread pugs-commits
Author: lwall
Date: 2009-01-29 21:32:51 +0100 (Thu, 29 Jan 2009)
New Revision: 25113

Modified:
   docs/Perl6/Spec/S03-operators.pod
   src/perl6/STD.pm
Log:
[STD, S03] slaughter of the LTM metatokens
STD now runs considerably faster
Freed from LTM, metaoperators may now be nested arbitrarily deep
new &[op] notation for infix functions


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-01-29 15:35:07 UTC (rev 25112)
+++ docs/Perl6/Spec/S03-operators.pod   2009-01-29 20:32:51 UTC (rev 25113)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 8 Mar 2004
-  Last Modified: 27 Jan 2009
+  Last Modified: 29 Jan 2009
   Number: 3
-  Version: 150
+  Version: 151
 
 =head1 Overview
 
@@ -49,7 +49,7 @@
 R  Item assignment   = := ::= => += -= **= xx= .=
 L  Loose unary   true not :by(2)
 X  Comma operator, p5=> :
-X  List infixZ minmax X X~X X*X XeqvX ...
+X  List infixZ minmax X X~ X* Xeqv ...
 R  List prefix   print push say die map substr ... [+] [*] any $ @
 X  Loose and and andthen
 X  Loose or  or xor orelse
@@ -1697,9 +1697,9 @@
 
 Cross hyperoperators
 
-@files X~X '.' X~X @extensions
-1..10 X*X 1..10
-@x XeqvX @y
+@files X~ '.' X~ @extensions
+1..10 X* 1..10
+@x Xeqv @y
 etc.
 
 See L.
@@ -3507,21 +3507,24 @@
 
 The precedence of any negated operator is the same as the base operator.
 
+The operator
+
+!%
+
+is specially allowed for testing even divisibility by an integer.
+
 Note that logical operators such as C<||> and C<^^> do not return a Bool,
 but rather one of the operands.
 
 =head2 Reversed comparison operators
 
-Any infix comparison operator returning type C may be transformed into 
its reversed sense
-by prefixing with C<->.
+Any infix operator may be called with its two arguments reversed
+by prefixing with C.  For instance, to do reversed comparisons:
 
--cmp
--leg
--<=>
+Rcmp
+Rleg
+R<=>
 
-To avoid confusion with the C<-=> operator, you may not modify
-any operator already beginning with C<=>.
-
 The precedence of any reversed operator is the same as the base operator.
 
 =head2 Hyper operators
@@ -3964,22 +3967,22 @@
 =head2 Cross operators
 
 The final metaoperator is the cross metaoperator.  It is formed syntactically
-by placing an infix operator between two C characters.  It applies the
+by placing an infix operator after the C character.  It applies the
 modified operator across all groupings of its list arguments as returned
 by the ordinary C<< infix: >> operator.  All
 cross operators are of list infix precedence, and are list associative.
 
 The string concatenating form is:
 
- X~X <1 2>   #  'a1', 'a2', 'b1', 'b2'
+ X~ <1 2>   #  'a1', 'a2', 'b1', 'b2'
 
-The C operator desugars to something like:
+The C operator desugars to something like:
 
-[~]«(  X,X <1 2> )  #  'a1', 'a2', 'b1', 'b2'
+[~]«(  X, <1 2> )  #  'a1', 'a2', 'b1', 'b2'
 
-The list concatenating form, C, when used like this:
+The list concatenating form, C, when used like this:
 
- X,X 1,2 X,X 
+ X, 1,2 X, 
 
 produces
 
@@ -3998,15 +4001,15 @@
 For the general form, any existing, non-mutating infix operator
 may be used.
 
-1,2 X*X 3,4   # 3,4,6,8
+1,2 X* 3,4   # 3,4,6,8
 
 (Note that C<< <== >> and C<< ==> >> are considered mutating, as well as
 all assignment operators.)
 
 If the underlying operator is non-associating, so is the metaoperator:
 
-@a XcmpX @b XcmpX @c   # ILLEGAL
-@a XeqX @b XeqX @c # ok
+@a Xcmp @b Xcmp @c   # ILLEGAL
+@a Xeq @b Xeq @c # ok
 
 In fact, though the C operators are all list associative
 syntactically, the underlying operator is always applied with its
@@ -4019,44 +4022,37 @@
 
 =head2 Nesting of metaoperators
 
-In order to match operators by the longest-token rule, the
-compiler pregenerates various metaforms based on existing operators.
-Unfortunately, with nesting metaoperators there are an infinite number
-of metaforms, so we arbitrarily say that no metacircumfix form is
-pregenerated that uses the same grammatical category more than once.
-Therefore forms like C<[+=]> and C<»!===«> and C are generated,
-but not forms like C<»X*X«> or C or C<<< <<+=>>= >>>.
-You do get C<[X*X]>,
-though, because reduction is prefix_circumfix_meta_operator while
-cross operators are infix_circumfix_meta_operator.
+Constructs containing metaoperators are considered "metatokens",
+by which we mean that they are not subject to ordinary longest-token
+matching rules, although their components are.  Like ordinary
+tokens, however, metaoperators do not allow whitespace between
+their subparts.
 
-This use-each-category-once limitation is not a great hardship since
-you can define your own infix operators.  Suppose you say
+Any ordinary infix operator ma

r25121 - docs/Perl6/Spec

2009-01-29 Thread pugs-commits
Author: lwall
Date: 2009-01-30 08:11:23 +0100 (Fri, 30 Jan 2009)
New Revision: 25121

Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] more comments


Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-30 05:01:11 UTC (rev 25120)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-01-30 07:11:23 UTC (rev 25121)
@@ -65,7 +65,7 @@
 I. Each command line element is whitespace separated, so elements
 containing whitespace must be quoted. The I processes the arguments
 and performs the requested actions. It looks something like F,
-F, F, and is followed by zero or more I.
+F, or F, and is followed by zero or more 
I.
 Perl 6 does not do any processing of the I portion of the command
 line, but it is made available at run-time in the read-only C<$?PROGRAM>
 variable.
@@ -77,14 +77,18 @@
 values remain, Perl 6 reads the script from STDIN--you must specify the
 special C<-> option if you wish to pass arguments to a script read from STDIN.
 
+=for consideration
+[This seems a bit misleading; in p5think - is actually the name of STDIN
+if you open it as a filename for reading.  See p5's open. --law]
 
+
 =head1 Backward (In)compatibility
 
 You may find yourself typing your favorite Perl 5 options, even after
 Christmas has arrived.  As you'll see below, common options are provided
 which behave similarly.  Less common options, however, may not be available
-or may have changed syntax.  If you provide Perl with unrecognized command-
-line syntax, Perl gives you a friendly error message.  If the unrecognized
+or may have changed syntax.  If you provide Perl with unrecognized command-line
+syntax, Perl gives you a friendly error message.  If the unrecognized
 syntax is a valid Perl 5 option, Perl provides helpful suggestions to allow
 you to perform the same action using the current syntax.
 
@@ -111,13 +115,13 @@
   -a   Autosplit
   -c   Check syntax
   -e *line*Execute
-  -F *expression*  Specify autosplit value
-  -h   Display help
+  -F *expression*  Specify autosplit field separator
+  -h   Display help and exit
   -I *directory*[,*directory*[,...]]   Add include paths
   -n   Act like awk
   -p   Act like sed
   -S   Search PATH for script
-  -T   Taint mode
+  -T   Enable taint mode
   -v   Display version info
   -V   Display verbose config info
 
@@ -179,6 +183,11 @@
 arguments passed to a script using the rules defined in this document,
 rendering this switch obsolete.
 
+=for consideration
+[This is a bit misleading, insofar as the script's switches are generally
+parsed by the signature suppied by the user in the MAIN routine,
+as in S06. --law]
+
 =item -t
 
 Enable taint warnings mode.  Taint mode needs more thought, but it's
@@ -208,6 +217,9 @@
 Run program embedded in ASCII text.  Infrequently used, and doesn't
 deserve its own command-line option.
 
+=for consideration
+[but there's no other way to get that functionality if we ever want it. --law]
+
 =item -X
 
 Disable all warnings.  This is infrequently used, and doesn't deserve its
@@ -229,6 +241,12 @@
 
 Options must begin with one of the following symbols: C<< < -- - : > >>.
 
+=for consideration
+[That you are using < ... > P6 syntax as meta notation is not clear.
+Reads as if < and > are also allowed.  Suggest
+'C<-->', 'C<->', or 'C<:>'
+instead.  --law]
+
 =item *
 
 Options are case sensitive. C<-o> and C<-O> are not the same option.
@@ -253,8 +271,12 @@
 
 Options may be negated with C, for example C<--/name>, C<:/name>, C<-/n>.
 Each single-letter option in a cluster must be negated separately
- (e.g. C<-a/n/o> is the same as C<-a -/n -/o>.)
+(e.g. C<-a/n/o> is the same as C<-a -/n -/o>.)
 
+=for consideration
+[I'd just outlaw clustering of negatives as too confusing visually.
+Most options are (or should be) born false anyway, so the need is minimal. 
--law]
+
 =item *
 
 Option names follow Perl 6 identifier naming convention, except C<'> is not
@@ -273,6 +295,12 @@
 delimiters on either end, allowing options to be passed through to specified
 subsystems, and are parsed with the following rules:
 
+=for consideration
+Delimited options allow you to transparently pass one or more options through 
to
+a subsystem, as specified by the special options that delimit those options.
+They are parsed according to the following rules:
+
+
 =over 4
 
 =item *
@@ -293,7 +321,8 @@
 =item *
 
 Inside a delimited option, the C<--> option does not suppress searching for
-the closing delimiter.
+the closing delimiter.  That 

r25122 - docs/Perl6/Spec

2009-01-29 Thread pugs-commits
Author: lwall
Date: 2009-01-30 08:12:14 +0100 (Fri, 30 Jan 2009)
New Revision: 25122

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] random clarifications


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-01-30 07:11:23 UTC (rev 25121)
+++ docs/Perl6/Spec/S02-bits.pod2009-01-30 07:12:14 UTC (rev 25122)
@@ -50,7 +50,10 @@
 =item *
 
 In the abstract, Perl is written in Unicode, and has consistent Unicode
-semantics regardless of the underlying text representations.
+semantics regardless of the underlying text representations.  By default
+Perl presents Unicode in "NFG" formation, where each grapheme counts as
+one character.  A grapheme is what the novice user would think of as a
+character in their normal everyday life, including any diacritics.
 
 =item *
 
@@ -63,7 +66,7 @@
 Unicode horizontal whitespace is counted as whitespace, but it's better
 not to use thin spaces where they will make adjoining tokens look like
 a single token.  On the other hand, Perl doesn't use indentation as syntax,
-so you are free to use any whitespace anywhere that whitespace makes sense.
+so you are free to use any amount of whitespace anywhere that whitespace makes 
sense.
 Comments always count as whitespace.
 
 =item *
@@ -103,7 +106,7 @@
 =item *
 
 POD sections may be used reliably as multiline comments in Perl 6.
-Unlike in Perl 5, POD syntax now requires that C<=begin comment>
+Unlike in Perl 5, POD syntax now lets you use C<=begin comment>
 and C<=end comment> delimit a POD block correctly without the need
 for C<=cut>.  (In fact, C<=cut> is now gone.)  The format name does
 not have to be C -- any unrecognized format name will do
@@ -117,7 +120,8 @@
 in code reverts to code afterwards.
 
 Since there is a newline before the first C<=>, the POD form of comment
-counts as whitespace equivalent to a newline.
+counts as whitespace equivalent to a newline.  See S26 for more on
+embedded documentation.
 
 =item *
 
@@ -130,7 +134,7 @@
 work just as in Perl 5, starting with a C<#> character and
 ending at the subsequent newline.  They count as whitespace equivalent
 to newline for purposes of separation.  Unlike in Perl 5, C<#>
-may not be used as the delimiter in quoting constructs.
+may I be used as the delimiter in quoting constructs.
 
 =item *
 
@@ -336,8 +340,8 @@
 either a postfix operator or an infix operator, the infix operator
 requires space before it.  Postfix operators may never have intervening
 space, though they may have an intervening dot.  If further separation
-is desired, an embedded comment may be used as described above, as long
-as no whitespace occurs outside the embedded comment.
+is desired, an unspace or embedded comment may be used as described above, as 
long
+as no whitespace occurs outside the unspace or embedded comment.
 
 For instance, if you were to add your own C<< infix:<++> >> operator,
 then it must have space before it. The normal autoincrementing
@@ -346,6 +350,8 @@
 
 $x++
 
+$x\++
+
 $x.++
 
 $x\ ++
@@ -417,7 +423,7 @@
 or C<42.0>.  In other words, a dot following a number can only be a
 decimal point if the following character is a digit.  Otherwise the
 postfix dot will be taken to be the start of some kind of method call
-syntax, whether long-dotty or not.  (The C<.123> form with a leading
+syntax.  (The C<.123> form with a leading
 dot is still allowed however when a term is expected, and is equivalent
 to C<0.123> rather than C<$_.123>.)
 



r25138 - docs/Perl6/Spec

2009-01-31 Thread pugs-commits
Author: particle
Date: 2009-02-01 01:26:46 +0100 (Sun, 01 Feb 2009)
New Revision: 25138

Modified:
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S19-commandline.pod
Log:
[spec] spelling, grammar, and other clarifications; TimToady++

Modified: docs/Perl6/Spec/S06-routines.pod
===
--- docs/Perl6/Spec/S06-routines.pod2009-01-31 21:53:33 UTC (rev 25137)
+++ docs/Perl6/Spec/S06-routines.pod2009-02-01 00:26:46 UTC (rev 25138)
@@ -2742,8 +2742,8 @@
 -n :name
 -n=value   :name
 -nvalue:name # only if not declared Bool
--n="spacy value"   :name«'spacy value'»
--n='spacy value'   :name«'spacy value'»
+-n="spacey value"  :name«'spacey value'»
+-n='spacey value'  :name«'spacey value'»
 -n=val1,'val 2',etc:name«val1 'val 2' etc»
 
 # Long names
@@ -2751,10 +2751,10 @@
 --name=value   :name # don't care
 --name value   :name # only if not declared Bool
 
---name="spacy value"   :name«'spacy value'»
---name "spacy value"   :name«'spacy value'»
---name='spacy value'   :name«'spacy value'»
---name 'spacy value'   :name«'spacy value'»
+--name="spacey value"  :name«'spacey value'»
+--name "spacey value"  :name«'spacey value'»
+--name='spacey value'  :name«'spacey value'»
+--name 'spacey value'  :name«'spacey value'»
 --name=val1,'val 2',etc:name«val1 'val 2' etc»
 --name val1 'val 2' etc:name«val1 'val 2' etc» # only if declared @
 --  # end named argument processing
@@ -2762,16 +2762,16 @@
 # Negation
 --/name:!name
 --/name=value  :name but False
---/name="spacy value"  :name«'spacy value'» but False
---/name='spacy value'  :name«'spacy value'» but False
+--/name="spacey value" :name«'spacey value'» but False
+--/name='spacey value' :name«'spacey value'» but False
 --/name=val1,'val 2',etc   :name«val1 'val 2' etc» but False
 
 # Native
 :name  :name
 :/name :!name
 :name=value:name
-:name="spacy value":name«'spacy value'»
-:name='spacy value':name«'spacy value'»
+:name="spacey value"   :name«'spacey value'»
+:name='spacey value'   :name«'spacey value'»
 :name=val1,'val 2',etc :name«val1 'val 2' etc»
 
 Exact Perl 6 forms are okay if quoted from shell processing:

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-01-31 21:53:33 UTC (rev 25137)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-02-01 00:26:46 UTC (rev 25138)
@@ -37,7 +37,7 @@
 
 =item *
 
-Common options have a short, single-letter name, and allow clustering
+Common options have a short, single-character name, and allow clustering
 
 =item *
 
@@ -101,11 +101,11 @@
 
 =item *
 
-The most common options have a single-letter short name
+The most common options have a single-character short name
 
 =item *
 
-Single-letter options may be clustered with the same syntax and semantics
+Single-character options may be clustered with the same syntax and semantics
 
 =item *
 
@@ -239,14 +239,8 @@
 
 =item *
 
-Options must begin with one of the following symbols: C<< < -- - : > >>.
+Options must begin with one of the following symbols: C<-->, C<->, or C<:>.
 
-=for consideration
-[That you are using < ... > P6 syntax as meta notation is not clear.
-Reads as if < and > are also allowed.  Suggest
-'C<-->', 'C<->', or 'C<:>'
-instead.  --law]
-
 =item *
 
 Options are case sensitive. C<-o> and C<-O> are not the same option.
@@ -263,24 +257,20 @@
 
 =item *
 
-Single-letter options may be clustered. C<-ab> means C<-a -b>. When a
-single-letter option which requires a value is clustered, the option may
+Single-character options may be clustered. C<-ab> means C<-a -b>. When a
+single-character option which requires a value is clustered, the option may
 appear only in the final position of the cluster.
 
 =item *
 
 Options may be negated with C, for example C<--/name>, C<:/name>, C<-/n>.
-Each single-letter option in a cluster must be negated separately
-(e.g. C<-a/n/o> is the same as C<-a -/n -/o>.)
+Negated single-character options cannot appear in a cluster.  In practice,
+negated options are rare anyway, as most boolean options default to False.
 
-=for consideration
-[I'd just outlaw clustering of negatives as too confusing visually.
-Most options are (or should be) born false anyway, so the need is minimal. 
--law]
-
 =item *
 
 Option names follow Perl 6 identifier naming convention, except C<'> is not
-allowed, and single-letter options may be any letter or number.
+allowed, and sing

r25156 - docs/Perl6/Spec

2009-02-01 Thread pugs-commits
Author: lwall
Date: 2009-02-01 17:25:33 +0100 (Sun, 01 Feb 2009)
New Revision: 25156

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S19-commandline.pod
Log:
move away from "prelude" towards "setting"
establish LANG lexical scope to indicate setting
define --language or -L to set LANG dsl


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-02-01 15:17:26 UTC (rev 25155)
+++ docs/Perl6/Spec/S02-bits.pod2009-02-01 16:25:33 UTC (rev 25156)
@@ -1763,7 +1763,8 @@
 MY  # Lexical symbols declared in the current scope
 OUR # Package symbols declared in the current package
 FILE# Lexical symbols in this file's outermost scope
-PERL# Lexical symbols in the standard "perlude"
+PERL# Lexical symbols in the standard setting
+LANG# Lexical symbols in current dsl (usually PERL)
 GLOBAL  # Interpreter-wide package symbols
 PROCESS # Process-related globals (superglobals)
 SUPER   # Package symbols declared in inherited classes
@@ -1779,10 +1780,15 @@
 Other all-caps names are semi-reserved.  We may add more of them in
 the future, so you can protect yourself from future collisions by using
 mixed case on your top-level packages.  (We promise not to break
-any existing top-level CPAN package, of course.  Except maybe ACME,
+any existing top-level CPAN package, of course.  Except maybe C,
 and then only for coyotes.)
 
-Note that FILE::OUTER is usually, but not always, PERL.
+The C scope is equivalent to C.  For a standard Perl
+program C is the same as C, but various startup options
+(such as C<-n> or C<-p>) can put you into a domain specific language,
+in which case C remains the scope of the standard language,
+while C represents the scope defining the DSL that functions
+as the setting of the current file.
 
 =item *
 

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-02-01 15:17:26 UTC (rev 25155)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-02-01 16:25:33 UTC (rev 25156)
@@ -14,8 +14,8 @@
 
   Maintainer: Jerry Gay 
   Date: 12 Dec 2008
-  Last Modified: 9 Jan 2009
-  Version: 15
+  Last Modified: 1 Feb 2009
+  Version: 16
 
 This is a draft document. This document describes the command line interface.
 It has changed extensively from previous versions of Perl in order to increase
@@ -324,10 +324,10 @@
 These options are made available in context variables matching their name,
 and are invisible to C except as C<< %+OPTS >>.  For example:
 
-  ++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER
+  ++PARSER --setting=Perl6-autoloop-no-print ++/PARSER
 
 is available inside your script as C<< %+OPTS >>, and contains
-C<--prelude=Perl6-autoloop-no-print>.  Since eager matching is used, if you
+C<--setting=Perl6-autoloop-no-print>.  Since eager matching is used, if you
 need to pass something like:
 
   ++foo -bar ++foo baz ++/foo ++/foo
@@ -478,7 +478,7 @@
 =item --autoloop-no-print, -n
 
 Act like awk.  Desugars to
-C<++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER>.
+C<++PARSER --setting=Perl6-autoloop-no-print ++/PARSER>.
 
 =item --output-format, -O *format*
 
@@ -497,8 +497,15 @@
 =item --autoloop-print, -p
 
 Act like sed.  Desugars to
-C<++PARSER --prelude=Perl6-autoloop-print ++/PARSER>.
+C<++PARSER --setting=Perl6-autoloop-print ++/PARSER>.
 
+=item --language, -L *dsl*
+
+Set the domain specific language for parsing the script file.  (That is,
+specify the I (often known as the prelude) for the program.)
+C<++PARSER --setting=*dsl* ++/PARSER>.
+
+
 =item --search-path, -S
 
 Use PATH environment variable to search for script specified on command-line.
@@ -608,6 +615,6 @@
 Sandboxing? maybe-r
 
 Env var? maybe -E.
-Could be posed in terms of substituting a different prelude.
+Could be posed in terms of substituting a different setting.
 
 =for vim:set expandtab sw=4:



r25157 - docs/Perl6/Spec

2009-02-01 Thread pugs-commits
Author: lwall
Date: 2009-02-01 17:31:51 +0100 (Sun, 01 Feb 2009)
New Revision: 25157

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
ref -L in S19


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-02-01 16:25:33 UTC (rev 25156)
+++ docs/Perl6/Spec/S02-bits.pod2009-02-01 16:31:51 UTC (rev 25157)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 28 Jan 2009
+  Last Modified: 1 Feb 2009
   Number: 2
-  Version: 150
+  Version: 151
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -1764,7 +1764,7 @@
 OUR # Package symbols declared in the current package
 FILE# Lexical symbols in this file's outermost scope
 PERL# Lexical symbols in the standard setting
-LANG# Lexical symbols in current dsl (usually PERL)
+LANG# Lexical symbols in current DSL (usually PERL)
 GLOBAL  # Interpreter-wide package symbols
 PROCESS # Process-related globals (superglobals)
 SUPER   # Package symbols declared in inherited classes
@@ -1788,7 +1788,8 @@
 (such as C<-n> or C<-p>) can put you into a domain specific language,
 in which case C remains the scope of the standard language,
 while C represents the scope defining the DSL that functions
-as the setting of the current file.
+as the setting of the current file.  See also the C<-L>/C<--language>
+switch described in L.
 
 =item *
 



r25175 - docs/Perl6/Spec

2009-02-02 Thread pugs-commits
Author: lwall
Date: 2009-02-02 23:36:20 +0100 (Mon, 02 Feb 2009)
New Revision: 25175

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[S03] remove frivolous sub [op] form of reduce declaration
&[op] always refers to a binary infix even for list associative ops


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-02-02 22:07:53 UTC (rev 25174)
+++ docs/Perl6/Spec/S03-operators.pod   2009-02-02 22:36:20 UTC (rev 25175)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 8 Mar 2004
-  Last Modified: 29 Jan 2009
+  Last Modified: 2 Feb 2009
   Number: 3
-  Version: 151
+  Version: 152
 
 =head1 Overview
 
@@ -3748,26 +3748,6 @@
 &prefix:<[*]> ::= &reduce.assuming(&infix:<*>, 1);
 &prefix:<[**]> ::= &reducerev.assuming(&infix:<**>);
 
-As a special form of name, the non-prefix notation, as in
-
-proto [foo] (*...@args) {
-...
-}
-
-or
-
-&[foo] ::= ...
-
-defines both the C<[foo]> reduce operator and the C infix operator.
-Where appropriate, use of the infix form may be optimized like this:
-
-# Original  # Optimized
-$a foo $b   # [foo] $a, $b
-$a foo $b foo $c# [foo] $a, $b, $c
-
-(Note that any infix generated with C<::=> will default to the precedence
-of C<+>.  When that is not desired you must use C.  See S06.)
-
 If the reduction operator is defined separately from the infix operator,
 it must associate the same way as the operator used:
 
@@ -4048,6 +4028,9 @@
 1,1 ... &[+]   # fibonacci series
 sort &[R<=>], @list# reversed, numerically
 
+The C<&[op]> form always refers to a binary function of the operator,
+even if it is underlyingly defined as a variadic list-associative operator.
+
 There is no corresponding form for unary operators, but those may
 usually be constructed by applying an operator to C<*>:
 



  1   2   3   4   5   6   7   8   9   10   >