This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
Dr.Doom (([X]((s..nd).grep(*.is-prime) xx k)).map({[*] $_}).grep(s <= * <= nd)) ==> {$_.grep(* > 15)}(); 04:44
this last grep isnt working for me any ideas why ?
05:30 CIAvash joined 09:43 cleo left 09:54 cleo joined 11:28 Manifest0 joined 11:42 teatwo joined 11:46 teatime left 12:04 teatwo left, teatwo joined 12:21 CIAvash left 12:29 tea3po joined 12:32 teatwo left 14:47 inquinn joined 15:19 inquinn left 19:02 Tirifto left 19:04 Tirifto joined
rcmlz some of the modules on have a download counter badge, some do not. What is required to get such a counter? For instance that one has a download counter, and that one does not Thank you for your hints. 19:21
lizmat reposted on 19:44
.vushu Hi I'm doing some bindings with native call for a c-library. The binding expect a callback function which get triggered in c-land. Everything compiles fine, but in runtime I get this following error: MoarVM panic: native callback ran on thread (some-thread-id) unknown to MoarVM Is there a workaround for this? 20:20
lizmat I seem to recall GTK::Simple module needing that, it had a dedicated threadpoolscheduler to allow GTK to run on its own threads 20:24
.vushu somewhere here? 20:27
Im not sure how it works :d
lizmat doesn't know either off-hand 20:29
tonyo .vushu i think that happens if the function signature doesn't quite match, there's some examples in the ecosystem. i'll see if i can find one 20:44
.vushu: 20:45
.vushu Thanks I will try to take a look 🙂 20:46
tonyo eg int32 v int64 or uint/int mismatches 21:04
.vushu Here is what I did this is the c function I want to bind: typedef void (*AudioCallback)(void *bufferData, unsigned int frames); RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); translating this to raku : our sub set-audio-stream-callback (AudioStream $stream, &audio-callback (Pointer[void] $bufferData, int32 $frames)) is export is native(LIBRAYLIB) is 21:31
symbol('SetAudioStreamCallback_pointerized'){ * } I pointerized the function since it takes a value type: void SetAudioStreamCallback_pointerized(AudioStream* stream, AudioCallback callback){ SetAudioStreamCallback(*stream, callback); }
when calling I do this: sub audio-callback(Pointer $buf, int32 $frames) { say "Show me something"; } # my $audio set-audio-stream-callback($audio-stream, &audio-callback); 21:32
which gives me the error
Im not sure what I did wrong with the signatures. 21:34
21:46 inquinn joined 22:16 inquinn left 22:31 jgaz left 23:42 teatwo joined 23:43 teatwo left 23:45 tea3po left 23:47 inquinn joined