01:17 parv left 04:40 Flwyd joined
Flwyd What's the usual way to split a program across multiple files? E.g. foo.raku has `class Foo` and bar.raku has `class Bar` and the two classes can reference each other? 04:45
I've read the documentation on modules, packages, and compunits, and I don't _think_ I want to make a module for each class. 04:46
04:50 Kaiepi joined 05:26 sjn left, Flwyd left, qorg11 left, sivoais left, mjgardner left, tbrowder left, SmokeMachine left, hexology left, Util_ left, codesections left, CIAvash left, samebchase left 05:27 Flwyd joined, sivoais joined, qorg11 joined, hexology joined, sjn joined, Util_ joined, mjgardner joined, tbrowder joined, SmokeMachine joined, CIAvash joined, samebchase joined, codesections joined 05:50 samebchase left 08:04 riffraff joined
SmokeMachine Flwyd: usually you have 1 .raku file that can “import” other .rakumod files using `use` (docs.raku.org/language/modules#index-entry-use) 08:48
Flwyd: an example using 3 different files: glot.io/snippets/g4wdiwvfta 08:54
09:01 frost joined, frost left 09:13 dakkar joined 11:01 riffraff left 11:02 riffraff joined 11:11 riffraff left, riffraff joined 11:15 riffraff left 11:40 riffraff joined
Nemokosch is there a short way to transpose a two-dimensional array? 13:18
atroxaper Yes. andrewshitov.com/2019/09/09/how-to...in-perl-6/ 13:29
Nemokosch zip reduce 🤯 13:30
very clever, thank you
hm, wait 14:22
why does this work?
m: dd [1, 2] Z [3, 4] Z [5, 6]; 14:23
m: dd ([1, 2] Z [3, 4]) Z [5, 6]; 14:24
> sub infix:<Z>(**@lists --> Seq:D) is assoc<list> 14:25
is this because of the list associativity?
Hydrazer how can i fix string keys in hash? ```pl 14:32
my %hash{Int} = (3 => 5, 5 => 1, 6 => 4);
%hash = %hash.Hash.kv.map(-> $a, $b {$b => $a}).Hash;
say %hash
Type check failed in binding to parameter 'key'; expected Int but got Str ("5")
in block <unit> at file0.code line 2
hm seems to work if i declare a new hash then insert into that one 14:36
14:44 A26F64 joined
atroxaper => Operator makes left side be Str. = operator takes (in first line) takes a list from the right side (yes, it is list) and `convert` it to hash. But in second line you already have a hash on the right side and = operator do not convert it. If you change `.Hash` to `.List` in second line, it will work. 14:46
Change the trailing .Hash, of course. 14:48
Hydrazer can you check my gist in <#783746907225980958> im not sure why half the time it say ``` 14:50
Cannot look up attributes in a VMNull type object
in block <unit> at 2021/06/part_two.raku line 40
tried for an hour but i can't get consistent result 14:52
atroxaper What should I pass to 'get' ? 14:57
15:00 riffraff left, riffraff joined