🦋 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 00:37 statisfiable6 joined 01:46 benchable6 joined, releasable6 joined 01:51 sourceable6 joined 01:53 coverable6 joined, committable6 joined 03:04 linkable6 joined 04:20 statisfiable6 left, benchable6 left, bloatable6 left, squashable6 left, bisectable6 left, quotable6 left, reportable6 left, evalable6 left, linkable6 left, committable6 left, coverable6 left, sourceable6 left, releasable6 left, tellable6 left, unicodable6 left, nativecallable6 left, greppable6 left, notable6 left, shareable6 left 04:21 sourceable6 joined, notable6 joined 04:22 benchable6 joined, statisfiable6 joined, reportable6 joined, shareable6 joined 04:23 unicodable6 joined, quotable6 joined 05:02 quotable6 left, unicodable6 left, shareable6 left, reportable6 left, statisfiable6 left, benchable6 left, notable6 left, sourceable6 left, nine left, ab5tract left, summerisle left, [Coke] left, Geth left, bartolin left, ugexe left, vrurg left, sivoais left, lizmat left, dogbert17 left, samcv left, rypervenche left, [Tux] left 05:03 MasterDuke joined, camelia joined, sjn joined, guifa joined, RakuIRCLogger joined, gfldex joined, SmokeMachine joined, patrickb joined, jdv joined, coleman joined, kawaii joined, nebuchad` joined, timo joined, discord-raku-bot joined, djinni` joined, japhb joined, JRaspass joined, zostay joined, leont joined, rba joined, tbrowder__ joined, |Tux| joined 05:04 RakuIRCLogger left 05:24 bloatable6 joined 05:26 squashable6 joined 05:27 bisectable6 joined, greppable6 joined 05:28 releasable6 joined, coverable6 joined, linkable6 joined 05:29 committable6 joined 06:00 reportable6 left 07:47 nativecallable6 joined 08:07 tellable6 joined
Geth rakudo/main: f4c228dcf3 | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: DRY the codegen of simple variables
09:08
09:11 Geth left, Geth joined 09:54 reportable6 joined
[Tux] Rakudo v2023.08-200-gf4c228dcf (v6.d) on MoarVM 2023.08-3-g2f8234c22
csv-ip5xs1.003 - 1.103
csv-ip5xs-205.326 - 5.999
csv-parser4.004 - 4.478
csv-test-xs-200.345 - 0.347
test6.379 - 7.725
test-t1.506 - 1.645
test-t --race0.899 - 1.087
test-t-2021.044 - 21.547
test-t-20 --race6.415 - 7.314
10:05
Geth rakudo/main: f67797dbe2 | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: only join if necessary
10:10
10:12 finanalyst joined
finanalyst .tell @coleman the docs-website buildkite agent is delaying a branch build. Not sure why 10:14
tellable6 finanalyst, I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Tellable
finanalyst .tell coleman: the docs-website buildkite agent is delaying a branch build. Not sure why 10:15
tellable6 finanalyst, I'll pass your message to coleman
Geth rakudo/main: eb8fea816f | (Elizabeth Mattijsen)++ | src/Raku/Grammar.nqp
RakuAST: streamline special-variable tokens

This is mostly about not needing to capture <sym> for the error message.
10:24
10:32 finanalyst left 10:39 evalable6 joined
Geth rakudo/main: 9d711ea512 | (Elizabeth Mattijsen)++ | src/Raku/Grammar.nqp
RakuAST: remove some more unneeded captures
10:43
rakudo/main: 863373a6c1 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: give .intern-int a default radix of 10

For better readability, and smaller bytecode at the caller's side
10:59
12:00 reportable6 left 12:02 finanalyst joined
Geth rakudo/main: 3a91b4956e | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: streamline parameter / arglist actions

  - prevent repeated hash lookups where possible
  - prevent duplicate condition evaluation
  - class lookup once if needed multiple times
12:16
12:31 finanalyst_ joined 12:32 finanalyst_ left 12:59 finanalyst left 13:10 lizmat_ joined 13:13 lizmat left 13:20 lizmat_ left, lizmat joined 14:44 jgaz joined
coleman Looking into it 14:59
tellable6 2023-09-12T10:15:02Z #raku-dev <finanalyst> coleman: the docs-website buildkite agent is delaying a branch build. Not sure why
15:44 evalable6 left, linkable6 left
ab5tract lizmat: WRT the remaining once block issue.. 15:44
15:46 evalable6 joined
ab5tract I've determined that the var declaration is getting generated on the wrong scope.. there is a QAST::Block definition in between the declaration and the check on p6stateassign, meaning that this op is never true because there is no statevar in the current block 15:46
lizmat hmmm
ab5tract or at least, that's my working assumption at the moment 15:47
*p6stateinit 15:49
the mystery also deepens:
m: 'my int $i; $i += ($ = 21) for 1,2; say $i'
camelia WARNINGS for <tmp>:
Useless use of constant string "my int $i; $i += ($ = 21) for 1,2; say $i" in sink context (line 1)
ab5tract m: Q| my int $i; $i += ($ = 21) for 1,2; say $i | .AST.EVAL 15:50
camelia 42
ab5tract m: 'my int $i; $i += (state $s = 21) for 1,2; say $i'
camelia WARNINGS for <tmp>:
Useless use of constant string "my int $i; $i += (state $s = 21) for 1,2; say $i" in sink context (line 1)
ab5tract doh! 15:51
m: my int $i; $i += ($ = 21) for 1,2; say $i
camelia 42
ab5tract m: Q| my int $i; $i += ($ = 21) for 1,2; say $i | .AST.EVAL
camelia 42
ab5tract m: my int $i; $i += (state $s = 21) for 1,2; say $i
camelia Use of uninitialized value of type Any in numeric context
0
in block at <tmp> line 1
Use of uninitialized value of type Any in numeric context
in block at <tmp> line 1
ab5tract m: Q| my int $i; $i += (state $s = 21) for 1,2; say $i | .AST.EVAL 15:52
camelia Use of uninitialized value of type Any in numeric context
0
in block <unit> at /home/camelia/EVAL_0 line 1
Use of uninitialized value of type Any in numeric context
in block <unit> at /home/camelia/EVAL_0 line 1
ab5tract this implies that p6stateassign isn't true when the state variable is defined directly on the Block named 'unit' 15:54
gar, *p6stateinit
lizmat ack 15:55
ab5tract but p6stateinit leads me into moar territory, IIUC
MasterDuke m: Q| say |.AST.EVAL 16:13
camelia ===SORRY!=== Error while compiling
Unsupported use of bare "say". In Raku please use: .say if to call it
as a method on $_, or use an explicit invocant or argument, or use &say
to refer to the function as a noun.
------> say⏏ …
17:26 linkable6 joined
Geth rakudo/main: 636c878946 | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: some massive streamlining

  - more shortcuts
  - multiple self.attach: $/, … combined into a single with conditional
   arguments to reduce bytecode size
  - generally combining stuff into ternaries
  - using postfix if where it makes sense
Takes 1 second off spectest. Less than I hoped :-(
17:52
17:56 ab5tract left
lizmat still, about .5% 18:00
18:01 reportable6 joined
MasterDuke lizmat: any idea why some *Method Nodes take an ast and some just a name? e.g., here github.com/rakudo/rakudo/commit/63...1158-R1166 18:09
lizmat if the name can only be \w+ basically, it is a string. Otherwise it's a RakuAST::Name object 18:10
MasterDuke ah 18:12
lizmat must admit this is potentially something that may need to be made consistent
or at least rename RakuAST::Name to FQName or something 18:13
MasterDuke yep 18:14
`if $foo -> $bar { ... }` is (still) slower than `if $foo { my $bar = $foo; ... }`, right? 18:15
lizmat well, yeah, but that appears to be because that will prevent the outer scope from being inlined 18:16
MasterDuke and is that what inspired your comment over in #moarvm ?
lizmat yes
MasterDuke hm
lizmat raku -MSIL -e 'sub a($a) { if $a -> $b { $b } }; a(42) for ^3000000' 18:17
MasterDuke are you trying to remove all duplicated uses of `$<foo>`?
lizmat vs: 18:18
raku -MSIL -e sub a($a) { if my $b := $a { $b } }; a(42) for ^3000000
yeah, as those are hash lookups, and they're relatively expensive, no?
MasterDuke yeah, i was just looking at that most recent diff 18:19
so github.com/rakudo/rakudo/commit/63...a2aa0R1903 could make sense to pull out of the `if`, right?
lizmat right, except that that slows down 18:20
m: sub a($a) { if $a -> $b { $b } }; a(42) for ^300000; say now - INIT now
camelia 0.060584146
lizmat m: sub a($a) { if my $b := $a { $b } }; a(42) for ^3000000; say now - INIT now
camelia 0.100177813
lizmat that's weird
MasterDuke well, i meant just move the line above the if
lizmat m: sub a($a) { if $a -> $b { $b } }; a(42) for ^300000; say now - INIT now 18:21
camelia 0.061284621
lizmat m: sub a($a) { if my $b := $a { $b } }; a(42) for ^3000000; say now - INIT now
camelia 0.097742603
MasterDuke i.e., `my $desigilname := $<desigilname>; if $desigilname {`
the := version takes slightly under half the time of the -> version locally
lizmat yeah, for me as well 18:22
on an M1
MasterDuke github.com/rakudo/rakudo/commit/63...a2aa0R1950 and github.com/rakudo/rakudo/commit/63...a2aa0R1989 are other places with `if $<foo> { my $foo = $<foo>`. but maybe polluting the outer scope 18:23
isn't worth removing only one more $<foo>
bunch more of those 18:24
lizmat well.. I think the inline stopping is wrong, unless you can tell me otherwise :-)
why would sub a($a) { if $a -> $b { } } stop inlining of sub a ? 18:25
dinner& 18:26
MasterDuke m: my $a = 42; my $b = +(rand > 0.5); if $b -> $a { say $a }; say $a 18:28
camelia 1
42
MasterDuke not sure 18:29
18:51 notna joined 19:01 notna left
nemokosch are declarations meant to work with statement modifiers? 20:20
or maybe the more useful question would be: which declarations are meant to work with statement modifiers? 20:21
MasterDuke lizmat: what do you mean by your commit message for github.com/rakudo/rakudo/commit/c1...fa7d794ffb ? 20:56
when you say this stuff shouldn't be copied over to the raku grammar, is that because you think it doesn't belong in the *grammar* (and should be implemented elsewhere)? or should just be removed completely? 20:58
vrurg m: say 20:59
camelia ===SORRY!===
Argument to "say" seems to be malformed
at <tmp>:1
------> say⏏<EOL>
Other potential difficulties:
Unsupported use of bare "say". In Raku please use: .say if you meant
to call it as a method on $_, or u…
vrurg m: put
camelia ===SORRY!===
Argument to "put" seems to be malformed
at <tmp>:1
------> put⏏<EOL>
Other potential difficulties:
Function "put" may not be called without arguments (please use () or whitespace to denote arguments, or &put t…
vrurg m: note
camelia Noted
vrurg I'd be for removing it altogether. It's like warning about a user/imported routine invoked without arguments. Besides, it's inconsistent. 21:00
I guess it was introduced back in days when migration from Perl was expected. For now it just makes little to no sense. 21:01
MasterDuke that'll have to be 6.e change 21:02
vrurg Sure. 21:04
MasterDuke but that does mean we have to implement it for rakuast first 21:06
nemokosch I don't know. It seems kinda weird to consider these obsolete errors a part of the language, rather than just additional courtesy from a parser 21:09
vrurg Waste of resources... :(
nemokosch just think about it. Say, the migration from 5 to 6 had happened, in an alternate reality. How long would these notifiers have lasted? 21:10
Arguably, shorter than the code written for the new version 21:11
22:13 committable6 left, bloatable6 left, greppable6 left, coverable6 left, squashable6 left, bisectable6 left, releasable6 left, sourceable6 left, unicodable6 left, statisfiable6 left, shareable6 left, reportable6 left, coverable6 joined, squashable6 joined, sourceable6 joined, shareable6 joined
lizmat MasterDuke: I think you got your answer, right ? 22:13
22:14 greppable6 joined, bloatable6 joined, unicodable6 joined, bisectable6 joined 22:15 releasable6 joined, committable6 joined 22:16 statisfiable6 joined, reportable6 joined
MasterDuke can we do language specific stuff in the grammar? 22:17
*language version 22:18
lizmat yes, e.g. to handle prefix // 22:41
look for nqp::getcomp('Raku').language_revision 22:42
sleep&
MasterDuke thanks
23:16 linkable6 left, evalable6 left, linkable6 joined 23:18 evalable6 joined