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.
zacque Can I read Raku doc (e.g. rakudocs.github.io/routine/subst) from command line? 01:45
Search and browse is what I've in mind, better still if it's integrated with editor/IDE 01:46
MasterDuke there is the rakudoc program, but it needs some fixing, it might not be in a working state right now 02:05
zacque Hmmm, indeed it is broken, can't even be installed with `zef` 02:22
Thanks, will stick to the web interface for the time being
Another question, there is nowhere in the *regex* doc saying that `{expression}` will be evaluated, is this an error in the doc or in rakudo? 03:32
Reference: rakudocs.github.io/language/regexes 03:33
05:43 [Coke] left 05:45 [Coke] joined
Nemokosch what is the actual behavior? 07:57
zacque I believe it can evaluate arbitrary code in `{}`. E.g. 08:03
```raku
use v6.d;
my $count = 0;
my $str = "1, 2, 3, 4";
if $str ~~ / [\d+ {$count++; say "Found $count digit" } \D*]+ / {
say "There are $count digits in total";
}
```
Output: 08:05
```
Found 1 digit
Found 2 digit
Found 3 digit
Found 4 digit
There are 4 digits in total
```
Nemokosch oh I didn't read it right, so you are saying that this is undocumented
that's quite possible
zacque Ya, couldn't found it in the doc, that's why I'm asking 08:07
Nemokosch happens quite often...
it's a bit like, assumed that you'd automagically know it 😂
08:08 dakkar joined
but yeah this is definitely a feature 08:08
zacque Exactly, would prefer it to be mentioned explicitly in the docs 🤦‍♂️ 08:10
Nemokosch the docs is always work in progress
zacque So... I guess the fault is in the fault and not in Rakudo 😂 08:12
So... I guess the fault is in the doc and not in Rakudo 😂
I'll file an issue at Github then, thanks! 08:14
Nemokosch Try to think about where you would like to see it 08:15
The only certainty is what we do ourselves, maybe I can get to it and make a PR 08:16
zacque Oh, just file the issue, didn't think about it from PR point of view 08:28
github.com/Raku/doc/issues/4112
Oh, just filed the issue, didn't think about it from PR point of view
It's sort of related to this section: rakudocs.github.io/language/regexe...erpolation
Because here are the descriptions of `$var`, `$(code)`, `<$variable>`, `<{code}>`. 08:30
So the syntax of `{expression}` is may be related here
However, its behaviour is different because `{expression}` is not about regex interpolation, more like side-effect execution of code
Nemokosch yep 08:32
zacque I don't think it fits into any existing section for that matter 08:34
So probably put it under the first section: rakudocs.github.io/language/regexe...onventions
So the syntax of `{expression}` may be related here
08:34 frost joined 11:33 frost left 11:34 frost joined
[Coke] I added the link you mentioned there to the ticket. 13:09
13:10 frost left 13:23 kjp left 13:27 frost joined 13:34 frost left 13:36 kjp joined 13:47 razetime joined
zacque Thanks! 14:23
16:40 dakkar left 17:15 Kaiepi left 17:24 razetime left 17:44 Kaiepi joined 23:38 Kaiepi left