News for hackers. Stuff that matters.
Re:MiniVM: A zero-dependency cross-language runtime on par w... by wruza on Saturday January 08, 2022 @08:54AM (#29851686)
4984, there is a roadmap, but I couldn't find info on strategic goals of this project or where it supposed to be a best fit. Can you please share your views on this?

Also, is there an API to connect to to emit VM bytecodes? Or an instruction set reference.

I'm asking out of pure fan-like interest in this field and because I see lack of simple-enough (for me) tools for language building. Don't take me serious or anything like that, I'm not a pro. I tried to dig to llvm few years ago, but so c++ much boilerplate, meh. I know I can just transpile to Lua or js with sourcemaps, but it's zero fun. Projects like this remind me of 8080 asm times.

Re:MiniVM: A zero-dependency cross-language runtime on par w... by 4984 on Saturday January 08, 2022 @09:05AM (#29851774)
There is no roadmap. There are no written long term goals. This project came out of need for a faster virtual machine for my Paka language. There is an api to emit vm bytecode, but it's not in C, it is from Paka.

Roadmap could go like this tho: More Core Opcodes (Bit Ops, Closures), Split overloaded opcodes. More frontends. Optimizer, Dynamic Compiler and JIT.

Re:MiniVM: A zero-dependency cross-language runtime on par w... by childintime on Saturday January 08, 2022 @09:22AM (#29851896)
This is a nice Forth-style bytecode interpreter, that is easy to generate code for. Close to WASM, but much simpler.

The thing that attracts me most is that the bytecode format can be easily translated to a more compact format, allowing it serve as an intermediate format for _many_ homegrown instruction sets.

So a GCC or LLVM backend needs to be on the roadmap. Code generation is a blast. Only the number of registers should be user-configurable to make this useful.

Re:MiniVM: A zero-dependency cross-language runtime on par w... by rahimiali on Saturday January 08, 2022 @04:54PM (#29856741)
In what way is this forth-like? The opcodes take immediates and registers as arguments, whereas forth-like would be much more stack-based than this, right?
Re:MiniVM: A zero-dependency cross-language runtime on par w... by jng on Saturday January 08, 2022 @05:33PM (#29857190)
The bytecodes aren't but the interpreter is, look up threaded code.
Re:MiniVM: A zero-dependency cross-language runtime on par w... by b3morales on Saturday January 08, 2022 @02:05PM (#29854974)