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.
Nicholas good *able6, #moarvm 06:04
nine Type captures are weird. They are parameters but actually parse as type constraints 12:48
nine Parametric roles are a deep rabbit hole. Type captures were just the start. BEGIN time calls to the role's body block are a bit of a different beast. 14:18
dogbert17 nine: you always seem to fall into rabbit holes :) 14:24
japhb "I wonder why it's so dark under that tree ..." 14:36
MasterDuke huh, commaide.com/subscriber/home only shows 2022.02 for download, but i already have 2022.04... 14:58
jnthn Hmm 14:59
MasterDuke looks like it's fixed now (i.e., showing 2022.04) 15:09
jnthn Yeah, for me too.
Nicholas jnthn: you're now registered as jnthn? 15:11
jnthn No, just IRC client seems to like this do this on reconnect 15:13
Nicholas aha OK
nine How on earth can a WVal that's a Block at compile time turn into an (EXPORT) at deserialize time? 15:24
jnthn Wrong SC somewhere? 15:27
nine No idea how that would happen. I'm only trying RAKUDO_RAKUAST=1 ./rakudo-m --ll-exception -e 'my role IntTypedCArray[::TValue] { method foo() { TValue } }; my class Foo does IntTypedCArray[Int] { }; Foo.new.foo' 15:33
The WVal in question is $code-obj (the role's body) in IMPL-LINK-META-OBJECT github.com/rakudo/rakudo/blob/raku...akumod#L76 15:34
I get the same SC handle at all times 15:48
Huh.... it's somehow the experimental self.IMPL-INTERPRET(RakuAST::IMPL::InterpContext.new) call in the body's stub 15:53
jnthn: I understand the plan for BEGIN time execution is to just interpret the AST. How would that work with role bodies which end with nqp::list($?PACKAGE, nqp::curlexpad)? Wouldn't the interpreter have to come up with a lexpad then? 16:42
jnthn nine: The plan is to interpret simple, compile others, and the plan for compile was to get the VM involved with some kind of way of telling it that a lexical lookup was actaully to be delegated to something that would do a late-bound symbol lookup under the control of the compiler (rather than the fake environment trick we have today 16:44
nine Ok, that makes more sense of course. It also raises the "oh boy, am I really going to try to implement that?" question 16:46
jnthn :) 16:51
nine Actually I think with just little adjustments to the metamodel code, I could avoid full BEGIN time compilation a while longer. After all that lexpad is only used to resolve generics. Wouldn't be hard to make that work a little differently at compile time 16:53
And that may actually make sense regardless of my trepidation. Role bodies are mostly boring blocks that would be fast to interpret. And they are common. 16:55
jnthn Well, the main problem is the clone of the methods, which have to close over ::?CLASS in order to do attribute access 16:57
nine Ah, yes, of course. That's actually something I have come across just earlier today. I don't think those closures are implemented yet 17:24