This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
00:08 Manifest0 left 01:19 inquinn left 01:33 inquinn joined 01:43 inquinn left 02:28 inquinn joined 02:33 inquinn left 04:05 hythm joined 06:11 hythm left 08:40 Manifest0 joined
ab5tract_ .vushu I was looking into raylib just last week, specifically at the GUI parts! I didn’t encounter any callbacks in what I adapted, but I also couldn’t get everything working as expected.. Anyway, dealing with callbacks between C and Raku is a bit complex. Hopefully the answer already exists in an ecosystem example. 08:45
I wonder what happens if you change Pointer[void] $bufferData to just Pointer $bufferData? 08:49
.vushu Hi again I have tried to just using Pointer, im still having the same issue 09:14
I am autogenerating all raylib.h bindings: here they are If you can spot what's wrong: 09:15
here are the generated pointerized wrapper : 09:16
ab5tract_ that’s pretty slick! 10:55
OOC, how are other parts of ray lib behaving? 10:58
Because these auto-generated thingies look good to me to be honest 10:59
ah, I think I see something.. isn’t $frames supposed to be unsigned? 11:03
unsigned int frames —> gets generated into —> int32 $frames 11:04
.vushu the other part of the library seems to work fine :), and other callbacks seems to work to. Thanks for pointing that out I did fix it for converting unsigned int to uint32, but still getting the error :cameliathink: 11:12
12:10 stanrifkin joined
ab5tract_ Very cool that the rest is working 12:46
Are you using `(Pointer, uint32)` or `(Pointer[void], uint32)`? 12:47
.vushu I tried both the result is sadly the same. 13:13
how would you translate this in raku, // Opaque structs declaration // NOTE: Actual structs are defined internally in raudio module typedef struct rAudioBuffer rAudioBuffer; typedef struct rAudioProcessor rAudioProcessor; // AudioStream, custom audio stream typedef struct AudioStream { rAudioBuffer *buffer; // Pointer to internal data used by the audio system rAudioProcessor *processor; // 13:39
Pointer to internal data processor, useful for audio effects unsigned int sampleRate; // Frequency (samples per second) unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported) unsigned int channels; // Number of channels (1-mono, 2-stereo, ...) } AudioStream; Im not sure how to translate an forward declared struct in c to raku
typedef struct rAudioBuffer rAudioBuffer; typedef struct rAudioProcessor rAudioProcessor; 13:40
ab5tract_ yeah, I saw those forward declared structs in the C code and was also baffled as to how they are supposed to be translated 14:13
samebchase When I try to install Linenoise, I get the error: 15:07
Enabled extracting backends [git path unzip] don't understand /tmp/.zef/1698592010.92934/1698592018.92934.4673.58247307469/182028fca2d81184bf6c6858d76c21be90e794b4.tar.gz
You may need to configure one of the following backends, or install its underlying software - [tar psunzip]
This is on OpenBSD by the way
don't remember having an issue with installing Linenoise through zef
I do have tar installed
stanrifkin Is it for the repl? 15:12
samebchase yes 15:13
stanrifkin same with readline? 15:14
samebchase let me try that 15:15
I get the same error 15:17
it's not able to handle .tar.gz files
I do have tar and gzip installed
, but tar is BSD tar and not GNU tar
stanrifkin the error says something about psunzip
maybe that is needed 15:18
or better first look at the manpage of tar 15:19
I can't image it doesn't support gzip 15:20
samebchase 15:39
it seems to be related to this
stanrifkin How did you install Raku? 15:46
samebchase rakubrew 15:50
the problem is that the difference between gnu tar and bsd tar
they require slightly different command line args
got zef working, will submit a patch later
to zef 15:51
stanrifkin yep, I only wanted to know if you have the newest version. OK.
samebchase stanrifkin: basically, we do `tar -t -f <tar.gz file.>` to show all the files in the archive, but on openbsd we need to do `tar -tz -f <tar.gz file>` the extra `-z` option needs to be added to specify it's a gzipped archive. 15:52
I have an interview tomorrow for which I am planning to use raku
for the hiring assignment
so getting my setup working
lizmat samebchase: good luck! keeping fingers crossed! 16:50
rantanplan the GNU Tar version also supports an explicit (but optional, as it appears) -z! :-) 18:05
18:05 rantanplan is now known as snonux 18:46 stanrifkin left 23:08 hythm joined 23:14 hythm left