Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
`xx` with large Int repeat count gives bogus results #6136
15:53 m: dd (($++ ?? 42 !! |()) xx 9999999999999999999)[^4]
Also, giving huge values that don't yet trigger the above bug causes a hang,
m: dd (($++ ?? 42 !! |()) xx 99999999999999)[^4]
Turning xx into a Seq is already on my radar and I already have a patch for it.
But first I needed to make sure that HYPER could handle Seq’s as a result of the infix op. That’s been fixed now. Currently look at one other spectest fail.
The 42 xx 999999999999999 case is fixed with rakudo/rakudo@f190f24 .
Not having an Empty indicate the end can only be done by breaking at least two spectests. Also:
(|(),) xx 42
would then hang. So this feels like something that cannot be fixed generally, unless we accept the hanging behaviour of this example.
I also have a patch for the thunked version of xx. But alas, this still breaks a couple of spectests that do:
my $a = 0; ($a++,) xx 42; # note the xx Seq is in sink context
So for some reason, it looks like the Seq.sink-all is not doing any pull-one’s. Still investigating!