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
Method combinations broken after commit bcc113cfb0 #6002
Comments
From @usev6With Rakudo commit bcc113cfb0 (Migrate combinations(n,k) logic to I think it comes down to this failure: $ ./perl6-j -e '(2).combinations(0)' This works as expected, so the (0) case seems to be the culprint: $ ./perl6-j -e 'say (1, 2, 3).combinations(1..3).list.perl' The full backtrace looks like this: $ ./perl6-j --ll-exception -e '(2).combinations' |
From @lizmatHopefully fixed in 00c3551c86 . Cannot check because building JVM backend fails on MacOS.
|
The RT System itself - Status changed from 'new' to 'open' |
From @lizmatHopefully fixed in 00c3551c86 . Cannot check because building JVM backend fails on MacOS.
|
From @usev6On Sat, 14 Jan 2017 03:06:52 -0800, elizabeth wrote:
As discussed on #perl6-dev [1] this didn't fix the issue, unfortunately. I think, I've found the underlying reason for the breakage. This is a golf of the error (the following evaluations are run on commit 502fc77a68): $ ./perl6-j --version $ ./perl6-j -e 'say Rakudo::Internals.ListsFromSeq( (2,3), combinations(2,0))' Now 'combinations(2,0)' is nothing else than 'Seq.new(Rakudo::Iterator.Combinations(2,0,0))' At first glance the following looks ok: $ ./perl6-j -e 'dd combinations(2,0)' # same output as on perl6-m But this looks wrong: $ ./perl6-j -e 'dd combinations(2,0)[0..1]' Compare to perl6-m: $ ./perl6-m -e 'dd combinations(2,0)[0..1]' And calling 'Seq.new(Rakudo::Iterator.Combinations(2,0,0))' reveals the problem: $ ./perl6-j -e 'say Seq.new(Rakudo::Iterator.Combinations(2,0,0))' Under the hood Rakudo::Iterator.OneValue is called like so: $ ./perl6-j -e 'say Seq.new(Rakudo::Iterator.OneValue(List.new))' And within Rakudo::Iterator.OneValue we execute something like this (same bug as in https://rt-archive.perl.org/perl6/Ticket/Display.html?id=130532): $ ./perl6-j -e 'use nqp; class A { has Mu So, as far as I understand Rakudo::Iterator.OneValue does not work correctly on rakudo-j, and that surfaces at different points due to lizmat's refactoring. [1] https://irclog.perlgeek.de/perl6-dev/2017-01-14#i_13920333 |
From @usev6This seems to be resolved now: $ ./perl6-j --version $ ./perl6-j -e 'say (2).combinations(0)' Since there are tests for this behaviour in S32-list/combinations.t, I'm closing this ticket as 'resolved' without adding another test. |
1 similar comment
From @usev6This seems to be resolved now: $ ./perl6-j --version $ ./perl6-j -e 'say (2).combinations(0)' Since there are tests for this behaviour in S32-list/combinations.t, I'm closing this ticket as 'resolved' without adding another test. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#130556 (status was 'resolved')
Searchable as RT130556$
The text was updated successfully, but these errors were encountered: