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.
00:17 NemokoschKiwi left 01:07 Manifest0 left 01:43 frost47 joined 01:44 frost47 left 01:46 frost69 joined 01:48 frost69 left 01:50 frost31 joined 01:51 frost31 left 01:53 frost20 joined, frost20 is now known as frost 02:34 frost left 02:59 frost joined
el gatito (** advocate) mfw class method syntaxperl method classmeth(::?CLASS:U:) 03:18
03:36 jgaz left 04:06 rf left 05:19 deoac joined
deoac Is there a Test module that provides a `throws-like` test that can also test the .message thrown? 05:21
05:35 deoac18 joined, deoac18 left
CIAvash deoac: `throws-like { frodo }, Exception, message => /dies/;` docs.raku.org/type/Test#sub_throws-like 05:39
WINEPREFIX=~/Games/fifa19 setup_vkd3d_proton install 06:39
07:29 deoac left 08:52 Manifest0 joined 08:56 dakkar joined 09:01 Manifest0 left, tbrowder left, tbrowder joined, Manifest0 joined
el gatito (** advocate) is Int $n syntactic sugar for $n where Int? 09:21
Skarsnik hm good question, maybe not 09:22
m: sub foo(Int $a) { say $a.WHAT }; sub fooer($a where Int) {say $a.Int}; foo(32); fooer('40'); 09:23
Raku eval (Int) Exit code: 1 Constraint type check failed in binding to parameter '$a'; expected anonymous constraint to be met but got Str ("40") in sub fooer at main.raku line 1 in block <unit> at main.raku line 1
Skarsnik Not sure how to check this actually, maybe with a subtype of Int? and see if .WHAT is changed 09:25
Nemokosch it's definitely not sugar for that 10:45
el gatito (** advocate) but constrain $n to an Int 10:46
Nemokosch that would probably also have dispatch implications, khm-khm, it's hard to tell without actually knowing the dispatch process
my $foo where Int; dd $foo 10:49
m: my $foo where Int; dd $foo
Raku eval <anon $foo = <anon>
Nemokosch the container is different 10:50
gotcha, this should be telling enough... 10:52
m: my $foo where Int = 22; $foo.VAR.of.say;
Raku eval (<anon>)
Nemokosch versus 10:53
m: my Int $foo = 22; $foo.VAR.of.say;
Raku eval (Int)
el gatito (** advocate) real 11:02
11:26 lizmat_ joined 11:30 samebchase5 joined
lizmat_ RakuIRCLogger 11:30
11:34 lizmat_ left, lizmat_ joined 11:36 lizmat left, samebchase left, samebchase5 is now known as samebchase, lizmat_ left, lizmat joined
el gatito (** advocate) so raku just create a subset of Mu with that constraint and check against it 11:40
Nemokosch substitute that Mu for Any
el gatito (** advocate) ah yes Any is the effective root of the class hierachy 11:41
i say effective because almost everything treats Any as the top 11:42
even though it is not 11:43
lizmat indeed. the difference between Mu and Any allows for auto-threading of Junctions 11:53
and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/02/13/2023-...ore-class/ 14:42
17:12 rf joined 17:38 QhpAptyj9hj0RQwM joined 17:39 dakkar left 17:56 ab5tract left 19:06 saint- joined 20:37 jgaz joined 21:29 Guest8418 joined 22:00 frost left 22:08 ab5tract joined 22:32 Guest8418 left 23:37 jgaz left