🦋 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:03 vrurg left
MasterDuke Voldenet: works as in completely builds rakudo? 00:06
Voldenet "works" as it builds nqp-j 00:07
but the process of compiling gets killed, probably by oom killer 00:08
I am giving it only 4GB of ram to use
MasterDuke yeah, i think it wants at least 16gb, though i'm not sure exactly how much it actually uses 00:09
Voldenet I'm running it with some monitoring tools attached and I don't see any steep increase of memory usage 00:18
00:19 vrurg joined 00:24 vrurg left
Voldenet I must say that raku-ast-compiler.nqp is painfully long and not threaded in particular 00:34
00:35 vrurg joined
Voldenet nevermind, it is threaded 00:36
00:38 vrurg left 00:40 vrurg joined
Voldenet Indeed it was an oom killer, I've checked that by default compilation process uses -Xmm6G, so it's obvious why it failed for me 01:20
Building v6c actually uses up to 7.38G even with Xmm6G 01:24
So, I've checked that it compiles 01:46
with openjdk 11.0.19 2023-04-18 01:47
MasterDuke Voldenet: rakudo compiles? 03:02
for anybody who's interested, github.com/MasterDuke17/nqp/tree/a...ollections is my wip for this nqp jvm backend work 03:21
Voldenet I've looked and I doubt it will be substantially faster, but I'm sure it is faster 03:31
though since raku-ast-compiler takes 1h to compile, even 10% is a win
MasterDuke oh, but it did finish for you? i'm using openjdk 21. maybe i should get 11 if that will at least build rakudo 03:33
Voldenet I just grabbed whatever was available on the randomly cloned vm, didn't pick this version in particular 03:34
MasterDuke it didn't used to take that long. it was always slower than moarvm, but istr it was about 10m, not 1h
looks like i have 11 already installed... 03:35
Voldenet I think it's well-paralellized, so it can take 10 minutes if I gave it 4 or 8 cores instead of 2 03:39
MasterDuke trying with openjdk 11 now 03:41
it's allocating tons of TreeMap-related objects 03:46
i wish visualvm told me where in our source things were being allocated from... 03:47
Voldenet Hm, if allocations are the problem, then maybe an object pool could help? 03:54
something like ThreadLocal<ObjectPool> 03:55
MasterDuke yeah, that's why i want to know where they're being allocated
i also don't know if HashMaps would be better and/or iterating them with the new (since the code was originally written) forEach 03:58
Voldenet async-profiler has allocation profiling 03:59
I've never used it though 04:01
MasterDuke ah, it seems to be showing me where in our code stuff is being allocated 04:09
and no surprise, it's runNFA (as called by nfarunalts) 04:12
well, with openjdk 11 i get farther in the build, but now it dies with `java.lang.NullPointerException in callsame (gen/jvm/CORE.c.setting:1044)` 04:26
oh, i hadn't pulled the most recent rakudo commits, let me try again with those 04:27
nope, same NPE 05:08
releasable6 Next release in ≈2 days and ≈11 hours. There are no known blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft 07:00
Voldenet are you sure you're building from scratch? 07:02
It'd be good if this wasn't a data race or something env-specific 07:03
the version I've built is 3c9f07a 07:10
erm, 3c9f07a8 07:11
linkable6 (2024-02-25) github.com/rakudo/rakudo/commit/3c9f07a881 Streamline Metamodel::PackageHOW
Voldenet So, i'm building rakudo with that fastutil branch, and raku-ast-compiler seems to eat way more memory 07:50
in a bit I'll be seeing if build times improved 07:51
Memory usage is up from 910MB to 2190MB, Build times improved from around 56 minutes to 8 minutes 07:56
during v6c build the memory usage also went up by a lot 07:58
MasterDuke: I get exactly the same error, it's some fastutil build problem 08:05
in `'/usr/bin/perl' rakudo-j-build –setting=NULL.c –ll-exception –optimize=3 –target=jar –stagestats –output=blib/CORE.c.setting.jar 'gen/jvm/CORE.c.setting'` 08:06
in `'/usr/bin/perl' rakudo-j-build --setting=NULL.c --ll-exception --optimize=3 --target=jar --stagestats --output=blib/CORE.c.setting.jar 'gen/jvm/CORE.c.setting'` 08:07
MasterDuke: github.com/Raku/nqp/commit/654e227...0935a4b198 this is wrong, .get returns null and not -1 08:17
use Object2IntOpenHashMap<STable> and .getOrDefault(…, -1) 08:19
related docs fastutil.di.unimi.it/docs/it/unimi...ng.Object) 08:24
intriguingly, nqp tests pass 08:47
09:10 sena_kun joined
Geth nqp/main: 73f53f1297 | (Elizabeth Mattijsen)++ | 8 files
Mark all potentially useless arguments

  - if a method accepts a single positional argument and it is **NOT**
   being used inside the method, rename it to $XXX and make it optional
  - if the first positional argument *is* used in the method, rename
   it to $target and change all references to that as well. It may
   well be that it turns out that the argument *is* useless in the
... (6 more lines)
10:07
rakudo/main: cf4babd282 | (Elizabeth Mattijsen)++ | tools/templates/NQP_REVISION
Bump NQP for JVM build fix

And variable renaming
10:27
nqp/main: 9ecf1f156d | (Elizabeth Mattijsen)++ | src/how/NQPAttribute.nqp
Fix typo, Masterduke++
11:43
rakudo/main: 4f64b4876b | (Elizabeth Mattijsen)++ | 33 files
Mark all potentially useless arguments

  - if a method accepts a single positional argument and it is **NOT**
   being used inside the method, rename it to $XXX and make it optional
  - if a method accepts multiple positional arguments and the first one
   is not being used, rename it to $XXX
  - if the first positional argument *is* used in the method, rename
   it to $target and change all references to that as well. It may
   well be that it turns out that the argument *is* useless in the
   end. By renaming it, it is at least clear that we've looked at
   it.
12:15
nqp/main: 91b6bd236a | (Elizabeth Mattijsen)++ | src/how/NQPClassHOW.nqp
(is_)array_type don't need any positional argument
12:27
rakudo/main: 5585454f54 | (Elizabeth Mattijsen)++ | 4 files
(is_)array_type don't need any positional argument
12:34
¦ problem-solving: patrickbkr assigned to codesections Issue Code highlighting / inspection / IDE tooling github.com/Raku/problem-solving/issues/422 12:40
rakudo/main: cf773dc2df | (Elizabeth Mattijsen)++ | 15 files
Abstract .new handling in Metamodel::BUILDALL role

So we only need to look up where NQPMu.BUILDALL lives, and allow for other debugging / optimising in the future
13:10
rakudo/main: 68cd850fb8 | (Elizabeth Mattijsen)++ | 11 files
language_revision doesn't need any positional argument
13:27
rakudo/main: fd936efefa | (Elizabeth Mattijsen)++ | 2 files
Use shortcuts for $target.HOW

So we don't need to do that over and over again
14:38
rakudo/main: 0422989966 | (Elizabeth Mattijsen)++ | 12 files
Use "self" as shortcut for $target.HOW

Although technically it *is* possible to call a method on a xxxHOW class where the target does not have the invocant as its HOW, it would really naughty to do so.
So use "self" as a shortcut for $target.HOW where possible. This should at least reduce the bytecode size.
This also makes naughtiness a DIHWIDT.
14:44 sena_kun left 15:07 sena_kun joined 15:18 sena_kun left 15:19 sena_kun joined
Geth rakudo/main: 3c2182652d | (Elizabeth Mattijsen)++ | 7 files
Streamline name / ver / auth / api setting

All of the methods that do this, accept these settings as named arguments. So add a "set_identity" method in the Versioning role that will set the appropriate attributes from the info of the named arguments.
... (6 more lines)
16:52
17:06 Xliff joined
Xliff Has anyone had a chance to look at #5534, yet? 17:06
lizmat MasterDuke ^^ ?? 17:11
Geth rakudo/main: 192d7d0ab1 | (Elizabeth Mattijsen)++ | 11 files
Trailing whitespace cleanup
17:59
lizmat Geth 19:36
19:37 Geth left, Geth joined
Geth rakudo/main: 3271329c84 | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/Trusting.nqp
Streamline Metamodel::Trusting
19:37
rakudo/main: 71dcfd42c6 | (Elizabeth Mattijsen)++ | 10 files
Use nqp::push(foo,bar) instead of foo[+foo] := bar

nqp::push has a smaller bytecode size and is about 1.7x as fast. Hopefully also helps with better inlining
Xliff lizmat: ME reference? 19:42
lizmat ?
Xliff "Geth". Is it a Mass Effect reference? 19:43
lizmat I have no idea: the name predates my deep involvement in Raku
Xliff Origin, then?
lizmat I guess it could well be a Mass Effect reference :-) 19:46
"Servant of the People" describes it well :-) 19:47
20:04 codesections1 joined
gfldex Xliff: Before Geth we had Dalek. Surprisingly, no extermination ever transpired. 20:09
lizmat aah... yes... I remember now :-) 20:10
gfldex I just checked we switched the bots at: Log opened Sun Jan 08 10:08:46 2017 20:13
lizmat I guess my memory isn't what it used to be 20:18
gfldex Without IRC logs I would be lost too. :-> 20:19
lizmat :-) 20:20
Geth rakudo/main: 52dfda3fc3 | (Elizabeth Mattijsen)++ | 9 files
Change remaining +@foo to nqp::elems(@foo)

And some additional streamlining. nqp::elems(@foo) is about 50x as fast as +@foo.
20:37
rakudo/main: b720babdea | (Elizabeth Mattijsen)++ | 2 files
Change the few cases of if foo -> int bar {

Although this is pretty normal in Raku, it only occurred twice in the NQP part of Rakudo. And the few other times I used that construct I got *very* weird runtime errors. So even though NQP allows the syntax, I'm not convinced it actually codegens correctly.
So, it is a bit superstitious, but it felt an easy decision to make.
20:49
20:59 codesections1 left
Geth nqp/main: eb7016e7f8 | (Elizabeth Mattijsen)++ | 5 files
The method_table method is always an instance method

And can therefore be called without any additional arguments.
21:04
lizmat greppable6: method method_table 21:07
greppable6 lizmat, 3 lines, 2 modules: gist.github.com/0ae12e4aa34e596ca8...afb66fe22a
21:12 codesections1 joined
Geth nqp/main: 16b425ce63 | (Elizabeth Mattijsen)++ | tools/templates/MOAR_REVISION
Bump MoarVM to get better Int -> int error message
21:24
21:31 codesections1 left, codesections1 joined 21:32 codesections1 left 21:34 codesections1 joined
Geth roast: 2e0f5f7c55 | (Elizabeth Mattijsen)++ | S02-types/declare.t
Fix error testing because message got more verbose
21:39
rakudo/main: a4d3396ee1 | (Elizabeth Mattijsen)++ | tools/templates/NQP_REVISION
Bump NQP to get various fixes
21:40
22:09 codesections1 left 22:27 sena_kun left 23:09 lizmat_ joined 23:12 lizmat left