🦋 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.
01:22 japhb joined 08:26 sena_kun joined
Geth rakudo/main: ec381c7002 | (Stefan Seifert)++ | src/Raku/ast/code.rakumod
RakuAST: fix `let` not restoring values on unsuccessful block exit

Fixes: my $a = 42; { let $a = 23; Mu }; say $a
09:51
rakudo/main: 37b5aeb891 | (Stefan Seifert)++ | src/Raku/ast/code.rakumod
RakuAST: fix `let` restoring values even on successful block exit

If a code block contains let statements, we need to keep its return value even if the block is in sink context or the routine has a --> Nil signature. Otherwise the UNDO phaser won't know whether to undo anything.
rakudo/main: 1849fc8b4a | (Stefan Seifert)++ | 4 files
RakuAST: stub TEMP phaser support

This is about as far as the old frontend ever got.
11:05
nine m: use Test; my $x = 2; my $y := $x; my $x = 3; is $y, 3 11:07
camelia Potential difficulties:
Redeclaration of symbol '$x'.
at <tmp>:1
------> use Test; my $x = 2; my $y := $x; my $x⏏ = 3; is $y, 3
ok 1 -
nine m: my $x; my $x; 11:09
camelia Potential difficulties:
Redeclaration of symbol '$x'.
at <tmp>:1
------> my $x; my $x⏏;
nine Why on earth did we not make this a hard error?
Geth rakudo/main: c1f424a5e5 | (Stefan Seifert)++ | 3 files
RakuAST: fix compilation failing on duplicate variable declarations

Apparently it's ok to declare the same variable multiple times and we only warn about it. However the QAST compiler is not so lenient, so we need to avoid ading the same QAST variable declaration.
Fixes: my $x; my $x;
13:15
rakudo/main: 8bbd71044b | (Stefan Seifert)++ | 3 files
RakuAST: suggest declaring a multi on redeclaration of routines

Gets the correct error message for: sub foo() { }; sub foo() { }
nine That's 1116 now
Geth rakudo/main: d0be5d1be1 | (Stefan Seifert)++ | 2 files
RakuAST: prohibit usage of placesholders in routines with explicit signature

Fixes sub foo() { $^x } # to fail appropriately
14:10
nine And 1117
If my LibreOffice foo is correct, I'll hit the finish line in 14 weeks, that's late November 14:16
m: { constant $foo = 1 }; { constant $foo = 2 }; say GLOBAL::<$foo> 15:13
camelia 2
nine Currently the RakuAST frontend complains about this re-declaration of an our-scoped constant in the same package. I'd argue that's a sensible position to hold. Right? If yes, I'll just fix the spectest that does this by accident. 15:14
ab5tract nine: I 100% endorse such an adjustment 16:00
Sometimes the phrase “times were different back then” really do reasonably apply, and whatever logic was behind setting that into spec is no longer useful to us now 16:02
*does
Oh, just re-read and noticed the “by accident” .. that’s miles ahead of this being put to writ on purpose 16:04
MasterDuke nine: is there a spectest that explicitly allows redeclaration with only a warning? i'd be happy to make that a compile error 17:36
nine MasterDuke: S04-declarations/constant.t just uses the same names "foo" and "bar for several more or less unrelated tests. 17:38
Geth roast: fb3d3a08f4 | (Stefan Seifert)++ | S04-declarations/constant.t
Skip tests for NYI constants as type constraints

Support for using constants as type constraints in variable definitionsa has never been implemented and these tests have only "worked" because the compiler didn't look too closely and because the tests for type constraints did not ask why the code would die. A different compiler
  (frontend) would stumble over these without actually having fewer
features.
17:48
roast: 172634a3cd | (Stefan Seifert)++ | 4 files
Fix redeclaration of our-scoped constants in tests

Older compilers didn't notice that these tests were re-declaring the same our-scoped constants over and over. Newer compilers rightfully complain, so fix the tests.
nine MasterDuke, ab5tract ^^^ 17:49
Geth rakudo/main: 5 commits pushed by (Stefan Seifert)++
nine 1118
MasterDuke nice 17:50
nine Our spectest authors clearly did not notice that constants are our scoped by default 17:51
lizmat that feels like why t/spec/S32-array/splice.t is now consistently failing? 19:11
already have an 'our constant @tests' in the package ?
nine yes 19:25
Geth roast: b9bb4f6bf9 | (Elizabeth Mattijsen)++ | S32-array/splice.t
Fix test
19:33
lizmat what percentage were we thinking about again to start thinking about the actual language release ? 19:46
22:08 sena_kun left