The 42 xx 999999999999999 case is fixed with 
https://github.com/rakudo/rakudo/commit/f190f241e0 .

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!

> On 8 Mar 2017, at 16:56, Zoffix Znet (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  Zoffix Znet 
> # Please include the string:  [perl #130956]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=130956 >
> 
> 
> 
> 
> 15:53                 m: dd (($++ ?? 42 !! |()) xx 9999999999999999999)[^4]
> 15:53         camelia         rakudo-moar 0633f0: OUTPUT: «(Nil, Nil, Nil, 
> Nil)␤»
> 15:53         IOninja         m: dd (($++ ?? 42 !! |()) xx 999)[^4]
> 15:53         camelia         rakudo-moar 0633f0: OUTPUT: «(42, 42, 42, 42)␤»
> 
> 
> Also, giving huge values that don't yet trigger the above bug causes a hang,
> perhaps it shouldn't be refying everything?
> 
> m: dd (($++ ?? 42 !! |()) xx 99999999999999)[^4]
> camelia │ rakudo-moar 0633f0: OUTPUT: «(timeout)»

Reply via email to