🦋 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.
jaguart anyone have any examples of Role introspection? 00:26
for example, the list of `does` that a Role will instroduce, or the list of Methods it will compose into a class?
MasterDuke m: say Encoding.^methods 03:54
camelia (name alternative-names encoder decoder)
MasterDuke but it's not 100% for all the built-in roles, (at least sometimes) due to chicken-and-egg problems with building the core 03:55
jaguart m: role R { multi method x () { say <x> } };R.^methods 04:23
camelia ( no output )
jaguart m: class R { multi method x () { say <x> } };R.^methods
camelia ( no output )
[Coke] you need a say 04:28
jaguart m: class R { multi method x () { say <x> } };.say for R.^methods
camelia x
BUILDALL
jaguart m: role R { multi method x () { say <x> } };.say for R.^methods
camelia ( no output )
MasterDuke m: role R { method x () { say <x> } }; .say for R.^methods 04:30
camelia x
MasterDuke huh
jaguart multi methods
works for classes but not for roles
m: role R { multi method x () { say <x> } }; .say for R.^candidates.map({ $_.^multi_methods_to_incorporate.map({.code}) })
camelia (x) 04:31
MasterDuke i wonder if that's specced...
might be worth a rakudo issue
but i am off to sleep
[Coke] day 21 has a typo: For this task, Raku has most of the funtions built-in, so nothing to be invented. 04:44
jaguart havent tracked it down, but $o.^method_table is sometimes returning a BOOTHash - any suggests for how to decode? 06:38
this is from $o.HOW.^name ===> Perl6::Metamodel::ClassHOW 06:41
jaguart ah: ``%m = `` converts a BOOTHash into a devland hash. 06:57
Ven_de_Thiel o/ 09:57
Nemokosch raku-advent.blog/2022/12/20/sigils/ by the way 14:15
why does number 2 repeat for all points made for sigils?
> 2. Sigils use semantically dense symbols
> 2. Sigils can be used quickly and easily
oh okay, not all, 3 comes after...
2, 2, 3 14:16
Anton Antonov It is most like just a type. 14:32
It is most like just a typo
Voldenet easter egg 14:37
jdv i saw 2 typos in it. it was quite long. surprised i got through it:) 14:59
but fun 15:00
Nemokosch respect for that. I pretty much gave up around the Raku part 😄 15:10
Anton Antonov Hmm.... Easter eggs are for Easter, right? Maybe some Christmas deers or snowflakes are more relevant... 15:12
Voldenet easter eggs are more fun-sounding 15:39
Anton Antonov @Voldenet Sure. ("Egg" sounds funny in many contexts.) I just uploaded a video with snowflake approximations: youtu.be/THNnofZEAn4 . 17:12
Voldenet wow, Jupyter::Kernel looks amazing 17:17
Anton Antonov Yeah! 🙂 It is very underutilized by the Raku community (in my opinion...) 17:23
Voldenet I didn't know it existed until now 17:25
btw, Chart::Gnuplot is also the alternative 17:26
I'm not sure if it would work with jupyter ootb 17:27
Anton Antonov @Voldenet Thanks for mentioning "Chart::Gnuplot" -- I did not encounter it when I was looking for charting / plotting options in Raku... 17:53
Voldenet the only pitfall is that Chart::Gnuplot brings its own version of gnuplot without pngcairo 18:00
Voldenet but it helps a lot still 18:00
Anton Antonov @Voldenet I think at some I point I tried to install those on my mac computer, without success. 18:50
Voldenet That makes sense, I use it on x86_64 debian 19:09
Anton Antonov Good to know! 19:16
[Coke] github.com/niner/Inline-Perl5/issues/181 - someone having trouble with I::P5 20:12
p6steve ++ Jupyter::Kernel 21:54
mybinder.org/v2/gh/p6steve/raku-Ph...pyter/HEAD 21:58
may need to give it a minute or so
MTree is quite seasonal 22:02
moritz libera does wallops messages for major releases of open source projects. Maybe we can get the newest rakudo version announced that way? 22:35
jaguart m: class C is rw { has $a is readonly; } 23:23
camelia Potential difficulties:
useless use of 'is readonly' on $!a
at <tmp>:1
------> class C is rw { has $a ⏏is readonly; }
jaguart As the class IS RW why is this useless?
oh - because private? 23:24
m: class C is rw { has $.a is readonly; }
camelia ( no output )
jaguart m: class C is rw { has $!a is readonly; }
camelia Potential difficulties:
useless use of 'is readonly' on $!a
at <tmp>:1
------> class C is rw { has $!a ⏏is readonly; }
jaguart though this doesn't really make sense because: 23:31
m: class C is rw { has $!a; }; .say for C.^attributes.map({ $_.name => $_.rw ?? 'read-write' !! 'readonly' })
camelia $!a => read-write
jaguart m: class C { has $!a; }; .say for C.^attributes.map({ $_.name => $_.rw ?? 'read-write' !! 'readonly' })
camelia $!a => readonly
jaguart m: class C is rw { has $!a is readonly; }; .say for C.^attributes.map({ $_.name => $_.rw ?? 'read-write' !! 'readonly' }) 23:32
camelia Potential difficulties:
useless use of 'is readonly' on $!a
at <tmp>:1
------> class C is rw { has $!a ⏏is readonly; }; .say for C.^attributes.
$!a => readonly