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.
habere-et-disper How do I ascertain the name of the calling method within a method? 01:29
gfldex m:put .package.raku, '::', .name with callframr(1).code; 08:14
lizmat m: sub a() { dd &?BLOCK.name }; a 08:54
camelia "a"
lakmatiol m: say TR:i/abc/123/ given "abC" 18:44
why does this not actually do case insesitive transliteration
why does this not actually do case insensitive transliteration
[Coke] don't think it takes an :i 18:48
TR same as tr same as .trans 18:49
lakmatiol IG the next question is why isn't it an error 18:53
Nemokosch Or why it doesn't take an :i, to be honest 19:07
guifa it's not an error because it just passes :i probably as an adverb to Str.trans(), and trans() allows arbitrary pairs sent, so it won't want to error on random named args 19:38
Nahita :Z for example is a compile time error, so there's an inconsistency there unfortunately 19:40
guifa m: Str.^find_method('trans').wrap( -> |c { say c } ); tr:i/a/A/ given 'a'; 19:41
camelia \("a", "a" => "A", :i(1))
Cannot modify an immutable Str (a)
in block <unit> at <tmp> line 1
19:42
guifa anyways, there we can see the argument is being passed through, at least.
It seems like the grammar will happily allow all of the regex modifiers, even though trans doesn't support them 19:43
m is allowed too, for instance
lakmatiol ah, funky 20:36
deoac What is the difference between `Rat` and `Rat()` ? 23:40