🦋 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 00:02 reportable6 joined 06:00 reportable6 left, reportable6 joined 06:09 codesections left 06:11 codesections joined 09:24 ab5tract joined
Geth rakudo/main: 9db0bc973c | (Brian Duggan)++ (committed using GitHub Web editor) | 7 files
RakuAST: implement recursive regexes

This adds RakuAST support for the recursive regex token, <~~>.
09:45
09:59 gfldex left 10:00 gfldex joined
lizmat nine: I'm looking at making: sub () { $^a } fail properly at compile time 10:39
it looks like I need a way to ask $*BLOCK whether it has seen a real signature
when the signature is parsed, it is already "attach"ed to the $*BLOCK 10:40
I just don't see a way to introspect that
thoughts?
nine Wait, $*BLOCK is only known by the grammar and actions. But surely such a check should be done by the node at CHECK time? 10:53
lizmat hmmm... I guess I should learn that CHECK time is not too late to do a compile time error, right ? 10:57
nine Well the name should kinda give it away, shouldn't it? :) 10:58
lizmat well, no, not to me... CHECK time to me is at a time you *can* report errors , but have lost the position in the code where they occurred 11:01
ok, so RakuAST::VarDeclaration::Placeholder is not a CheckTime, so that would have to change
nine But nodes still have an origin? 11:10
lizmat I guess that's something I need to burn into my brain :-) 11:13
ok, so I added a CheckTime check, yet the error does *not* show the location in the source 11:21
ah, and it always fails :-( 11:22
I guess I could check for any parameters, but then: sub () { $^a } would still succeed 11:24
nine AFAIK error reporting is not fully integrated yet 11:27
12:00 reportable6 left 12:01 reportable6 joined
lizmat ok, so I basically got the PERFORM-CHECK logic in there, but have no reliable way to distinguish from: 12:23
a. no signature specified at all (an empty Signature object is always created)
b. a signature without parameters (an empty parameters list is always created) 12:24
c. parameters that have been added by placeholders
not setting up an empty parameters list, seems the most logic thing to do 12:25
but then there's a *lot* of places that are iterating over it and assume that there's something to iterate 12:26
which feels meh
vrurg lizmat: I'm out of context, but let me a wild guess for a: a subclass? NoSignature is Signature. 13:36
MasterDuke a lot of the remaining spectest fails are error related, e.g., the one fail in t/spec/S32-array/push.t is: 14:39
    # Expected: X::TypeCheck::Argument
    # Got:      X::AdHoc
[Coke] Ooh, that seems low-hanging. 14:55
nine I've been saying for months that there is a _lot_ of low hanging fruit like that :) 15:04
lizmat: what if you phrase the condition differently? "if there are placeholder parameters, there must not be any other parameters" 15:05
Ah, that still doesn't cover sub () { $^a }
[Coke] to test, build as normal, then set the env var to run tests/roast? 15:13
nine yes 15:14
[Coke] for roast, is there a special target, or just 'spectest' ok? 15:33
any pointers on the unicode symbols in the --target=ast output? 15:46
Statement::Expression ⚓▪𝄞 -e:1 ⎡3.say⎤
Nemokosch > <vrurg> 'sunk', 'block', and 'key' 15:53
I guess it's applicable again
16:12 discord-raku-bot left, discord-raku-bot joined
[Coke] would something like gist.github.com/coke/2786e14b70166...bda6e80367 be helpful? 16:15
anyone have a pointer to a vim wrapper that lets you drop it in a pipeline? I've lost my old link to such a thing. 16:19
nine [Coke]: I'm not sure what you mean with that gist? 16:30
[Coke] starting a list of places in tests for rakuast where the only error is the expected exception type, showing the file, the snippet, and the types 16:41
I was putting a list together for me to work on, but if it's helpful for anyone else... great, I guess?
16:52 squashable6 left
[Coke] (vim wrapper) now called "vipe" and part of moreutils in brew. 16:52
16:54 squashable6 joined 18:00 reportable6 left, reportable6 joined 18:20 Xliff joined 18:22 ab5tract left 19:34 RakuIRCLogger left, RakuIRCLogger joined
Geth rakudo/main: 6d9c4c7694 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: add sorry for using placeholder when not allowed

When a placeholder is encountered, check whether the signature of the placeholder owner already has an instantiated parameters list. If it has, then add a X::Signature::Placeholder sorry. Except if the placeholder name is '@_' or '%_': if *these* occur in the parameters list, then they're ok: ... (19 more lines)
19:48
19:53 nine left, nine joined
Geth rakudo/main: 5 commits pushed by (Elizabeth Mattijsen)++ 19:59
rakudo/main: 1dcf6452a5 | (Elizabeth Mattijsen)++ | src/Raku/ast/variable-declaration.rakumod
RakuAST: use variable instead of calling the method (again)
20:18
rakudo/main: b583c33317 | (Elizabeth Mattijsen)++ | t/12-rakuast/placeholder.rakutest
RakuAST: test RakuAST::VarDeclaration::Placeholder::Slurpy(Array|Hash)