Elizabeth Mattijsen

Results 961 comments of Elizabeth Mattijsen

golfed to: $ perl6 -e 'loop (my $i = 0; $i < once { print $i; 10 }; ++$i ) { }’ 012345678910 I suspect some weird scoping issue :-(...

FWIW, my version: sub sieve($n) { my buf8 $composite := buf8.allocate($n); my int $t = 3; while (my $q := $t * $t)

> On 20 Jan 2018, at 17:35, Elizabeth Mattijsen wrote: > > FWIW, my version: > > sub sieve($n) { > my buf8 $composite := buf8.allocate($n); > my int $t...

on HEAD, this version now runs at 4.8 seconds for me. I'm not sure how I can explain that discrepancy.

2.00 is because `time` only has second granularity. With this version of sieve: ```raku use v6.*; sub sieve(int $n) { my buf8 $composite := buf8.allocate($n); my int $t = 3;...

Not sure why I originally used a `buf8` where an `int` array would make more sense. This version clocks in at **.50** on Intel, and **0.95** on an M1: ```raku...

Oddly `Map.clone` appears to be reduced to `self` now. Not sure whether that is actually correct, as a `Map` may contain mutable elements, such as a `Hash`.

The problem appears to be caused by the fact that the LHS of `but` is getting (re-)instantiated (which it probably shouldn't?) ```raku role Foo { has $.a; method TWEAK() {...

Looks like 8f440ea6d4 is to blame, although the old state is a bit iffy as well.

Turns out, the same issue exists for arrays: ```raku role Foo { has $.a }; role Bar { has $.b }; say ((my @a but Foo(5)) but Bar(7)).a; # (Any)...