Re: [perl #40817] [TODO] track generated files during the configure/make process

2008-12-30 Thread Reini Urban
2008/12/30 James Keenan via RT:
 On Tue May 06 17:56:23 2008, jk...@verizon.net wrote:
 No.  I only figured out how to keep track of files generated during
 configuration, not during build.  We need some of what, IIRC, particle
 termed makefile trickery to keep track of files generated by make.

 I'm going to relinquish this ticket and give it to Nobody because I
 frankly don't have any good ideas on the 'makefile trickery' required to
 identify all the files generated during the build process.

makefile trickery could be a simple
  echo $(filename) [bla]  MANIFEST.generated
which is platform independent. It even works on windows plain.

But most of the examples can be generated more easily during the
build step by better utils.

Examples are arch specific library names and extensions,
now in MANIFEST.generated. But this sucks.
E.g.
blib/lib/libparrot.so.0.8.2   [main]lib
has to be fixed on every VERSION bump.

runtime/parrot/dynext/perl6_group.bundle  [library]
runtime/parrot/dynext/perl6_group.dll [library]
runtime/parrot/dynext/perl6_group.dylib   [library]
runtime/parrot/dynext/perl6_group.so  [library]
can be collapsed on the actual platform.

Also the generated ops for each core can be added during the build step.
runtime/parrot/dynext/wmls_ops.dll[library]
runtime/parrot/dynext/wmls_ops_cg.dll [library]
runtime/parrot/dynext/wmls_ops_cgp.dll[library]
runtime/parrot/dynext/wmls_ops_switch.dll [library]

All the perl6 ops e.g. are currently missing and are therefore not
installed in trunk. (fixed in pdd30install_stage3)

I'll work on that in the pdd30install_stage3 branch since it's only needed
for make install.
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/


Re: r24681 - docs/Perl6/Spec

2008-12-30 Thread Carl Mäsak
diff bot ():
===
 --- 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.

I think this patch misses that Solution and Accepted were
capitalized because they represented the S and the A,
respectively, in PSA. The fact that Problem wasn't de-capitalized
seems to corroborate this.

// Carl


Re: [perl #40817] [TODO] track generated files during the configure/make process

2008-12-30 Thread Reini Urban
Can you assign it to me?

2008/12/30 Reini Urban rur...@x-ray.at:
 2008/12/30 James Keenan via RT:
 On Tue May 06 17:56:23 2008, jk...@verizon.net wrote:
 No.  I only figured out how to keep track of files generated during
 configuration, not during build.  We need some of what, IIRC, particle
 termed makefile trickery to keep track of files generated by make.

 I'm going to relinquish this ticket and give it to Nobody because I
 frankly don't have any good ideas on the 'makefile trickery' required to
 identify all the files generated during the build process.

 makefile trickery could be a simple
  echo $(filename) [bla]  MANIFEST.generated
 which is platform independent. It even works on windows plain.

 But most of the examples can be generated more easily during the
 build step by better utils.

 Examples are arch specific library names and extensions,
 now in MANIFEST.generated. But this sucks.
 E.g.
 blib/lib/libparrot.so.0.8.2   [main]lib
 has to be fixed on every VERSION bump.

 runtime/parrot/dynext/perl6_group.bundle  [library]
 runtime/parrot/dynext/perl6_group.dll [library]
 runtime/parrot/dynext/perl6_group.dylib   [library]
 runtime/parrot/dynext/perl6_group.so  [library]
 can be collapsed on the actual platform.

 Also the generated ops for each core can be added during the build step.
 runtime/parrot/dynext/wmls_ops.dll[library]
 runtime/parrot/dynext/wmls_ops_cg.dll [library]
 runtime/parrot/dynext/wmls_ops_cgp.dll[library]
 runtime/parrot/dynext/wmls_ops_switch.dll [library]

 All the perl6 ops e.g. are currently missing and are therefore not
 installed in trunk. (fixed in pdd30install_stage3)

 I'll work on that in the pdd30install_stage3 branch since it's only needed
 for make install.

I took the task and wrote it.
In the makefiles are now various lines such as
$(PERL) -Ilib -MParrot::BuildUtil -e add_to_generated 
$@,[main],bin

add_to_generated() also includes the manifest logic for windows.
I'll try now to get all the currently MANIFEST.generated files into this,
so we don't accidently loose some files again (being installed).

patch comes this evening. I will apply to pdd30install_stage3 also.
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/


[perl #61842] Indexing with reversed ranges (which ought to be null ranges) doesn't return an empty list in Rakudo

2008-12-30 Thread Patrick R. Michaud via RT
On Tue Dec 30 01:43:10 2008, masak wrote:
 Rakudo r34628:
 
 $ perl6 -e 'say (2..1).elems' # right
 0
 
 $ perl6 -e 'say (1,1)[2..1].elems' # wrong
 2

Now fixed in r34652:

 say (1,1)[2..1].elems
0

This ticket can be closed when we verify there's a suitable spectest. 
Thanks!

Pm




[perl #61172] hash becomes string or int

2008-12-30 Thread Patrick R. Michaud via RT
On Mon Dec 08 10:24:33 2008, ihrd wrote:
 Hi!
 in 33622:
 
  sub foo (%h) { say %h.perl }; foo({a=1});
 {a = 1}
  sub foo (%h) { say %h.perl }; foo(1);
 1
  sub foo (%h) { say %h.perl }; foo(a);
 a

This is a problem with parameter passing of arrays and hashes in general
-- the parameter takes on the type of its argument regardless of the
sigil.  This has been fixed in the rvar branch and should be merged into
trunk soon.

Pm



[perl #61806] undefined hash, something wrong (plz make subject better if your understand what is right behavior)

2008-12-30 Thread Patrick R. Michaud via RT
On Mon Dec 29 04:25:51 2008, ihrd wrote:
 
  sub foo (%h?) { { a = 1, %h }.perl.say; }; foo( { b = 2 } );
 {a = 1, b = 2} # :)
 
  sub foo (%h?) { { a = 1, %h }.perl.say; }; foo( { } );
 {a = 1} # :)
 
  sub foo (%h?) { { a = 1, %h }.perl.say; }; foo();
 Odd number of elements found where hash expected # :(

These are the same issues as RT #61172 -- merging tickets.

Pm



[perl #61814] [TODO] implement 'my class'

2008-12-30 Thread Patrick R. Michaud via RT
On Mon Dec 29 08:40:57 2008, masak wrote:
 S12:
 
 To declare a lexically scoped class, use my class.
 
 This currently does not work in Rakudo.


Marking ticket as a duplicate of RT #61108.

Pm


[perl #61826] [BUG] use after module executes out of order in compiled PIR

2008-12-30 Thread Patrick R. Michaud via RT
On Mon Dec 29 12:49:10 2008, jhorwitz wrote:
 assume the following three files:
 
 Bar.pm:
  say in Bar.pm;
 
 foo1.p6:
  module Foo;
  use Bar;
  say in Foo;
 
 foo2.p6:
  use Bar;
  module Foo;
  say in Foo;

This second version (foo2.p6) isn't valid Perl 6.  Rakudo doesn't
recognize it as an error yet, but it is one.

That still leaves the question of why foo1.p6 is changing for the
compiled versus non-compiled version -- I'll look into it.

Pm





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 *
 



[perl #61866] has $.x = 'default' / my Foo $x .= new together have issues

2008-12-30 Thread jn...@jnthn.net (via RT)
# New Ticket Created by  jn...@jnthn.net 
# Please include the string:  [perl #61866]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61866 


22:58 @jonathan rakudo: class Foo { has $.x = 42; }; say Foo.new.x
22:58  polyglotbot OUTPUT[42NL]
22:59 @jonathan rakudo: class Foo { has $.x = 'default'; }; say Foo.new.x
22:59  polyglotbot OUTPUT[defaultNL]
22:59 @jonathan rakudo: class Foo { has $.x = 'default'; }; my $x = 
Foo.new;
  say $x.x
22:59  polyglotbot OUTPUT[defaultNL]
22:59 @jonathan rakudo: class Foo { has $.x = 'default'; }; my Foo $x 
.= new;
  say $x.x
22:59  polyglotbot OUTPUT[NL]
22:59 @jonathan ...odd...
23:00 @jonathan Why on earth would that make a difference. :-S



[perl #61838] Rakudo allows reference to variables before their declaration

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61838]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61838 


Rakudo r34628:

$ perl6 -e 'my $a = $b'
Scope not found for PAST::Var '$b'
[...]

$ perl6 -e 'my $a = $b; my $b' # Compiles and runs!


[perl #61842] Indexing with reversed ranges (which ought to be null ranges) doesn't return an empty list in Rakudo

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61842]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61842 


Rakudo r34628:

$ perl6 -e 'say (2..1).elems' # right
0

$ perl6 -e 'say (1,1)[2..1].elems' # wrong
2


[perl #61846] Is this syntax OK: @a[0..**-1]

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61846]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61846 


Just wondering whether the following syntax, currently accepted by
Rakudo r34628, is legal Perl 6:

$ perl6 -e 'say (a..c).list[0..**-1]'
abc


[perl #61858] SDL library bindings and examples broken

2008-12-30 Thread via RT
# New Ticket Created by  Markus Mayr 
# Please include the string:  [perl #61858]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61858 


---
osname= linux
osvers= 2.6.26-1-686
arch=   i486-linux-gnu-thread-multi
cc= cc
---
Flags:
category=library
severity=medium
ack=no
---
The following SDL related files use deprecated PIR and are therefore
broken currently:
 * examples/sdl/anim_image.pir
 * examples/sdl/move_parrot_logo.pir
 * examples/sdl/mandel.pir
 * examples/sdl/bounce_parrot_logo.pir
 * examples/sdl/anim_image_dblbuf.pir
 * runtime/parrot/library/SDL.pir
 * runtime/parrot/library/SDL/Event.pir

Furthermore the SDL-examples lcd, minesweeper and tetris located in
examples/sdl are known to be broken. Some other files in
runtime/parrot/library/SDL are probably affected as well, especially the
files LCD.pir and StopWatch.pir use deprecated PIR.



[perl #61860] Printing a variable from inside an eval yields Null PMC Access in Rakudo

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61860]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61860 


masak rakudo: my $a = 5; eval 'say $a'
p6eval rakudo 34665: RESULT«Null PMC access in find_method() [...]
* masak submits rakudobug


[perl #61840] [TODO] min= and max= operators

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61840]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61840 


Rakudo r34628 doesn't support the assignment metaoperators Cmin= and Cmax=.

$ perl6 -e 'my $a = 5; $a min= 2; say $a'
get_iter() not implemented in class 'Integer'
[...]


[perl #61844] Rakudo experiences problems with two Whatever stars in a slice range

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61844]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61844 


Rakudo r34628 dies with a strange error on a perfectly acceptable
range specification involving two stars:

$ perl6 -e '(0,1)[*..*]'
Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP-I'
[...]

When it also involves a subtraction, Parrot dies of a bus error instead.

$ perl6 -e '(0,)[*-1..*]'
Bus error


[perl #61836] Rakudo cannot take the minimum of undef

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61836]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61836 


Rakudo r34628:

$ perl6 -e 'undef min 2'
Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP-I'
[...]


[perl #61848] Rakudo cannot take a slice out of a Range

2008-12-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #61848]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61848 


Rakudo often treats Ranges as a kind of List, but in the case of list
slices, r34628 currently fails with a runtime error:

$ perl6 -e 'say (a..z)[0]'
elements() not implemented in class 'Range'
[...]


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 jerry@rakudoconsulting.com
   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 Icompiler, and
+The command line is broken down into two basic elements: a Iprogram, and
 Iarguments. Each command line element is whitespace separated, so elements
-containing whitespace must be quoted. The Icompiler processes the arguments
+containing whitespace must be quoted. The Iprogram processes the arguments
 and performs the requested actions. It looks something like F/usr/bin/perl6,
 Fparrot perl6.pbc, Frakudo, and is followed by zero or more Iarguments.
-Perl 6 does not do any processing of the Icompiler 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 Iprogram 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 Icompiler when (from the Unix point
-of view) it's just a program to run, and the compilation may have
-happened long ago.  Maybe Iprogram or Iprocessor 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 Iarguments are further broken down into Ioptions and
 Ivalues. Unlike Perl 5, Ioptions and Ivalues 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/Option Reference below).
 
@@ -282,12 +297,9 @@
 
 =item *
 
-BMode flags set the operational mode of the compiler (e.g. I--doc, I-e).
+BMode 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 *
 
 BDynamic flags may be set on the command line, via the IPERL6OPT
@@ -300,7 +312,7 @@
 =item *
 
 BStatic 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, 

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 jerry@rakudoconsulting.com
   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/Option Reference 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 jerry@rakudoconsulting.com
   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 jerry@rakudoconsulting.com
   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 LSynopsis 11|S11-modules.pod/Forcing Perl 6 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: 

[perl #61846] [spec] Is this syntax OK: @a[0..**-1]

2008-12-30 Thread Patrick R. Michaud via RT
On Tue Dec 30 01:47:47 2008, masak wrote:
 Just wondering whether the following syntax, currently accepted by
 Rakudo r34628, is legal Perl 6:
 
 $ perl6 -e 'say (a..c).list[0..**-1]'
 abc


As of r34652, this now produces an empty list (which is what I would
expect).

$ perl6 -e 'say (a..c).list[0..**-1]'

$

Rakudo is parsing **-1 as whatever times -1, which means the range is
being computed as 0..-3, which produces an empty slice.

Pm


[perl #61868] say eval

2008-12-30 Thread Patrick R. Michaud via RT
On Tue Dec 30 17:46:31 2008, si...@simon-cozens.org wrote:
 This causes a null access in PMC, presumably because the eval is
 returning the wrong kind of nothing.

This should now be fixed in r34682, assigning to moritz++ so that we can
verify there's a test for it.

Thanks!

Pm




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 la...@wall.org
   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 CCode, not CWhatever, so that constructs can 
distinguish
+This closure is of type CCode:($), not CWhatever, 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 CWhatever
-object, it supplies an argument indicating the number of elements in
-(that dimension of) the array.  See S09.
+But note that this is Inot 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 CWhatever 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 CCode
+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 CHyperWhatever.
+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 CCode:(*@).  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
+CWhatever 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 CWhatever 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



Re: [perl #61846] [spec] Is this syntax OK: @a[0..**-1]

2008-12-30 Thread Larry Wall
On Tue, Dec 30, 2008 at 09:52:10AM -0800, Patrick R. Michaud via RT wrote:
: On Tue Dec 30 01:47:47 2008, masak wrote:
:  Just wondering whether the following syntax, currently accepted by
:  Rakudo r34628, is legal Perl 6:
:  
:  $ perl6 -e 'say (a..c).list[0..**-1]'
:  abc
: 
: 
: As of r34652, this now produces an empty list (which is what I would
: expect).
: 
: $ perl6 -e 'say (a..c).list[0..**-1]'
: 
: $
: 
: Rakudo is parsing **-1 as whatever times -1, which means the range is
: being computed as 0..-3, which produces an empty slice.

According to S02 and S09, term:** is supposed to be a dwimmy
HyperWhatever, so the above should parse ** as a single term, and it
should end up meaning something like:

- *...@dims { map { 0 .. *-1 }, @dims )

which, since there's only one dimension in the subscript, should
degenerate to

0..*-1

which is the same as

^*

or even

*

for that matter.

Which means we probably need to figure out how to write the sort of
partial binding that a Cfor loop does, since subscript now appears
to want the same sort of partial binding that processes the next
N dimensions of the subscript, whenever it finds a Code subscript.
And it would be much better to let the binding figure out and report
where it gave up than to second-guess by inspection of arities and
such.  The implementation of Cfor should just do that repeatedly
to whatever remains of its list.  Maybe it's just a form of binding
that removes elements from a list as it binds them.

Well, maybe we almost have the notation already.

($some, $sig, |$remaining) := |$remaining

except that we need to be able to interpolate :($some, $sig) into the
left side somehow with the |$remaining at the same capture level.
(We have subsig matching currently, but only applied to the next
argument.)

Or looking at the other way, given a signature $somesig, we need
some way of appending a |$remaining on the end to slurp up whatever
remains of the capture when the binding stops.

Well, my brain feels like it's in sideways today, so I'd better stop
before I say something profound but wrong...

Larry


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) + (34);  # (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 Cany, Call, Cone, and 
Cnone.
 
@@ -2770,7 +2771,7 @@
 
 =item *
 
-The Cleg operator (less than, equal or greater than) is defined
+The Cleg operator (less than, equal to, or greater than) is defined
 in terms of Ccmp, so C$a leg $b is now defined as C~$a cmp ~$b.
 The sort operator still defaults to Ccmp rather than Cleg.  The
 C =  operator's semantics are unchanged except that it returns



Re: [perl #58410] [TODO] Deprecate n_* variants of the math opcodes

2008-12-30 Thread Allison Randal

Will Coleda via RT wrote:

On Thu Aug 28 00:03:51 2008, alli...@perl.org wrote:


The plan is to make the regular variants (like 'add') create a new 
destination PMC, and then deprecate the old n_* variants (like 'n_add').


Does this include n_not , n_bnot, and n_bnots ?


Yes. The 'not', 'abs', 'bnot', and 'bnots' opcodes already have 
2-argument variants, the 'n_*' alternates are unnecessary.


The task also involves modifying the corresponding vtable functions 
('logical_not', 'absolute', 'binary_not', 'binary_nots') so they return 
a new PMC, rather than morphing the existing destination PMC. (Many of 
them already do this, so the 'n_*' variants were actually already doing 
the same thing as the regular opcodes.)


Allison


[svn:parrot-pdd] r34684 - trunk/docs/pdds

2008-12-30 Thread allison
Author: allison
Date: Tue Dec 30 18:53:27 2008
New Revision: 34684

Modified:
   trunk/docs/pdds/pdd07_codingstd.pod

Log:
[pdd] Remove the 'HISTORY' section from expected documentation, as it is no
longer used. Be explicit on our policy about author information in individual
files. Remove a legacy perl6-ism.


Modified: trunk/docs/pdds/pdd07_codingstd.pod
==
--- trunk/docs/pdds/pdd07_codingstd.pod (original)
+++ trunk/docs/pdds/pdd07_codingstd.pod Tue Dec 30 18:53:27 2008
@@ -840,11 +840,6 @@
 successors, e.g. benchmarks of differing hash algorithms, essays on how to do
 integer arithmetic.
 
-=item HISTORY
-
-Record major changes to the file, e.g. we moved from a linked list to a hash
-table implementation for storing Foos, as it was found to be much faster.
-
 =item SEE ALSO
 
 Links to pages and books that may contain useful information relevant to the
@@ -852,6 +847,10 @@
 
 =back
 
+Don't include author information in individual files. Author information can be
+added to the CREDITS file. (Languages are an exception to this rule, and may
+follow whatever convention they choose.)
+
 =item Per-section comments
 
 If there is a collection of functions, structures or whatever which are
@@ -924,15 +923,13 @@
 
 =head2 Extensibility
 
-If Perl 5 is anything to go by, the lifetime of Perl 6 will be at least
-seven years. During this period, the source code will undergo many major
-changes never envisaged by its original authors -- c.f. threads, unicode in
-perl 5. To this end, your code should balance out the assumptions that make
-things possible, fast or small, with the assumptions that make it difficult
-to change things in future. This is especially important for parts of the
-code which are exposed through APIs -- the requirements of source or binary
-compatibility for such things as extensions can make it very hard to change
-things later on.
+Over the lifetime of Parrot, the source code will undergo many major changes
+never envisaged by its original authors. To this end, your code should balance
+out the assumptions that make things possible, fast or small, with the
+assumptions that make it difficult to change things in future. This is
+especially important for parts of the code which are exposed through APIs --
+the requirements of source or binary compatibility for such things as
+extensions can make it very hard to change things later on.
 
 For example, if you define suitable macros to set/test flags in a struct, then
 you can later add a second word of flags to the struct without breaking source


[perl #61870] [BUG] [META] Trac system borks authenticated user's privileges

2008-12-30 Thread via RT
# New Ticket Created by  James Keenan 
# Please include the string:  [perl #61870]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61870 


I know that committers are not supposed to be opening new tickets in  
RT, but I am forced to do so since I and others can no longer do so  
in Trac.

Tonight both GeJ and I encountered the situation that once we were  
logged in to Trac -- a status which presumably made us  
Authenticated users with TICKET_CREATE and TICKET_APPEND privileges  
-- and once we attempted to set or modify our Preferences, a variety  
of error messages started popping up which effectively negated all  
our login privileges.

GeJ reported being logged in, but once having clicked on the New  
Ticket button, being told, Error: Forbidden.   TICKET_CREATE  
privileges are required to perform this operation.  He also reported  
this warning in a box underneath the Trac menu bar:  Warning:  
acct_mgr.web_ui.MessageWrapper object at 0x81a80b4c

While I was poking around RTFM, I clicked on Preferences and, under  
the General tab, decided to add my user name and my email address.   
Big mistake!  I got this message underneath the Trac menu bar:
Notice: acct_mgr.web_ui.MessageWrapper object at 0x80cec96c.  And  
when I then went to New Ticket, I got the same bad news as GeJ.  I  
got this:  Trac detected an internal error:  Key Error 'email'.

And then, to add insult to injury, Trac told me, To that end, you  
could 'create' a ticket at this site.  And when I tried to do so, I  
saw that I no longer had TICKET_CREATE privileges.

This error is definitely on the server side, because (a) I removed  
all cookies from the browser I was using, closed the browser,  
reopened it and attempted to login again -- and got the same error;  
(b) got the same error with a completely different browser.

So GeJ and I can no longer work in Trac.

Goodbye, Parrot project, at least until this is fixed!

kid51