03:12 discord-raku-bot left, discord-raku-bot joined
stevied man, I'm loving how easy it is to create and upload modules. that alone is a good reason to switch to Raku 05:18
guifa stevied++ I saw your module on the weekly today! 05:56
09:10 dakkar joined
stevied heh, no kidding? can I collect a check now? 13:53
Nemokosch I'm also curious... which one was it? 14:18
lizmat raku.land/zef:sdondley/Mac::Applications::List I presime 14:19
Nemokosch wow 14:29
guifa stevied lizmat has an amazing weekly recap of all things Raku: rakudoweekly.blog/2022/01/10/2022-...-perching/ <-- at the bottom is yours, in the list of new/updated modules 14:40
14:48 MasterDuke left 14:52 qorg11 left 14:53 qorg11 joined 15:06 MasterDuke joined 15:10 jgaz joined 16:33 jgaz left 17:38 dakkar left
thowe Is there an env variable I can set that tells raku where to find libraries? Like PERL5LIB only for raku? 17:55
ah, duh, RAKULIB 17:56
a callback is just a sub passed to another sub as an argument? Why's everything have to have fancy nonsensical names? 18:48
guifa thowe welcome to the world of jargon 18:49
Generally, the idea is that a sub would have a way to "callback" into a scope it doesn't have access to otherwise 18:53
thowe so... With that in mind, are you supposed to pass it a closure? 18:55
I mane, not "supposed to" but is that part of the thinking of the name? 18:56
guifa In Raku, you can pass it anything that's Code. It really will depend on what the purpose of the callback is
they're most useful in asynchronous situations 18:57
thowe Yeah, I get that, I think. I was just trying to noodle out the origin of the name that I am now mad about as it made me feel like there was some deep shit I wasn't grasping.
stevied yeah, the Mac::Applications::List module. Just something simple to get my feet wet with Raku.
I'm going to use it as part of another Raku module I'm going to write for generating json for Karabiner
guifa for instance let's say in your code you have
thowe Like, when passing a block to map, is that the same kind of thing? 18:58
guifa Same-ish idea. you could almost write map as 18:59
sub map ( @array, &code) { code $_ for @array } 19:00
but map doesn't need to know anything about what code does
just that it takes a single argument (the real map is a bit more complicated, but you get the idea)
thowe "code $_ for @array" <- wha? 19:01
guifa m: my @array = 1, 2, 3; say $_ for @array;
camelia 1
thowe TMTOWTDI boogaloo 19:02
guifa $_ is called the topic in Raku 19:03
when you do for loops, it's set to the item being looped on, unless you specify a different name
m: my @array = 1,2,3; for @array { say $_ } 
camelia 1
thowe the for coming at the end gave me pause
guifa aaah
thowe I'm familiar with $_
guifa yes, Raku (and its Perl sister) allow postfixes for certain things 19:04
for, if, unless, while, etc, can all be used after a line of code
m: say "hi" if 2 > 0; say "bye" if 2 < 0;
camelia hi
guifa m: my $a = 0; say $a while $a++ < 3; 19:05
camelia 1
thowe the if at the end is something I am familiar with.
19:07 [Coke]_ joined
guifa The really cool thing with the for loop is the fact that topicalization means you can just .method call stuff 19:07
m: my @a = 1,2,3; .say for @a
camelia 1
19:10 [Coke] left
stevied anyone know what the "Mi" in App::Mi6 is? Module installer? 19:12
maybe minimal?
thowe guifa: it is the cool 19:31
20:22 zacts left 20:52 [Coke]_ left 20:55 [Coke] joined
Nemokosch Umm, I know I have asked this one 22:27
but how do you append Sequences to create one Sequence? 22:28
okay, found it 22:33
.map(&slip) probably does the trick still 😂 22:34
22:51 stevied joined