🦋 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
vrurg Read above what Coke tries to achieve. 00:04
01:00 linkable6 left, evalable6 left 01:01 linkable6 joined, evalable6 joined 03:50 reportable6 left, releasable6 left, squashable6 left, greppable6 left, unicodable6 left, committable6 left, statisfiable6 left, linkable6 left, benchable6 left, sourceable6 left, tellable6 left, nativecallable6 left, coverable6 left, bisectable6 left, bloatable6 left, quotable6 left, evalable6 left, notable6 left, shareable6 left 03:51 notable6 joined, evalable6 joined, coverable6 joined, benchable6 joined, shareable6 joined 03:52 tellable6 joined, statisfiable6 joined, quotable6 joined, linkable6 joined, bloatable6 joined, reportable6 joined, greppable6 joined, releasable6 joined, sourceable6 joined 03:53 nativecallable6 joined, bisectable6 joined, unicodable6 joined, squashable6 joined, committable6 joined 04:53 quotable6 left, squashable6 left, statisfiable6 left, sourceable6 left, greppable6 left, coverable6 left, bloatable6 left, nativecallable6 left, benchable6 left, tellable6 left, committable6 left, linkable6 left, evalable6 left, shareable6 left, notable6 left, releasable6 left 04:54 statisfiable6 joined, committable6 joined, shareable6 joined, squashable6 joined, sourceable6 joined 04:55 coverable6 joined, greppable6 joined, tellable6 joined, notable6 joined, quotable6 joined 04:56 releasable6 joined, bloatable6 joined, linkable6 joined, benchable6 joined, nativecallable6 joined, evalable6 joined 05:56 squashable6 left, benchable6 left, bloatable6 left, greppable6 left, linkable6 left, committable6 left, coverable6 left, evalable6 left, reportable6 left, unicodable6 left, notable6 left, nativecallable6 left, shareable6 left, statisfiable6 left, quotable6 left, releasable6 left, sourceable6 left, tellable6 left 05:57 linkable6 joined, statisfiable6 joined 05:58 nativecallable6 joined, releasable6 joined, evalable6 joined, shareable6 joined, notable6 joined, bloatable6 joined, greppable6 joined, benchable6 joined, quotable6 joined, sourceable6 joined 05:59 reportable6 joined, tellable6 joined, committable6 joined, unicodable6 joined, coverable6 joined 06:00 squashable6 joined, reportable6 left 06:01 reportable6 joined 07:53 nativecallable6 left, coverable6 left, evalable6 left, committable6 left, shareable6 left, notable6 left, greppable6 left, quotable6 left, releasable6 left, squashable6 left, bisectable6 left, tellable6 left, unicodable6 left, bloatable6 left, sourceable6 left, linkable6 left, statisfiable6 left, benchable6 left, reportable6 left, reportable6 joined, benchable6 joined, coverable6 joined, statisfiable6 joined 07:54 notable6 joined, linkable6 joined 07:55 squashable6 joined, nativecallable6 joined, shareable6 joined, bisectable6 joined, committable6 joined, tellable6 joined, releasable6 joined, quotable6 joined 07:56 sourceable6 joined, greppable6 joined, unicodable6 joined, evalable6 joined, bloatable6 joined
nine I'd say just load CORE.c setting. After all what's the cost? We are slightly inefficient when throwing an error and exiting. 09:05
09:06 sena_kun joined
Geth rakudo/main: 0a79b6a95b | (Elizabeth Mattijsen)++ | src/Raku/ast/variable-access.rakumod
RakuAST: another step closer to making "no strict" work

This generates the correct QAST for auto-declared variables. But to prevent the QAST to generate this for every occurrence of an auto- declared variable, it needs to mark it as declared.
The resolver has a "declare-lexical" method to do just that. But only if the resolver is not in "batch" mode. And so far it always seems to be. Even if the declaration is happening on a CHECK-BEGIN method. So I'm unclear on how to proceed, and am hoping nine will be able to produce some clarity.
12:00 reportable6 left 12:02 reportable6 joined
Geth roast: aa7f34bc59 | (Elizabeth Mattijsen)++ | S05-metasyntax/interpolating-closure.t
Remove worries
nine lizmat: to be properly handled RakuAST::Var::Lexical::Auto should be a RakuAST::Declaration. But that still wouldn't be right for every access but the first. So why not generate a RakuAST::VarDeclaration::Simple for the first access and a plain RakuAST::Var::Lexical for subsequent accesses? 13:15
lizmat but how to determine what the first access is ? 13:16
in a given scope ?
Geth rakudo/main: b50422489e | (Elizabeth Mattijsen)++ | 3 files
RakuAST: add test for RakuAST::Regex::Assertion::Callable

And fix/refine its deparsing
nine lizmat: that's declare-lexical and find-lexical again 13:22
lizmat but they need a resolver?
Ah, you mean in the action do a resolver action?
nine: BTW,is there a difference between $*R.foo and self.r.foo ? 13:24
ah, yes, duh, sorry for the noise 13:25
nine Yes, this needs to be done in Actions.
13:27 linkable6 left, evalable6 left 13:29 evalable6 joined, linkable6 joined
Geth rakudo/main: 238931ac82 | (Elizabeth Mattijsen)++ | 5 files
RakuAST: make "no strict" work in the Raku grammar

  - Remove class RakuAST::Var::Lexical::Auto
  - Add class RakuAST::VarDeclaration::Auto
   This is for all intents and purposes, the same as the
   RakuAST::VarDeclaration::Simple class, but it deparses and rakufies
   as a RakuAST::Var::Lexical.
... (7 more lines)
14:39 linkable6 left, evalable6 left 14:40 evalable6 joined 14:41 linkable6 joined
Geth roast: 8d0a9c1371 | (Elizabeth Mattijsen)++ | S05-metasyntax/interpolating-closure.t
Revert "Remove worries"

This reverts commit aa7f34bc591b67f801ea67193158ab2a53aeea08.
For some unclear reason, this now fails **ONLY** when doing "make spectest" with RAKUDO_RAKUAST=1. Not bothering to spend any further time on this so reverting.
lizmat nine: the "no strict" test file now fails only because of missing suggestions for X::Undeclared error 14:44
I assume these suggestions would need to be generated by the resolver, right ?
nine I thought that logic was contained in the exception classes? 14:53
lizmat nope, in the case of X::Undeclared, it's a simple attribute to be given 14:56
Geth rakudo/main: d4792fdea6 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: add test for RakuAST::Var::Package
15:47 japhb left 15:55 japhb joined
[Coke] vrurg: Sure, but there is a test to catch it for some reason. 16:39
(as to the why bother with a typed exception) 16:40
Geth rakudo/rakuast-v5: 2e4d3177fc | (Will Coleda)++ | src/Raku/Grammar.nqp
copy lang-version from non-AST Grammar
rakudo/rakuast-v5: 18f06edc0a | (Will Coleda)++ | 2 files
DRAFT: copy lang-version from non-AST Grammar

Add sample showing that throwing the exception is the problem
  'use 4' is processed correctly, but use 5 dies on the exception
rakudo/rakuast-v5: 943255fcc6 | (Will Coleda)++ | src/Raku/Grammar.nqp
failed attempt to get a resolver setup

so we can safely throw the exception
[Coke] updated github.com/rakudo/rakudo/pull/5237 - getting closer, but not sure how to setup the resolver properly at this point so I can throw the typed exception. 17:59
18:00 reportable6 left 18:01 reportable6 joined 19:13 guifa joined 19:16 guifa_ left
Geth rakudo/main: ba37259678 | (Elizabeth Mattijsen)++ | 3 files
RakuAST: add deparsing/test for RakuAST::Var::Lexical::Setting
japhb Was there some point at which current versions of zef or prove6 stopped working on older Rakudo releases? I went to update one of my modules yesterday and found that it was failing CI tests but only on older Rakudo (such as 2022.02); latest works just fine. 20:47
Example of failing run: github.com/japhb/Text-MiscUtils/ac...7963447581
I went to build a local 2022.02 (and install my usual modules) to see if I could recreate the problem locally, and started to get weird errors in modules that never had problems installing. 20:48
lizmat ugexe or nine might know 20:49
japhb lizmat: Fair enough. 20:50
Geth rakudo/rakuast-v5: 212bfd61cb | (Will Coleda)++ | src/Raku/Grammar.nqp
Don't just load resolver, try to load v6.c
rakudo/rakuast-v5: 5932db2385 | (Will Coleda)++ | src/Raku/Grammar.nqp
remove debug
[Coke] vrurg: I've tried to load v6.c in that latest version, still failing with trying to invoke something on an NQPMu, still investigating. 20:57
vrurg [Coke]: could be something resolver-specific. Unfortunately, I can only dream of doing something for RakuAST currently. Therefore lacking knowledge in the area. :( 20:59
lizmat [Coke]: "lang_setup2" is that correct ?
vrurg lizmat: for now – it is. Hope it changes later. 21:01
lizmat ack
vrurg For the moment the primary goal is to draft something that works. Then make it do it the right way. :)
[Coke] lizmat: yes, I needed to call it explicitly because the copy from Grammar was triggering it so it could grab the value of <version> to do some logic on it 21:06
lizmat oki, it just looked strange looking at the diff 21:07
[Coke] so I moved it out of the way, call it explicitly. Ah, vrurg, at some point 'use v6' started failing too.
Would help if I had any idea what I was doing.
Figured this would be an easy change, not so far. :)
so, lizmat, my "move it out of the way" probably broke it. 21:09
vrurg I haven't noticed it at first, but how do you expect Raku::Actions::lang_setup2($/) to work? It's a method.
[Coke] vrurg: good catch 21:10
vrurg [Coke]: I'd say you need a method to which you'd be delegating from RakuAST::Actions.lang_setup.
[Coke] AHAHAHAHA 21:11
that was the remaining bug, thank you. :_)
er, :)
vrurg This is for now, to debug. But later the logic of throwign the exception should get its own method where it'd load the CORE, pull in the exception class, etc.
[Coke] ok, now -e 'use v6' and -e 'use v5' both do something reasonable.
running 01-errors.t complains "Unable to parse source" 21:12
vrurg Reminds me: "All humanity will be demolished, only cats would survive!" – "AHAHAHAHA! Oops, meow!"
Geth rakudo/rakuast-v5: ff355bf07a | (Will Coleda)++ | src/Raku/Grammar.nqp
this is a method call!

[Coke] Glad I pushed what I had to get eyes, thank you 21:13
Geth rakudo/main: 4b1eaecc03 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: add test for RakuAST::Trait::Hides
[Coke] vrurg: the v5 exception in the standard grammar isn't pulled out (but it's doing less work) 21:38
vrurg [Coke]: sorry, don't get what you mean. 21:39
Ah, got it !
I'm used to call it 'legacy grammar' now. :) 21:40
Looking at the test, I think it works because `throws-like` is using its outer context to resolve symbols.
RakuAST might do EVAL differently. But I wouldn't rely on the legacy behavior here because if we ever get to the point of multi-threaded compiler the exception might start being more useful even if thrown for a bare, non-eval, compunit. 21:42
[Coke]: BTW, speaking of less work, it relies upon World.typed_exception method. This is where all the resolution magic happens for the legacy parser. 21:44
Geth rakudo/main: b65253481e | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Raku.pm6
RakuAST: fix .raku of package.parameterization
21:48 sena_kun left
Geth rakudo/main: a30f08cbee | (Elizabeth Mattijsen)++ | t/12-rakuast/TODO
RakuAST: remove some untestable RakuAST:: classes from TODO list