Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
00:02 linkable6 left, evalable6 left, evalable6 joined 00:03 linkable6 joined 00:07 reportable6 left 00:09 reportable6 joined 00:41 Kaipei left 01:00 MasterDuke left 01:15 Kaipei joined 01:20 Kaipei left 01:47 MasterDuke joined 04:24 linkable6 left, reportable6 left, coverable6 left, nativecallable6 left, bloatable6 left, quotable6 left, shareable6 left, notable6 left, committable6 left, benchable6 left, statisfiable6 left, greppable6 left, bisectable6 left, releasable6 left, unicodable6 left, squashable6 left, sourceable6 left, tellable6 left, evalable6 left, squashable6 joined, sourceable6 joined, greppable6 joined 04:25 nativecallable6 joined, evalable6 joined, unicodable6 joined, releasable6 joined, bisectable6 joined, bloatable6 joined 04:26 tellable6 joined, benchable6 joined, linkable6 joined, coverable6 joined, quotable6 joined, reportable6 joined 04:27 statisfiable6 joined, shareable6 joined, committable6 joined, notable6 joined
[Coke] well done, nine. 05:06
05:13 sortiz left 06:07 reportable6 left 06:08 reportable6 joined 08:44 Kaipei joined 09:00 crystalfrost[m] left 10:14 sena_kun joined 11:31 linkable6 left 11:32 linkable6 joined, sena_kun left 11:34 sena_kun joined 12:08 reportable6 left 12:09 reportable6 joined 12:23 sena_kun left 15:19 sena_kun joined 17:20 Altai-man joined 17:23 sena_kun left 17:56 linkable6 left 17:57 linkable6 joined 18:07 reportable6 left 18:09 reportable6 joined
ugexe MVM_file_chown takes int arguments, but i think they are supposed to be unsigned. see github.com/nodejs/node-v0.x-archiv...dd33d82d37 19:28
19:55 evalable6 left, linkable6 left, evalable6 joined 19:57 linkable6 joined 21:02 discord-raku-bot left, discord-raku-bot joined 21:07 discord-raku-bot left 21:08 discord-raku-bot joined
MasterDuke yep, nice catch 21:08
i should be able to fix that today or tomorrow 21:09
21:14 discord-raku-bot left, discord-raku-bot joined 21:21 Kaipei left 21:23 sortiz joined 21:31 discord-raku-bot left, discord-raku-bot joined 21:44 discord-raku-bot left 21:45 discord-raku-bot joined 21:46 discord-raku-bot left 21:47 discord-raku-bot joined 21:53 Altai-man left 21:55 discord-raku-bot left, discord-raku-bot joined 21:56 discord-raku-bot left
lizmat so, it looks like if you create a *large* string (such as by slurping a 4MB file) 21:56
21:56 discord-raku-bot joined
lizmat and you take a 1 char substring of that, it will keep the large string in memory because of the substring 21:57
is there a way to disassociate a substring from such a large string ?
nqp::indexingoptimized doesn't seem to cut it 22:01
japhb lizmat: Incredibly ugly hack, but ... encode the substring into a buffer, drop all references to the original string or the substring, decode the buffer back into a new string? 22:09
lizmat something like:
nqp::strtocodes($string, nqp::const::NORMALIZE_NFC, my int32 @ords);
nqp::strfromcodes(@ords)
??
nine Or just $substring.encode.decode 22:12
lizmat if that would work, it wouldn't matter how big the original string was, right? 22:15
basic code: 22:26
use Telemetry;
for ^100 {
my $a = substantiate($io.slurp.substr(0,1));
}
END say T<max-rss>;
where $io is either a 4 byte or a 4MB file
japhb lizmat: Right, shouldn't matter at all. 22:28
lizmat it does :-(
so that would make it not work
japhb Of course, just because the original string is now garbage, doesn't mean it has been collected .... 22:29
lizmat reason I'm asking is IRC log parsing for instance
hmmm
22:30 discord-raku-bot left, discord-raku-bot joined
lizmat nqp::force_gc appears to make a difference... 22:31
for ^100 { 22:32
my $a = $io.slurp.substr(0,1);
nqp::force_gc;
}
actually, hiving: 22:39
start { loop { sleep .1; nqp::force_gc } }
running, seems to have a very beneficial effect on memory usage, and no effect on CPU usage 22:40
*having 22:42
putting a "nqp::force_gc() unless nqp::mod_i(++$force_gc,100);" into the ThreadPoolScheduler supervisor loop 22:58
has a similar positive effect on memory usage of the above code 23:02
lizmat sleeps on it 23:04
23:17 discord-raku-bot left, discord-raku-bot joined 23:27 Kaipei joined