🦋 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:02 nuno left
SmokeMachine lizmat: I’ve created 2 issues on ParaSeq, one asking if it could/should have a reduce parallel method and another to ask if it would make sense to head and tail (and any thing that returns an Seq, like skip) to return ParaSeq 01:02
[Coke] are pod comments stripped on compile or are they part of the $=pod? 01:07
(and does the answer change in RakuAST) 01:08
01:12 jpn joined 01:15 kylese left 01:16 kylese joined, jpn left 01:26 Chanakan left 02:15 kylese left, kylese joined 02:37 guifa joined 02:38 guifa left 02:49 Chanakan joined 04:16 merp left 04:21 merp joined 04:25 jpn joined 04:30 jpn left, wayland joined 04:31 wayland76 left 05:30 Sgeo left 05:32 jpn joined 06:13 jpn left 06:27 jpn joined 07:16 jpn left 08:33 sena_kun joined 08:58 sena_kun left 09:19 jpn joined 11:18 ACfromTX left 11:32 ACfromTX joined 11:38 ACfromTX left 11:39 MasterDuke left 11:49 ACfromTX joined 11:52 jpn left 12:08 jpn joined 12:16 jgaz left 14:06 avuserow_ left 14:07 avuserow_ joined 14:10 soverysour joined 14:13 soverysour left 14:55 Sgeo joined 16:00 jpn left 17:35 simcop2387 left, perlbot left 17:38 jpn joined 18:09 simcop2387 joined 18:10 perlbot joined 18:59 jpn left 19:44 eddd9087 joined 19:50 Xliff left 20:00 eddd9087 left
tbrowder .seen tyil 20:22
tellable6 tbrowder, I saw tyil 2021-06-20T16:51:00Z in #raku-dev: <tyil> that should be all of the (non-archived) docs
tbrowder has anyone tried using @tyil's Pod::To::Anything module? it looks very useful but it looks to me like it can't handle pod config hashes 20:24
it bombs when i try to feed it a pod chunk with a config entry 20:26
20:26 guifa joined 20:34 ACfromTX left
tbrowder arg, i don't think i'm using it correctly yet! 20:40
20:47 ACfromTX joined 20:56 jpn joined 21:46 sena_kun joined 21:57 bdju left 21:59 bdju joined 22:19 jpn left 22:28 bdju left, bdju joined
[Coke] .seen cfa 22:54
tellable6 [Coke], I saw cfa 2023-03-17T17:38:06Z in #raku: <cfa> m: say "u\x[0308]" ~~ /\x[0308]/
23:00 sena_kun left 23:04 kybr joined
kybr is there a reverse of the Z operator? 23:04
ab5tract not exactly, but.. 23:11
m: dd <a b c> Z=> <x y z>.reverse
camelia (:a("z"), :b("y"), :c("x")).Seq
ab5tract or
m: (<a b c> Z=> <x y z>).reverse 23:12
camelia ( no output )
ab5tract m: dd (<a b c> Z=> <x y z>).reverse
camelia (:c("z"), :b("y"), :a("x")).Seq
ab5tract kybr: does either of those spark for your use case? 23:13
Voldenet the question was probably how to turn 23:14
m: say <a b c> Z <x y z>
camelia ((a x) (b y) (c z))
Voldenet into (a b c) (x y z) back
kybr yes. that 23:19
Voldenet m: my $x = <a b c> Z <x y z>; say ($x.map(*[0]), $x.map(*[1])) 23:20
camelia WARNINGS for <tmp>:
Useless use of "Z" in expression "my $x = <a b c> Z <x y z>" in sink context (line 1)
Index out of range. Is: 1, should be in 0..0
in block <unit> at <tmp> line 1
Voldenet hm 23:21
m: my $x = eager <a b c> Z <x y z>; say ($x.map(*[0]), $x.map(*[1]))
camelia ((a b c) (x y z))
Voldenet that's not exactly an elegant solution
kybr thanks 23:23
Voldenet but it works at least
guifa m: multi sub V {@x } { @x.map(*.head), @x.map(*.tail) }; say V(<a b c> Z <x y z>) 23:29
camelia ===SORRY!=== Error while compiling <tmp>
Variable '@x' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> multi sub V {⏏@x } { @x.map(*.head), @x.map(*.tail) };
guifa m: multi sub V (@x ) { @x.map(*.head), @x.map(*.tail) }; say V(<a b c> Z <x y z>)
camelia ((a b c) (x y z))
ab5tract ah, sorry for misinterpreting the question. Voldenet++ and guifa++ 23:31
Voldenet good solution could probably iterate over both of those only once 23:36
m: multi sub V($x) { $x.map(*.head), $x.map(*.tail) }; say V(0..* Z 5..*) 23:37
camelia The iterator of this Seq is already in use/consumed by another Seq (you
might solve this by adding .cache on usages of the Seq, or by assigning
the Seq into an array)
in sub V at <tmp> line 1
in block <unit> at <tmp> line 1
antononcube @lizmat I will publish an English version tomorrow. 🙂 23:41
guifa Voldenet: I was thinking about that too, but I couldn't think of a functional way to do it. 23:43
obviously can just do
m: multi sub V(@x) { my @a; my @b; for @x -> ($a, $b) {push @a, $a; push @b, $b}; return @a.List, @b.List; }; say V(0..4 Z 5..9); 23:45
camelia ((0 1 2 3 4) (5 6 7 8 9))
guifa but that fails for the infinite
ah I guess it'd be creating an iterator and returning a sequence made from it 23:47
would be able to iterate them independently at least 23:48
Voldenet yeah, custom iterator is what I'd think of too 23:51
with a buffer for every sequence, and pull-one either using values from the buffer or advancing the inner iterator 23:54
doesn't sound like something fitting in one-liner