🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
antononcube Use LLMs — can help you a lot! 01:12
wayland thowe: Example? I would've thought that $str1 =~ $str2 would work. 09:53
lizmat $str1 ~= $str2 you mean? 09:55
wayland Yeah, that's it. thowe: Use ~= 09:56
m: no strict; $str1 = "aaa"; $str2 = "bbb"; $str1 ~= $str2; say $str1; 09:57
camelia aaabbb
lizmat note that the "=" in there is a meta-op
m: sub infix:<foo>($a, $b) { $a ~ "foo" ~ $b }; my $a = "bar"; $a foo= "bar; say $a 09:59
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1)
at <tmp>:1
------> }; my $a = "bar"; $a foo= "bar; say $a⏏<EOL>
expecting …
lizmat m: sub infix:<foo>($a, $b) { $a ~ "foo" ~ $b }; my $a = "bar"; $a foo= "bar"; say $a
camelia barfoobar
lizmat it even works on custom ops
tbrowder anybody using sublime editot 13:17
tbrowder *editor for raku? 13:18
tbrowder or Damian Conway's .vimrc file? 13:49
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/07/15/2024-...exprjit-5/ 15:48
vendethiel fwiw, the "unreviewed content" warning on reddit can be dodged by using old.reddit.com, but of course it's suboptimal... 15:53
jdv thanks lizmat! 15:56
just recently reddit on mobile thinks the sub is "unsafe". classic switch to old is easy enuf but really?! 15:57
vendethiel it's just their default 15:59
reddit is awful
jdv ah, nevermind. same warning were talkin bout. 16:01
lizmat yeah, would have been surprised if it were that easy to circumvent 16:02
vendethiel no, it is that easy to circumvent
jdv yes, reddit isnt great, but its where many look. me included.
lizmat well, you could start looking at programming.dev as well
vendethiel the old. trick works, I just have no clue what kind of process you need to go through to get approved 16:03
jdv yeah:) i typically hit r/perl, r/rakulang, r/ programming, and r/programmerhumor...
jdv brrt++ 16:10
is that the right nick? 16:11
.seen brrt
tellable6 jdv, I saw brrt 2024-07-15T11:24:25Z in #moarvm: <brrt> *sigh*
jdv pri
probably
lizmat yeah, that's the one 16:17
wayland If I have a series of values of possibly varying types (eg. Int, Str), is there a straightforward way I can get the highest common parent? eg. in the case of Int and Str, it's "Cool", but in the case of Str and Str, it's "Str". 22:32
m: my Int $a = 42; my Str $b = "c"; say $a.^parents, $b.^parents;
camelia ()()
wayland my Int $a = 42; my Str $b = "c"; say $a.^parents(:all), $b.^parents(:all); 22:35
evalable6 ((Cool) (Any) (Mu))((Cool) (Any) (Mu))
wayland Now I just need a good way to detect the first common element in 2 lists. But I think I can do that :). 22:38