News for hackers. Stuff that matters.
Re:Building a Minimalistic Virtual Machine by rhn_mk1 on Saturday February 25, 2023 @11:28AM (#34937860)
I wonder how this compares to LLVM. That project had building a directly interpretable bytecode and a virtual machine as an initial goal.
Re:Building a Minimalistic Virtual Machine by maxime_cb on Saturday February 25, 2023 @11:31AM (#34937892)
LLVM is more heavyweight. Has a lot of analysis and optimization passes for static compilation. UVM is currently very lightweight, will be JIT compiled. Crucially UVM will provide graphics, audio and networking primitives.
Re:Building a Minimalistic Virtual Machine by rhn_mk1 on Saturday February 25, 2023 @11:34AM (#34937906)
That's what LLVM is today, but IIRC their goals were the same. It might be worth it to look at what made it turn away from the minimal idea and into the heavyweight that it is now.
Re:Building a Minimalistic Virtual Machine by maxime_cb on Saturday February 25, 2023 @01:38PM (#34939203)
If I had to guess, I would say it probably comes down to wanting to go with static, ahead of time compilation rather than JIT. There are real and valid advantages to AOT compilation. There's downsides with the LLVM approach too. For example, LLVM makes it explicit that they provide zero guarantees when it comes to the stability of their bitcode format. That somewhat limits what you can do with it.
Re:Building a Minimalistic Virtual Machine by int_19h on Saturday February 25, 2023 @10:32PM (#34942794)
LLVM also has a strong emphasis on performance and interoperability with existing code and is willing to introduce arch- and platform-specific features for that purpose.