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:41 [Coke] left 02:38 [Coke] joined 10:13 sena_kun joined 10:35 xiaomiao is now known as DrEeevil 10:52 JimmyZhuo joined
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2025/03/25/2025-...n-rakuast/ 11:34
12:33 Voldenet_ joined 12:34 Voldenet left, Voldenet_ is now known as Voldenet
jdv [Coke]: the only place the extra 0 is used is on the branch push dst 13:00
maybe that addition you made to the release guide added confusion?
we could just rename the release branches if its causing trouble. maybe like rakudo "release-..." or whatever... 13:02
patrickb NativeCall has no support for varargs at all, correct? It seems the trick to just treat a vararg function as a non-vararg function does not work on all architectures. It namely fails on ARM MacOS with dyncall. 13:25
I validated that with a small c prog that uses dyncall directly and performs a call to a vararg function. It works when dyncalling it as a proper vararg function, but fails when doing a regular dyncall (the arguments don't survive). On Linux x64 it works. Only fails on MacOS Arm. 13:28
That's my little test prog: paste.sr.ht/~patrickb/c336c2664351...53563b319b 13:30
Strange enough the value that the vararg function sees is not completely off, but only differs slightly. I.e. the pointer is 0x16bce7590 on the outside and 0x16bce7540 on the inside. 13:33
Anyone knows if calling vararg functions like normal functions is expected to work or if it's undef behavior that just happened to work? 13:35
[Coke] jdv- no, the confusion was that the command to create the tar file *fails* for me when used with 2025.03 13:37
but *worked* with 2025.030 (worked, but then created the wrong folder)
jdv what is going on over there:) 13:39
13:40 JimmyZhuo left
[Coke] I would like to schedule something a few weeks out where I can show you how the moarvm process from my standpoint so we can figure out why it's weird for me. 13:40
and it may just be "will not paying attention". :( 13:41
jdv sure 13:42
Nicholas Wierdly I don't know about ARM varags ABIs. But IIRC "we" discovered that the x86_64 ABI for varargs differs from the ABI for fix arg counts. IIRC it was that for varargs one of the CPU registers is popluated with the value "number of arguments", but for fixed arg count functions that register is any old garbage. After all, the callee knows the difference 13:44
result - casting a varargs function (eg printf) to a pointer to a function that takes exactly one char * arguments
and then using tha tfunction pointer somewhere else
and kaboomy
busy with (other) meetings - can't really fill in further 13:46
other than "these seem to be bad cheating assumptions and they will catch you out later"
patrickb Nicholas: That's valuable information. So even on x64 we only managed to do it out of sheer luck. The only way forward then would be to put vararg support into Moar / NativeCall. Ugh. 14:09
Nicholas sorry, seems that I didn't document all the details back then: github.com/Perl/perl5/commit/ceab7...7540fe14f1 14:27
15:16 sena_kun left, sena_kun joined 15:25 sena_kun left 15:26 sena_kun joined 15:33 sena_kun left, sena_kun joined
patrickb For vararg support, NativeCall will need to know the types of all the args that are passed. Since the signature doesn't tell for the variadic args, there needs to be some other way. I figure we want to explicitly specify the type when calling. Could an annotation on the capture work? 15:36
Also is there any potential in automatically determining the C type based on the variable type passed in in Raku land? (always keeping the ability to specify the type explicitly) We should probably start with only explicit types as a first step. 15:38
15:46 vrurg left, vrurg joined 15:54 notable6 left, linkable6 left, shareable6 left, evalable6 left, tellable6 left, coverable6 left, unicodable6 left, nativecallable6 left, quotable6 left, greppable6 left, sourceable6 left, benchable6 left, bloatable6 left, releasable6 left, bisectable6 left, committable6 left
patrickb github.com/Raku/problem-solving/issues/473 15:55
15:56 coverable6 joined, bloatable6 joined, bloatable6 left, coverable6 left 15:59 nativecallable6 joined, committable6 joined, sourceable6 joined 16:00 greppable6 joined, quotable6 joined, evalable6 joined, bisectable6 joined, tellable6 joined, coverable6 joined, unicodable6 joined, releasable6 joined 16:01 bloatable6 joined, shareable6 joined, linkable6 joined, notable6 joined, benchable6 joined 16:10 Altai-man joined, sena_kun left 16:14 Altai-man left 16:16 sena_kun joined 16:44 benchable6 left, unicodable6 left, bloatable6 left, bisectable6 left, evalable6 left, greppable6 left, releasable6 left, quotable6 left, tellable6 left, notable6 left, sourceable6 left, linkable6 left, nativecallable6 left, committable6 left, coverable6 left, shareable6 left 16:47 bloatable6 joined, greppable6 joined, bisectable6 joined, unicodable6 joined 16:48 notable6 joined, evalable6 joined, nativecallable6 joined, linkable6 joined, benchable6 joined, releasable6 joined, tellable6 joined, coverable6 joined 16:49 quotable6 joined, shareable6 joined, sourceable6 joined, committable6 joined 17:23 coverable6 left, shareable6 left, nativecallable6 left, committable6 left, greppable6 left, notable6 left, bisectable6 left, linkable6 left, quotable6 left, unicodable6 left, tellable6 left, bloatable6 left, releasable6 left, benchable6 left, evalable6 left, sourceable6 left 17:25 coverable6 joined 17:26 greppable6 joined, linkable6 joined, benchable6 joined, nativecallable6 joined, evalable6 joined, tellable6 joined, unicodable6 joined 17:27 releasable6 joined, shareable6 joined, committable6 joined, quotable6 joined, notable6 joined, shareable6 left, releasable6 left, coverable6 left, nativecallable6 left, committable6 left, benchable6 left, notable6 left, quotable6 left, evalable6 left, tellable6 left, linkable6 left, unicodable6 left, greppable6 left 17:30 greppable6 joined, quotable6 joined, bisectable6 joined 17:31 nativecallable6 joined, releasable6 joined, evalable6 joined, committable6 joined, sourceable6 joined, linkable6 joined, coverable6 joined 17:32 bloatable6 joined, shareable6 joined, benchable6 joined, unicodable6 joined, tellable6 joined 17:33 notable6 joined 17:35 greppable6 left, releasable6 left, notable6 left, unicodable6 left, linkable6 left, coverable6 left, committable6 left, evalable6 left, benchable6 left, bloatable6 left, nativecallable6 left, bisectable6 left, tellable6 left, shareable6 left, sourceable6 left, quotable6 left 17:38 greppable6 joined, releasable6 joined, unicodable6 joined, coverable6 joined 17:39 committable6 joined, evalable6 joined, shareable6 joined 17:40 quotable6 joined, notable6 joined, nativecallable6 joined, linkable6 joined, benchable6 joined 17:41 bloatable6 joined, sourceable6 joined, bisectable6 joined, sourceable6 left, nativecallable6 left, bloatable6 left, benchable6 left, quotable6 left, evalable6 left, coverable6 left, greppable6 left, bisectable6 left, committable6 left, notable6 left, shareable6 left, unicodable6 left, linkable6 left, releasable6 left 17:44 coverable6 joined, evalable6 joined, shareable6 joined, bisectable6 joined, benchable6 joined 17:45 tellable6 joined, releasable6 joined, notable6 joined, quotable6 joined, linkable6 joined 17:46 greppable6 joined, committable6 joined, unicodable6 joined, nativecallable6 joined, bloatable6 joined, sourceable6 joined 23:17 sena_kun left