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:25 guifa_ joined, guifa_ left 08:39 lizmat left 15:31 rakkable left 15:32 rakkable joined 18:28 lizmat joined 18:30 lizmat left, lizmat_ joined 20:16 lizmat_ left 20:17 lizmat joined
patrickb It's pretty bad to couple moar code to HLL classes, right? 20:41
Currently my var-arg approach encompasses passing a named arg in the actual native function call with a `Signature` object as value. That object I now need to inspect in moar land to extract the parameter types. Is there a good alternative? 20:44
timo maybe that part can be done in a dispatcher. if there were a dispatcher target that is like "invoke native call, every other argument is a type to use for the argument that comes after it" or so, that could be dispatched to after setting stuff up from inside hll code 21:24
or the arguments come after all the types or so
patrickb the dispatcher idea could maybe work 21:31
The reason I want to use an actual Signature object instead of just a list of types in the HLL call is that other wise I have to touch the raku grammar, because "Str is copy" is not legal raku code outside of a Signature literal. 21:32
So the call would look as follows: sub var_fun(Str) is native is variadic {*}; var_fun("val", 1, "two", :var-sig(:(int32 is rw, Str))); 21:35
That's kind of ugly, but pretty consistent I'd say. 21:36
The syntax could be improved (e.g. putting the Signature in as a positional instead: `var_fun("val", :(int32 is rw, Str), 1, "two");`), but the fundamental issue of how to reach into that Signature stays. 21:38
I guess I'll dig a bit into dispatchers. Oh man, I once again underestimated how a seemingly minor project can escalate into a deeeep rabbit hole... 21:41
timo: Thanks for the pointers!
timo YW 21:42
japhb patrickb: But isn't the rabbit hole half the fun? :-D 22:17
timo big sigh, turning on coverage logging makes core setting compilation no longer work ... that's amazing ... 22:35
22:46 lizmat left
timo somehow the `return if $!composed` in Attribute.rakumod is hitting "trying to return outside of any routine" and i don't really understand why 22:52