🦋 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.
japhb Xliff: categorize by index mod 3? 00:09
Voldenet m: my $a = (^3).map({ [] }); for <a b c d e f g h i> { $a[$++ % $a.elems].push($_); } ; $a.say 00:56
camelia ([a d g] [b e h] [c f i])
Voldenet I'm not entiresly sure if it's idiomatic 00:57
tbrowder__ i can't see my msg, but i'm trying to dynamically load a module per the example in the docs but i'm getting a failure. hints welcome 01:08
SmokeMachine m: my (@a, @b, @c); for <a b c d e f g h I> -> $a, $b, $c { @a.push: $a; @b.push: $b; @c.push: $c }; say [:@a, :@b, :@c] 01:20
camelia [a => [a d g] b => [b e h] c => [c f I]]
SmokeMachine m: my (@a, @b, @c); for <a b c d e f g h I> -> $a, $b, $c { my @r = $a, $b, $c; (@a, @b, @c).map: *.push: @r.shift }; say [:@a, :@b, :@c] 01:28
camelia [a => [a d g] b => [b e h] c => [c f I]]
SmokeMachine my :(@a, @b, @c) := <a b c d e f g h i>.classify($++ % 3).values; say [:@a, :@b, :@c] 01:32
m: my :(@a, @b, @c) := <a b c d e f g h i>.classify($++ % 3).values; say [:@a, :@b, :@c]
camelia Cannot resolve caller classify-list(Hash[Any,Mu]:D: Int:D, List:D, :as(Callable)); none of these signatures matches:
(Hash: &test, \list, :&as, *%_)
(Hash: %test, |c)
(Hash: @test, |c)
(Hash: &test, **@list, |c)
in block <u…
SmokeMachine my :(@a, @b, @c) := <a b c d e f g h i>.classify({ $++ % 3}).values; say [:@a, :@b, :@c]
evalable6 [a => [c f i] b => [a d g] c => [b e h]]
Voldenet the output is somewhat… weird 01:33
SmokeMachine Xliff: 👆
Voldenet >b => [a d g]
where in the previous examples it was a
SmokeMachine Yes… very odd… just noticed
Voldenet doesn't classify guarantee order?
Voldenet Ah, that's because classify is implemented with hash 01:34
Voldenet so obviously it doesn't 01:34
SmokeMachine my :(@a, @b, @c) := <a b c d e f g h i>.classify({ $++ % 3}).values.sort: *.head; say [:@a, :@b, :@c] 01:35
evalable6 [a => [a d g] b => [b e h] c => [c f i]]
SmokeMachine m: say [].classify-list: <a b c d e f g h i>, {$++ % 3} 01:37
camelia No such method 'classify-list' for invocant of type 'Array'
in block <unit> at <tmp> line 1
SmokeMachine Hash-like only… :( 01:38
Xliff SmokeMachine: Odd. That does work, but it loses points for hash disorder! :) 02:00
SmokeMachine++! # Gives me something else to work with
tbrowder__ i'm going to try using a dynamic env var def of RAKULIB 02:06
Xliff My Raku Fu now stands at: 1,110,875 lines of code. 02:16
ponycat :O 08:20
tbrowder__ quib: thnx. looking at my current display i do NOT see multiple channels. 12:28
what i do see now are two networks: "IRCCloud" and "Libera.Chat" 12:31
and i have 12:32
tbrowder__ *and i have forgotten (never really understoof) how they are supposed to work together 12:33
afk& 12:34