🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
00:00 reportable6 left, reportable6 joined 01:02 Kaiepi left 01:14 epony left
Geth nqp: vrurg++ created pull request #786:
Add support for RakuAST::Origin::Match
01:47
02:37 evalable6 left, linkable6 left 02:38 evalable6 joined 02:39 linkable6 joined 02:57 epony joined 05:18 evalable6 left, greppable6 left, reportable6 left, squashable6 left, linkable6 left, sourceable6 left, tellable6 left, statisfiable6 left, coverable6 left, nativecallable6 left, notable6 left, benchable6 left, quotable6 left, committable6 left, shareable6 left, unicodable6 left, bloatable6 left, releasable6 left, bisectable6 left, shareable6 joined, linkable6 joined 05:19 sourceable6 joined, bisectable6 joined, unicodable6 joined, reportable6 joined, committable6 joined, nativecallable6 joined, squashable6 joined 05:20 quotable6 joined, benchable6 joined, greppable6 joined 05:21 bloatable6 joined, releasable6 joined, tellable6 joined, evalable6 joined, statisfiable6 joined, notable6 joined, coverable6 joined 06:00 reportable6 left 06:02 reportable6 joined 07:53 Kaiepi joined 08:30 sena_kun joined 08:51 sena_kun left
Geth rakudo/rakuast: 4 commits pushed by (Stefan Seifert)++ 09:27
10:46 frost joined 11:19 squashable6 left 11:21 squashable6 joined 11:46 Xliff joined 12:00 reportable6 left 12:03 reportable6 joined 14:10 frost left
gfldex m: class C { method foo(--> self) {} } 14:29
camelia ===SORRY!=== Error while compiling <tmp>
Type 'self' is not declared
at <tmp>:1
------> class C { method foo(--> self⏏) {} }
gfldex I was under the impression that self is always declared for a method.
Nemokosch that makes sense - and why is it recognized as a "type" anyway 14:33
gfldex m: constant self = 42; class C { method foo(--> self) {} } 14:44
camelia ( no output )
gfldex Also, it should throw X::Syntax::NoSelf. 14:46
Nemokosch so the outer self managed to peek in, although the method defines its own self 14:50
return values are kinda fragile 14:51
sub foo(--> -1) {}
Kaiepi m: role Foo[Mu \T] { method of { T } }; class Bar { method baz(Foo[self] $foo) { $foo.of } }; say Bar.baz: Foo[Bar] 14:53
camelia Type check failed in binding to parameter '$foo'; expected Foo[NQPMu] but got Foo[Bar] (Foo[Bar])
in method baz at <tmp> line 1
in block <unit> at <tmp> line 1
Nemokosch how do function return values work, by the way? 14:56
sub bar(-->1) { 2 }
1 seems to win here
but at the same time, if I wrote -->Int, I wouldn't get the type object back 14:58
(which is desirable but at least not trivial)
[Coke] I believe it's :if it's a type object, any concrete return values must match the type. If it's a concrete value, that's what you get. 16:09
m: sub a(-->3) { return "a" }; say a(); 16:11
camelia ===SORRY!=== Error while compiling <tmp>
No return arguments allowed when return value 3 is already specified in the signature
at <tmp>:1
------> sub a(-->3) { return "a" ⏏}; say a();
[Coke] and also that.
17:16 melezhik joined 17:19 melezhik left 18:00 reportable6 left 18:01 reportable6 joined 18:33 melezhik joined 18:43 melezhik left 18:46 [Coke] left 18:48 [Coke] joined 21:32 linkable6 left, evalable6 left 21:33 linkable6 joined 21:35 evalable6 joined 23:50 squashable6 left, evalable6 left, unicodable6 left, nativecallable6 left, committable6 left, greppable6 left, quotable6 left, linkable6 left, shareable6 left, bisectable6 left, tellable6 left, notable6 left, statisfiable6 left, benchable6 left, releasable6 left, reportable6 left, coverable6 left, sourceable6 left, bloatable6 left 23:51 reportable6 joined, coverable6 joined, notable6 joined, tellable6 joined, shareable6 joined 23:52 statisfiable6 joined, nativecallable6 joined, releasable6 joined, evalable6 joined, quotable6 joined, unicodable6 joined, bisectable6 joined, benchable6 joined 23:53 squashable6 joined, greppable6 joined, committable6 joined, bloatable6 joined, sourceable6 joined 23:54 linkable6 joined