This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:16 Summer left
aloussase Nice! Thank you! So far Im really liking Raku 00:40
08:53 dakkar joined
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/12/11/2023-...ore-magic/ 13:02
13:20 sjn left 14:41 Dominika is now known as sdomi 17:41 sjn joined 17:46 dakkar left 18:36 Rajhan joined
Rajhan hello Raj here from India, want to learn programming, want to start with Raku. kindly suggest how to prroceed 18:37
18:58 Rajhan left
nemokosch hello Raj, I think course.raku.org/ can be good for starting 20:07
also raku.guide/
20:08 mcmillhj joined
mcmillhj If I have `Point` class is there a method I can override to provide the correct logic for how `Point`s should be ordered during `.sort`? 20:10
nemokosch I'm afraid you will have to pass a callback to sort itself 20:13
the reason is that the cmp operator is resolved insufficiently, only from core 20:14
in theory, it would be that operator that you could overload
mcmillhj oh okay, bummer. Thank you 20:16
I'll override cmp though, that seems better than doing it manually in the sort callback 20:19
nemokosch yeah you can still pass that as the sorting function
you can even try without passing it, in case this got fixed
but I vaguely recall that PR never got merged
of course there is a pretty big overhead when doing caller-side symbol resolution - even if that's the right thing in my opinion, and there is a reason somebody made a PR with that 20:20
mcmillhj it seems to just work after I overloaded the operator. I am on v2023.11 of Rakudo 20:24
nemokosch interesting github.com/rakudo/rakudo/pull/4484 20:26
lizmat: did something change here recently?
21:14 samebchase left, samebchase joined, RakuIRCLogger left
lizmat the only thing changing with .sort was the addition of the :k argument 22:05
mcmillhj I can post a paste if you are curious but it seems to work fine. Possibly I did something not expected though? 22:37
oh wow, this is not working and I only discovered it while making the paste. I am not sure how my AOC result was correct then. My Point class has a `Str` method and that appears to be what sort is using. 22:42
paste if you are curious topaz.github.io/paste/#XQAAAQAhAgA...uXWmWaKp/h 22:44
OlLOE9skUaI6KKjz8FGfYosmcBUb/6KTdPtUO1yR6J35SVyrliTgGtsp6mbtHQ71kMqVDhazmms/R6VgiGMmbwJ+wP9tYW/8RlLQqbgT56q7qYuHbv9SpvZdM78pfUV2k/LC5KtnJtMr/90nS1
nemokosch that's a bit... too long 22:51
anyway, toldya 😛 22:52
mcmillhj oh sorry, my client truncates it. I thought that was more common my bad :( 22:53
23:31 mcmillhj left