🦋 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.
00:05 pierrot_ left 00:06 pierrot joined 00:13 jjido left
jdv ive used rakubrew and just straight. i think its just general cli/nix knowledge mostly? 00:19
maybe the default path couod be more hand holdy. it might be valuable. 00:20
[Coke]: you like doc stuff! ^ 00:21
01:13 librasteve_ left 01:38 kylese left, hulk joined 01:59 arkiuat left 02:12 arkiuat joined 02:15 hulk left, kylese joined 02:21 arkiuat left 02:41 arkiuat joined 03:16 deoac left 03:25 unicodable6 left 03:30 releasable6 left 03:31 releasable6 joined 03:35 sourceable6 left 03:40 linkable6 left 03:45 coverable6 left 03:46 kylese left 03:47 kylese joined 04:50 human-blip left 04:51 human-blip joined 04:57 Aedil joined 05:04 human-blip left 05:05 human-blip joined 05:39 human-blip left 05:41 human-blip joined 06:25 arkiuat left 06:55 Sgeo left 07:23 jjido joined 07:50 ACfromTX left 07:51 ACfromTX joined 07:55 Aedil left 07:56 Guest60 joined 08:15 jjido left 08:16 jjido joined 08:17 jjido left 08:22 Guest13 joined 08:23 Guest13 left 08:43 lichtkind joined 09:02 Guest60 left 09:13 apac joined 09:50 Aedil joined 10:24 wayland joined 10:25 committable6 left 10:40 notable6 left 11:08 apac left 12:25 evalable6 left 12:30 tellable6 left 12:31 tellable6 joined 13:34 apac joined 15:11 abraxxa-home joined 15:39 apac left 15:41 Sgeo joined 15:54 abraxxa-home left 16:00 jgaz left
[Coke] . 17:19
been a long week, skiping review here, feel free to clip any stuff I should look at, thanks. 17:20
tbrowder welcome back, [Coke], we did like yr presentation, and i admired yr glasses! 17:30
[Coke] got 'em from zenni, cheap and quite nice. 17:37
and thank you
17:43 guifa left 17:53 wayland76 joined, wayland left 18:05 arkiuat joined 19:29 arkiuat left 19:42 arkiuat joined 19:47 arkiuat left 20:01 arkiuat joined 20:05 arkiuat left
tbrowder are they progressive or bi or trifocal? 20:12
i need new ones and i need mostly 1.5 to 2.5 ft for reading 20:14
are yours the "geek chiv 20:17
chic black?
20:34 arkiuat joined 20:40 arkiuat left 20:50 lucerne left 20:51 lucerne joined 20:57 arkiuat joined, Aedil left 21:03 jjido joined 21:28 jjido left 21:31 cm left, cm joined
[Coke] progressives. 22:38
I should be able to use them everything but STILL find it's easier to take them off for very close cell phone stuff
22:46 lichtkind left
tbrowder which model did you get? my wife says they were NOT the geek-chic, but she likes them 22:59
on you
[Coke] one sec 23:00
www.zennioptical.com/p/acetate-pla...260/126016 23:03
23:05 wayland76 left 23:10 lizmat left 23:15 wayland76 joined
tbrowder thanks! 23:22
back to raku: what do y'all recommed as the easiest way (least amount of code) to pass the common set of named parameters (and their values, if any) from one calling routine to each of two other routines? 23:27
the other two may not be strictly multi subs. 23:29
Voldenet my fav way to do that is to use a class with args, not sure if it's short 23:38
m: sub one(:$x, :$y) { say ($x, $y) }; sub two (:$x, :$y) { one :$x, :$y }; two :3x, :4y # nothing clever version, just raw arg-passing
camelia (3 4)
Voldenet m: class A { has $.x; has $.y; }; sub one(A $a) { say ($a.x, $a.y) }; sub two (A $a) { one $a }; two A.new(:3x, :4y) # slightly longer, but only if your arguments are $x and $y 23:40
camelia (3 4)
Voldenet it depends what the common part is
m: sub one(:$x, :$y) { say ($x, $y) }; sub two (*%common) { one |%common }; two :3x, :4y # another version 23:41
camelia (3 4)
Voldenet m: sub one(:$x, :$y, :$z) { say ($x, $y, $z) }; sub two (*%common) { one |%common, :5z }; two :3x, :4y # allows adding args on top of it… 23:43
camelia (3 4 5)
Voldenet m: sub one(:$x, :$y, :$z) { say ($x, $y, $z) }; sub two (:$z, *%common) { one |%common }; two :3x, :4y, :6z # or deducing if you explicitly don't want to pass something
camelia (3 4 (Any))
Voldenet however `*%thing` feels difficult to maintain in the long run, class can have another validation and stuff like that on top of it 23:46
wayland76 Is there a nice way to go "for @array -> $item {}" but also access the array index in the loop? 23:50
timo you can @array.pairs to get a pair in your $item or $_, you can @array.kv and iterate two at a time 23:51
m: my @a = <a b c d>; for @a.kv -> $i, $item { say "$i is $item" }
camelia 0 is a
1 is b
2 is c
3 is d
Voldenet you can make the syntax shorter if you really want 23:53
m: sub bah(@x) { @x.kv.map( -> $k, $i { $i but $k }); }; my @a = <a b c d>; for @a.&bah -> $item { say $item; say $item.Int } 23:54
camelia a
0
b
1
c
2
d
3
Voldenet but the syntax with .kv is saner 23:55