[02:33] *** floppy_disk joined [02:49] hi, how do you compare two hashes for equality? [03:07] *** andinus left [03:08] *** floppy_disk left [03:59] *** floppy_disk joined [04:39] *** zacts joined [04:53] *** zacts left [06:22] *** floppy_disk left [06:39] floppy_disk: using `eqv` or `~~` [06:50] I'm wondering if there is any pressing need to rewrite major perl modules in raku since you can just use Inline::Perl. Is there any advantage to using a pure Raku module over a Perl module? [06:55] *** discord-raku-bot left [06:55] *** discord-raku-bot joined [08:10] Apart from convenience, if the module can make use of Raku features and have an interface that suits Raku better [08:37] ok, thanks. I imagine most developers will not be eager to reinvent the wheel for a lot of the popular perl modules if they are perfectly usable in raku. [08:53] *** dakkar joined [08:56] *** Manifest0 joined [11:03] *** razetime joined [11:10] *** razetime left [11:11] *** razetime joined [13:08] *** razetime left [13:20] *** razetime joined [15:21] *** razetime left [15:31] *** razetime joined [15:32] and yet another Rakudo Weekly News hits the Net: https://rakudoweekly.blog/2022/03/14/2022-011-tau-2/ [16:49] *** razetime left [17:38] *** dakkar left [18:32] Hi, is there a straightforward way to generate all subsets of a set? [18:34] m: dd .Set.combinations [18:34] rakudo-moar 377564339: OUTPUT: «((), (:c,), (:b,), (:a,), (:c, :b), (:c, :a), (:b, :a), (:c, :b, :a)).Seq␤» [18:34] m: dd .Set.keys.combinations [18:34] rakudo-moar 377564339: OUTPUT: «((), ("c",), ("b",), ("a",), ("c", "b"), ("c", "a"), ("b", "a"), ("c", "b", "a")).Seq␤» [18:37] wow, thanks 😋 [18:39] I guess if you want them to be Sets as well: [18:39] m: dd .Set.keys.combinations>>.Set [18:39] rakudo-moar 377564339: OUTPUT: «(set(), Set.new("b"), Set.new("c"), Set.new("a"), Set.new("b","c"), Set.new("a","b"), Set.new("a","c"), Set.new("b","a","c"))␤» [20:01] Hm, seems like what I actually need is more complex... [20:02] how do I generate all subsets of a _bag_? [20:05] seems like kxxv can come handy [20:08] still... that generates a lot of repetitions [20:09] .unique should come in handy then [20:11] well yes, still it would be nice to have a multiset version of combinations, efficiency-wise [22:04] is there a way to set a starting value for reduce? [22:42] `reduce(&fun, $init, |@vals)` [22:43] need to slip due to `+list` in the signature