🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:02 reportable6 left 00:06 Arathorn joined 00:09 jmcgnh joined 00:23 monkey_ joined 00:33 Skarsnik left 00:47 lembark joined 00:57 getimiskon left 01:05 reportable6 joined 01:55 monkey_ left 02:18 [Coke] left 02:19 [Coke] joined
SmokeMachine m: use Test; my $*a = 42; react whenever Promise.in: 1 { await start { is $*a, 42 } } # should this work? 02:21
camelia not ok 1 -
# Failed test at <tmp> line 1
# expected: '42'
# got: (Failure)
SmokeMachine m: use Test; my $*a = 42; react whenever Promise.in: 1 { is $*a, 42 } 02:22
camelia ok 1 -
SmokeMachine m: use Test; my $*a = 42; await start { is $*a, 42 } 02:23
camelia ok 1 -
SmokeMachine why it's ok with whenever, it's on on a Promise but when doing both that breaks?
Voldenet m: my $b; my $*a = 42; react whenever Promise.in: 1 { await start { $b = $*a } }; 02:28
rip 02:29
camelia (timeout)
Voldenet when you don't do this assignment, however 02:30
m: my $b; my $*a = 42; react whenever Promise.in: 1 { await start { } };
camelia ( no output )
SmokeMachine m: my $*a = 42; react whenever Promise.in: 1 { await start { say $*a } }; 02:31
camelia A react block:
in block <unit> at <tmp> line 1

Died because of the exception:
An operation first awaited:
in block at <tmp> line 1

Died with the exception:
Dynamic variable $*a not found
in block …
02:32
SmokeMachine m: my $a = 42; react whenever Promise.in: 1 { await start { say $a } }; # not dyn
camelia 42
Voldenet m: use Test; my $*a = 42; await start { await start { is $*a, 42 } }; 02:39
camelia not ok 1 -
# Failed test at <tmp> line 1
# expected: '42'
# got: (Failure)
Voldenet m: use Test; my $*a = 42; await start { is $*a, 42 };
camelia ok 1 -
SmokeMachine It seems a bug to me... does it seem a but to you, Voldenet ? 02:41
Voldenet I bet it can be explained, but it doesn't seem fine at all 02:42
SmokeMachine github.com/rakudo/rakudo/issues/4654 02:51
03:19 evalable6 left, linkable6 left 03:21 linkable6 joined 03:41 [Coke] left 04:02 [Coke] joined
[Coke] . 04:02
frost Hello all 04:10
The question is about zef, can I set DefaultCUR as a custom path in the config.json? 04:11
04:21 evalable6 joined 04:28 kjp left 04:31 kjp joined 05:31 bisectable6 left, greppable6 left, committable6 left, reportable6 left, sourceable6 left, quotable6 left, shareable6 left, coverable6 left, releasable6 left, unicodable6 left, squashable6 left, statisfiable6 left, tellable6 left, benchable6 left, nativecallable6 left, linkable6 left, notable6 left, bloatable6 left, evalable6 left 05:32 releasable6 joined, quotable6 joined, tellable6 joined, bloatable6 joined 05:33 greppable6 joined, linkable6 joined 05:34 reportable6 joined, notable6 joined, benchable6 joined 06:01 small_petit joined 06:02 small_petit left, reportable6 left 06:12 dogbert12 joined 06:32 nativecallable6 joined 06:33 coverable6 joined 06:34 shareable6 joined 06:36 andrzejku joined 07:03 reportable6 joined 07:25 seednode left 07:26 seednode joined 07:29 Xliff joined 07:33 sourceable6 joined 07:34 committable6 joined 08:30 Sgeo left 08:33 evalable6 joined 08:44 lizmat_ joined 08:45 RakuIRCLogger left, Geth left 08:46 lizmat left 09:33 bisectable6 joined 09:34 squashable6 joined, unicodable6 joined 10:00 nebuchad` is now known as nebuchadnezzar 10:08 andrzejku left
Voldenet m: use Test; my $*a = 42; await start { await start { is $*a, 42 } }; 10:22
camelia not ok 1 -
# Failed test at <tmp> line 1
# expected: '42'
# got: (Failure)
Voldenet m: $*SCHEDULER = CurrentThreadScheduler; use Test; my $*a = 42; await start { await start { is $*a, 42 } };
camelia ok 1 -
10:34 statisfiable6 joined 10:36 lizmat_ left, TempIRCLogger joined 10:42 Xliff_ joined
Xliff_ Here's a sample of what you can now do with Raku. Please note the full script for this example on the right. 10:43
vimeo.com/650780944
Thank YOU, #rakyu
:P # raku
github.com/Xliff/p6-GEGL 10:44
timo "Video is not rated. Log in to watch." :\ 10:46
vimeo forgot what video i wanted to watch when i created an account with "sign in with google" 10:47
Xliff_ LOL 10:48
Let me see if I can rate it.
timo the slow / abrupt movement of the grid makes it look like it's stuttering :D 10:49
Xliff_ Yeah. Interpolation is float, but the property is int. 10:50
timo just hvae the grid twice and fade opacity between one step and the next perhaps :D 10:52
Xliff_ Perhaps. That is a whole different level of complexity.
Probably be easier to modify gegl:grid to use a float.
Then again... probably not 10:53
timo couldn't really read the code on the video, so no clue how gegl actually works 10:54
Xliff_ github.com/Xliff/p6-GEGL/blob/main/t/spiral.t 10:56
timo ha, that wasn't there when last i looked :D
phogg Should probably link to the source in the description (or a comment) 10:58
Xliff_ timo: Good idea. Busy fixing a snack. Will add that when I'm done. 11:06
You can get an operation list, here: gegl.org/operations/
11:30 _Xliff joined
_Xliff vimeo.com/650787185 11:31
This one is rated, so should be viewable without a login.
timo the fractal zoomer is just a node implemented inside of gegl itself? 11:38
_Xliff Yes. 11:40
Actually, it's a fully functional explorer. 11:41
Have to work on getting better colors out of it, though.
timo so gegl has a concept of user input as well? 11:48
_Xliff Hmmm... what do you mean? 11:53
timo like, i imagine a fully functional explorer you'd control with the mouse or something? 11:55
_Xliff Yes. You can accomplish that using GTK.
There's a project out there called GEGL-Gtk. It's written for GTK2, but shouldn't be hard to convert to GTK3. 11:56
I'm pretty sure there's an easier route, though.
timo ah, ok
_Xliff It's all GLib
timo how easy is it to hook a gegl renderer up to SDL's windowing and opengl/vulkan context management? 11:57
_Xliff gitlab.gnome.org/GNOME/gegl-gtk
Don't know. Haven't looked that far yet. Project is only 10 days old. :)
gegl.org/operations/gegl-sdl2-display.html 11:58
timo oh that's fun 12:00
_Xliff =)
timo looks like it takes control of the window completely or something like that?
_Xliff Actually, I think it just controls the content. SDL still controls the window. 12:01
timo right, i meant more like you can't pass something from SDL to use or get the thing from gegl to use your own sdl stuff with?
not that important :)
12:02 reportable6 left
_Xliff Actually, you should be able tgo. 12:02
You'd use the SDL buffer as an input. 12:03
gegl.org/operations/gegl-load.html 12:04
gegl.org/operations/gegl-pixbuf.html
gegl.org/operations/gegl-buffer-source.html 12:05
So convert SDL buffer to one of those and you should be good.
Set your chain up to do processing in the middle and then output to gegl:sdl2-display 12:06
Yet another way to do user input, too.
Let SDL handle it. ;)
timo: Mind taking a gander at github.com/rakudo/rakudo/issues/4655? 12:07
nine is working on it, but more eyes couldn't hurt. That's the last thing killing the weekly timings since new-disp landed. 12:08
timo don't really have the opportunity to try to reproduce it, but when nine catches it in the rr, i shall have a look or two
gfldex lolibloggedalittle: gfldex.wordpress.com/2021/11/28/leaky-rakudo/ 12:09
timo oh, gfldex, if you had zstd available at moarvm build time, you'll be using the newer heap snapshot format that's already compressed 12:10
you can see which format it is from the first 16 bytes of the file 12:13
_Xliff What is `rr`? Rakudo Repository? 12:16
timo rr is mozilla's time traveling debugger / recorder and replay tool 12:17
i've been the one who keeps shouting "have you tried rr" for perhaps a year or so :P 12:18
_Xliff Huh. Is it easy to set up? 12:27
frost To be honest, I'm confused about the zef config😫 12:37
in the README file, it said that the config.json in  $*HOME/.zef/config.json will override the default config.json 12:39
Most cases
actually, that path is not working 12:40
The right path is $*HOME/.config/zef/config.json 12:41
Xliff README might need updating.
You'll have to ask ugexe about that. 12:42
frost Yeah
I think so
Xliff weekly: vimeo.com/650780944, vimeo.com/650787185, github.com/p6-GEGL
notable6 Xliff, Noted! (weekly)
timo if you don't run into any trouble, it's trivial to set up 12:43
`rr record raku -e 'say "hi"'`, then `rr replay`
you land in a regular old gdb but now commands like "reverse-step", "reverse-continue" etc work
Xliff Huh... OK 12:44
timo also compatible with that browser-based gdb frontend, gdbgui i think it's called?
nine timo: I think you've advertised rr a lot longer than just a year ;) And good thing you did that, too 13:00
timo time is relative, especially when you rr
13:01 MoC joined
gfldex timo: Am I looking for "MoarHeapDumpv002"? 13:02
timo ok that format will benefit from compression, and also be slower to load in the heap dump explorer 13:04
13:17 MoC left 13:18 Skarsnik joined 14:03 andinus left 14:05 reportable6 joined 14:13 dextercd joined 14:30 Xliff left 14:46 Xliff joined 14:53 _Xliff left
qorg11 will there ever be a fork() function in raku? 15:08
tbrowder or goto (pls) 15:09
ah, well, getting along without it so far ;-D 15:10
qorg11 I don't usually use goto
tbrowder i see need for it less and less since i don't have it. forgetting fortran was easy! 15:11
qorg11 Well, you can call fork() using NativeCall 15:20
`sub fork( --> int32) is native("c",v6) {*}`
Skarsnik hm, still no luck getting moar with debug symbols :( 15:23
goto is useful (for me) to replace exception or when you have some clean up to do before exiting a function. The last part you can probably do with the LEAVE phaser or don't worry at all since you don't have to free memory 15:24
Xliff Skarsnik: Are you using --moar-option="--debug" when you invoke Configuree.pl? 15:29
s/eee/
Skarsnik yes
Xliff Huh.
Skarsnik perl Configure.pl --gen-moar --moar-option='--optimize=0 --debug=3 -g' --gen-nqp --backends=moar --prefix=/home/skarsnik/raku/ && make && make install 15:33
ugexe qorg11: there is nqp::fork() although unless you really know whats going on internally re threadpool, mutxes, etc you're going have a bad time 15:34
Xliff Skarsnik: Try with just --debug 15:43
Skarsnik I think that never rebuild moar actually 15:44
Xliff Sounds about right.
--force-rebuild
./Configure.pl --gen-moar --force-rebuild --moar-option="--debug" # Works for me.... ymv
s/ymv/ymmv/ 15:45
Skarsnik aaah 15:51
finall xD
15:51 monkey_ joined
Skarsnik gist.github.com/Skarsnik/611d0211f...7c430da149 15:54
nine Skarsnik: What does `p *key` say? 16:19
Skarsnik (gdb) p *key 16:23
$1 = {common = {header = {sc_forward_u = {forwarder = 0x0, sc = {sc_idx = 0, idx = 0}, st = 0x0}, owner = 0,
flags1 = 0 '\000', flags2 = 0 '\000', size = 0}, st = 0x0}, body = {storage = {blob_32 = 0x0, blob_ascii = 0x0,
blob_8 = 0x0, strands = 0x0, any = 0x0}, storage_type = 0, num_strands = 0, num_graphs = 0,
cached_hash_code = 0}}
(gdb) 16:24
This code is annoying, it does not always merge everything :( (sometime it merge 1 struct and sometime 2} 16:25
when it does not crash x)
nine That's a lot of 0es for a string 16:28
Skarsnik I think it try to use a deleted key (that why I need to test for ~~ Struct since I got Any when it's something I removed) 16:30
16:32 monkey_ left
nine That alone doesn't explain it. MoarVM is not allowed to segfault just because you're trying to access a deleted hash entry. 16:36
Skarsnik I pushed the code on github.com/Skarsnik/gptrixie. I am using the MQTTProperties.h from github.com/eclipse/paho.mqtt.c .Just run gptrixie like this for example gptrixie --structs --castxml=c99 tmp/paho.mqtt.c/src/MQTTProperties.h 16:38
Time to do something else x)
17:09 Xliff left 17:30 Sgeo joined 17:32 Xliff joined 18:02 reportable6 left 18:03 monkey_ joined 18:05 reportable6 joined 18:43 discord-raku-bot left 19:03 Ergo444 joined
Ergo444 m: say now;say ^1000000 .race.grep(*.is-prime) .elems;say now 19:03
camelia Instant:1638126262.303614874
78498
Instant:1638126263.255051417
Ergo444 m: say now;say ^1000000 .grep(*.is-prime) .elems;say now 19:04
camelia Instant:1638126281.673599486
78498
Instant:1638126282.05227383
Ergo444 m: $t= now;say ^1000000 .grep(*.is-prime) .elems;say now-$t
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$t' is not declared
at <tmp>:1
------> 3<BOL>7⏏5$t= now;say ^1000000 .grep(*.is-prime)
Ergo444 m: my $t= now;say ^1000000 .grep(*.is-prime) .elems;say now-$t 19:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
now used at line 1. Did you mean 'HOW', 'not'?
Ergo444 m: my $t= now();say ^1000000 .grep(*.is-prime) .elems;say now()-$t
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
now used at line 1. Did you mean 'not', 'HOW'?
Ergo444 m: my $t= now.Int;say ^1000000 .grep(*.is-prime) .elems;say now.Int-$t 19:06
camelia 78498
0
Ergo444 m: my $t= now.Num;say ^1000000 .grep(*.is-prime) .elems;say now.Num-$t
camelia 78498
0.3817102909088135
Ergo444 m: my $t= now.Num;say ^1000000 .race .grep(*.is-prime) .elems;say now.Num-$t 19:07
camelia 78498
0.6764755249023438
19:08 discord-raku-bot joined 19:17 discord-raku-bot left, discord-raku-bot joined 19:22 discord-raku-bot left 19:30 discord-raku-bot joined
gfldex m: say ^1000000 .race .grep(*.is-prime) .elems; say now - BEGIN now; 19:40
camelia 78498
0.893027857
gfldex Ergo444: ^^^ we got phasers for that 19:41
20:23 Xliff_ left 20:26 A26F64 joined
xinming releasable6: status 20:47
releasable6 xinming, Next release in ≈5 days and ≈22 hours. 4 blockers. Changelog for this release was not started yet
xinming, Details: gist.github.com/e83d7e1f4be2e33b2e...418dc02eb0
21:22 patrickb joined, monkey_ left
patrickb qorg11: There is a blog post about Form in Rakudo: brrt-to-the-future.blogspot.com/201...2.html?m=1 21:23
tellable6 2021-11-27T03:43:46Z #raku-dev <andinus> patrickb: ah i see, then i should be able to manage releases after this december's release
21:26 patrickb left 21:42 A26F64 left 21:43 patrickb joined, patrickb left
SmokeMachine Are there still available slots for the advent calendar? 22:03
[Coke] github.com/Raku/advent/blob/master...authors.md 22:06
Looks like, yes.
I can add an entry for you if you like.
SmokeMachine I’m still not sure if I’ll have enough time to finish my post… :( 22:16
[Coke] I will add you as a potential-don't-count-on-me so someone can find you later to ask, OK? 22:25
... nevermind, that's too much pressure. 22:26
japhb Xliff: You probably figured this out in the ensuing two days, but if not ... For the Mandelbrot coordinates I posted, I believe to convert for the GEGL explorer: real -> x, imaginary -> y 22:39
22:43 evalable6 left, linkable6 left
SmokeMachine [Coke]: I think I’m almost finishing it… but I’ll really need someone to review/price read it… my English is already not good and I’m writing that on my cellphone. So it will probably be even worse… 22:44
22:44 evalable6 joined
gfldex SmokeMachine: Neither is my English. Yet, I never got hurt by hitting the publish button. They make those from extra soft rubber. :) 22:46
I would go so far to say: A good post in bad English is better then a bad post is good English. 22:48
SmokeMachine What about a bad post in bad English? 22:52
timo if you abandon your post i will have your cord mashalled 22:57
moon-child SmokeMachine: only way to make anything better is practice 23:04
if you make a bad post in bad english, the next post you write will be better and better written
SmokeMachine I’ve already done 2 other bad posts in bad English for advent calendar… this one should be going a bit better… but it seems not to be the case… :( 23:06
23:22 Ergo444 left
SmokeMachine I think it’s done… would someone one like to review/prof read? 23:22
23:23 djerius left 23:24 djerius joined
Xliff japhb: Did you try it out? 23:37
23:46 linkable6 joined 23:54 Skarsnik left 23:57 monkey_ joined