šŸ¦‹ Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
01:02 Sgeo joined 01:34 hulk joined, kylese left 01:48 MasterDuke joined 01:57 jgaz left 02:12 Aedil joined 02:15 hulk left, kylese joined 02:29 elcaro left 02:32 elcaro joined, elcaro left 02:34 elcaro joined, guifa joined 03:33 guifa left 05:30 Sgeo left 07:10 sena_kun joined 07:27 dawids joined 07:59 dakkar joined 08:02 xinming left 08:03 xinming joined 08:30 sena_kun left 09:18 dawids left 11:40 guifa joined 11:54 MasterDuke left 12:06 Sgeo joined, guifa left 12:25 jgaz joined
tbrowder wayland76: i'm very interested in your pod quest. if you are using some published module that extracts the pod nodes in an array of objects that **clearly** define pod **type**, **contents**, and any **children**, i would like to know its name. my problem with parsing $=pod has always been the recursive nature of pod nodes and having to recurse to the end before knowing how to handle a conversion to a PDF file. thanks for any 12:45
suggestions.
tellable6 tbrowder, I'll pass your message to wayland76
tbrowder my only idea to handle the situation is using arrays to push to until the end and then replay from the begining knowing more about the structure. 12:48
*beginning 12:50
afk& 12:54
[Coke] tbrowder: have you tried using the RakuAST parser instead? 13:14
github.com/Raku/doc/blob/main/xt/r...e.rakutest goes that route 13:16
14:43 xinming left 14:45 xinming joined 15:10 xinming left 15:11 xinming joined 15:42 MoC joined
tbrowder [Coke]: no, but thanks: thatā€™s a good idea, you may have mentioned that beforeā€¦and i forgot it ā˜¹ļø 15:58
ā€¦just lookedā€¦wow, iā€™m gonna use it very soon!! 16:01
i just emailed the link to myselfā€¦with a TODO labelā€”exciting! 16:04
16:28 derpydoo joined 16:36 dakkar left 16:58 MoC left 18:12 sena_kun joined
[Coke] wow, glad to hear. :) 19:25
I was very happy to start switching the raku/doc testing over to that instead of the original parser.
And I was able to combine 3-4 tests into a single test, making everything even faster. 19:26
19:36 teatime left, teatime joined 20:13 guifa joined 20:16 Aedil left 20:31 derpydoo left 21:34 sena_kun left 21:37 sena_kun joined 21:42 sena_kun left 21:45 Xliff joined
Xliff Hi Lowe! 21:46
Or would "Hifi, Lofi" be a better alternative? 21:47
I need to build a native call sub definition at runtime. Can anyone point me to prior art or a code snippet? 21:48
Mainly because I won't know the .so filename until then.
Hmmm... Odd. I think I've built this right like so... 22:06
22:06 guifa left
Xliff m: my &gst_spectrum_get_type = sub { * }; trait_mod:<is>(&gst_spectrum_get_type, native => "/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstspectrum.so"); trait_mod:<is>(&gst_spectrum_get_type, symbol => "gst_spectrum_get_type"); 22:06
camelia Use of Nil in string context
in block <unit> at <tmp> line 1
Use of Nil in string context
in block <unit> at <tmp> line 1
Can't use unknown trait 'is' -> 'native' in sub declaration.
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; my &gst_spectrum_get_type = sub { * }; trait_mod:<is>(&gst_spectrum_get_type, native => "/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstspectrum.so"); trait_mod:<is>(&gst_spectrum_get_type, symbol => "gst_spectrum_get_type"); 22:07
camelia ( no output )
Xliff However I get the following when I run it:
Cannot locate symbol 'gst_spectrum_get_type' in native library '/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstspectrum.so'
Even though I get the following from readelf:
54: 0000000000004a20 89 FUNC LOCAL DEFAULT 14 gst_spectrum_get_type 22:08
22:33 guifa joined 22:42 MasterDuke joined
timo Xliff: i think you can't use dlopen for "LOCAL" symbols 23:47
something fun i found today:
m: my Channel $updates .=new; start { react { whenever $updates { .say; LAST { say "update channel closed" } } } }; say "updates done hooray!" }; for ^ 10 { sleep 0.05; $updates.send(($ = "a")++); }; say "finished"; $updates.close; 23:50
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> ed" } } } }; say "updates done hooray!" ā}; for ^ 10 { sleep 0.05; $updates.send(
timo m: my Channel $updates .=new; start { react { whenever $updates { .say; LAST { say "update channel closed" } } }; say "updates done hooray!" }; for ^ 10 { sleep 0.05; $updates.send(($ = "a")++); }; say "finished"; $updates.close;
camelia a
a
a
a
a
a
a
a
a
a
finished
timo m: my Channel $updates .=new; my $ will leave { await $_ } = start { react { whenever $updates { .say; LAST { say "update channel closed" } } }; say "updates done hooray!" }; for ^ 10 { sleep 0.05; $updates.send(($ = "a")++); }; say "finished"; $updates.close;
camelia a
a
a
a
a
a
a
a
a
a
finished
update channel closed
updates done hooray!
timo ^- you can put the "await" in an anonymous variable's leave phaser so you don't have to keep it in a variable and put an explicit LEAVE block that refers to it, or to put an await at the end of your block (and take care if you use the last-statement-return-value semantics for something) 23:53