[perl #131089] Different parsing of combined colonpairs

2019-05-12 Thread Jan-Olof Hendig via RT
On Sun, 02 Apr 2017 07:48:11 -0700, alex.jakime...@gmail.com wrote:
> I wonder, is it a dup of RT #124553 and RT #125353 ?
> 
> On 2017-04-02 04:50:15, c...@zoffix.com wrote:
> > If joined colonpairs are after a position arg, only the first
> > colonpair gets registered:
> >
> >  m: -> *@_, *%_ { dd [@_, %_] }("/", :r:w:d:x)
> >  rakudo-moar 1b9d53: OUTPUT: «[["/"], {:r}]␤»
> >
> > But if they're first in line, then all do:
> >
> >  m: -> *@_, *%_ { dd [@_, %_] }(:r:w:d:x, "/")
> >  rakudo-moar 1b9d53: OUTPUT: «[["/"], {:d, :r, :w, :x}]␤»
> >
> > When in a [], only first one is obtained as well:
> >  m: dd [:r:w:d:x]
> >  rakudo-moar 1b9d53: OUTPUT: «[:r]␤»
> >
> > And when in a {}, all are obtained, but only the first one gets value
> > True (related?)
> >  m: dd {:r:w:d:x}
> >  rakudo-moar 1b9d53: OUTPUT: «Hash % = {:d(1), :r, :w(1),
> > :x(1)}␤»

The examples given by Zoffix above seems to have been fixed by 
https://github.com/rakudo/rakudo/commit/91359141fb7501636b073ccaf6fb6598dc273bec



[perl #130069] [BUG] Unknown QAST error when creating List of Pairs

2019-05-12 Thread Jan-Olof Hendig via RT
On Thu, 04 May 2017 17:36:32 -0700, c...@zoffix.com wrote:
> On Thu, 10 Nov 2016 21:03:43 -0800, joshu...@gmail.com wrote:
> > Normally Rakudo is happy for you to omit comma when declaring pairs
> > with
> > the `:key(value)` syntax, however I found that it does not like this
> > syntax
> > is Rat's are used as the value, like this:
> >
> > > (:this(3.5) :that(5.3))
> > Unknown QAST node type NQPMu
> >
> 
> I took a stab at this one, but giving up for now.
> 
> Things discovered:
> - It's the second `:that(5.3)` that is the thing causing the issue
> - To repro the issue, instead of a Rat you can use a constant, e.g.
> `:that(pi)`
> - ASTs:
> - Working version has: QAST::WVal(Rat)  :statement_id
> 5.3
> - Broken version has: QAST::Want  (looks like it's missing
> stuff inside of it, which is what gives the error)
> - --target=parse:
> - Working version has EXPR => - 0: colonpair: (first)  - 1:
> colonpair: (second)
> - Broken version has EXPR => - 0: colonpair: (first)  -
> fake_infix:   - OPER:   - colonpair: (second)
> 
> So looks like the Actions for `statement` token needs to rake through
> `fake_infix` capture and generate proper colonpair instead of empty
> QAST::Want.
> 
> I gave up at that point, but hopefully my digging will be helpful to
> someone :)

Fixed with commit 
https://github.com/rakudo/rakudo/commit/91359141fb7501636b073ccaf6fb6598dc273bec

testneeded



[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword

2019-05-12 Thread Jan-Olof Hendig via RT
On Sun, 12 May 2019 07:36:16 -0700, jan-olof.hen...@bredband.net wrote:
> On Sat, 26 Aug 2017 05:15:41 -0700, sml...@gmail.com wrote:
> > This bug is still present in
> >
> > Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version
> > 2017.08.1-
> > 19-g151a2563
> > implementing Perl 6.c
> 
> As per commit
> https://github.com/rakudo/rakudo/commit/cf1673d9c20e82aad6291a8aa123c46e177edf34
> the second case now works as intended.

As for the first case, see 
https://colabti.org/irclogger/irclogger_log/perl6-dev?date=2019-05-12#l48

should be set to testneeded



[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword

2019-05-12 Thread Jan-Olof Hendig via RT
On Sat, 26 Aug 2017 05:15:41 -0700, sml...@gmail.com wrote:
> This bug is still present in
> 
> Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-
> 19-g151a2563
> implementing Perl 6.c

As per commit 
https://github.com/rakudo/rakudo/commit/cf1673d9c20e82aad6291a8aa123c46e177edf34
the second case now works as intended.



[perl #131395] [BUG] Cross meta operator on empty list complains "This type (Scalar) does not support elems"

2019-05-12 Thread Jan-Olof Hendig via RT
On Sat, 30 Sep 2017 12:40:59 -0700, sml...@gmail.com wrote:
> On Mon, 29 May 2017 11:36:49 -0700, c...@zoffix.com wrote:
> > On Mon, 29 May 2017 10:02:27 -0700, thunderg...@comcast.net wrote:
> > > Using a cross meta operator on an empty list complains "This type
> > > (Scalar) does not support elems".
> > >
> > > say (1,2).elems; say ().elems; say (1,2) X ();
> > >
> > > yields "2␤0␤This type (Scalar) does not support elems"
> > >
> > > Seems to work correctly with arrays instead of lists.
> > >
> > > say [1,2].elems; say [].elems; say [1,2] X [];
> > >
> > >
> > > Linux Mint 17.2
> > >
> > >  > perl6 -v
> > >  >  This is Rakudo version 2017.05 built on MoarVM version 2017.05
> > > implementing Perl 6.c.
> >
> >
> > Thank you for the report. lizmat++ fixed the issue.
> >
> > Fix: https://github.com/rakudo/rakudo/commit/9494cbd3b9
> > Test: https://github.com/perl6/roast/commit/0faf3c354f
> 
> Re-opening, because it hasn't been fixed for the Xop case yet:
> 
> ➜  say () X+ (1, 2);
> This type (Scalar) does not support elems
> 
> ➜  say (1,2) X~ ();
> This type (Scalar) does not support elems
> 
> ➜  say () X=> ();
> This type (Scalar) does not support elems
> 
> Bisectable¹ blames a commit² from January.
> 
> 
> ---
> [1]
> https://gist.github.com/Whateverable/f1b3066f1e2c45df7ab5e0aa7aeee3a7
> [2] https://github.com/rakudo/rakudo/commit/a26f51361
> 
> ---
> This is Rakudo version 2017.09-142-ga89add0bf built on MoarVM version
> 2017.09.1-49-gb3dd812a
> implementing Perl 6.c.

Fixed with commit 
https://github.com/rakudo/rakudo/commit/6c93fde85da027748bddd7cf75e295ed70ce3b05
Roast tests added with 
https://github.com/perl6/roast/commit/7d47580eb83fbf7c315e21411422fbc547f96399

Closing