🦋 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:00 reportable6 left 00:01 reportable6 joined 00:10 derpydoo joined 00:41 Tirifto left 00:42 Tirifto joined 00:48 sftp_ joined, sftp left, sftp_ is now known as sftp 00:49 jpn joined 00:53 jpn left 01:43 jpn joined 01:48 jpn left 02:09 andydude joined 02:17 tea3po left 02:18 tea3po joined 02:25 Tirifto left 02:27 Tirifto joined 03:27 linkable6 left, sourceable6 left, quotable6 left, greppable6 left, nativecallable6 left, tellable6 left, releasable6 left, coverable6 left, evalable6 left, notable6 left, reportable6 left, unicodable6 left, squashable6 left, bisectable6 left, statisfiable6 left, benchable6 left, bloatable6 left, shareable6 left, committable6 left, sourceable6 joined, quotable6 joined, committable6 joined, squashable6 joined 03:28 bisectable6 joined, tellable6 joined, benchable6 joined, notable6 joined, unicodable6 joined, coverable6 joined, nativecallable6 joined, reportable6 joined 03:30 linkable6 joined, shareable6 joined, statisfiable6 joined, greppable6 joined, releasable6 joined, bloatable6 joined, evalable6 joined 03:31 jpn joined 03:36 jpn left 03:44 summerisle is now known as eof 04:22 rf left 04:28 jpn joined 04:32 jpn left 04:37 thowe left 05:27 jpn joined 05:32 jpn left 05:34 Tirifto left 05:36 Tirifto joined 06:00 reportable6 left 06:02 reportable6 joined 06:07 jpn joined 06:40 jpn left 07:05 abraxxa joined 07:06 abraxxa left 07:18 jpn joined 07:21 andydude left 07:23 jpn left 08:12 dakkar joined 08:19 jpn joined 08:30 Sgeo left 08:38 jpn left 09:07 andydude joined 09:08 sena_kun joined 09:21 jpn joined 09:53 eseyman left 10:08 derpydoo left 10:17 jpn left 10:22 manu__ joined 10:32 andydude left 10:48 jpn joined 11:48 notable6 left, unicodable6 left, quotable6 left, sourceable6 left, benchable6 left, greppable6 left, evalable6 left, squashable6 left, releasable6 left, committable6 left, reportable6 left, bisectable6 left, shareable6 left, nativecallable6 left, statisfiable6 left, bloatable6 left, coverable6 left, tellable6 left, linkable6 left, reportable6 joined, unicodable6 joined 11:49 linkable6 joined, bisectable6 joined, nativecallable6 joined, coverable6 joined, tellable6 joined, committable6 joined 11:50 greppable6 joined, evalable6 joined, releasable6 joined, shareable6 joined, squashable6 joined, sourceable6 joined, statisfiable6 joined, notable6 joined, benchable6 joined 11:51 quotable6 joined, bloatable6 joined 12:00 reportable6 left 12:02 reportable6 joined 12:14 hideocho joined 12:53 hideocho left 13:52 raiph joined 14:06 ProperNoun left 14:10 ProperNoun joined 14:13 andydude joined 14:14 raiph left 14:17 tea3po left, tea3po joined 15:13 Sgeo joined 15:24 rypervenche left 15:25 hideocho joined 15:26 hideocho left 15:36 rypervenche joined 15:51 andydude left 16:07 jpn left 16:17 andydude joined
tonyo m: enum A <A1 A2 A3>; sub a (A:D $a) { say $a == A2; }; a(A1); a(A2); # tbrowder__ ?? 16:22
camelia False
True
16:36 dakkar left 17:14 Xliff_ joined
Xliff_ \o 17:14
What'
What's the best way to do multi-key sorting in Raku? 17:15
17:20 TieUpYourCamel left
Voldenet just sort by them both 17:23
m: my $x = [{ :a(1) :b(2) }, { :a(1) :b(1) }, { :a(1) :b(-1) }, { :a(-1) :b(2) }]; say $x.sort(*<b>).sort(*<a>)
camelia ({a => -1, b => 2} {a => 1, b => -1} {a => 1, b => 1} {a => 1, b => 2})
Voldenet iirc sort is stable
just sort by attributes in reversed order, so `order by a, b` becomes `.sort(*<b>).sort(*<a>)` 17:25
Xliff_ Or you can just use a list. :) 17:33
Voldenet++
17:33 TieUpYourCamel joined 17:34 Xliff_ left
tonyo isn't that ordering by just a? 17:34
b=2,1,1,2, a=-1,1,1,1 doesn't look like it's order by b, a 17:35
m: my $x = [{ :a(1) :b(2) }, { :a(1) :b(1) }, { :a(1) :b(-1) }, { :a(-1):b(2) }]; say $x.sort({ $^a<a> cmp $^b<a> ~~ Same ?? $^a<b> cmp $^a<b> !! $^a<a> cmp $b<a>}); 17:38
camelia ({a => -1, b => 2} {a => 1, b => 2} {a => 1, b => 1} {a => 1, b => -1})
17:52 andydude left
Voldenet oh, using a list works too 17:56
librasteve yeah - I thought that
there has to be a better way than this ?!
Voldenet m: my $x = [{ :a(1) :b(2) }, { :a(1) :b(1) }, { :a(1) :b(-1) }, { :a(-1) :b(2) }]; say $x.sort(*<a b>) 17:57
camelia ({a => -1, b => 2} {a => 1, b => -1} {a => 1, b => 1} {a => 1, b => 2})
Voldenet obviously
librasteve ++ 18:00
Voldenet or
18:00 reportable6 left
Voldenet m: my $x = [{ :a(1) :b(2) }, { :a(1) :b(1) }, { :a(1) :b(-1) }, { :a(-1) :b(2) }]; say $x.sort({ $_<a>, $_<b> }) 18:00
camelia ({a => -1, b => 2} {a => 1, b => -1} {a => 1, b => 1} {a => 1, b => 2})
18:01 reportable6 joined 18:03 bigdata joined
librasteve wrong! 18:04
what is the $ in $<a> ?? 18:05
oh, sorry maybe the bridge dropped a * or an 18:07
18:08 jpn joined
Voldenet `my $x = [{ :a(1) :b(2) }, { :a(1) :b(1) }, { :a(1) :b(-1) }, { :a(-1) :b(2) }]; say $x.sort({ $_<a>, $_<b> })` 18:09
the bridge will inevitably drop underscores and whateverstars
librasteve alles klar
tx 18:10
18:13 jpn left
Nemokosch well it treats them as markdown 18:21
18:41 jpn joined 18:47 jpn left 18:58 andydude joined 19:00 rf joined 19:46 jpn joined 20:07 jpn left 20:18 Maylay joined 20:50 rf left 20:51 manu__ is now known as eseyman 21:08 andydude left 21:10 rf joined 21:20 jpn joined
tonyo Voldenet++ , didn't know you could do that 21:31
21:34 guifa left 21:40 rf left 21:52 sena_kun left 21:59 jpn left 22:12 jpn joined 22:50 jpn left 23:07 teatwo joined 23:10 tea3po left 23:20 Scotteh left, tea3po joined 23:21 Scotteh joined 23:23 teatwo left 23:29 jpn joined