|
02:33
floppy_disk joined
|
|||
| floppy_disk | hi, how do you compare two hashes for equality? | 02:49 | |
|
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
|
|||
| CIAvash | floppy_disk: using `eqv` or `~~` | 06:39 | |
| stevied | 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:50 | |
|
06:55
discord-raku-bot left,
discord-raku-bot joined
|
|||
| CIAvash | Apart from convenience, if the module can make use of Raku features and have an interface that suits Raku better | 08:10 | |
| stevied | 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:37 | |
|
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
|
|||
| lizmat | and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/03/14/2022-011-tau-2/ | 15:32 | |
|
16:49
razetime left
17:38
dakkar left
|
|||
| Nemokosch | Hi, is there a straightforward way to generate all subsets of a set? | 18:32 | |
| lizmat | m: dd <a b c>.Set.combinations | 18:34 | |
| camelia | ((), (:c,), (:b,), (:a,), (:c, :b), (:c, :a), (:b, :a), (:c, :b, :a)).Seq | ||
| lizmat | m: dd <a b c>.Set.keys.combinations | ||
| camelia | ((), ("c",), ("b",), ("a",), ("c", "b"), ("c", "a"), ("b", "a"), ("c", "b", "a")).Seq | ||
| Nemokosch | wow, thanks 😋 | 18:37 | |
| lizmat | I guess if you want them to be Sets as well: | 18:39 | |
| m: dd <a b c>.Set.keys.combinations>>.Set | |||
| camelia | (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")) | ||
| Nemokosch | Hm, seems like what I actually need is more complex... | 20:01 | |
| how do I generate all subsets of a _bag_? | 20:02 | ||
| seems like kxxv can come handy | 20:05 | ||
| still... that generates a lot of repetitions | 20:08 | ||
| lizmat | .unique should come in handy then | 20:09 | |
| Nemokosch | well yes, still it would be nice to have a multiset version of combinations, efficiency-wise | 20:11 | |
| is there a way to set a starting value for reduce? | 22:04 | ||
| Nahita | `reduce(&fun, $init, |@vals)` | 22:42 | |
| need to slip due to `+list` in the signature | 22:43 | ||