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.
Anton Antonov Assume I have a grammar B that inherits a grammar A, grammar B is A {...} . How do I access parent methods of A in B? I thought something like rule TOP { <A::some-rule> } would work, but it does not seem to be the case. 16:43
Actually, that does work, my mistake ... 17:04
rf Maybe i'm drunk, but I thought "{{0}}" ~~ /"{{"\d"}}"/ would match. 17:09
Nemokosch {} within "" would be a block, no? 17:10
oh it's not within
rf "{{0}}" ~~ /'{{'\d'}}'/
Also doesn't match
I guess that would be a block
Nemokosch but the left handside is! 17:11
rf Ahh yes
'{{0}}' works
Thanks
Hmm I want to just capture the 0, how would I do that again? 17:13
Nemokosch () around the part to match, to register a positional capture group 17:14
or <()> around the part to indicate that as the whole match 17:15
rf m: '{{23}}' ~~ /'{{' <(+\d)> '}}'/; 17:17
This blows up
camelia MoarVM panic: Memory allocation failed; could not allocate 478183424 bytes
Nemokosch why the + sign at an awkward place? 17:18
rf I want to match a lot of numbers
'{{109238190381293028}}' for example
Nemokosch \d+, not +\d
rf Thank you, haven't done regex in awhile 17:19
Nemokosch 🍬
p6steve m: ('{{23}}' ~~ /'{{' \d+ '}}'/).say; 20:46
Raku eval 「{{23}}」
p6steve ('{{23}}' ~~ /'{{' <(\d+)> '}}'/).say; 20:47
m: ('{{23}}' ~~ /'{{' \d+ '}}'/).Str; 20:48
Raku eval
Nemokosch you didn't say it 😉
p6steve m: ('{{23}}' ~~ /'{{' \d+ '}}'/).say;
Raku eval 「{{23}}」
p6steve m: ('{{23}}' ~~ /'{{' <(\d+)> '}}'/).say; 20:49
Raku eval 「23」
p6steve pjew