🦋 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:00 linkable6 left, evalable6 left 01:01 evalable6 joined 01:02 linkable6 joined
japhb [Coke]: Missing UTF-16 garbled Windows Terminal screenshot fixed. Thanks for the reminder. :-) 01:54
[Coke] đź‘Ť 01:55
02:02 evalable6 left, linkable6 left, linkable6 joined 02:03 evalable6 joined 02:27 MasterDuke joined 05:16 epony joined 06:00 reportable6 left 06:03 reportable6 joined 07:13 coverable6 left, reportable6 left, committable6 left, sourceable6 left, squashable6 left, releasable6 left, shareable6 left, bloatable6 left, statisfiable6 left, notable6 left, tellable6 left, benchable6 left, unicodable6 left, quotable6 left, benchable6 joined, coverable6 joined 07:14 notable6 joined, unicodable6 joined, sourceable6 joined, statisfiable6 joined, quotable6 joined 07:15 reportable6 joined, tellable6 joined, releasable6 joined, bloatable6 joined, squashable6 joined, shareable6 joined 07:16 committable6 joined 08:06 nine left, nine joined 08:22 sena_kun joined
lizmat m: say v6c cmp v6.c TIL 11:08
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> say v6c cmp v6.c⏏ TIL
expecting any of:
infix
infix stopper
postfix
statement end
statement mod…
lizmat m: say v6c cmp v6.c # TIL
camelia Same
12:00 reportable6 left 12:03 reportable6 joined
Geth rakudo/main: 88e479f888 | (Stefan Seifert)++ | 4 files
RakuAST: give correct error message when accessing non-existing package variable
12:04
lizmat So making progress on getting declarator docs working 13:42
token comment:sym<#|> {
'#|' \h $<attachment>=[\N*]
{ nqp::push(@*LEADING-DOC, ~$<attachment>) }
}
nine: any idea why that would be called 3 times when just having:
#| This is a sub
sub a() { }
ah, this only appears to happen at the compunit scope 13:45
Geth rakudo/main: 7dd3696b56 | (Stefan Seifert)++ | src/Raku/ast/code.rakumod
RakuAST: fix package subs not found before their lexical location in code

Fixes: Foo::foo; package Foo { our sub foo() {} }
14:31
rakudo/main: bd084fc3e4 | (Stefan Seifert)++ | src/Raku/ast/variable-declaration.rakumod
RakuAST: fix package variables being VMNull before their lexical location

Fixes: Foo::foo; package Foo { our $x = 1; our sub foo() { $x.defined } }
14:55 epony left 15:01 epony joined
lizmat nine: re pod strings: I wonder whether we really need to make them all StrLiterals 15:23
the result of all pod strings is basically a big WVal array in $=pod 15:24
[Tux] where is "where" documented for "multi method foo (Int:D $x where ...)"? (I want this case to only allow 0..5) 16:04
I scanned docs.raku.org for "where" but to no avail 16:05
lizmat docs.raku.org/language/signatures....onstraints 16:06
[Tux] So my guessed "(Int:D $x where { 0 <= * <= 5 })" should be correct 16:08
[Coke] you need $_ there, inside the {}s 16:11
m: sub x(Int:D $x where 0 <= * <=5) { $x.say }; x(-3) 16:12
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Int (-3)
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
[Coke] without the {}
you can use the *
lizmat m: sub a (Int:D $x where 0 <= * <= 5) { }
camelia ( no output )
lizmat m: sub a (Int:D $x where { 0 <= $_ <= 5 }) { } 16:13
camelia ( no output )
ugexe Should github.com/rakudo/rakudo/blob/bd08...m6#L88-L89 should start with `my $!;`? 16:47
there are a couple of other instances of checking global `$!` after a `try` in there as well 16:48
18:00 reportable6 left, reportable6 joined
Geth rakudo/main: 00d35fbd89 | (Elizabeth Mattijsen)++ | src/Raku/ast/doc-declarator.rakumod
RakuAST: add RakuAST::Doc::DeclaratorTarget.set-leading/trailing

For completeness
18:13
rakudo/main: f7a0caeae4 | (Elizabeth Mattijsen)++ | 3 files
RakuAST: initial stab at integrating declarator blocks

  - Add X::Syntax::Pod::DeclaratorTrailing::MissingDeclarand error
   class to mark trailing declarator doc that cannot be attached to
   anything
  - Add tokens for #| #|(...) #= #=(...) declarator docs to grammar
  - Add associated methods to actions
... (16 more lines)
lizmat gist.github.com/lizmat/24de913b31b...7c4e422c10 so is this a trailing declarator doc bug ?? 18:32
Geth rakudo/main: a930b3ba2f | (Elizabeth Mattijsen)++ | 2 files
RakuAST: multiple calls to tokens are apperently normal

The legacy grammar had a way to make sure that each leading or trailing declarator doc was only added once. Copy the same mechanism into the Raku grammar
18:59
nine LOL 19:12
nine@sphinx:~/rakudo (main =)> RAKUDO_RAKUAST=1 ./rakudo-m --ll-exception -e 'class Bar::Tap { }; say Bar::Tap.WHO'
Tap
nine@sphinx:~/rakudo (main =)> RAKUDO_RAKUAST=1 ./rakudo-m --ll-exception -e 'class Bar::Foo { }; say Bar::Foo.WHO' 19:13
Bar::Foo
lizmat so it's looking up the parts in the setting ?
m: say Q|class Bar::Tap { }; say Bar::Tap.WHO|.AST.EVAL
camelia ===SORRY!=== Error while compiling
Confused
------> class Bar::Tap { }; say Bar::Tap.WHO⏏<EOL>
lizmat meh 19:14
nine Lexically: 19:15
nine@sphinx:~/rakudo (main =)> RAKUDO_RAKUAST=1 ./rakudo-m --ll-exception -e 'class Foo { }; class Bar::Foo { }; say Bar::Foo.WHO'
Foo
Geth rakudo/main: 679d5c41c6 | (Stefan Seifert)++ | src/Raku/ast/scoping.rakumod
RakuAST: fix wrongful stealing of stashes

With multi-part package names, we could have found the final part of the name lexically and then went on to steal that totally unrelated package's WHO.
19:54
nine That's got to be my most favourite commit title of all time :)
19:56 linkable6 left, evalable6 left
lizmat hehe 19:56
Geth rakudo/main: f380b87ba7 | (Elizabeth Mattijsen)++ | 3 files
RakuAST: fix .raku of Rakuast::Doc::DeclaratorTarget objects

Creating a .raku representation of object 1 that has an object 2 as an attribute, that has object 1 as an attribute, it is a bit of a challenge to prevent infinilooping.
This adds a "declarator-docs" method to DeclaratorTargets, which ... (7 more lines)
19:58
19:59 evalable6 joined, linkable6 joined 20:16 Geth__ joined, lizmat_ joined, RakuIRCLogger left 20:17 RakuIRCLogger joined 20:18 Geth left, lizmat left, lizmat_ left 20:19 lizmat joined 20:29 discord-raku-bot joined 21:33 heartburn left 21:40 heartburn joined 22:17 lizmat left 22:18 lizmat joined 22:21 lizmat left, lizmat joined