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

Large non-Infinite gists are eager #2920

Closed
0racle opened this issue May 24, 2019 · 3 comments · Fixed by Raku/roast#747
Closed

Large non-Infinite gists are eager #2920

0racle opened this issue May 24, 2019 · 3 comments · Fixed by Raku/roast#747
Labels
regression Issue did not exist previously tests needed Issue is generally resolved but tests were not written yet

Comments

@0racle
Copy link
Contributor

0racle commented May 24, 2019

The Problem

Large, non-infinte sequences should gist lazily, showing the fist 100 elements. Instead, Rakudo seems to be evaluating the entire sequence before it gists. Suspect the sequence is not being detected as lazy.

Expected Behavior

As per old compiler version

> $*PERL.compiler
rakudo (2018.04.1)
> { (2, 4 ... 1_000_000).gist; say (now - ENTER now).Int }
0

Actual Behavior

Recent compiler version

> $*PERL.compiler
rakudo (2019.03.1.427.gb.279670)
> { (2, 4 ... 1_000_000).gist; say (now - ENTER now).Int }
15

Bisectable points to this commit as the regression.

@AlexDaniel AlexDaniel added the regression Issue did not exist previously label May 24, 2019
@lizmat
Copy link
Contributor

lizmat commented Jun 1, 2019

Reverted with 2566db7

@AlexDaniel
Copy link
Contributor

What about tests?

@AlexDaniel AlexDaniel reopened this Jun 1, 2019
@AlexDaniel AlexDaniel added the tests needed Issue is generally resolved but tests were not written yet label Jun 1, 2019
@AlexDaniel
Copy link
Contributor

How to test:

(0, { $_ == 1000 ?? die ‘ouch!’ !! $_ + 1 } ... 99999).gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously tests needed Issue is generally resolved but tests were not written yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants