[perl #106932] Junctions in subsignatures can cause infinite recursion

2014-02-24 Thread Will Coleda via RT
Verified behavior, unchanged in e8cea1.

-- 
Will Coke Coleda


[perl #77340] [BUG] Arrays should flatten in for loop expressions in the absence of explicit don't-flatten clues, but they don't in Rakudo

2014-02-24 Thread Will Coleda via RT
On Fri Aug 20 17:53:36 2010, pmichaud wrote:
 On Fri, Aug 20, 2010 at 03:42:57PM -0700, Carl Mäsak wrote:
  masak rakudo: my %h = foo = []; for %hfoo - $a { say $a.perl }
  p6eval rakudo 7b0031: OUTPUT«[]␤»
  masak I find I do such hash accesses when iterating on quantified
  Match objects. I'd like to know if I should write %hfoo or
  %hfoo.list in the for statement.
  masak not least because bitrot in my code seems to indicate that
  the
  behaviour changed in Rakudo recently :)
  TimToady I think that one should flatten
 
 Initially I disagree.  Consider:
 
 my %h = abc = [1,2,3], def = 4;  for %habc def - $x { say
 $x.perl; }
 
 I'd expect that loop to iterate twice, not 4 times.
 In general, I think that .{ } and .[ ] on arrays and hashes
 tend to produce scalar containers (which don't flatten by default).
 
 To get an array in a hash element to flatten, I'd suggest  @%habc .
 
 TimToady can override this interpretation, in which case we'll
 switch Rakudo to match.  But I fear making hash and array elements
 flattening by default will have far-reaching ramifications to other
 things we're doing.
 
 Pm

Sorry about the delay.

02:53  [Coke] Here's another ticket that requires a ruling, and perhaps a
rethink in the 3.5 years since it was opened: RT #77340
02:58  TimToady given current understanding of how things itemize, I think Pm
  has it right, and we should reject the ticket
02:58  TimToady except that @%habc can't work
02:58  TimToady must be either @(%habc) or %habc.list or %habc[]

Rejecting ticket, sorry.

-- 
Will Coke Coleda


[perl #79294] [BUG] $*PERLversion should be version of Perl, not version of Rakudo in Rakudo

2014-02-24 Thread Will Coleda via RT
On Tue Nov 16 16:15:29 2010, masak wrote:
 TheHarlot rakudo: say $*PERL
 p6eval rakudo 015d77: OUTPUT«name  rakudo␤version 2010.10-22-
 g015d77b␤␤»
 TimToady $*PERL should be the Perl version, not the rakudo version
 TimToady the rakudo version should be in VM
 * masak submits rakudobug

Since this was opened, what was version is now in ver, and version is unset:

03:02  [Coke] r: say $*PERLversion
03:02 +camelia rakudo-parrot e8cea1, rakudo-jvm e8cea1, rakudo-moar e8cea1:
 OUTPUT«(Any)␤»

What version should we declare to make this ticket closable?

-- 
Will Coke Coleda


[perl #102478] [BUG] Attributes can't be declared inside of a BEGIN eval in Rakudo

2014-02-24 Thread Will Coleda via RT
On Sat Oct 29 13:09:29 2011, masak wrote:
 moritz nom: class A { eval 'has $.x' }; say A.new(x = 3).x
 p6eval nom 9c6aed: OUTPUT«===SORRY!===␤A  cannot have attributes at
 line 1, near ␤»
 moritz nom: class A { BEGIN eval 'has $.x' }; say A.new(x = 3).x
 p6eval nom 9c6aed: OUTPUT«===SORRY!===␤A  cannot have attributes at
 line 1, near ␤»
 moritz why not?
 jnthn moritz: Probably that eval doesn't know it's in a class
 definition or some such
 jnthn moritz: e.g. it's treated like a little bit of mainline
 jnthn moritz: I guess you can argue that the BEGIN case there should work
 moritz jnthn: but the error message knows that it's in A
 jnthn moritz: no, the error message is busted
 jnthn The first case should certainly not work
 jnthn The second one...maybe.
 jnthn So the question is...
 jnthn In eval, what do we treat as the current package?
 jnthn masak: The A in the error messsage is not referring to the clas A
 jnthn Call it B in the code to see :)
 masak jnthn: aha, it's an article ;)
 jnthn nom: class B { BEGIN eval 'has $.x' }
 p6eval nom 9c6aed: OUTPUT«===SORRY!===␤A  cannot have attributes at
 line 1, near ␤»
 jnthn See the double space? :)
 jnthn It doesn't know what sort of thing it is in :)
 jnthn nom: has $.x
 p6eval nom 9c6aed: OUTPUT«===SORRY!===␤A  cannot have attributes at
 line 1, near ␤»
 jnthn Right. :)
 jnthn eval is doing the wrong kind of thing about current package.
 * masak submits rakudobug
 jnthn Yeah, we should probably make that one work.
 jnthn I'm in the middle of re-doing the repr API at the moment
 though, so won't get to that for a day or two.

Behavior has changed a bit.

This now gives an awesome error and can be closed with tests:

03:16  [Coke] nom: has $.x
03:17 +camelia rakudo-parrot e8cea1, rakudo-jvm e8cea1, rakudo-moar e8cea1:
 OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤You
 cannot declare attribute '$.x' here; maybe you'd like a class
 or a role?␤at /tmp/tmpfile:1␤-- has $.x⏏EOL␤   …»

However, the examples from earlier now give errors about non-rakudo objects, or 
methods we weren't asking about, e.g.:

03:16  [Coke] nom: class A { BEGIN EVAL 'has $.x' }; say A.new(x = 3).x
03:16 +camelia rakudo-jvm e8cea1: OUTPUT«(timeout)»
03:16 +camelia ..rakudo-parrot e8cea1: OUTPUT«===SORRY!===␤No such method
 'name' for invocant of type 'NQPMu'␤»
03:16 +camelia ..rakudo-moar e8cea1: OUTPUT«===SORRY!===␤Cannot find method
 'name'␤»



-- 
Will Coke Coleda


Re: [perl #79294] [BUG] $*PERLversion should be version of Perl, not version of Rakudo in Rakudo

2014-02-24 Thread Moritz Lenz

On 02/24/2014 09:04 AM, Will Coleda via RT wrote:

On Tue Nov 16 16:15:29 2010, masak wrote:

TheHarlot rakudo: say $*PERL
p6eval rakudo 015d77: OUTPUT«name  rakudo␤version 2010.10-22-
g015d77b␤␤»
TimToady $*PERL should be the Perl version, not the rakudo version
TimToady the rakudo version should be in VM
* masak submits rakudobug


Since this was opened, what was version is now in ver, and version is unset:

03:02  [Coke] r: say $*PERLversion
03:02 +camelia rakudo-parrot e8cea1, rakudo-jvm e8cea1, rakudo-moar e8cea1:
  OUTPUT«(Any)␤»

What version should we declare to make this ticket closable?


Maybe something like '6.2014.02' or '6.preview' or so.

Cheers,
Moritz


Re: [perl #78454] [BUG] Filehandle not flushed at program exit

2014-02-24 Thread Dagur Valberg Johannsson
There is a related test in roast/ S32-io/io-handle.t that tests that IO
flushes when it goes out of scope.

rakudo-parrot still doesn't do that:
10:57 dagurval  r: asdf.IO.open(:w).print(24); say slurp asdf;
10:57 camelia rakudo-jvm 299d70, rakudo-moar 299d70: OUTPUT«24␤»
10:57 camelia ..rakudo-parrot 299d70: OUTPUT«␤»



On Mon, Feb 24, 2014 at 8:47 AM, Will Coleda via RT 
perl6-bugs-follo...@perl.org wrote:

 On Tue Oct 19 13:47:36 2010, Solomon wrote:
  my $file = open test.txt, :w;
 
  for 1..1000 {
  $file.say: sprintf(This is a test
 %7d, $_);
  }
 
 
  # end of text.txt after executing this:
 
  This is a test980
  This is a test981
  This is a test982
  This is a test983
  This is a test984
  This is a test985
  This is a test986
  This is a test987
  This is a test988
  This is a test  # file ends before \n on this line
 
  This happens with
 
  This is Rakudo Perl 6, version 2010.09-60-gd497078 built on parrot
  2.9.0 r49583
 
  on the OS X, and
 
  This is Rakudo Perl 6, version 2010.09-53-gd357695 built on parrot
  2.8.0 r49541
 
  on Linux.
 

 I cannot duplicate this error now. Closable with tests.


 --
 Will Coke Coleda



[perl #119293] Rakudo doesn't warn about Perl 5 $]

2014-02-24 Thread Will Coleda via RT
On Wed Aug 14 14:39:07 2013, lue wrote:
 lue r: say $]
 camelia rakudo c0814a: OUTPUT«===SORRY!=== Error while compiling 
 /tmp/bQ267__iqC␤Non-declarative sigil is missing its name␤at 
 /tmp/bQ267__iqC:1␤-- say ⏏$]␤ expecting any of:␤ argument list␤ 
 prefix or term␤ prefix or meta-prefix␤»…
 
 The error message should be closer to what STD says:
 
 lue std: say $]
 camelia std c2215f0: OUTPUT«===SORRY!===␤Unsupported use of $] 
 variable; in Perl 6 please use $*PERL_VERSION at /tmp/30I9vo1peV line 
 1:␤-- say $]⏏EOL␤Parse failed␤FAILED 00:00 42m␤»

Fixed. Closable with tests:

12:09  [Coke] m: say $]
12:09 +camelia rakudo-moar 299d70: OUTPUT«===SORRY!=== Error while compiling
 /tmp/_cHikCl3Xj␤Unsupported use of $] variable; in Perl 6
 please use $*PERL_VERSION␤at /tmp/_cHikCl3Xj:1␤-- say
 ⏏$]␤expecting any of:␤argument list␤ …»
-- 
Will Coke Coleda


[perl #117147] doesnt compile under mac 10.8.3

2014-02-24 Thread Will Coleda via RT
On Thu Mar 14 01:20:35 2013, moritz wrote:
 On 03/13/2013 03:07 PM, herbert breunung (via RT) wrote:
  # New Ticket Created by  herbert breunung
  # Please include the string:  [perl #117147]
  # in the subject line of all future correspondence about this issue.
  # URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117147 
 
 
  error msg:
 
  http://pastebin.com/35N6aaN8
  thanks a lot,keep on the goodherbert
 
 The interesting part:
 
 /Users/lichtkind/Perl/six/rakudo/install/bin/parrot  -o 
 blib/Perl6/Actions.pbc src/gen/perl6-actions.pir
 Cannot open output file blib/Perl6/Actions.pbc
 
 Have you checked that your disc isn't full?
 
 Cheers,
 Moritz
 

The original paste is gone.

Is this still an issue?

-- 
Will Coke Coleda


[perl6/specs] 73c60f: remove accidental duplication

2014-02-24 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/perl6/specs
  Commit: 73c60fc5fe4c69ca56e1b688a9cc6b339e5e132e
  
https://github.com/perl6/specs/commit/73c60fc5fe4c69ca56e1b688a9cc6b339e5e132e
  Author: Larry Wall la...@wall.org
  Date:   2014-02-24 (Mon, 24 Feb 2014)

  Changed paths:
M S32-setting-library/Containers.pod

  Log Message:
  ---
  remove accidental duplication




[perl6/specs] 5ef5f5: Add Range.sample for TheDamian++

2014-02-24 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/perl6/specs
  Commit: 5ef5f5ca42804c868ff42c7913cde19a554b1e8e
  
https://github.com/perl6/specs/commit/5ef5f5ca42804c868ff42c7913cde19a554b1e8e
  Author: Larry Wall la...@wall.org
  Date:   2014-02-24 (Mon, 24 Feb 2014)

  Changed paths:
M S32-setting-library/Containers.pod

  Log Message:
  ---
  Add Range.sample for TheDamian++