Re: r25200 - docs/Perl6/Spec t/spec

2009-02-05 Thread Dave Whipp

Jon Lang wrote:

 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


Should the default pattern be ' ', or should it be something more like /\s+/?


/ws/ ?


Re: r25200 - docs/Perl6/Spec t/spec

2009-02-05 Thread Larry Wall
On Thu, Feb 05, 2009 at 07:47:01AM -0800, Dave Whipp wrote:
 Jon Lang wrote:
  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

 Should the default pattern be ' ', or should it be something more like /\s+/?

 /ws/ ?

You guys are all doing P5Think.  The default should be autocomb, not autosplit,
and the default comb is already correct...

Larry


Re: r25200 - docs/Perl6/Spec t/spec

2009-02-05 Thread Jon Lang
On Thu, Feb 5, 2009 at 9:21 AM, Larry Wall la...@wall.org wrote:
 On Thu, Feb 05, 2009 at 07:47:01AM -0800, Dave Whipp wrote:
 Jon Lang wrote:
  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

 Should the default pattern be ' ', or should it be something more like 
 /\s+/?

 /ws/ ?

 You guys are all doing P5Think.  The default should be autocomb, not 
 autosplit,
 and the default comb is already correct...

In that case, the -a option needs to be renamed to autocomb, rather
than autosplit as it is now.

-- 
Jonathan Dataweaver Lang


Re: r25200 - docs/Perl6/Spec t/spec

2009-02-05 Thread Larry Wall
On Thu, Feb 05, 2009 at 10:43:35AM -0800, Jon Lang wrote:
: On Thu, Feb 5, 2009 at 9:21 AM, Larry Wall la...@wall.org wrote:
:  On Thu, Feb 05, 2009 at 07:47:01AM -0800, Dave Whipp wrote:
:  Jon Lang wrote:
:   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
: 
:  Should the default pattern be ' ', or should it be something more like 
/\s+/?
: 
:  /ws/ ?
: 
:  You guys are all doing P5Think.  The default should be autocomb, not 
autosplit,
:  and the default comb is already correct...
: 
: In that case, the -a option needs to be renamed to autocomb, rather
: than autosplit as it is now.

Well, it needs to be both, really.  See various discussions of
figure/ground in the psychology literature...

Pity that -F specifies the ground.  Hey, I know, let's make -G the
figure, that makes about as much sense as -x vs +x, or electrons
vs positrons...  :)

Larry


r25200 - docs/Perl6/Spec t/spec

2009-02-04 Thread pugs-commits
Author: particle
Date: 2009-02-05 03:14:01 +0100 (Thu, 05 Feb 2009)
New Revision: 25200

Added:
   t/spec/S19-command-line/
   t/spec/S19-invalid/
Modified:
   docs/Perl6/Spec/S19-commandline.pod
Log:
[S19] --autoloop-split, -a: assigns result to @_; signature and option name 
fixups

Modified: docs/Perl6/Spec/S19-commandline.pod
===
--- docs/Perl6/Spec/S19-commandline.pod 2009-02-05 01:59:03 UTC (rev 25199)
+++ docs/Perl6/Spec/S19-commandline.pod 2009-02-05 02:14:01 UTC (rev 25200)
@@ -15,7 +15,7 @@
   Maintainer: Jerry Gay jerry@rakudoconsulting.com
   Date: 12 Dec 2008
   Last Modified: 4 Feb 2009
-  Version: 17
+  Version: 18
 
 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
@@ -369,20 +369,21 @@
 =head2 Synopsis
 
   multi sub perl6(
-Bool :a($autosplit),
+Bool :a($autoloop-split),
 Bool :c($check-syntax),
 Bool :$doc,
  :e($execute),
- :F($autoloop-split),
+ :F($autoloop-delim),
 Bool :h($help),
  :I(@include),
- :u($use),
+ :L($language),
 Bool :n($autoloop-no-print),
  :O($output-format) = 'exe',
  :o($output-file) = $*OUT,
 Bool :p($autoloop-print),
 Bool :S($search-path),
 Bool :T($taint),
+ :u($use),
 Bool :v($version),
 Bool :V($verbose-config),
   );
@@ -391,12 +392,13 @@
 
 =over 4
 
-=item --autosplit, -a
+=item --autoloop-split, -a
 
-Turns on autosplit mode.
+When used with C-n or C-p, implicitly splits input on whitespace
+(by default) and assigns the result to C@_ within the loop produced
+by the C-n or C-p.
 
-=for consideration
-[what does it split to?  @F like P5?  Or should we switch to @_? --law]
+An alternate delimiter may be specified with C--autoloop-delim, a.k.a. C-F.
 
 =item ++CMD --command-line-parser *parser* ++/CMD
 
@@ -440,7 +442,7 @@
 =for consideration
 [doesn't work without a semicolon! (unless we special case it) --law]
 
-=item --autoloop-split, -F *expression*
+=item --autoloop-delim, -F *expression*
 
 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



Re: r25200 - docs/Perl6/Spec t/spec

2009-02-04 Thread Jon Lang
pugs-comm...@feather.perl6.nl wrote:
 -=item --autoloop-split, -F *expression*
 +=item --autoloop-delim, -F *expression*

  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

Should the default pattern be ' ', or should it be something more like /\s+/?

-- 
Jonathan Dataweaver Lang