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

Lazy series failure on jvm - prime example from 2012 advent day 14 #3379

Closed
p6rt opened this issue May 5, 2014 · 4 comments
Closed

Lazy series failure on jvm - prime example from 2012 advent day 14 #3379

p6rt opened this issue May 5, 2014 · 4 comments

Comments

@p6rt
Copy link

p6rt commented May 5, 2014

Migrated from rt.perl.org#121802 (status was 'resolved')

Searchable as RT121802$

@p6rt
Copy link
Author

p6rt commented May 5, 2014

From @dwarring

Here's a slightly golfed version of the prime example from integration/advent2012-day14.t

use v6;

my @​primes := 2, 3, 5, -> $p { ($p+2, $p+4 ... &is-prime)[*-1] } ... *;
sub is-prime($n) { $n %% none @​primes ...^ * > sqrt $n }

is-prime($_) for 2 .. 20;
is-prime($_) for 2 .. 30;

./perl6-j -Ilib tst.pl
Cannot do aggregate operation on a type object
  in method reify at gen/jvm/CORE.setting​:7542
  in method reify at gen/jvm/CORE.setting​:7536
  in method gimme at gen/jvm/CORE.setting​:7991
  in method Bool at gen/jvm/CORE.setting​:7889
  in block at gen/jvm/CORE.setting​:16800
  in block at gen/jvm/CORE.setting​:7785
  in block at gen/jvm/CORE.setting​:7787
  in method reify at gen/jvm/CORE.setting​:7813
  in method reify at gen/jvm/CORE.setting​:7536
  in method reify at gen/jvm/CORE.setting​:7536
  in method reify at gen/jvm/CORE.setting​:7536
  in method reify at gen/jvm/CORE.setting​:7536
  in method gimme at gen/jvm/CORE.setting​:7991
  in method eager at gen/jvm/CORE.setting​:7963
  in method new at gen/jvm/CORE.setting​:3358
  in sub none at gen/jvm/CORE.setting​:3479
  in sub is-prime at tst.pl​:4
  in block at tst.pl​:7

Working on Moar and Parrot.

@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

From @usev6

The tests are now passing on JVM. I unfudged them with the following commit​: Raku/roast@741b08ee70

@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

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

@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

@usev6 - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 17, 2014
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