Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First intermediate value of reduction with zip operator #6680

Open
p6rt opened this issue Mar 23, 2018 · 3 comments
Open

First intermediate value of reduction with zip operator #6680

p6rt opened this issue Mar 23, 2018 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Mar 23, 2018

Migrated from rt.perl.org#133017 (status was 'open')

Searchable as RT133017$

@p6rt
Copy link
Author

p6rt commented Mar 23, 2018

From @nwellnhof

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

@p6rt
Copy link
Author

p6rt commented Mar 24, 2018

From @AlexDaniel

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) rakudo/rakudo@16f950b

Which links to RT#​131009 ( https://rt-archive.perl.org/perl6/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, wellnhofer@​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

@p6rt
Copy link
Author

p6rt commented Mar 24, 2018

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant