github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
timotimo so, i've been wondering 14:48
if all the CBlah reprs get a "owner-of-the-memory" pointer
should it always ask the owner for the most up-to-date pointer?
so that a CStruct inside of a CArray that gets resized will immediately work?
i'm not actually sure it wouldn't already immediately work, tbh 14:49
but this also applies to things that are nativecast
m: use NativeCall; my $initial = CArray[uint8].new(1, 2, 3, 4); my $casted = nativecast(CArray[uint16], $initial); $casted.say; $initial.push($_) for 10..14; $casted.say 14:50
evalable6 (exit code 1) WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, y…
timotimo, Full output: gist.github.com/2c439cbcbf23df58f6...ed9bc8d17b
timotimo right 14:51
what
m: use NativeCall; my $initial = CArray[uint8].new(1, 2, 3, 4); my $casted = nativecast(CArray[uint16], $initial); $casted.say; $initial[$initial.elems] = $_ for 10..14; $casted.say
evalable6 NativeCall::Types::CArray[uint16].new
NativeCall::Types::CArray[uint16].new
timotimo m: use NativeCall; my $initial = CArray[uint8].new(1, 2, 3, 4); my $casted = nativecast(CArray[uint16], $initial); $casted[^2].say; $initial[$initial.elems] = 10 + $_ for 0..14; $casted[^2].say
evalable6 (513 1027)
(-3616 1712)
timotimo m: use NativeCall; my $initial = CArray[uint8].new(1, 2, 3, 4); my $casted = nativecast(CArray[uint16], $initial); $casted[^2].say; $initial[$initial.elems] = 10 + $_ for 0..1024; $casted[^2].say 14:52
evalable6 (513 1027)
(-13456 17870)
timotimo i didn't expect the data to be overwritten this quickly, but whatevs
it shows the potential issue 14:55
might of course say "if you're doing that, you're in trouble anyway, you'd also be in trouble in C"
but in C it's a lot less tiresome to just have casts of the original array/pointer whereever you use it
ugexe time perl6 -e 'for 1..10000 { my $meta = from-json($*CWD.add("META6.json").slurp); $meta<version>; }' 16:52
in 2019.03.1 that takes 1m45s 16:53
blead it takes 18s
timotimo is that the json-fast performance improvements? 16:57
ugexe yeah 17:03
timotimo sweet 17:05
i mean it could be more
i mean more faster
ugexe it used to be that CURI read meta6.json for every installed module on startup (pre v6.c), and having 100 modules installed meant perl6 -e '' would take like 10 seconds 17:06
timotimo ouch 17:08
timotimo i wonder if we should go through gen2 size classes in parallel 23:43