27 Apr 2026
librasteve_ rakudoweekly.blog/2026/04/27/2026-...lease-192/ 14:38
28 Apr 2026
disbot2 <simon_sibl> multi sub combine(Hash \a, \b --> Hash()) { is this like in Go where if the types is the same you dont need to repeat it or in this case \b could be something else than a Hash ? 02:02
<simon_sibl> the quicksort code is quite amazing, I wish my brain could come up with stuff like that 😆 02:10
[Coke] I think \b could be anything there. 02:54
m: 3.say 03:08
not bot, sorry - yes, the b isn't restricted there.
disbot2 <librasteve> @simon_sibl … yes exactly … I could have maybe have used %a on this sub but I chose to keep the same signature for both multis … so \a will take Any on the other sub… going sigilless helps to project that “will take any type” intent hopefully 07:11
<librasteve> btw the weekly tips n tricks is aimed at (i) putting some actual Raku in the weekly so that occasional readers can get a feel for what we are on about and (ii) as a way to share idioms with readers who are moving up the curve. What are your thoughts… is it sometimes interesting/helpful? Too easy/too hard? 07:14
<simon_sibl> I think its great, I really liked the quicksort one, showed to my colleagues 😆 07:17
<librasteve> thanks for the feedback ,,, that was contributed by a reader … always happy to get suggestions! 07:31
29 Apr 2026
<simon_sibl> I am not sure to understand the difference between callwith and samewith, for me samewith because of the same should call the same function its already in, but it doesnt seem to be the case 02:37
<librasteve> @simon_sibl I'll try to clarify ...for me samewith is easy to understand ... it just reruns the dispatch from scratch with the new args (try running the factorial example here docs.raku.org/language/functions#sub_samewith) 07:48
<librasteve> callwith calls the next candidate (so the current candidate is excluded) - the example here shows that docs.raku.org/language/functions#sub_callwith - so it is quite a jumpy ride around the multis 07:51
<librasteve> suggest you try swapping the calls around and see what breaks ;-)
<simon_sibl> is the next candidate affected by which order the multi sub are declared ? 07:53
<simon_sibl> it seems yes
<simon_sibl> I see
<librasteve> should order from most specific (often a where clause) to least specific, maybe declaration order is a tie breaker 09:10
30 Apr 2026
<simon_sibl> from what I tried it seems the order of declaration matters 07:02
<simon_sibl> the most open sub on top makes it fails, while if the most open sub is at the bottom (last declared) then it works
<rcmlz> IMHO a good way of discovering interesting new Raku features is a.) solving a task on exercism.org/tracks/raku and then b.) look at the community solutions and then c.) improve your own solution. 08:32
<librasteve> okaay - guess I should rtfm docs.raku.org/language/glossary#Multi-dispatch 09:51
<librasteve> The selection process is primarily based on types and number of arguments (arity), where the narrowest, most specific candidate wins, typically without regard to the order of declaration. The is default trait may be used as a tiebreaker in this first phase. There is also a secondary phase where some different tiebreakers may be evaluated in order of declaration of the methods or subs.
<librasteve> (if a narrow multi is passed over in favour of one declared before it, then that is a bug - share code if it's still a mystery) 09:55
<librasteve> please
lizmat note that required named arguments (:$foo!) count as "arity" 09:56
optional named arguments do not
disbot2 <librasteve> .oO - is that in the docs?
lizmat think it is? 09:57
m: 'multi a(:$a, :$b) { dd }; multi a(:$c!) { }; a; a(:c)
m: multi a(:$a, :$b) { dd }; multi a(:$c!) { }; a; a(:c) 09:58
hmmm... did we lose evallable6 now as well?
sub a(:$a, :$b)
sub a(:$c!)
disbot2 <librasteve> m: say 42
<Raku eval> 42
<librasteve> guess you have to say
lizmat nah, even without say it would have responded that there was no output 09:59
disbot2 <librasteve> m: my $x = 42;
<Raku eval>
<librasteve> (this over the bridge from Discord ofc)
<librasteve> fwiw I will make a couple of tweaks to the docs since I don't see it 10:01
<winfredraj> Hello all, is there a way to recover a fez password? 13:52
<librasteve> try fez reset-password 13:56
<librasteve> (from fez help btw) 13:57
1 May 2026
<cerumod> Hi. I want to add tab-completions to prompt(). I found a Prompt module and a REPL module, and the REPL module shows this example: raku sub shout($line, $pos) { ($line.chop.uc,) if $pos == $line.chars && $line.ends-with("!") } my $repl = REPL.new(:additional-completions([&shout])); $repl.run; But this doesn't seem to work. I expect if I type foo!<tab> into the resulting REPL that the input text will be changed to FOO!, but instead, 02:43
nothing happens. This is true even if I add :supports-completions(True) to the REPL.new(...). Does anyone have any suggestions for how I could implement a prompt with custom tab-completion behavior? I can't just provide a list of strings to complete (a la :complete), since I want more complex behavior than simple word list-based completion.
<librasteve> Hi @cerutonin, my guess is that repl is limited to simple word list completions … sounds to me that you need an LSP of some sort. 06:13
<librasteve> lizmat: maybe you can advise on the situation with repl? 06:14
lizmat cerumod could you make an issue in the REPL repo? 07:11
disbot2 <cerumod> sure, i'll try to do that sometime today 07:44
2 May 2026
habere-et-disper Rakudo issue labelling seems stale. Only four issues labelled "good first issue"? 21:04
4 May 2026
disbot2 <librasteve> rakudoweekly.blog/2026/05/04/2026-...-wars-day/ 18:03