🦋 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 01:02 greppable6 left, linkable6 left, committable6 left, nativecallable6 left, evalable6 left, bloatable6 left, reportable6 left, statisfiable6 left, sourceable6 left, squashable6 left, benchable6 left, quotable6 left, coverable6 left, notable6 left, tellable6 left, bisectable6 left, releasable6 left, unicodable6 left, shareable6 left, unicodable6 joined, reportable6 joined, notable6 joined, sourceable6 joined
ugexe Anyone have any suggestions to speed up this pure raku sha1 implementation? its pretty slow - gist.github.com/ugexe/06469f5d3e06...ceed814883 01:02
01:03 tellable6 joined, nativecallable6 joined, releasable6 joined, linkable6 joined, quotable6 joined, coverable6 joined 01:04 benchable6 joined, greppable6 joined, statisfiable6 joined, shareable6 joined, bloatable6 joined, squashable6 joined, bisectable6 joined, committable6 joined 01:05 evalable6 joined
ugexe infix:<+&> 02:26
SETTING::src/core.c/Int.pm6:465
there is a bunch of allocations like that, but why does it appear to be using the Int multi and not the int multi?
02:38 MasterDuke joined
MasterDuke you have to type pretty much every operand. i.e., `my int $a = 3; $a + 5` will use the Int multi. `my int $a = 3; $a + (my int $ = 5)` should use the int multi 02:41
i'm not sure if we convert multiply/divide/mod by powers of 2 to shifts. might try doing that manually to see if there's a difference 02:42
ugexe m: BEGIN my int $ff = 0xFF; 03:00
camelia ===SORRY!=== Error while compiling <tmp>
An exception X::Comp::AdHoc occurred while evaluating a BEGIN: Lexical with name '$ff' has wrong type. real type 8 wanted type -1
at <tmp>:1
Exception details:
===SORRY!=== Error while com…
ugexe m: my int $ff = 0xFF;
camelia ( no output )
ugexe replacing the various constant literal ints like 64 with $i64 where `my int $i64 = 64;` doesn't seem to have helped 03:18
gist.github.com/ugexe/dcd034259f1c...3525164bd7 03:19
MasterDuke well, a profile shows a decent amount of time spent in line 53
ugexe infix:<+&>
SETTING::src/core.c/Int.pm6:459
1164435
like where are all those coming from
MasterDuke maybe `@words[$t] = (@words[$t - 3] +^ @words[$t - 8] +^ @words[$t - 14] +^ @words[$t - 16]);` would by faster if all those array accesses were pulled out into explicit natives 03:20
ugexe in the second gist i have `@words[$t] = ((@words[$t] +< $i1) +& $ffffffff) +| (@words[$t] +> $i31);`, and since @words is `int @words` shouldn't that all be native accesses? 03:21
oh, re: "where are all those coming from" i was assuming because it was Int.pm6 that it was using the Int candidates, but the int candidates are in there too 03:22
if i write that same algorithm in perl it does the 500000 character string in less than a second, but it takes the raku code 3.6 seconds 03:25
MasterDuke but the literals might be be native 03:35
might *not*
ugexe i replaced all the literals like 32 with $i32 (which was `my int $i32 = 32`). are you suggesting that $i32 might not be a native? 03:38
03:38 evalable6 left, linkable6 left
MasterDuke oh, i kind of missed that `$ffffffff` was already a native 03:39
for example 03:40
03:40 linkable6 joined
ugexe yeah forcing all those literals to be native didn't seem to improve the runtime (it was actually slightly worse) 03:40
03:41 evalable6 joined
MasterDuke idle curiosity, but why do you have some `BEGIN my int @a = <...>` and some `my int @b = BEGIN <...>` 03:41
06:00 reportable6 left 06:02 reportable6 joined
Geth rakudo/main: 4b2c40728c | ab5tract++ | src/Raku/ast/package.rakumod
RakuAST: Fix role inheritence not working
06:59
rakudo/main: 0572d44140 | niner++ (committed using GitHub Web editor) | src/Raku/ast/package.rakumod
Merge pull request #5363 from ab5tract/add-role-inheritence

RakuAST: Fix role inheritence not working
07:02 codesections left 07:40 sena_kun joined 09:24 squashable6 left, squashable6 joined 09:35 Xliff joined
Xliff Raku-GLib suite timing statistics for Raku 2023.08.51.gec.2076759.b 09:35
Using the following processor: AMD Ryzen 9 5950X 16-Core Processor
Total number of projects: 34 (506509 loc)
Total non-parallel compile times: 10790.200 (317.359 avg)
tellable6 2023-08-27T08:30:44Z #raku <lizmat> Xliff: please provide sample and --ll-exception trace :-)
Xliff Total parallel compile times: 1948.092 (57.297 avg) 5.539x speedup
.tell lizmat gist.github.com/Xliff/f9658ed834dc...c36f869ac3 # As requested. 10:26
tellable6 Xliff, I'll pass your message to lizmat
nemokosch this "no space on the device" came up a couple of days ago 10:28
lizmat it doesn't ring a bell with me... 10:29
nemokosch you said it then as well, Xliff
"Turns out the problem was NOT drive space, but open apps."
Xliff Yeah. In this case, pulsar (spiritual successor to the Atom Editor) 10:32
But why is pulsar creating a false "no space left on device" error in Raku?
nemokosch I don't know if Atom was also this huge but the size of Pulsaar is just beyond ridiculous 10:33
Xliff Yes. Atom was that huge.
The previous machine had something similar, except it was "too many open files"
nemokosch What makes you use it? It's pretty basic as well
Xliff It's not if you have the right plugins (and I've written a few for my own personal use!) 10:34
nemokosch I remember I thought "VSC started off from this, it can't be that bad", and yes, it was that bad, ugly and stupid and all
got rid of it very soon
Xliff What? VSC?
nemokosch Atom
VSC is absolutely rocket science compared to it
Xliff Yes, welll.... color me spoiled. It's treated me well over the last decade.
I'm not sold on VSC (color me crazy). 10:35
Pulsar works, but has teething issues.
I would switch if I had a decent alternative that I haven't used (and abandoned) before. And that's a LOT.
nemokosch I took part in migrating the code of the package manager back to JS
Xliff Syntax highlighting is decent.
nemokosch: Ah! Nice! 10:36
nemokosch it wasn't a huge work but it took a couple of months to be integrated
but it happened at least
it really makes a difference how your work is received, especially when it was at least agreed on 10:37
Xliff True enough. Now if only I can get my own work out there. 10:39
Only time will tell.
Stuff keeps getting in the way. Now it's medical (both mine and mom's)
nemokosch take care... 10:40
Xliff Insurance dropped me after only 41 days. I was ready to pay 2 weeks late.
Now I have no insurance and can't get any until Open Enrollment. This whole thing strikes me as a big con. Why does medical insurance need an Open Enrollment period?
Especially when they are ready to kick people off of their roles, early!
It's not like there's a waiting list! 10:41
lizmat profit ?
Xliff I guess.
But I doubt it. Big Pharma is going to make its money whether I'm on its roles or not!
11:04 NemokoschKiwi joined
lizmat Xliff: looking at your gist, not getting much further as a .DEPARSE fails as well in a weird way 11:22
and *that* appears to be related to the ColonPair::Value 11:23
ugexe MasterDuke: the ones with BEGIN before ‘my’ are basically constant, while the other BEGIN goes to an array that is modified (but the initial default values are always the same) 11:30
lizmat m: BEGIN my @a = 1,2,3; @a.push(42); dd @a
camelia Array @a = [1, 2, 3, 42]
lizmat m: my constant @a = 1,2,3; @a.push(42); dd @a 11:31
camelia Cannot call 'push' on an immutable 'List'
in block <unit> at <tmp> line 1
lizmat MasterDuke ^^ the difference
ugexe In my code the difference wouldn’t be that error though. The values of the array would just be wrong
It’s more like using BEGIN to initial the array but then doing @a[1] = 42 11:33
the second time the function is called @a won’t have the expected values 11:34
lizmat Xliff: the RakuAST::ColonPair::Value.new(key => "\$upc") is missing a value 11:44
Xliff: did you mean RakuAST::ColonPair::True.new(key => '$upc') ?? 11:45
ab5tract m: my $content = 'role A { method m() { self.x} }; class B does A { has $.x = 42; method m() { self.A::m() } }; dd B.new.m'; shell Q:scalar<RAKUDO_RAKUAST=1 $*EXECUTABLE -e '$content'> 11:50
camelia No such method 'A::m' for invocant of type 'B'
in method m at -e line 1
in block <unit> at -e line 1

The spawned command 'RAKUDO_RAKUAST=1 /home/camelia/rakudo-m-inst-1/bin/perl6-m -e 'role A { method m() { self.x} }; class B does A { has…
ab5tract nine: any thoughts on how one might go about fixing this? ^^
there's so many little corners just to getting 't/spec/S14-roles/basic.t' to compile and run suncessfully, this is one of them 11:51
lizmat Xliff: if you fix the ColonPair::Value issue, the code EVALs ok 11:52
Geth rakudo/main: 48838af431 | (Elizabeth Mattijsen)++ | src/Raku/ast/pair.rakumod
RakuAST: ::ColonPair::Value *must* have a value specified
11:53
12:00 reportable6 left 12:01 reportable6 joined 13:09 NemokoschKiwi left
ab5tract any idea how I can convert a RakuAST::Call::Method object ot a RakuAST::Method object? 13:27
I can't seem to figure out how to create an expression out of a RakuAST::Postfixish, despite it living in expressions.rakumod 13:35
13:49 jgaz joined
ab5tract got it :D 14:33
m: role A { method m() { self.x} }; class B does A { has $.x = 42; method m() { self.A::m() } }; dd B.new.m 14:41
camelia 42
ab5tract I've never seen this `self.A::m()` syntax before. 14:42
unfortunately the exception is thrown late enough that I don't see any RakuAST module references in the stacktrace, so I'm really not sure where to begin. 14:45
but... if we fix that, then I get a single (failing) test file to run without a bad exit code. I'm aiming high! 14:47
ugexe m: my @HEXBYTES[16] = flat 0..9, "A".."F"; say @HEXBYTES 14:58
camelia [0 1 2 3 4 5 6 7 8 9 ...]
ugexe m: BEGIN my @HEXBYTES[16] = flat 0..9, "A".."F"; say @HEXBYTES
camelia (Array)
ugexe m: BEGIN my @HEXBYTES = flat 0..9, "A".."F"; say @HEXBYTES
camelia [0 1 2 3 4 5 6 7 8 9 A B C D E F]
[0 1 2 3 4 5 6 7 8 9 A B C D E F] 14:59
ugexe BEGIN + shaped array seems to not work right
ab5tract m: my $content = 'my @HEXBYTES[16] = flat 0..9, "A".."F"; say @HEXBYTES'; shell Q:scalar<RAKUDO_RAKUAST=1 $*EXECUTABLE -e '$content'> 15:32
camelia [0 1 2 3 4 5 6 7 8 9 ...]
ab5tract ugexe: fixed in RakuAST?? :O :D
ugexe heh 15:38
m: sub foo(str $a) {}; my $arg = "xxx"; say $arg; foo($arg)
camelia xxx
ugexe m: proto sub foo(|) {*}; multi sub foo(str $a) {}; my $arg = "xxx"; say $arg; foo($arg)
camelia xxx
Cannot resolve caller foo(Str:D); none of these signatures matches:
(str $a)
in block <unit> at <tmp> line 1
ugexe why does it being changed to a multi have that effect? 15:39
ab5tract m:my $content = 'proto sub foo(|) {*}; multi sub foo(str $a) {}; my $arg = "xxx"; say $arg; foo($arg)'; shell Q:scalar<RAKUDO_RAKUAST=1 $*EXECUTABLE -e '$content'> 15:48
evalable6 (exit code 1) xxx
Cannot resolve caller foo(Str…
15:49
ab5tract, Full output: gist.github.com/c2fb62050ddc8033d8...59c9110feb
ab5tract twice in one day would be too much ;)
16:11 linkable6 left, evalable6 left, evalable6 joined 16:12 linkable6 joined
Xliff lizmat: Ah! Thanks so much! 17:02
ab5tract m: my $content ='class A:auth<Foo> {}; dd A.^auth'; shell Q:scalar<RAKUDO_RAKUAST=1 $*EXECUTABLE -e '$content'> 17:03
camelia ===SORRY!=== Error while compiling
Undeclared routine:
A used at line -1. Did you mean ''?

The spawned command 'RAKUDO_RAKUAST=1 /home/camelia/rakudo-m-inst-1/bin/perl6-m -e 'class A:auth<Foo> {}; dd A.^auth'' exited unsuccessfully…
ab5tract m: class A:auth<Foo> {}; dd A.^auth
camelia "Foo"
ab5tract I guess Foo:auth<Bar> is NYI in RakuAST... getting so closed to getting this test file to pass 17:04
Xliff m: RakuAST::ColonPair::True.new("upc").gist.sau 17:16
camelia ===SORRY!=== Error while compiling <tmp>
Use of RakuAST is experimental; please 'use experimental :rakuast'
at <tmp>:1
------> RakuAST::ColonPair::⏏True.new("upc").gist.sau
expecting any of:
statement list
Xliff m: use experimental :rakuast; RakuAST::ColonPair::True.new("upc").gist.sau 17:17
camelia No such method 'sau' for string 'RakuAST::ColonPair::True.new("upc")'.
Did you mean 'say'?
in block <unit> at <tmp> line 1
Xliff m: use experimental :rakuast; RakuAST::ColonPair::True.new("upc").gist.say
camelia RakuAST::ColonPair::True.new("upc")
Xliff m: use experimental :rakuast; RakuAST::ColonPair::True.new("upc").DEPARSE.say
camelia :upc
lizmat Xliff: use v6.* is shorter :-) 17:38
Geth rakudo/main: ea40e4c626 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/LegacyPodify.pm6
RakuAST: introduce =numitem/=numhead

As alternatives to =item # / =head # , aka an alternative to specifying # as an alternative to :numbered.
As per discussion in github.com/finanalyst/Rakudoc-BETA/issues/47
17:58
18:00 reportable6 left 18:01 reportable6 joined 18:59 Xliff left 20:32 NemokoschKiwi joined 20:53 samcv_ joined 21:01 djinni`_ joined 21:02 discord-raku-bot left, djinni` left, samcv left, JRaspass left 21:07 JRaspass joined 21:41 sena_kun left 22:53 NemokoschKiwi left 23:53 quotable6 left, statisfiable6 left, coverable6 left, sourceable6 left, linkable6 left, greppable6 left, committable6 left, tellable6 left, releasable6 left, reportable6 left, nativecallable6 left, benchable6 left, bisectable6 left, unicodable6 left, notable6 left, squashable6 left, bloatable6 left, evalable6 left, shareable6 left 23:54 coverable6 joined, sourceable6 joined, quotable6 joined, statisfiable6 joined 23:55 releasable6 joined, unicodable6 joined, shareable6 joined, squashable6 joined, evalable6 joined, benchable6 joined, bisectable6 joined, notable6 joined 23:56 linkable6 joined, committable6 joined, reportable6 joined, bloatable6 joined, greppable6 joined, nativecallable6 joined, tellable6 joined