🦋 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.
00:00 reportable6 left 00:01 reportable6 joined
el m:perl given x => 1, y => 2 { say x } 00:51
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Undeclared routine: x used at line 2
el m:perl given x => 1, y => 2 { when (:\x, :\y) { say x } } 00:52
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Bogus statement at /home/glot/main.raku:2 ------> when (:⏏\x, :\y) { say x } expecting any of: colon pair
el m:perl given x => 1, y => 2 { when (:$x, :$y) { say $x } }
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Variable '$x' is not declared at /home/glot/main.raku:2 ------> when (:⏏$x, :$y) { say $x }
el doesn’t work
00:59 jgaz left
Nemokosch m: given x => 1, y => 2 { when :(:$x, :$y) { say $x } } 01:05
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Variable '$x' is not declared at /home/glot/main.raku:2 ------> when :(:$x, :$y) { say ⏏$x }
Nemokosch it does work, however $x doesn't carry on 01:07
guifa m: given x => 1, y => 2 { say $_ } 01:09
camelia (x => 1 y => 2)
guifa m: given x => 1, y => 2 { .<x>.say } 
camelia Type List does not support associative indexing.
in block <unit> at <tmp> line 1
guifa err
m: given x => 1, y => 2 { %@_<x>.say } 01:11
camelia 1
guifa but plz don't do that because line noise ha
Nemokosch the following code just downright segfaults for me 01:16
m: given x => 1, y => 2 { when (my :(:$x, :$y) := $_) { say 'BLAH' } }
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Malformed my at /home/glot/main.raku:2 ------> when (my⏏ :(:$x, :$y) := $_) { say 'BLAH' }
Nemokosch (v2022.02 didn't support the syntax yet) 01:17
m: given x => 1, y => 2 { when (my (:$x, :$y) := $_) { say 'BLAH' } }
Raku eval
Nemokosch and this probably does explode for the evalbot as well, couldn't tell by this output xd 01:18
m: given x => 1, y => 2, z => 3 { when my $x := 2 { say 'HMMM' } say $x + $x; } 01:23
Raku eval 4
Nemokosch I'd think this is a bug - why does the when not succeed? 01:24
runs with if
oh right, smartmatching... probably it smartmatches the value of this expression 01:25
01:27 freeside joined 01:28 frost joined
m: given x => 1, y => 2, z => 3 { when so my $x := 2 { say 'HMMM' } say $x + $x; } 01:29
Raku eval HMMM
Nemokosch gotcha
01:29 frost left
m: given x => 1, y => 2, z => 3 { when so 1 == 1 { say '$x' } say so 1 == 1; } 01:30
Raku eval True
Nemokosch this breaks my mind, though
01:30 frost joined
the condition couldn't be truer, it seems 01:30
01:32 frost left, frost joined 01:33 frost left
MasterDuke huh, can repro the segfault. that's a definite bug 01:35
guifa So the line Nemokosch just gave used to work 01:38
m: given x => 1 { when so 1 == 1 { say '$x' }; say so 1 == 1 }
01:38 freeside left
camelia True 01:38
MasterDuke bisectable6: given (x => 1, y => 2) { when (my :(:$x, :$y) := $_) { say "BLAH" } }
bisectable6 MasterDuke, Will bisect the whole range automagically because no endpoints were provided, hang tight
MasterDuke, Output on all releases: gist.github.com/8ebdceda3806df5944...cc5fe4cd10 01:39
MasterDuke, Bisecting by exit signal (old=2022.04 new=2022.06). Old exit signal: 0 (None)
guifa bisectable6: given x => 1 { when so 1 == 1 { say '$x' }; say so 1 == 1 }
bisectable6 guifa, Will bisect the whole range automagically because no endpoints were provided, hang tight
guifa, Output on all releases: gist.github.com/5554349b52600fafbd...9ed7497331 01:40
guifa, Bisecting by output (old=2021.12 new=2022.02) because on both starting points the exit code is 0
01:40 bisectable6 left
guifa ^^ looks like the change happened about a year ago 01:40
el perl be likeperl @_ == 3 or croak "Bad number of arguments";
01:41 bisectable6 joined 01:50 freeside joined 01:52 QhpAptyj9hj0RQwM left 01:58 freeside left, codesections left 02:01 codesections joined 02:18 freeside joined 02:22 freeside left 02:33 frost joined 02:39 frost left
what will happen if two roles having the same method are added to a class 03:05
rf m: role Foo { method foo { say 'bar'; }; }; role Bar { method foo { say 'baz'; }; }; class Baz is Foo is Bar {}; Baz.new.foo; 03:07
camelia bar
el m:perl role A { sub a() { say ‘A.a’ } } role B { sub a() { say ‘B.a’ } } class C does A, B {} C.a 03:08
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Unable to parse class definition at /home/glot/main.raku:9 ------> class C does A⏏, B {}
el m:perl role A { sub a() { say ‘A.a’ } } role B { sub a() { say ‘B.a’ } } class C does A does B {} C.a
Raku eval Exit code: 1 No such method 'a' for invocant of type 'C' in block <unit> at main.raku line 11
03:09 frost joined
el m:perl role A { method a() { say ‘A.a’ } } role B { method a() { say ‘B.a’ } } class C does A does B {} C.a 03:09
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Method 'a' must be resolved by class C because it exists in multiple roles (B, A) at /home/glot/main.raku:9
rf m: role Foo { method foo { say 'bar'; }; }; role Bar { method foo { say 'baz'; }; }; class Baz is Foo, Bar {}; Baz.new.foo;
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse class definition
at <tmp>:1
------> foo { say 'baz'; }; }; class Baz is Foo⏏, Bar {}; Baz.new.foo;
el yeah it forces you to forward the call to a role 03:10
03:10 frost left
adding role is does not is 03:11
rf ^
03:11 frost joined
rf: 03:12
m:perl role A { method a() { say ‘A.a’ } } role B { method a() { say ‘B.a’ } } class C does A does B { method a(|c) { self.A.a(|c) } C.a 03:13
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Missing block at /home/glot/main.raku:14 ------> <BOL>⏏<EOL> expecting any of: statement end statement modifier statement modifier loop
el m:perl role A { method a() { say ‘A.a’ } } role B { method a() { say ‘B.a’ } } class C does A does B { method a(|c) { self.A.a(|c) } } C.a
Raku eval Exit code: 1 No such method 'A' for invocant of type 'C'. Did you mean 'a'? in method a at main.raku line 10 in block <unit> at main.raku line 13
el m:perl role A { method a() { say ‘A.a’ } } role B { method a() { say ‘B.a’ } } class C does A does B { method a(|c) { self::A.a(|c) } } C.a 03:14
Raku eval Exit code: 1 Could not find symbol '&A' in 'GLOBAL::self' in method a at main.raku line 10 in block <unit> at main.raku line 13
el what
help
m:perl role A { method a() { say ‘A.a’ } } role B { method a() { say ‘B.a’ } } class C does A does B { method a(|c) { self.A::a(|c) } } C.a
Raku eval A.a
03:15 frost left
rf Well, yes and no. You should read about is vs does 03:23
03:23 rf left 03:25 freeside joined 03:29 freeside left
el yes, i mean using does semantics when i ask that question 03:35
is is just multiple inheritance multiple inheritance is funny
03:40 razetime joined 03:48 freeside joined 03:54 freeside left 04:09 razetime left 04:15 razetime joined 05:11 MasterDuke left 05:30 spacebat53 joined 05:45 codesections left 06:00 reportable6 left, reportable6 joined 06:01 razetime left 06:09 razetime joined 06:22 razetime1 joined, razetime left, razetime1 is now known as razetime 06:32 Bocaneri joined 06:33 Bocaneri is now known as Guest7366 06:35 Sauvin left 06:37 Guest7366 is now known as SenFache 06:45 pingu joined 06:52 spacebat53 left 06:54 SenFache left 06:58 Sauvin joined 07:13 razetime left 07:51 razetime joined 08:14 grondilu joined 08:21 jpn left 08:26 grondilu left 08:42 Sgeo left 08:47 razetime left 09:04 dakkar joined 09:16 tejr left
lizmat forgot to clickbait rakudoweekly.blog/2023/02/20/2023-...herkining/ yesterday 09:17
sjn gets baited 09:19
09:21 tejr joined 09:22 sena_kun joined 09:25 jpn joined 09:39 ab5tract joined 10:05 spacebat61 joined 10:18 spacebat61 left 10:25 sena_kun left 10:28 spacebat23 joined 10:38 freeside joined 10:46 spacebat23 left 10:51 freeside left 10:55 ab5tract left 10:56 Sauvin left, Sauvin joined 11:01 sena_kun joined 11:06 jpn left
Nemokosch by the way, heredoc strings are a nice quality-of-life micro-feature 11:09
from what I see, there is something like this in PHP as well but it seems somwhat more awkward
11:17 jpn joined, freeside joined 11:26 freeside left 11:27 freeside joined 11:32 freeside left
el heredoc nowdoc 11:34
11:57 ab5tract joined 11:59 grondilu joined 12:00 reportable6 left 12:02 reportable6 joined
moritz isn't not really a micro-feature, in the sense that it does make the parser significantly more complicated 12:21
Nemokosch on the other hand it has no runtime impact 12:26
Voldenet heredocs that support tab/space trimming gets it even more complicated 12:28
the syntax in PHP is straight out of perl btw
C# needed 11 versions to get proper heredocs (they called it raw string literals) 12:31
Nemokosch > C# 11 Preview Updates – Raw string literals, UTF-8 and more! 12:33
it seems not only that took them 11 versions...
Voldenet that utf-8 is a not useless, but it's made to win at some benchmarks… 12:35
Nemokosch also, very bluntly put, Raku sacrificed quite a lot of parsing benefits with this approach where you can basically switch to a different sub-language by any token 12:36
so just as much it's good to see the beneficial part of that trade-off, well, any trade-off should have benefits, right?
Voldenet _should_ 12:39
Nemokosch tbh I think these things should also get some showtime. "So you say Raku's grammar is complex and it's hard to inform the user where a certain syntax error could happen? In return, you get a decent remedy to a challenge that gives everybody a headache in pretty much all languages" 12:40
12:41 ab5tract left 13:08 spacebat41 joined, spacebat41 left 13:10 freeside joined 13:12 grondilu left 13:14 freeside left 13:27 pingu left 13:32 El_Che joined 13:46 rf joined 13:52 freeside joined
rf Good morning folks 13:54
lizmat rf o/ 13:55
14:01 freeside left 14:05 razetime joined
el - complex grammar - no backtracking parser 14:14
Nemokosch this was mentioned not so long ago - actually the latter is decided by the former 14:15
if you want to allow "deviations" (like switching to a slang at any point and then back), backtracking will be too much.... 14:16
14:16 jgaz joined
the amount of ambiguities and their processing, that does sound like a dangerous road to walk down on 14:17
el so the grammar is too complex for backtracking 14:19
14:25 sena_kun left 14:26 freeside joined
Nemokosch that's one way to put it xD 14:27
shmup can we for the love of camelia rename this bot lol 14:28
good morning y'all :)
14:29 codesections joined 14:30 freeside left 14:57 freeside joined 15:01 freeside left
moritz good morning shmup. What's wrong with the name? too long for your taste? 15:02
rf m: say 'hello';
camelia hello
rf We already have a camelia :)
shmup haha moritz , i'm so new here i really cannot complain at all! 15:03
i was just waking up, checking irc from mobile, and screaming at columns
proof!!! heh cdn.discordapp.com/attachments/103...G_2742.jpg
it's possible discord is an avilable nick on freenode heh 15:13
lizmat who cares ?
shmup well for starters i absolutely meant to say libera :3 additionally you're right probably, who cares 15:16
lizmat heh, ok :-) 15:18
jdv esp. since on the logs site that is stripped:) 15:21
shmup haha, yes, i should def be controlling this myself. it's a complaint from the PEBCAC section. irssi is good at controllin this sorta thing 15:22
this is a nice boilerplate starting point: github.com/irssi/scripts.irssi.org...shnicks.pl 15:25
15:41 freeside joined 15:45 freeside left 15:47 ab5tract joined 15:51 xinming left, xinming joined 16:11 Sgeo joined 16:21 Nemokosch joined 16:23 ProperNoun left, ProperN[out] joined, Nemokosch left 16:24 freeside joined 16:28 freeside left 16:33 QhpAptyj9hj0RQwM joined 16:37 freeside joined 16:41 deoac joined 16:45 freeside left 16:46 freeside joined 16:50 freeside left 16:52 codesections left, codesections joined 16:53 abraxxa-home joined 16:58 ab5tract left 17:14 razetime left 17:15 ab5tract joined 17:16 grondilu joined 17:35 ab5tract left 17:37 dakkar left 17:43 ab5tract joined 18:00 reportable6 left 18:02 abraxxa-home left, reportable6 joined 18:06 ab5tract left 18:40 sena_kun joined 19:40 linkable6 left 19:41 linkable6 joined, jpn left 20:10 Guest2981 joined 20:15 grondilu left 20:23 QhpAptyj9hj0RQwM left 20:38 jpn joined 20:55 bdju_ joined 20:56 bdju left 21:11 bdju_ left 21:12 bdju joined, jpn left 21:46 jmcgnh left 21:51 sena_kun left, jpn joined
shmup quick test 22:03
22:03 jgaz left
shmup weeeee i.imgur.com/x5Tcp0K.png 22:04
22:04 codesections left 22:05 codesections joined, jmcgnh joined
shmup Nemokosch, say one thing for me, pretty please 22:06
22:07 Guest2981 left
Nemokosch www.youtube.com/watch?v=NuYQWxbYydY 22:07
s/reason/thing/ 22:08
22:22 jpn left
shmup ty. here is the thing for any irssi folks who might be interested :3 github.com/shmup/irssi-scripts/blo...renamer.pl 22:23
i.imgur.com/GUmzCr1.png 22:26
El_Che shmup: interesting... 22:30
tellable6 2023-02-22T21:30:32Z #raku-dev <jdv> El_Che the 2023.02 release happened
[Coke] jdv++. I immediately went to rakubrew to build and install it... and typed 2022.02 22:31
El_Che \o/ 22:32
build the packages tomorrow morning Europe time 22:33
22:33 deoac left
El_Che almost going to bed and I want to avoid a rabbit hole just before :) 22:33
thx for the heads up (and release), jdv! 22:34
jdv nice 22:38
rf Going to rewrite one of my old pet projects in Raku with Humming-Bird :) 22:45
Nemokosch o.O good luck 22:55
lizmat jdv++ 23:16
rf jdv++ 23:25
23:33 linkable6 left, evalable6 left 23:34 linkable6 joined 23:35 evalable6 joined 23:41 jpn joined 23:47 jpn left 23:56 perlbot left, simcop2387 left