🦋 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 [Coke] left, [Coke] joined, reportable6 left 00:01 reportable6 joined 01:10 evalable6 left, notable6 left, sourceable6 left, tellable6 left, greppable6 left, shareable6 left, benchable6 left, bloatable6 left, releasable6 left, unicodable6 left, quotable6 left, squashable6 left, nativecallable6 left, statisfiable6 left, linkable6 left, bisectable6 left, committable6 left, reportable6 left, tellable6 joined, bloatable6 joined 01:11 sourceable6 joined, shareable6 joined, benchable6 joined, linkable6 joined, unicodable6 joined, nativecallable6 joined, releasable6 joined, greppable6 joined, reportable6 joined, quotable6 joined 01:12 squashable6 joined, notable6 joined, committable6 joined 01:13 statisfiable6 joined, bisectable6 joined, evalable6 joined 04:48 shareable6 left, tellable6 left, quotable6 left, reportable6 left, linkable6 left, releasable6 left, greppable6 left, bisectable6 left, squashable6 left, committable6 left, evalable6 left, bloatable6 left, nativecallable6 left, sourceable6 left, unicodable6 left, benchable6 left, statisfiable6 left, notable6 left, coverable6 left, coverable6 joined 04:49 tellable6 joined, benchable6 joined, notable6 joined, squashable6 joined, greppable6 joined 04:50 unicodable6 joined, shareable6 joined, committable6 joined, releasable6 joined, quotable6 joined, linkable6 joined, reportable6 joined 04:51 sourceable6 joined, statisfiable6 joined, nativecallable6 joined, bloatable6 joined, bisectable6 joined, evalable6 joined 06:00 reportable6 left 06:02 reportable6 joined 07:01 samebchase left
Geth rakudo/main: 8797bf9527 | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: streamline EXPR action, part 2/2

  - remove some dead code / unnecessary checks
  - provided some shortcuts to avoid repeated lookups
  - don't else / if if you can elsif
08:12
rakudo/main: fac51f9afa | (Elizabeth Mattijsen)++ | src/Raku/ast/operator-properties.rakumod
RakuAST: represent ternaries properly in properties
08:34
08:44 sena_kun joined
ab5tract vrurg: I meant I can make it get defined, but it happens in GLOBAL, not on this code block. the code block does not exist at the moment the signature is being parsed. maybe I can fix that 08:55
Geth rakudo/main: cb0f4ec2ad | (Elizabeth Mattijsen)++ | src/Raku/Grammar.nqp
RakuAST: streamline Grammar.EXPR-reduce

  - call action method directly without NQP's private method
  - apply shortcuts in the correct scope
  - don't bother setting a "key", handle in action call directly
08:58
09:44 linkable6 left, evalable6 left, linkable6 joined 09:46 evalable6 joined
Geth rakudo/main: ab613324e8 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: split up Actions.EXPR into several parts

Each part handling a certain situation, rather than passing an argument to indicate the situation, so we don't need to check twice for a given situation.
10:10
rakudo/main: 008b73de7e | (Elizabeth Mattijsen)++ | 2 files
RakuAST: simplify end of EXPR handling

  - don't use NQP private method with its additional checks
  - turned out the .MATCH was not needed
  - make action method return its $/ to simplify return value of EXPR
10:58
11:23 Altai-man joined 11:24 Altai-man left
Geth rakudo/main: f3215d059d | (Elizabeth Mattijsen)++ | src/Raku/ast/operator-properties.rakumod
RakuAST: remove the "dotty" category

  - move all of the times to "postfix", which is more general
  - add some more postfix entries
11:39
rakudo/main: d33af75895 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: provide classes with needed OperatorProperties access
12:00 reportable6 left 12:02 reportable6 joined
Geth rakudo/main: e958040c43 | (Elizabeth Mattijsen)++ | 3 files
Remove Test.is_approx

Was marked DEPRECATED in 2018 already. Technically we should've waited until 5.e is released, but removing it now feels as good a moment as any.
12:08
12:32 Xliff joined
Xliff Raku-GLib suite timing statistics for Raku 2023.08.109.g.5.d.43.ff.5.b.47 12:32
Using the following processor: AMD Ryzen 9 5950X 16-Core Processor
Total number of projects: 34 (506509 loc)
Total non-parallel compile times: 11767.290 (346.097 avg)
Total parallel compile times: 2567.759 (75.522 avg) 4.583x speedup
12:59 lizmat_ joined 13:02 lizmat left 13:10 Xliff left
vrurg ab5tract: Unfortunately, I don't see the context. But neither I like the idea of "attaching to GLOBAL" nor I see why the "redeclaration" error is a problem. 13:18
ab5tract vrurg: definitely not intending to submit the attaching to GLOBAL hack as a PR .. it's just the closest to a solution I've managed so far 13:31
vrurg ab5tract: But what problem are you trying to solve? Looks like it's what I'm missing in first place. :) 13:33
ab5tract the redeclaration error is a problem because Raku/Grammar.nqp absorbs the signature before it has entered the package scope. see github.com/rakudo/rakudo/blob/e958....nqp#L2951 13:34
nemokosch so the error is the goal itself? 13:35
ab5tract this is while trying to unlock parsing of R[Int $x where { $x % 2 }]
* role R[Int $x where { $x % 2 }] {} 13:36
$*VAR is not lexically resolved to a scope when check-variable($*VAR) is called, because $*DECLARE-TARGETS is set to 0, because the package scope hasn't been entered 13:39
nemokosch but that error message indicated that the package scope should have been entered probably
not saying that it's super-duper intuitive but that's how functions work as well 13:40
ab5tract entering it causes make spectests to stall out
nemokosch eg the signature of a function pretends to live in the scope of the function
ab5tract it should probably enter some kind of block scope, instead of the stubbed package scope that I've been trying
one doesn't just enter a package that hasn't happened yet :) 13:53
m: sub f(Int $x where { $x % 2}} { my Int $x = 5; "2 be 2" } 14:16
camelia ===SORRY!=== Error while compiling <tmp>
Malformed parameter
at <tmp>:1
------> sub f(Int $x where { $x % 2}⏏} { my Int $x = 5; "2 be 2" }
expecting any of:
constraint
ab5tract m: sub f(Int $x where { $x % 2}) { my Int $x = 5; "2 be 2" }
camelia Potential difficulties:
Redeclaration of symbol '$x'.
at <tmp>:1
------> ub f(Int $x where { $x % 2}) { my Int $x⏏ = 5; "2 be 2" }
14:56 lizmat_ left
vrurg ab5tract: considering that a role is a routine – I see it's having the same behavior as a normal routine. Still see no problem here. 14:56
14:56 lizmat joined
vrurg I would be reacting sporadically because I'm trying to work. 14:58
15:32 squashable6 left, squashable6 joined 15:48 hythm joined
ab5tract vrurg: no worries! thanks for checking in. I'm not sure how else to explain it beyond referencing the code in Grammar.nqp... with :DECLARE-TARGETS(0), there is no call to .declare-lexical, which is correct in that we don't want to install into the current scope of the resolver. However, before the .enter-package-scope($<signature>) call can happen (which would do the lexical declaration), we already hit the sorry from the compiler that checks 16:08
for lexical resolution
lizmat grr... infix = has different operator properties depending on context :-( 16:21
ab5tract oouch :(
nemokosch if you are horrified, imagine how horrified a mere user is 16:32
lizmat nemokosch *sigh* 16:33
this is about torturing the core developers, not users, so I don't see how your remark can be taken as something positive 16:35
nemokosch but this decision is something that makes everyone suffer
you made it sound like an implementation detail but it's the fundamental design of the syntax: hiding two operators behind the same visuals 16:36
lizmat ok, and which two operators are hiding then? 16:37
nemokosch "list assignment operator" and "item assignment operator" 16:38
lizmat and that's different in other languages ?
nemokosch yes, there is only one assignment operator 16:40
lizmat I'm not following, explain 16:42
nemokosch that there is only one assignment operator in other languages? 16:43
lizmat as there is in Raku ? 16:44
Geth rakudo/main: c0667de0ea | (Elizabeth Mattijsen)++ | src/Raku/ast/operator-properties.rakumod
RakuAST: more OperatorProperties fixes
16:45
nemokosch no, in Raku, these are two different operators that just look the same 16:46
they have different precedence levels
lizmat right, and that is different from other programming languages? 16:47
nemokosch from all languages I know 16:48
lizmat interesting... also Perl ?
nemokosch it's not "poor me who needs to wrangle the operator properties depending on context" but "poor user who ever wonders why there are two = entries in the docs at two different precedence levels" or "poor users who can't wrap their heads why @a = 1, 2, 3 and $a = 1, 2, 3 do two syntactically different things"
Perl was a language meant to be fixed for a reason...
all the bad things naturally come from Perl 16:49
lizmat well, I guess we can agree the heritage of this behaviour
nemokosch I don't think it can really be fixed at this point but the reaction was still painful at a gut level for me 16:54
not for the first time, it seems that not even the implementors like the design quite often 16:55
lizmat well... there's many things of the implementation I don't like, and I'm fixing them 16:56
this one had fallen below my radar... 16:57
oddly enough, only 3 RakuAST test-files would fail if a switch would be made to list-assignment precedence 17:01
so the dependency does not seem to be that great
nemokosch that's interesting indeed but at the end of the day, the @a = 1, 2, 3 versus $a = 1, 2, 3 is highly user-space behavior, and I can't think of even a compatibility mode if something about this were to change 17:04
lizmat use v6.e could be that
nemokosch unless the distinction is built up at core level but just yesterday I was reading up on the NQP expression parser and that deals with precedence level already
so probably that's not the case
lizmat nemokosch I'm replacing the NQP expression parser by a Raku one 17:05
nemokosch 👀 17:06
that's big news
lizmat see method EXPR in src/Raku/Grammar
fwiw, the plan is to completely remove NQP's HLL::Grammar as a superclass 17:15
nemokosch how does it affect the performance?
lizmat compilation speed should improve because a *lot* of hash lookups would be replaced by method calls on the OperatorProperties object 17:16
and a lot of splatting hashes should also be gone, so both lookup and hash creation should go *way* down 17:17
ab5tract vrurg: I've gotten what looks like a fix. btw, my "goal" is to get 't/spec/S14-roles/parameterized-basic.t' to compile and then pass 17:27
I find that having a single-minded focus like that helps to find direction in the set of possible things to work on in RakuAST 17:28
18:00 reportable6 left 18:02 reportable6 joined
ab5tract so much for that fix... even though it fixes the issue to do so, it breaks other things to enclose the match to <signature> with a .enter-block-scope('Block') and a .leave-block-scope 18:05
(along with setting :DECLARES-TARGETS(1)) 18:14
19:02 linkable6 left, evalable6 left 19:04 linkable6 joined, evalable6 joined
Geth nqp/main: 6669ea2ec4 | (Tom Browder)++ (committed using GitHub Web editor) | CREDITS
Update CREDITS

Add myself
19:11
lizmat tbrowder__++ 19:16
tbrowder__ thnx liz 19:43
i'm trying to read the src code for how raku gets distro info but no breakthru yet. what i would really like to see is a list somewhere in raku github maybe a list of contributed $*DISTRO outputs for real user systems. 19:48
Geth rakudo/main: ea12dec96c | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: simplify infix operator test
19:51
rakudo/main: 98312dcb52 | (Elizabeth Mattijsen)++ | 4 files
RakuAST: codegen item assignment differently

  - add RakuAST::Assign::Item class, subclass of RakuAST::Infix
   which only difference is that it has operator properties matching
   item assignment rather than list assignment.
  - set $*ITEM dynvar in infix:sym<=> token if item assignment wanted
  - add infix:sym<=> action method to create Assign::Item class if so
20:46
22:06 RakuIRCLogger__ joined 22:08 RakuIRCLogger left 22:15 sena_kun left