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:04 Kaipei left
stevied <@297037173541175296> I posted a question about this: stackoverflow.com/questions/750523...attributes 01:00
Nemokosch 🥁 01:06
02:56 rf joined 03:41 rf left 03:46 kjp joined 05:17 discord-raku-bot left 05:18 discord-raku-bot joined 05:47 Heptite left 06:48 samebchase joined 07:12 Kaipei joined 08:55 dakkar joined 10:10 Heptite joined 12:53 Kaipei left 13:08 Kaipei joined
stevied anyone know of any Raku modules that store a user's data in a config directory similar to what this old perl module does: metacpan.org/release/ADAMK/File-Us...rConfig.pm 14:15
lizmat raku.land/?q=config has a list I think 14:25
dakkar modules.raku.org/dist/XDG::BaseDir...athanstowe this one follows the correct standards under Linux 14:33
stevied ok, thanks. will check it out 14:41
14:44 discord-raku-bot left, discord-raku-bot joined
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/01/09/2023-...ofeatures/ 14:59
15:45 guifa joined 15:47 guifa_ left 15:49 jgaz joined 16:09 NemokoschKiwi joined 16:10 NemokoschKiwi left 17:34 dakkar left 19:31 Kaipei left 19:32 rf joined 19:42 Kaiepi joined 21:29 NemokoschKiwi joined 21:43 NemokoschKiwi left 22:03 jgaz left
yabobay i have an array that's something like this: 23:07
<a b b b b z b b b b x b b b b>
after every four b's, there's some trash information i want to throw away
is there some function that deletes every nth element of an array?
lizmat the "a" is *not* garbage? 23:08
yabobay *before every four b's 23:09
the a is also garbage
lizmat maybe something with .rotor? 23:12
m: say <a b b b b z b b b b x b b b b>.rotor(1,4)
camelia ((a) (b b b b) (z) (b b b b) (x) (b b b b))
yabobay thank u, but then how do i remove the (a) and the (z) and the (b) 23:13
i could do it right now, but i'm thinking of some stuff i can chuck onto the end of the line i already have
lizmat m: say <a b b b b z b b b b x b b b b>.rotor(1,4).map: -> $bad, @good { |@good } 23:14
camelia (b b b b b b b b b b b b)
lizmat the |@good is slipping all of the good values into a single list 23:16
yabobay that works pretty snazzy, thank you 23:17
i still can't figure out what slipping does. like, i get kind of what it's used for, but i don't know what sort of black magic is used to get that result 23:20
Nemokosch should we look it up?
yabobay i did, and it's just the usual arcane mutterings of raku 23:21
Nemokosch where did you find it? 23:22
yabobay docs.raku.org/type/Slip
like, ok, i understand its behaviour. that's what the docs are for.
but i don't know the logic behind what it is
Nemokosch I mean, should we look up the sources? 23:23
yabobay ohh
maybe
how?
23:23 Kaiepi left
Nemokosch I'm hoping that this would be implemented in the core and some guesses could take us really close to it 23:24
tbh I might have been a little optimistic xD 23:29
anyway, I'd like to share my thinking pattern, maybe that can also help, either me or someone else... 23:30
yabobay sure 23:31
Nemokosch so first it would be good to figure out what "containers" support slips
what is somewhat worrying that I seem to vaguely recall something with X and Z with regards to slips, they didn't support them or something 23:32
which implies there might be a hack on top of the data structures
a Seq taken from map definitely supports Slips 23:33
so atm I'm checking Iterable
no avail 23:35
well, then let's try to see what a map does 23:37
yabobay on second thought, "black magic" is a good enough answer for me 23:38
Nemokosch Too bad, I got curious xD
yabobay if u figure something out u can tell me but chances are it's gonna go over my head
Nemokosch looking up what gets called when you do `map *.Slip, (1, 2, 3)` is simple with CoreHackers::Sourcery 23:39
github.com/rakudo/rakudo/blob/2022....pm6#L2619
this monster-file is suspicious the least to say 23:40
github.com/rakudo/rakudo/blob/704a...s.pm6#L913 dispatches to this I suppose? 23:51
rf Does anyone know how you can nicely format Raku dates to the HTTP date spec, I am doing a bunch of garbage to do it but I feel like there is a much better way to do it. 23:53
Thu, 31 Oct 2021 07:28:00 GMT (the spec)
Nemokosch do you maybe know the name of this specification
rf No. 23:54
GMT? 23:55
yabobay GMT is the time zone
23:57 ToddAndMargo joined
rf When it comes to dates and times I've always been at a loss :L 23:57
ToddAndMargo how do I wrire in binary mode?
   my $Handle = open "$WanIpFileName", :rw, :bin;
   $Handle.print( $MyScrambleStr );
   $Handle.close;
 Cannot do 'print' on a handle in binary mode 23:58