🦋 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.
ugexe I do it all the time. Thing is I’m using Golang when I do it 😬 00:35
01:43 MasterDuke joined 06:47 sena_kun joined 07:01 sena_kun left 07:07 sena_kun joined
ab5tract Sometimes these things are a function of their historical moment of implementation (or even design, when aged of the apocalypses) 07:07
Failures are also designed to fail as late as possible and seem like a reasonable fit for a return value from Nil.nonexistent 07:08
nine Was specced on 2010-08-16 by larray 07:13
s/larray/Larry/
Sorry, pre-coffee
07:16 dawids joined, dawids left
gfldex Please consider that Nil (and it's odd behaviour) is needed so we can have Failure. 07:27
Also, a NativeCall call might return a zeropointer and we have to handle that somehow. 07:28
07:30 sena_kun left 08:19 donaldh_ joined 08:22 donaldh left 08:32 djinni` left 08:49 djinni` joined
nine m: grammar Foo { token TOP { <foo> }; proto token foo { * }; token foo:sym<a> { a }; }; say Foo.^method_table<foo>.is_dispatcher; say Foo.^method_table<foo>.dispatchees; say Foo.new.foo 08:57
camelia True
()
#<failed match>
nine but:
m: class Foo { proto method foo() { * }; }; say Foo.^method_table<foo>.is_dispatcher; say Foo.^method_table<foo>.dispatchees; say Foo.new.foo
camelia True
Cannot resolve caller foo(Foo:D); Routine does not have any candidates. Is only the proto defined?
in block <unit> at <tmp> line 1

()
nine What am I missing? How can the call to the proto token succeed when it has no candidates? Both calls should go through the same dispatchers and they should conclude that it's a proto and look for matching dispatchees and not find any and complain with that exception 08:59
That's at least what happens with RakuAST, but somehow it works with the old frontend. 09:00
ab5tract gfldex: is returning Nil for nonexistent methods part of the Failure implementation?
I’m not suggesting we remove Nil
nine Aaaaah! It's not something I have to add, but something I have to take away: the $routine.set_onlystar call. While the proto has an onlystar body, we must not take the dispatch shortcut and instead have to just invoke the proto 09:10
lizmat
.oO( less is more! )
09:18
timo gfldex: for null pointers we do have type objects to represent them 09:29
Geth rakudo/main: bce9c3db3a | (Stefan Seifert)++ | src/Raku/ast/code.rakumod
RakuAST: make multi regexes operational

A proto regex must not be marked onlystar as we would then use the optimized dispatcher for multis which would not find any candidates. That's because while a proto regex is a proto routine, the multi candidates will not be actual multis and will retain their full name including the :sym colonpair.
10:59
rakudo/main: 74b357b0dd | (Stefan Seifert)++ | 3 files
RakuAST: support <sym> in multi regexes

That <sym> is referring to the :sym colonpair in the regexes name is specially supported syntax.
Fixes: token foo:sym<bar> { <sym> }
rakudo/main: aada362ff7 | (Stefan Seifert)++ | src/Raku/ast/regex.rakumod
RakuAST: fix confusion of subs and regexes in regex tokens

A <something> in a regex first looks for a regex in lexical scope and only if it cannot find one, it generates a method call on the grammar. We already had most of this in place, but did not check whether the lexical we found was an actual regex and instead took any routine.
Fixes: token foo { <pair> } # which called &pair from the setting.
roast: f2c73fa651 | (Stefan Seifert)++ | S04-declarations/will-complain.t
Make test for assignment error compatible with compile time detection

A smarter compiler will detect this broken construct at compile time and throw a subclass of X::TypeCheck::Assignment. So use string EVAL instead of the block to have the test succeed.
11:01
nine These bring us up to 1141! So my quota for today is actually fulfilled already and I can switch to that other customer whith the end-of-the-week deadline...
lizmat nine++ 11:02
11:32 MasterDuke left
Geth rakudo/main: 29a032138c | (Elizabeth Mattijsen)++ | src/core.c/Regex.rakumod
Prevent dispatch errors on Regex.Bool

By deconting the result of the match before calling .Bool on that. This makes:
   my $code = $*PROGRAM.slurp x 10000;
   my atomicint $seen;
... (19 more lines)
12:17
rakudo/main: 4 commits pushed by (Stefan Seifert)++ 14:11
nine 1142 14:24
Geth rakudo: patrickbkr++ created pull request #5627:
Revert "Assorted grammar tests"
14:28
rakudo/main: 423ede6fc4 | (Patrick Böker)++ | t/12-rakuast/xx-fixed-in-rakuast.rakutest
Revert "Assorted grammar tests"

This reverts commit f6b5422b44e77daf56b96db134773018a0cd713c.
I'm pretty sure I was wrong. LTM explains well, why a leading `<!ww> prevents a branch from taking precedence. Whether a variable interpolation should terminate the LTM chain can be discussed, but is definitely not clear-cut wrong.
14:38
rakudo/main: e1ffa0fe16 | (Patrick Böker)++ (committed using GitHub Web editor) | t/12-rakuast/xx-fixed-in-rakuast.rakutest
Merge pull request #5627 from patrickbkr/revert-add-grammar-interpol-test

Revert "Assorted grammar tests"
15:53 donaldh_ left, japhb left 15:54 japhb joined, donaldh joined 21:25 sena_kun joined 23:09 sena_kun left