Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
timo ohai 09:46
lizmat timo o/! 09:47
nine \o 10:36
[Coke] tiiiiiiiiiimo 13:23
[Coke] Can someone give me a sentence or two about "why we won't be including TCO in rakudo" if that's the case, moarvm specific rationale is fine, so I can write up a FAQ and close one of the currently open tickets? 16:30
(I'm pretty sure the answer was no, but could be mistaken)
nine I guess the irclog would know the answer 20:45
lizmat I think codesections was to give an answer on that? 21:06
jnthn To the degree there's a consensus on that, I think it's something like: an explicit mechanism to do tailcalls is fine, but needs runtime support and is made more complex because a Routine maybe having non-inlined Blocks and so there can be many VM-level stack frames that need removing. 22:15
But TCO - doing it as an optimization - is tricky because features like CALLER and dynamic variables are impacted by it, and the late-bound nature of those mean they can be used at quite a distance. 22:16
So it's not really "no tailcalls", but "explicit tailcalls, and somebody needs to do the implementation work" 22:17
Oh, the interaction with LEAVE blocks is also fun :)
sub foo($n) { LEAVE say $n; $n ?? 1 !! $n * &foo.tailcall($n - 1) } ; foo(5); # what to do with this? 22:19
evalable6 5
jnthn hah, go the conditional backwards :D 22:19