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.
patrickb o/ 08:54
Does anyone know off hand what the minimum Windows version we depend on is?
jnthnwrthngtn patrickb: As a lower bound, the one libuv supports, which is Windows 8 per github.com/libuv/libuv/blob/v1.x/S...ATFORMS.md 09:23
patrickb Thanks! 09:38
jnthnwrthngtn fwiw, I'm currently working through getting Rakudo building with new-disp used for the various dispatches (so far, call and callmethod ops) 09:44
Currently considering replacing object boolification with the dispatch mechanism also 09:46
Which will make things more uniform in at least spesh
lizmat feels ok to me fwiw 09:47
jnthnwrthngtn More generally I think all of MVM_coerce_istrue, MVM_coerce_smart_stringify, MVM_coerce_smart_numify, and MVM_coerce_smart_intify could disappear 09:49
But about the boolification, currently we have ops for if_o, unless_o, istrue, and isfalse. 09:52
And spesh already rewrites the first two to use the latter two and if_i/unless_i because it makes analysis easier
So they only help bytecode side a little 09:53
.oO( RISC wins again... )
Uh, bytecode *size*
Anyway, think I'll divert to clean this lot up today given it's the current CORE.setting compilation blocker 09:54
brrt ohai 10:50
jnthnwrthngtn o/ brrt 11:12
brrt what's the thing that's currently broken? 11:17
jnthnwrthngtn brrt: `if $a-raku-object {}` compiles into unless_o, which goes through the current dispatch mechanism, which doesn't end well because we end up invoking a proto method compiled for the new dispatch mechanism. 12:09
And the best way to fix this seems to be to 1) generate istrue + if_i/unless_i sequences instead, which spesh actually already does today anyway, and b) compile istrue into a `dispatch` instruction that delegates to the language method call dispatcher 12:10
s/b)/2)/ :) 12:11
brrt ah, I see 12:24
so it's a new-disp problem
jnthnwrthngtn Not so much problem as just the current thing that needs doing to get us fully moved over to new-disp 12:26
Geth MoarVM/new-disp: 7313b9e79b | (Jonathan Worthington)++ | 6 files
Implement boolification using the dispatcher

This will replace all(if_o, unless_o, istrue, isfalse) after an NQP rebootstrap. The primary motivation is to have the method call form of boolification use the new dispatcher, however this will also make things simpler in spesh, since it will be just another dispatch op rather than needing special handling of the various object boolifying operations as happens today.
14:36
jnthnwrthngtn We now get 20,000 lines or so into compiling CORE.setting with new-disp. The next thing to fix up is that the chain compilation doesn't spit out a dispatch op, but the legacy invoke op 15:16
Now somewhere past 40,000 lines and the next problem is that I didn't teach the new-disp multi-dispatcher about native refs... 15:46
[Coke] fell down the wet front steps yesterday, and is definitely feeling old-mannish today. Ow. 16:15
jnthnwrthngtn Ouch. :( 16:20
[Coke] jnthnwrthngtn++
(er, for the new disp work, not the condolences, though I appreciate those!) 16:21
jnthnwrthngtn Hope not too much damage done
[Coke] jnthnwrthngtn: I cannot remember the last time I swore so loudly!
I am still sore. I am pretty sure nothing's broken, though, which I am grateful for.
jdv my brother in law slipped on dry gravel the other day and landed on his back and he's just 30 16:31
his knee was a problem the next few days 16:34
Geth MoarVM/new-disp: 70e22d8f9d | (Jonathan Worthington)++ | 3 files
Avoid freeing the arg identity maps

They can be referenced from deep in the callstack. Instead, assume we will usually only need one of a certain size, and if we ever need more then create a full-size one. Free one or both only at exit time. Also use a define instead of a magic number in various places.
17:24
jnthnwrthngtn Well, curious. We now make it through CORE.setting stage parse and into optimize, then memory usage goes wild. Guess that'll be the next thing to figure out. 17:29
Well, looking at the time...not right now :) bbl 17:31
[Coke] jdv: I wish I was only 30-old! 20:15
got a big one coming up this year.
jnthnwrthngtn: nice progress, though. good work
Geth MoarVM/new-disp: 9a6ac14fd0 | (Jonathan Worthington)++ | src/core/instance.h
Fix an overflow causing runaway allocations
21:22
Geth MoarVM/new-disp: 0463adde28 | (Jonathan Worthington)++ | src/core/callstack.c
Make oversize callstack record error informativer
21:42
jnthnwrthngtn Alright, yay. We now make it through the Rakudo build with new-disp. 21:43
japhb \o/ 21:44
jnthnwrthngtn `make test` even passes some sanity tests; `use Test` not working out fails the rest. That's certainly not for today, but getting to this point wasn't so bad as I feard.
japhb Go jnthnwrthngtn go!
OOC, when do you get another new-disp day? 21:45
jnthnwrthngtn It's also glacial because spesh doesn't understand how to optimize dispatch any non-trivial dispatch program yet
japhb Define "glacial" -- like orders of magnitude slower? Or like 2-4x?
jnthnwrthngtn ~2x
It's doing no inlining or specialization linking 21:46
japhb 2x worse without spesh or inlining actually seems pretty promising
jnthnwrthngtn It does manage some amount of spesh/JIT, but it's probably a bit off in its assessments of things too
japhb Ah, makes sense
jnthnwrthngtn No inlining has rather more than the cost of just missing the inlining too 21:47
japhb ... because of inability to optimize surrounding a call? 21:48
jnthnwrthngtn Well, to see things that cross the call boundary, for example if we inline a call we can see what it does and toss any checks against the type of the return value it produces in some cases, for example. Or allocations become possible to analyze because they don't escape. 21:50
Anyway, I should get further on being correct before I go after being faster. :)
jnthnwrthngtn Probably will continue with this on Monday; not all day, but hopefully a few hours. 21:52
jnthnwrthngtn In theory should get 2+ days worth of time in on it; Friday might be a bit of a lost day depending how I feel after dose 2... 21:52
(2+ days from next week, I mean)
japhb Ah, finally getting second vaccine dose? Yeah, you've got about a 50-50 chance of being knocked over. :-/ 22:03
jnthnwrthngtn The first time was some fatigue and a sore arm as effects of the vaccination itself, but I'm really anxious about getting any kind of injection of anything, which is at least as exhausting. 22:15
japhb Yeah, I can understand that. 22:18