4 ms·
Very impressive, good news for programming language research. On the other hand, it seems to me that these efforts and its resources would be better used devel
by pestatije 6y ago
Very impressive, good news for programming language research.
On the other hand, it seems to me that these efforts and its resources would be better used developing a Webasm JVM implementation. Or at least kick-start the project.
We are missing a major platform in the JVM ecosystem and nobody seems to care.
- lsuresh 6y agoThere's already GraalVM Wasm: https://www.graalvm.org/reference-manual/wasm/ https://www.graalvm.org/reference-manual/wasm/
- hackcasual 6y agoThat's GraalVM targeting WASM, not JVM on top of WASM. I suspect some level of GC support will be needed in WASM for good performance
- moonchild 6y agoI assume the GP was referring to wasm running on top of graal, not graal running on top of wasm. I don't think graal atop wasm would be a particularly interesting use case. Wasm purports to be a portable, secure, performant application runtime. Graal purports to be a portable, secure , performant application runtime. The latter, however, has had many more engineer-hours thrown at its implementation, and is thus both more heavyweight (so it needs all the resources it can get) and more performant (so it makes sense to use it as the backing runtime).
- pawelmurias 6y agoWasm is build as an efficient target for C/C++ like languages. It's mostly a striped down portable CPU intruction set. Graal/Truffle is intended to be an efficient target for everything. It's a toolbox of crazy magic for building your own JIT. There are not equivalent.
- johnnycerberus 6y agoIndeed, WASM will probably be a niche compared to what GraalVM offers.
- The_rationalist 6y agoBut because of harmful politics graalvm isn't going to be included in browsers anytime soon
- johnnycerberus 6y agoWhat if somebody will build a GraalVM-based browser? That would be something. Anyway, W3C recommends WebAssembly but does not impose it. It is not too late in the game because WASM doesn't even have DOM access, yet. And also people are still using browsers that are not WASM-ready. How many people actually compile their libraries to WASM today? Aside to early adopters scattered around Rust and Emscripten.
- The_rationalist 6y agoI don't see which actor in the industry (outside of browser makers) has the human resources to make such an experiment. Mozilla were the one lobbying for wasm... and chromium has abandoned pnacl because of them. The only hope might be microsoft. Oracle could do it in theory but I don't expect them to do it anytime soon.
- chrisseaton 6y agoGraalVM can output LLVM, which can go to WASM. In the past it also used to be able to output JavaScript. It should be easy enough to make it output WASM directly. The GC is written in Java, so if you have the translation to WASM that's covered as well.
- brabel 6y agoThere's TeaVM[0], which is an old project that compiles JVM bytecode to JS, and more recently, also to WASM. I had thought the project had been abandoned, but I was wrong, it seems to be actively maintained and evolving on GitHub[1]. [0] http://teavm.org http://teavm.org [1] https://github.com/konsoletyper/teavm/issues https://github.com/konsoletyper/teavm/issues
- pjmlp 6y agoYou can try to check for yourself with CheerpJ compiler. https://www.leaningtech.com/pages/cheerpj.html https://www.leaningtech.com/pages/cheerpj.html
- geokon 6y agoFrom a cursory look, jvm byte code and wasm byte code seem quite similar. where is the major mismatch btw underlying machine abstractions?
- The_rationalist 6y agoWasm is just a low quality jvm with lower human resources
- geokon 6y agoCould you be more specific? What's lower quality?
- The_rationalist 6y agoNot lower quality per se but the feature set is order of magnitude smaller and thus is a missfeat for modern languages
- jlouis 6y agoIt's just a different abstraction level. Taking the argument to the extreme, assembly is a misfit.
- pawelmurias 6y agoX86 assembly/native code offers more features than wasm but is not portable or safe to execute. Webasm is less powerful then graalvm/truffle.
- kaba0 6y agoIt is basically just a portable cpu architecture with everything it entails (manual memory management, etc). While there are plans for a gc, it seems hard to fit into this model (but I’m sure the team can pull it off). It is basically made so c/cpp and other low level languages could be run inside browsers, and I don’t really see the point of it? Like, it is probably good for a video editor running inside a browser, but it will probably mostly entail all sort of mining, unnecessarily usage of cpu and the like. And it won’t magically improve performance, since at the boundary , calling javascript is really expensive, usually much more than writing the whole thing in js. Unless of course if someone does plenty of numerical computations.
- pjmlp 6y agoYou can already run Java on WebAssembly, if that is what you are after, Java Applets are back. https://www.leaningtech.com/pages/cheerpj.html https://www.leaningtech.com/pages/cheerpj.html