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.
01:02 Kaiepi left 01:37 razetime joined
jaguart Ok - so I've skirmished with rakudo-pkg on Debian - and ended up being reminded of how much implicit knowlege is not actually written down. I'm getting the weird impression that zef-install has to be run for *every* user? and then that *zef install module* also has to be run for _every_ user including root? 02:28
there is a hint about #inst at the end of the zef readme, or maybe DefaultCUR default value of auto... and directory permissions in /opt/rakudo-pkg 02:43
whew - it is possible to have site modules with a bit of permissioning and tweaking of rakudo-pkg install scripts 03:48
Mason is there a way to do this? 05:55
```raku
given $foo {
when /'keyword '(\w+)/ -> $match {
$match.say;
}
}
```
jaguart m: given "one keyword too many" { when / keyword \s+ (\w+) { $0.say } / {} } 06:28
camelia 「too」
jaguart if you actually want to do something interesting in the given block you can: 06:52
m: given "red keyword one green keyword two blue" { when m:g/ keyword \s+ (\w+) {make($0.Str)} / { $/.map({say .made}) } }
camelia one
two
07:08 human-blip joined 07:47 razetime left, razetime joined 07:53 Kaiepi joined 09:09 dakkar joined 09:26 human-blip left 09:31 human-blip joined 10:46 frost joined
Mason $0 was what I was looking for I think 10:56
Nemokosch I don't understand the question and the answer either xd 11:09
just to make sure everyone is on the same page 11:10
$/ is the match object
$0, $1, $2 etc are the capture groups of that match object, i.e $/[0], $/[1] etc
it's possible to execute code straight from regex because code blocks still count, and apparently those code blocks can already access the forming match object 11:12
make is for assigning data to a certain match, usually for parsing purposes, and .made is to access the assigned data (I think .ast also works for the same purpose) 11:13
for convenience, you can also set the limits of the whole match object with <( and )> respectively 11:14
oh and a disclaimer: Raku regexes are still slow, one could say too slow for mass manipulation 11:16
11:31 razetime left, razetime joined 13:38 human-blip left 14:10 frost left 14:43 NemokoschKiwi joined 14:48 NemokoschKiwi left 15:16 Heptite joined 16:00 jgaz joined 17:07 ToddAndMargo joined
ToddAndMargo When I am in a module (pm6), is there one of those fancy system variables that will tell me the name of calling (pl6) program? 17:08
jaguart $*PROGRAM-NAME 17:09
ToddAndMargo thankyouthankyouthankyou!!
I am getting back "-e.bat"    raku -e "use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[ls]);" 17:26
I put the .bat onto it.  so "-e"
Nemokosch that's your calling program indeed - inline Raku using the -e option 17:28
17:29 razetime left, razetime joined
ToddAndMargo I get it now. Duh! 17:30
any reason why "print" does not show up on the screen from inside a module? 17:32
17:34 dakkar left 17:48 razetime left 18:16 ToddAndMargo left 19:38 jgaz left 22:47 Heptite left 22:53 Heptite joined