01:42 hulk left 01:43 kylese joined 02:15 kylese left, kylese joined 02:18 kurahaupo left 03:12 vasko45355861 joined 06:27 Sgeo_ left 06:43 soverysour joined, soverysour left, soverysour joined 07:06 soverysour left 07:29 soverysour joined, soverysour left, soverysour joined 08:36 soverysour left 08:40 soverysour joined 08:44 soverysour left 09:23 grondilu joined 09:41 ckfl3266 left 10:18 vasko45355861 left 10:29 vasko45355861 joined 11:09 soverysour joined, soverysour left, soverysour joined 11:14 soverysour left 11:19 vasko45355861 left, vasko45355861 joined
ab5tract TIL (or re-learned, memory gets fuzzy) that `but` clones and `does`, well, doesn't 11:26
such cases are sort of weird because when we have "almost-but-not-exactly" equal operators, the corner case of their distinctions can decay in (my) memory over time 11:30
lizmat I'd say that "but" may be used on values, while "does" does not 11:47
m: my $a = 0 but True; if $a { say "really" }
camelia really
12:06 abraxxa joined 12:09 abraxxa left
ab5tract huh, weird. I was doing a bit of diving into this yet now I am not sure where the confusion started. It's quite clear that `does` cannot be used in the way I just reported 12:13
fallible meatbrain
ah, it's the example that fails 12:20
m: role R { method ACCEPTS { True } }; my $x = 0; $x does R; dd $x.WHAT, :x($x ~~ 100)
camelia Int+{R}
Bool::False
ab5tract it works, just not with an enum like True is 12:21
though why the output is False in this case eludes me 12:22
m: role R { method m { True } }; my $x = 0; $x does R; dd $x.WHAT, :x($x.m) 12:32
camelia Int+{R}
ab5tract It compiles, but it doesn't exactly work, _does_ it ;)
12:59 leifgunnar left
ab5tract weird, :x there starts being treated as a named arg 13:00
m: role R { method m { True } }; my $x = 0; $x does R; dd $x.WHAT, $x.m 13:02
camelia Int+{R}
Bool::True
13:08 Sgeo joined 13:13 abraxxa joined
lizmat that could be a dd artefact 13:32
m: role R { method m { True } }; my $x = 0; $x does R; say $x.WHAT.raku; say $x.m.raku 13:33
camelia Int+{R}
Bool::True
13:59 soverysour joined 14:00 soverysour left 14:12 gfldex left 14:13 gfldex joined 15:29 human-blip left 15:31 human-blip joined 15:53 Aedil left 15:58 Aedil joined 16:08 human-blip left 16:11 human-blip joined 19:39 abraxxa left 19:49 cm left 19:58 cm joined
lizmat weekly: andrewshitov.com/2026/09/11/native...with-raku/ 22:20
notable6 lizmat, Noted! (weekly)
22:39 gcd left
Voldenet using `does` in such way is downright scary 22:42
m: role R { method m { True } }; my $x = 0; $x does R; say $x.WHAT.raku; say $x.m.raku; say 0.m.raku # 0 is now magical (ノ´ー`)ノ
camelia Int+{R}
Bool::True
Bool::True
Voldenet m: role R { method m { True } }; my $x = 0; ($x + 1) does R; say $x.WHAT.raku; say 1.m.raku; 0.m.raku # :O 22:43
camelia Int
No such method 'm' for invocant of type 'Int'
in block <unit> at <tmp> line 1

Bool::True
Voldenet m: True does role { method Bool { False } }; # …to the point where it makes no sense 22:46
camelia Unhandled exception: Unexpected resumption kind in method dispatch
at src/vm/moar/dispatchers.nqp:1649 (/home/camelia/rakudo-m-inst-1/share/perl6/lib/Perl6/BOOTSTRAP/v6c.moarvm:method-deferral-step)
from src/vm/moar/dispatchers.nqp:1707 (/ho…
23:14 tjr5 is now known as tjr
Voldenet though mostly it is safe on types that are allocated via .new() 23:27
m: m: role N { has $.n is rw }; class X { }; my $y = X.new does N; $y.n = 42; say $y; say X.new # nothing surprising here 23:28
camelia X+{N}.new(n => 42)
X.new