This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:38 habere-et-disper left 01:32 habere-et-disper joined 02:15 habere-et-disper left 02:16 tea3po joined 02:18 teatwo left 02:19 tea3po left, tea3po joined 02:36 Ebudae left 02:39 Heptite joined 03:32 Heptite left 04:55 deoac left 07:03 frost left 07:28 tea3po left 07:30 teatime joined 09:00 habere-et-disper joined
habere-et-disper Does it make sense that `rotate` does not take a range ? 10:18
m: say 'h-gzud-ronjdm'.trans: 'a'..'z' => rotate 'a'..'z'
camelia No such method 'rotate' for invocant of type 'Range'
in block <unit> at <tmp> line 1
habere-et-disper m: say 'h-gzud-ronjdm'.trans: 'a'..'z' => rotate 'a'...'z'
camelia i-have-spoken
Nemokosch interestingly enough, rotate is not defined on Any 10:26
it's hard to say if it adds value to define rotate on Range in particular; the output won't be a range anyway, then why not just fetch the range 10:27
m: say 'h-gzud-ronjdm'.trans: 'a'..'z' => rotate list 'a'..'z' 10:28
Raku eval i-have-spoken
habere-et-disper In this instance I suppose I was expecting that identical constructs either side of the translate should behave similarly in that they are both understood/accepted. 10:38
Nemokosch mind you, rotate has nothing to do with trans 10:42
m: rotate 'a' .. 'z' 10:47
Raku eval Exit code: 1 No such method 'rotate' for invocant of type 'Range' in block <unit> at main.raku line 1
Nemokosch this is the failure, regardless sides, isn't it
habere-et-disper yup 11:01
Nemokosch Well, I can only say that both (i.e having to convert and having Range "do the right thing" on its own) can make sense; consistency would be good 11:11
Right now, most of List's interface is exposed via Any, providing you a fallback to .list as the value to use for the method calls 11:12
habere-et-disper (y) 11:14
Nemokosch I think this approach itself would be worth revising, BUT, if this is seen as the right thing, probably rotate shouldn't be an outcast and use the same logic
that would imply that rotate would work with Ranges because they have .list defined on them in a way that they enumerate the values covered by that range 11:15
habere-et-disper Here's a mathy fun one: 11:16
m: sub circumfix:<⌊ ⌋> ( $_ ) { .floor }; say ⌊12.3⌋;
camelia 12
11:26 Heptite joined
Nemokosch 😄 11:26
habere-et-disper It would be fun to see this like already supported superscripts, eg  3²³ 11:31
m: say 3²³
camelia 94143178827
11:39 Heptite left 12:19 habere-et-disper left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/05/08/2023-19-pakku/ 12:37
13:57 jgaz left 14:16 teatime left, teatime joined 14:18 kjp left 14:34 Heptite joined 15:10 kjp joined 15:49 guifa_ joined 15:50 guifa left 16:28 habere-et-disper joined 16:31 jgaz joined 17:59 human_blip left 18:00 human_blip joined 18:44 habere-et-disper left