This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
02:35 Aozen joined
Aozen first day here i am new 02:36
03:06 discord-raku-bot left, discord-raku-bot joined 03:13 Aozen left
Sussysham Good morning everyone 04:48
greetings Aozen
06:51 tea3po joined 06:55 teatwo left 06:56 tea3po left, tea3po joined 09:38 lizmat_ joined 09:42 lizmat left, lizmat_ is now known as lizmat 10:06 habere-et-disper joined 13:39 nommef joined
nommef hello, does somebody know why first `say` is ok, but the second one freezes the program? 13:44
my %cfg1 = r => "^'D '";
my $tmp-r = %cfg1<r>;
%cfg1<r> = / <$tmp-r> /;
my %cfg2 = r => "^'D '";
%cfg2<r> = / <{%cfg2<r>}> /;
say "D d" ~~ %cfg1<r>;
say "D d" ~~ %cfg2<r>;
I thought they are doing the same thing, but apparently not -_-
13:48 habere-et-disper left
Nemokosch could you write it in a more readable way, preferably in a gist/pastebin? 14:00
14:25 Aozen joined 14:28 Aozen left
lucs @Nemokosch Yeah, it's pretty unreadable, but looking at it from IRC, it's not too bad. The problem when we look at it in Discord is that it uses a non-monospace font. And those triple backquotes that were used in IRC didn't apply in Discord. Fortunately, those problems may soon be over, as Libera (the IRC hosts) posted this this morning: "[Global Notice] Good Morning All! Following our Annual General Meeting 14:39
that took place last night (31st), we have decided that Libera will be pivoting to a Discord server ( )! We feel this is the best way forward for our various communities. Please let us know what you think in #libera-discord"
lucs nommef: Try replacing the 5th line with: %cfg2<r> = / <{note "Recursing?"; %cfg2<r>}> /; 14:57
nommef @lucs yes, it is recursing (endless spam) 15:30
unfortunately I have no idea how to format code on irc (I prefer to use discord as little as possible) 15:33
lucs nommef: If you use github, you can do a gist? 15:35
nommef here's the original code -
lucs (same idea, eh) 15:36
nommef so, the regex is using a reference to a string (field?) inside that hash, instead of using the string itself in regex construction? maybe another case of cursed sigils? -_-  (i am not a perl dev, it wouldnt be a first time me having such problem) 15:43
lucs For what it's worth, sigils in Raku are more well-behaved than in Perl. 16:00
I can't quite figure it out, but the problem seems to be more with the multiple levels of indirections and evaluations.
Here's the same code, golfed down somewhat: 16:01
Maybe someone more expert can explain what's going on.
16:05 moritz joined
lucs moritz: Hi. 16:05
moritz Hi nommef, I was told that you have a problem with a hanging regex
That's nommef's code, golfed down a bit.
moritz The regex you're building and storing in %h2<s> tries, at runtime, to look up a value from %h2<s> 16:06
so it finds itself, calls itself, and what does it do? it looks up a value from %h2<s>
this is basically the same as writing my $s = sub { $s() }; say $s();
just written with regexes
Nemokosch so it all boils down to <{%cfg2<r>}> being lazy? 16:10
lucs (aka <{%h2<s>}> in the golfed down version.) 16:13
moritz yes, a regex is really more like code, not like a string, and code always lazily looks up variables
18:16 habere-et-disper joined 18:23 fernandooliveira joined 18:33 habere-et-disper left 18:51 teatwo joined, Aozen joined 18:54 tea3po left 20:55 fernandooliveira left 21:00 fernandooliveira joined 21:07 fernandooliveira left 21:11 nommef left 21:34 fernandooliveira joined 21:45 fernandooliveira left, teatwo left 21:53 teatime joined 22:13 fernandooliveira joined, Aozen40 joined 22:14 Aozen40 left, Aozen left, Aozen joined 22:16 teatime left 22:17 teatime joined 22:24 teatime left, fernandooliveira left 22:25 Heptite left 22:50 jgaz joined 22:52 fernandooliveira joined 23:02 fernandooliveira left 23:18 jgaz left 23:25 fernandooliveira joined 23:38 Aozen left 23:42 fernandooliveira left