Comment by publicdebates
15 hours ago
I read the WASM spec and became somewhat of an expert in it for the purpose of eventually designing a low-level language specifically for wasm, to be the most efficient and lowest-level language you could possibly have for wasm, and then gradually add high level concepts into it to make it more convenient. Kind of like building C on top of asm, and then gradually evolving it into C++. That project never came about though due to lack of community interest and time on my part, but I like seeing languages that take a fresh look at how to integrate with wasm using novel techniques to aim for maximal efficiency.
I'm working on something like this right now, targeting WASM GC. I started with functions, basic numeric types, arrays, and structs. Then added blocks, control flow, and strings. Then interfaces, mixins, classes, and extension classes. It's now something like a statically typed mashup of TypeScript, Swift, and Dart, all done in the best way I could figure out specifically for WASM GC.
It's been a really fun side project.
I do think there is a market for something like this - optimizing an existing language for WASM, or ephemeral networked code delivery in general, can be really hard. And a statically typed, WASM-oriented, very familiar high-level language, that can give very good static errors, and quickly run in a secure sandbox might be a good target for LLM-generated code.
> to be the most efficient and lowest-level language you could possibly have for wasm, and then gradually add high level concepts into it to make it more convenient. Kind of like building C on top of asm, and then gradually evolving it into C++. That project never came about though due to lack of community interest and time on my part, but I like seeing languages that take a fresh look at how to integrate with wasm using novel techniques to aim for maximal efficiency.
I wonder how much efficient would such wasm be compared to native itself theoretically?
I really like libriscv as well, what are your thoughts on libriscv and now the recent project created by legendary fwsgonzo about looongarch.
Although I would say that libriscv/loongarch are more focused on trying to start the fastest as much as possible instead of pure performance (for which if atleast for the purpose of sandboxing, fwsgonzo has also created tinykvm which is really quite close to native performance)
I had the exact same idea around 5 years ago, and actually built a language. But without a stdlib it’s a bit useless and as there was no component model at the time it was impossible to have one.
A SIMD ECS language would probably be that today and be more modern than C.