31 Dec 2025
disbot8 <shimmerfairy> Glad to hear it. Incidentally, if you really need to match a previously-matched substring, there are ways to do it, with a bit of effort. 15:40
<antononcube> @jgaz More in the spirit of your Perl code is this: say "Mississippi" ~~ m:g/ ($<c>=\S $<c>+) /; 17:33
<antononcube> m: say "Mississippi" ~~ m:g/ ($<c>=\S $<c>+) / 17:34
<Raku eval> (「ss」 0 => 「ss」 c => 「s」 「ss」 0 => 「ss」 c => 「s」 「pp」 0 => 「pp」 c => 「p」)
4 Jan 2026
habere-et-disper Could someone please install L10N::AF 0.0.4 and tell me if it works for them? 20:42
The root folder isn't following the convention of the other L10N but it seems to install okay.
Not sure how to include that.
(Also seems to include an empty /sdist folder even though that's set to be ignored in .gitignore) 20:45
librasteve_ habere-et-disper: works for me 22:14
habere-et-disper =b
5 Jan 2026
librasteve_ rakudoweekly.blog/2026/01/05/2026-...happy-new/ 15:28
6 Jan 2026
disbot9 <simon_sibl> github.com/kjkuan/Shell-DSL/blob/m...SL.rakumod 04:13
<simon_sibl> I am not able to understand where in the code, is the part that handle the .<command name>(arguments)
<simon_sibl> must be line 149 for the create a command but the part that handles the . before to create a new one, I cant find it 04:15
<simon_sibl> oh its the method FALLBACK ? 04:16
7 Jan 2026
disbot11 <itsrakanott> Hello, people. I was wondering, if someone would be willing to help. Why does this code deadlocks itself? role Named { has Str $.name = "Unnamed"; } class Entity does Named { method name() { say self.$.name; return; } } my $entity = Entity.new(name => "bob"); $entity.name(); 06:11
<shimmerfairy> It's because $.name calls the name method its inside of, so it infinitely recurses. The has Str $.name declaration is actually convenient shorthand for class A { has Str $!name = "Default"; method name { $!name } } 06:30
<shimmerfairy> Redefining the method is completely fine, but you have to access the variable with $!name instead. $.name is shorthand for self.name, and self.$.name actually tries to do something nonsensical. 06:32
<itsrakanott> I knew it was something with the declaration. Thanks. 06:33
<itsrakanott> Another, slightly more convoluted question. Let's say i have this class: class Computer { has &compute_function; } and i instantiate object like that: sub something() { say "something happens!!"; } Computer.new(compute_function => &something); How would i call &compute_function from inside of Computer? I have tried doing &compute_function, &.compute_function, self.&compute_function, etc. Can't seem to get a 07:10
hold of this thing as of yet.
<itsrakanott> A mistake in my code somehow made it work. &compute_function.() works. Only with a dot. 07:12
<shimmerfairy> class A { has &.foo; method bar { say &!foo(42); say (&.foo)(42); say self.foo()(42); } } A.new(:foo({$_ * 3})).bar This is how I got it to work. The &!foo accesses the attribute directly, while &.foo and self.foo both call the public method foo to get a function object. So when accessing a public function object, you're calling two functions: one to get the object, and one to 07:24
actually invoke it. If you type &.foo(42), that gets read as &(self.foo(42)), which is the wrong function to send the argument to.
8 Jan 2026
<simon_sibl> with NativeCall rs // example code const std = @import("std"); const Action = enum(u8) { Allow, Deny, Reject }; const Proto = enum(u8) { tcp, udp }; const Rule = extern struct { action: Action, proto: Proto, port: u32, }; export fn apply_rule(rule: Rule) bool { std.debug.print("[*] Applying rule: action: {s}, proto: {s}, port: {d}\n", .{ @tagName(rule.action), @tagName(rule.proto), 05:52
rule.port, }); return true; } How would I use that enum in Raku, just uint8 or there is a way I can make enum Proto <tcp udp> works in a way to have some safety with the value ?
<librasteve> @simon_sibl - great question ... just to mention that while backticks are fine for those of us who are on Discord, folks who live over the bridge in IRC land (who are generally wiser and more attractive) get this somewhat garbled ... suggest sharing a gist for anything over a couple of lines ... keep em coming 11:01
<simon_sibl> thanks for the recommendation, I will keep using glot.io for sharing code next 🙏 11:23
<simon_sibl> so I have this zig code which is just a silly function to emulate a shared library that interact with the system: glot.io/snippets/henow4avyn
<simon_sibl> and I have this code in Raku to interact with it: glot.io/snippets/henoxa5vmm 11:24
<simon_sibl> I just wonder, if there is a better way to deal with the enum than what I am doing, and since enum are integers under the hood, will it be possible to use them in the future in the struct directly ?
lizmat m: enum FOO (a => "foo", b => "bar"); dd +a # enums are *not* always just integers under the hood 11:53
camelia Failure.new(exception => X::Str::Numeric.new(source => "foo", pos => 0, reason => "base-10 number must begin with valid digits or '.'"))
disbot11 <comulonymphus> I don't understand concurrency. Could anyone give me a simple example and an explanation, please? 12:20
lizmat m: await (start { for <a b c d> { sleep .1; .say } }, start { for ^4 { sleep .2; .say } }) 12:30
camelia a
b
0
c
d
1
2
3
lizmat note that the two lists of values are intermixed, as they ran concurrently with different delays 12:31
disbot11 <simon_sibl> lizmat oooh ok, I guess I was stuck in my C/Zig mindset of enum, then I understand why it cant work with Native call 12:56
lizmat well, by default they are ints 12:58
m: enum foo <a b c d>; say +a; say +d
camelia 0
3
lizmat just make sure to use the numeric value of them 12:59
dev.to/lizmat/raku-resolutions-17g7 13:18
disbot11 <simon_sibl> > when it became clear that Larry Wall would not be around much more to decide on matters related to what is now the Raku... 14:09
<simon_sibl> what happened with Larry ? 🥹 14:10
lizmat good question: I assume health and burnout played a role 14:15
I mean: he's still alive and every now and then comments on an issue (like maybe once or 2x a year) 14:16
I would argue that the last "big" thing he did, was endorsing the name change in 219 14:17
disbot11 <shimmerfairy> Absent any other information, I'd assume it's just that he's old and effectively retired. 14:21
lizmat *2019 14:26
yes, but I would say: "decided to retire" rather than "retired" :-)
9 Jan 2026
disbot11 <aruniecrisps> @librasteve I'll have a look when I can, apologies, work has been extremely busy 18:47
<librasteve> no worries - I really appreciate your thoughts in relation to Air features - but we all have $day-job and $family ;-) 18:51