This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
01:48 Dama joined 01:54 Dama left 02:38 human-blip left 02:39 human-blip joined 03:33 hythm joined 04:57 hythm left 05:12 CIAvash joined 05:59 gfldex left, gfldex joined 06:02 tea3po left 06:13 SmokeMachine left, SmokeMachine joined 06:19 CIAvash left 06:21 CIAvash joined 06:22 CIAvash left 08:18 lizmat_ left, lizmat joined 08:54 dakkar joined 08:57 jtza8 joined 08:59 samebchase left 09:01 samebchase joined
ab5tract .vushu installed the new raylib bindings. I think some signatures changed that weren’t supposed to.. `load-codepoints` worked fine before (at least, it didn’t explode and returned output), but I can’t figure out how to use it now (trouble creating Pointer[int32] objects). I can’t help but thinking that at least some of those pointers should really be CArray 09:06
Good news that it installed just fine on macOS! :D 09:07
09:30 camelia left
.vushu <ab5tract> good to know that it works on macos :), I will try to play around with the int pointers. 09:38
ab5tract here’s an example.. right now it’s broken but if you comment out the char point stuff and switch `image-text-ex` to `image-text`, it’s a working snowfall simulator 09:41
lizmat smiles at (0.1, 0.2, 0.2, 0.3, 0.3, 0.4)>>.Num 09:49
lizmat is looking forward to a screen shot of the result
ab5tract I think it’s technically fewer characters than adding `e0` to each number ;) 10:03
.vushu thanks <ab5tract> I will try it out 🙂 10:14
i think I know whats wrong 13:57
the load code point is missing is rw
for Pointer[int32] 13:58
14:06 jtza8 left
nvm it didn't solve it :d 14:50
ab5tract Is it also broken with CArray? 15:07
.vushu I think using pointers in raku isn't ergonomic this is how I got it working my $buf = Buf[int32].new(0); my $one-pointer = nativecast(Pointer[int32], $buf); my $text = "asdfsadfadsf"; my $code-point-a = load-codepoints($text, $one-pointer); say $one-pointer.deref; # 12 which is correct 15:47
btw it's nice the your blizzard simulator 🙂 15:52
ab5tract thanks! I’ve made a few tweaks since then, will probably make a few more. 16:22
.vushu I may be wrong but I believe you could also change back from `Pointer[int32]` to `int32 is rw` 16:36
At least in this case, for `load-codepoints`. For `load-font-ex` I think the answer is `CArray` (but I will shut up about that now :) ) 16:42
.vushu haha it’s fine I will play around with it and verify if thats the case 😅 17:12
17:31 dakkar left 17:43 MasterDuke left, kjp left, kjp joined 17:51 guifa_ left 17:52 guifa joined 18:43 KOTP left, KOTP joined 19:13 snonux left, snonux joined
Got it working I think 21:16
21:24 habere-et-disper joined
Turns out that I wasn't handling pointer return types properly Please update raylib-raku to version 0.0.11 my $buf = Buf[int32].new(0 xx 1); my $count = nativecast(Pointer[int32], $buf); my $text = "Ab5tract"; my Pointer[int32] $point = load-codepoints($text, $count); say $count.deref; # shows 8 my $snow-a = load-font-ex("resources/DotGothic16-Regular.ttf", 48, $point, $count.deref); 21:36
21:41 habere-et-disper left
ab5tract Cool! I will check this out :D 22:23
I’m about 2/3 of the way through implementing Tetris 22:24
22:27 jgaz left, jgaz joined
.vushu thats so cool 😄 22:33
please showcase the game when you are done 😁 22:42
ab5tract For sure. Was planning to PR it to raylib-raku as an example 23:22
likewise with the snowfall sim 23:23
23:37 kjp left 23:39 kjp joined
.vushu That would be a welcoming addition!😄 23:59