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
Whatever on the left side of array subscript range may cause hangs (@a[*-2..*]:exists) #5880
Comments
From @AlexDanielTo understand the issue, let's take a look at examples that *do* work. Code: Result: Code: Result: Code: Result: Alright? Now with “:exists”: Code: Result: |
From @zoffixznetOn Mon, 12 Dec 2016 11:25:01 -0800, alex.jakimenko@gmail.com wrote:
Here are some comments from jnthn: https://irclog.perlgeek.de/perl6/2016-12-12#i_13729493 FWIW, I'm not seeing a problem. You've contorted a piece of code into trying to reify an infinite number of elements... |
The RT System itself - Status changed from 'new' to 'open' |
From @AlexDanielSooo… Are you saying that the behavior in provided examples is consistent? On 2016-12-13 09:25:36, cpan@zoffix.com wrote:
|
From @zoffixznetOn Tue, 13 Dec 2016 11:10:38 -0800, alex.jakimenko@gmail.com wrote:
As far as I can see, yes. The first two are lazy Ranges. The second two are non-lazy WhateverCodes. And as jnthn++ pointed out "The array subscripter decides whether to auto-viv for not based on .is-lazy". The reason it does so is so things like `my @a; @a[3..5] = 1 xx *; say @a` autovivicate, while still letting you do stuff like `@a[2..*]` to get a truncated result. In the example you point out as problematic, you're exploiting the autovivication feature to create an infinite loop, hence the hang. Is there still an issue on this ticket not covered by those explanations? |
From @AlexDanielYes. Why the behavior with and without :exists is different? Why does it have to be different? On 2016-12-14 08:02:48, cpan@zoffix.com wrote:
|
Migrated from rt.perl.org#130330 (status was 'open')
Searchable as RT130330$
The text was updated successfully, but these errors were encountered: