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.
jnthn lizmat: In general, you'd want to bind the result into a temporary variable and re-use that, otherwise you can dupe side-effects. 01:18
lizmat jnthn: ok, that means that if you can be sure there are no (visible) side-effects, you're safe to do it 09:59
jnthn lizmat: Maybe. If it's in the same lexical scope, it's probably OK. But note that AST nodes get linked to other nodes elsewhere in the tree during various phases (such as variable resolution) 11:38
So at the very least anything that does RakuAST::Attaching is probably a very dubious idea to do this with 11:39
I guess the easy to follow rule is "don't do it", and the answer to any bug report arising from AST reuse will be "that's your fault, not Rakudo's". But there likely are harmless cases also (for example, it's hard to imagine an integer literal going wrong) 11:41
lizmat jnthn: its really about something like: 18:26
lizmat @args.AT-POS(0) ?? foo(@args.AT-POS(0)) !! "" 18:27
MasterDuke . 21:41
\r\n, arg
MasterDuke ha. had a bit of a scare that nqp::sha1 didn't match sha1sum, but turns out i just forgot to add a "\n" to the string i has hashing 22:33
japhb MasterDuke: Hopefully that actually did change half the bits of the result ... 22:54