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.
00:00 reportable6 left 00:02 reportable6 joined
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
02:55 MasterDuke left 03:57 kjp left 04:00 kjp joined 04:53 Techcable left 04:56 Techcable joined 05:06 discord-raku-bot left 05:09 discord-raku-bot joined 05:19 discord-raku-bot left 05:41 discord-raku-bot joined 05:49 discord-raku-bot left 06:00 reportable6 left 06:01 discord-raku-bot joined 06:02 reportable6 joined 06:06 discord-raku-bot left 07:08 squashable6 left 07:10 squashable6 joined 07:47 discord-raku-bot joined 07:49 discord-raku-bot left, discord-raku-bot joined 07:54 discord-raku-bot left 07:59 discord-raku-bot joined 08:00 discord-raku-bot left 08:54 sena_kun joined 09:14 sena_kun left 09:20 sena_kun joined
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
10:26 linkable6 left, evalable6 left 10:28 linkable6 joined, evalable6 joined 11:28 evalable6 left, linkable6 left 11:31 evalable6 joined, linkable6 joined
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
11:44 epony left 12:00 reportable6 left 12:03 reportable6 joined 12:29 Kaiepi left 12:56 Kaiepi joined 14:09 epony joined 14:17 discord-raku-bot joined 16:56 linkable6 left, evalable6 left 16:57 linkable6 joined 16:59 evalable6 joined 18:00 reportable6 left, reportable6 joined 18:25 sena_kun left
lizmat jnthn: its really about something like: 18:26
18:26 sena_kun joined
lizmat @args.AT-POS(0) ?? foo(@args.AT-POS(0)) !! "" 18:27
21:03 linkable6 left, evalable6 left 21:05 evalable6 joined, linkable6 joined 21:40 MasterDuke joined
MasterDuke . 21:41
\r\n, arg
22:01 sena_kun left
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