🦋 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:28
hulk joined
|
|||
lucs | Uh, which routines or operators should I be looking at to transform: | 01:29 | |
<a b c d e f ...> into <a-b c-d e-f ...> | |||
01:30
kylese left
|
|||
ugexe | m: say <a b c d e f g>.rotor(2, :partial).tree(*.join(" "), *.join("-")) | 01:44 | |
camelia | a-b c-d e-f g | ||
lucs | Oh wow, perfect. | 01:45 | |
Thanks! | |||
ugexe | m: say <a b c d e f g>.rotor(2, :partial).tree(*.item, *.join("-")) | 01:51 | |
camelia | (a-b c-d e-f g) | ||
ugexe | m: say <a b c d e f g>.rotor(2, :partial).tree(2).map(*.join("-")) | 01:53 | |
camelia | (a-b c-d e-f g) | ||
ugexe | that is probably the better way | ||
er the tree isn't needed at all i suppose | 01:54 | ||
m: say <a b c d e f g>.rotor(2, :partial).map(*.join("-")) | 01:55 | ||
camelia | (a-b c-d e-f g) | ||
lucs | Yeah, guess not. Thanks for exploring for me :) | 01:57 | |
02:03
wayland76 left
02:15
hulk left,
kylese joined
02:18
maylay left
02:31
Xliff_ left
02:32
xinming joined
02:38
maylay joined
03:41
kst left,
stanrifkin_ joined
03:44
stanrifkin left
04:15
guifa left
04:30
kylese left
04:34
kylese joined
04:48
xinming left
04:49
Guest96 joined
04:50
guifa joined
04:52
Guest96 left
05:30
kylese left
05:31
kylese joined
05:44
Aedil joined
06:35
Aedil left
06:39
Aedil joined
07:04
derpydoo joined
07:27
Aedil left
08:01
sena_kun joined
|
|||
grondilu | m: say (:foo) ~~ :(:$foo!) | 08:09 | |
camelia | False | ||
grondilu | m: say (:foo) ~~ :(:$foo) | 08:10 | |
camelia | False | ||
grondilu | oh, I need a list, right? | 08:11 | |
m: say (:foo,) ~~ :(:$foo!) | |||
camelia | True | ||
grondilu | m: say (:foo,) ~~ :(:$foo) | 08:12 | |
camelia | True | ||
grondilu | is there a nice way to specify :$foo where !* ? | ||
m: say (:foo,) ~~ :(:$foo where !*) | |||
camelia | False | ||
grondilu | m: say (:!foo,) ~~ :(:$foo where !*) | ||
camelia | True | ||
grondilu | I mean I guess that works but it's not as nead as :$foo! | 08:13 | |
*neat | |||
m: say (:!foo,) ~~ :(:$foo!) | 08:15 | ||
camelia | True | ||
grondilu | m: say (:!foo,) ~~ :(:$foo! where False) | ||
camelia | Potential difficulties: Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* instead at <tmp>:1 ------> say (:!foo,) ~~ :(:$foo! where <HERE>False) False |
||
09:25
lichtkind joined
09:33
abraxxa-home joined
10:58
abraxxa-home left
|
|||
Voldenet | m: say @(:foo) ~~ :(:$foo!) | 11:21 | |
camelia | True | ||
11:46
derpydoo left
|
|||
melezhik. | . | 12:23 | |
13:08
dg left
13:42
apac joined
14:31
apac left,
apa_c joined
|
|||
ugexe | m: say :($foo) ~~ :($foo!) | 14:35 | |
camelia | True | ||
ugexe | actually i guess you wouldn't want to do :($foo) | ||
15:01
Aedil joined
15:31
perias joined
|
|||
perias | hello | 15:31 | |
15:37
apa_c left
16:15
apa_c joined
16:39
sena_kun left
|
|||
grondilu | in the example for `whenever` in the docs, why are $bread-supplier and $vegetable-supplier not used directly as whenever arguments? Why instead $bread-supplier.Supply and $vegetable-supplier.Supply. They are already Supply instances, aren't they? | 16:49 | |
also in the doc example here docs.raku.org/language/statement-p...xes#react, the output seems to show everything happening in the same thread. This example looks odd. | 17:06 | ||
ah sorry my bad, several threads do show up. | 17:07 | ||
17:34
stanrifkin_ left
17:39
maylay left
|
|||
librasteve | hello | 17:59 | |
(perias) | |||
18:00
maylay joined
|
|||
grondilu: can you provide a link to the doc page --- really if you are happy that the .Supply is not needed - ie you ave tested the examp,e and it works without on recent raku, then why not make a PR for the docs site? | 18:01 | ||
18:03
perias left
18:07
Aedil left
|
|||
grondilu | docs.raku.org/language/concurrency#whenever | 18:10 | |
librasteve | grondilu: tx fof the link - you are right that the .Supply is not needed ... I suppose someone in the past decided that it was helpful to show explicitly the .Supply call for eductaional purposes - but whenever does no need it ... my preference would be to remove the .Supply since it is wasted typing so please do make that PR on the docs | 18:15 | |
18:16
apa_c left
18:32
MoC joined
18:33
stanrifkin joined
19:04
egeanll joined
|
|||
teases rakujourney.wordpress.com/2025/04/...llow-dive/ | 19:34 | ||
weekly: rakujourney.wordpress.com/2025/04/...llow-dive/ | |||
notable6 | librasteve, Noted! (weekly) | ||
19:45
MoC left
21:28
apac joined
21:47
egeanll left
21:51
sena_kun joined
22:22
sena_kun left
22:34
stanrifkin left
|