Re: r24737 - docs/Perl6/Spec

2009-01-03 Thread Aristotle Pagaltzis
* jerry gay  [2009-01-02 21:30]:
> the most likely short names, C<< < -d -o -c > >> are all taken
> by either p5 or p6 command-line.

Is `-q` taken?

Regards,
-- 
Aristotle Pagaltzis // 


Re: [perl #61928] [BUG] (undef === undef)

2009-01-03 Thread Patrick R. Michaud
On Fri, Jan 02, 2009 at 01:52:45PM -0800, Todd Hepler wrote:
> I think this is a bug, but I'm not sure.
> 
> (undef === undef) currently evaluates to false.  Seem like it should be 
> true.
> 
> I couldn't find a test for it, so below is a patch to add one.

Before entering a fix for this, I'm curious if (undef =:= undef)
should evaluate to true or false?  I'm guessing it should be true
also, but want to check.

Pm


Which brackets should @a.perl use?

2009-01-03 Thread Markus Laker
This behaviour looks wrong to me:


m...@edward:~/perl/6$ cat ap1
#!/home/msl/bin/perl6

my @a = ;
my $p = @a.perl;
say "\...@a: {...@a.elems} elements: $p";
say '@a[0]: ', @a[0];

my @b = eval $p;
say "\...@b: {...@b.elems} elements: $p";
say '@b[0]: ',@b[0];
say '@b[0][0]: ', @b[0][0];

m...@edward:~/perl/6$ ./ap1
@a: 3 elements: ["blue", "light", "hazard"]
@a[0]: blue
@b: 1 elements: ["blue", "light", "hazard"]
@b[0]: blue light hazard
@b[0][0]: blue
m...@edward:~/perl/6$ perl6 -v
This is Rakudo Perl 6, revision 34744 built on parrot 0.8.2-devel
for i486-linux-gnu-thread-multi.

Copyright 2006-2008, The Perl Foundation.

m...@edward:~/perl/6$


Because C<@a.perl> returns a string surrounded in square brackets, rather
than round brackets, C produces a list containing a single element:
we get one extra, unwanted level of indirection.

If C<@a.perl> were to return a string surrounded in round brackets, this
problem would be solved:


m...@edward:~/perl/6$ cat ap2
#!/home/msl/bin/perl6

my $p = '("blue", "light", "hazard")';

my @c = eval $p;
say "\...@c: {...@c.elems} elements: ", @c.perl;
say '@c[0]: ', @c[0];

my $c = eval $p;
say "\$c: {$c.elems} elements: ", $c.perl;
say '$c[0]: ', $c[0];

m...@edward:~/perl/6$ ./ap2
@c: 3 elements: ["blue", "light", "hazard"]
@c[0]: blue
$c: 3 elements: ["blue", "light", "hazard"]
$c[0]: blue
m...@edward:~/perl/6$


Is Rakudo's behaviour correct here?

Markus


[perl #61944] Rakudo stringifies some operands to X~X too early

2009-01-03 Thread Carl Mäsak
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #61944]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=61944 >


 rakudo: my %test = (1 => ); my @word = ;
(%test{1} X~X @word).perl.say
 rakudo 34889: OUTPUT«["a b ce", "a b cf", "a b cg"]␤»
 it appears to be stringifying  before crossing
it..any idea what i did wrong?
* masak submits rakudobug


[perl #61942] NaN !~~ NaN in Rakudo

2009-01-03 Thread Carl Mäsak
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #61942]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=61942 >


 perl6: say NaN ~~ NaN
 ..pugs: OUTPUT«1␤»
 ..rakudo 34888: OUTPUT«0␤»
 masak: want to report as a bug?
 moritz_: no.
 moritz_: I think Rakudo is right.
 masak: care to elaborate?
 moritz_: well,
 perl6: say NaN == NaN
 rakudo 34888: OUTPUT«0␤»
 ..elf 24743, pugs: OUTPUT«␤»
 two NaN's can very well be different. there is not but one NaN.
 that's part of the theory behind them.
 masak: ~~ doesn't test equality
 then how do you do $num ~~ NaN?
 moritz_: seems to me it does test equality in increasing amounts lately.
 rakudo: NaN === NaN
 rakudo 34888: RESULT«Bool::False»
 moritz_: but you have a point.
 I think that $thing ~~ NaN should answer the questions "is
$thing a NaN`?"...
* masak reports rakudobug
 just like $thing ~~ undef really desugars to !$thing.defined
 rakudo: my $nan = NaN; say $nan ~~ NaN;
 rakudo 34888: OUTPUT«0␤»


[perl #61940] No tests for unpack() in pugs/t/spec/

2009-01-03 Thread via RT
# New Ticket Created by  Gabor Szabo 
# Please include the string:  [perl #61940]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=61940 >


Nor is it implemented in rakudo.


[svn:parrot-pdd] r34905 - in trunk: . compilers/pirc compilers/pirc/new compilers/pirc/src config/gen/makefiles docs/pdds/draft lib/Parrot t/codingstd

2009-01-03 Thread jkeenan
Author: jkeenan
Date: Sat Jan  3 16:22:40 2009
New Revision: 34905

Modified:
   trunk/docs/pdds/draft/pdd06_pasm.pod

Changes in other areas also in this revision:
Added:
   trunk/compilers/pirc/src/
  - copied from r34904, /trunk/compilers/pirc/new/
Removed:
   trunk/compilers/pirc/new/
Modified:
   trunk/MANIFEST
   trunk/compilers/pirc/README.pod
   trunk/compilers/pirc/src/hdocprep.c
   trunk/compilers/pirc/src/pirlexer.c
   trunk/compilers/pirc/src/pirlexer.h
   trunk/compilers/pirc/src/pirsymbol.c
   trunk/config/gen/makefiles/pirc.in
   trunk/lib/Parrot/Distribution.pm
   trunk/t/codingstd/linelength.t

Log:
Change directory compilers/pirc/new/ to compilers/pirc/src, and edit
references to this directory in other files.  Cf.:
https://trac.parrot.org/parrot/ticket/70.


Modified: trunk/docs/pdds/draft/pdd06_pasm.pod
==
--- trunk/docs/pdds/draft/pdd06_pasm.pod(original)
+++ trunk/docs/pdds/draft/pdd06_pasm.podSat Jan  3 16:22:40 2009
@@ -121,7 +121,7 @@
 
 Below is an overview of the grammar of a PASM file.
 
-{{ See compilers/pirc/new for a bison-basd implementation of PASM }}
+{{ See compilers/pirc/src for a bison-basd implementation of PASM }}
 
  pasm_file:
[ pasm_line '\n' ]*


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: