00:10 Guest495 joined
Guest495 Hi everyone! :) How do I turn this around: 00:18
m: say ['an', 'amazing', 'length', 'test'].sort: *.chars; 00:19
camelia (an test length amazing)
Guest495 I thought this would work:
say sort(*.chars): ['an', 'amazing', 'length', 'test'];
m: say sort(*.chars): ['an', 'amazing', 'length', 'test'];
camelia Ambiguous call to 'sort(WhateverCode)'; these signatures all match:
(&by, +values)
(+values)
in block <unit> at <tmp> line 1
02:34 Guest495 left 04:27 parv joined
Nemokosch Hello 08:47
first of all, you need to know that routines and mathods are still different things 08:48
first of all, you need to know that routines and methods are still different things
so actually there is no guarantee you can "turn around" everything
second, it seems to me that sort does "exist globally" (maybe because it's a multi-method, I'm not sure) 08:51
but I think your syntax is invalid, plain and siple 08:52
but I think your syntax is invalid, plain and simple
m: say sort(*.chars, ['an', 'amazing', 'length', 'test']); 08:53
the colon plays the role of the paranthesis 08:54
in the first case, you had only one argument so it was equivalent to [].sort(*chars) 08:55
in the second case, though, you have two
the colon is for disambiguation when you want to drop the parantheses; it's used for method calls 08:56
here you could just drop the parantheses
m: say sort *.chars, ['an', 'amazing', 'length', 'test'];
09:14 dakkar joined 10:27 parv left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/11/23/2021-...adler-rip/ 13:30
SmokeMachine m: say sort *.chars, <an amazing length test> 15:01
camelia (an test length amazing)
16:38 [Coke] left 16:56 [Coke] joined 17:35 dakkar left 17:52 parv joined 18:28 TempIRCLogger__ left 18:31 lizmat left 18:34 lizmat joined 18:36 TempIRCLogger joined 18:39 TempIRCLogger left, lizmat_ joined, TempIRCLogger joined 18:43 lizmat left 18:44 lizmat_ left, lizmat joined 20:14 qorg11 joined
qorg11 Hello, i began programming in raku some hours ago, which are some good resources? (besides docs.raku.org), if it eans anything i have a lot of experience with perl 20:15
lizmat well, there are several books 20:23
raku.guide 20:24
course.raku.org/essentials/
learnxinyminutes.com/docs/raku/
github.com/LaurentRosenfeld/think_...k_raku.pdf # Think Raku as PDF 20:26
qorg11 thank you! 20:36
lizmat you're welcome
also, if you're coming from Perl. you might be interested in these articles: opensource.com/user_articles/238941/238941 20:37
of course s/Perl 6/Raku :-) 20:38
20:49 p6steve joined 21:37 p6steve left