[perl #133017] First intermediate value of reduction with zip operator

2018-03-24 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Some extra info:

Output on all releases (not a regression because the output was always wrong):
https://gist.github.com/b4b27b8088a230a6051d634dc7b2d13e

The change in behavior happened in (2017-03-21)
https://github.com/rakudo/rakudo/commit/16f950b30572e0fa584ddfab1e84e5ef0ca5dfc9

Which links to RT#131009 ( https://rt.perl.org/Ticket/Display.html?id=131009 )


Also, FYI, we also accept bug reports on github:
https://github.com/rakudo/rakudo/issues

On 2018-03-23 07:16:22, wellnho...@aevum.de wrote:
> When using a reduction operator with the "intermediate results" option
> combined with a zip operator, e.g. [\Z+], the first intermediate value
> is wrong:
>
> say [\Z+] (1, 2, 3), (10, 20, 30), (100, 200, 300);
> # got: ((6) (11 22 33) (111 222 333))
> # expected: ((1 2 3) (11 22 33) (111 222 333))
>
> Reduction with hyper operators like [\<<+>>] seems to work.
>
> Only tested online on tio.run
>
> Rakudo version 2017.12 built on MoarVM version 2017.12
> implementing Perl 6.c.
>
> and code-golf.io:
>
> Rakudo version 2018.03 built on MoarVM version 2018.03
> implementing Perl 6.c
>
> Nick


[perl #133016] Wrong set difference of Bag and List

2018-03-24 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
FWIW bisectable points to (2017-06-25)
https://github.com/rakudo/rakudo/commit/a2133dbc6a00d1f87bb0644c829591144381d736

( before that it was giving bag(a, b) or bag(b, a) )

On 2018-03-24 01:43:59, elizabeth wrote:
> That does indeed look wrong to me, investigating
>
> > On 23 Mar 2018, at 15:04, Nick Wellnhofer (via RT)  > follo...@perl.org> wrote:
> >
> > # New Ticket Created by Nick Wellnhofer
> > # Please include the string: [perl #133016]
> > # in the subject line of all future correspondence about this issue.
> > # https://rt.perl.org/Ticket/Display.html?id=133016 >
> >
> >
> > I get an unexpected result when subtracting a List from a Bag with
> > the set
> > difference operator (-). Subtracting Bags from Lists or Bags works
> > fine, as
> > does the baggy addition operator:
> >
> > say bag() (+) bag(); # Bag(a(3), b)
> > say bag() (+) ; # Bag(a(3), b)
> > say  (+) bag(); # Bag(a(3), b)
> >
> > say bag() (-) bag(); # Bag(a, b)
> > say bag() (-) ; # Bag(a(2), b) seems wrong
> > say  (-) bag(); # Bag(a, b)
> >
> > Only tested online on tio.run
> >
> > Rakudo version 2017.12 built on MoarVM version 2017.12
> > implementing Perl 6.c.
> >
> > and code-golf.io:
> >
> > Rakudo version 2018.03 built on MoarVM version 2018.03
> > implementing Perl 6.c
> >
> > Nick


Re: [perl #133016] Wrong set difference of Bag and List

2018-03-24 Thread Elizabeth Mattijsen
That does indeed look wrong to me, investigating

> On 23 Mar 2018, at 15:04, Nick Wellnhofer (via RT) 
>  wrote:
> 
> # New Ticket Created by  Nick Wellnhofer 
> # Please include the string:  [perl #133016]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=133016 >
> 
> 
> I get an unexpected result when subtracting a List from a Bag with the set 
> difference operator (-). Subtracting Bags from Lists or Bags works fine, as 
> does the baggy addition operator:
> 
> say bag() (+) bag();  # Bag(a(3), b)
> say bag() (+) ;   # Bag(a(3), b)
> say   (+) bag();  # Bag(a(3), b)
> 
> say bag() (-) bag();  # Bag(a, b)
> say bag() (-) ;   # Bag(a(2), b) seems wrong
> say   (-) bag();  # Bag(a, b)
> 
> Only tested online on tio.run
> 
> Rakudo version 2017.12 built on MoarVM version 2017.12
> implementing Perl 6.c.
> 
> and code-golf.io:
> 
> Rakudo version 2018.03 built on MoarVM version 2018.03
> implementing Perl 6.c
> 
> Nick


Re: [perl #133016] Wrong set difference of Bag and List

2018-03-24 Thread Elizabeth Mattijsen via RT
That does indeed look wrong to me, investigating

> On 23 Mar 2018, at 15:04, Nick Wellnhofer (via RT) 
>  wrote:
> 
> # New Ticket Created by  Nick Wellnhofer 
> # Please include the string:  [perl #133016]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=133016 >
> 
> 
> I get an unexpected result when subtracting a List from a Bag with the set 
> difference operator (-). Subtracting Bags from Lists or Bags works fine, as 
> does the baggy addition operator:
> 
> say bag() (+) bag();  # Bag(a(3), b)
> say bag() (+) ;   # Bag(a(3), b)
> say   (+) bag();  # Bag(a(3), b)
> 
> say bag() (-) bag();  # Bag(a, b)
> say bag() (-) ;   # Bag(a(2), b) seems wrong
> say   (-) bag();  # Bag(a, b)
> 
> Only tested online on tio.run
> 
> Rakudo version 2017.12 built on MoarVM version 2017.12
> implementing Perl 6.c.
> 
> and code-golf.io:
> 
> Rakudo version 2018.03 built on MoarVM version 2018.03
> implementing Perl 6.c
> 
> Nick