|
From: Robert H. <ha...@st...> - 2020-12-14 04:23:15
|
I've did a review of CheerpJ and TVM for a grant proposal. I don't know about JWebAssembly. That sounds plausible. I realize that CheerpJ has a nice website and *appears* to have a following, but I have done over 500 applets now, and I am 100% certain that they could not have been successfully done well with CheerpJ. For one thing, it is a bit-image creator. That is, it uses exactly the graphics that Java does, turning everything into a set of pixels. (Yes, I know that that is what a browser does, but a browser does that particularly well, and to simply emulate the Java canvas in JavaScript has all sorts of downsides.) But, also, some aspects of Java cannot be directly converted to JavaScript -- 64 bit integers, for Example. I guess that could be done in WASM, but that would be a huge performance hit unless there is a sustained process that would need those. I wonder how they do 32-bit floating-point math. JavaScript is 64-bit. <quote> JSweet[8] uses the Java language as a naive proxy for TypeScript. It has no place in the expansion of established Java projects as concurrently developed JavaScript equivalents. TeaVM[9] is a prototype compiler for turning specialized Java bytecode into JavaScript. It is extremely limited, does not work with OpenJDK classes, and has no practical use in relation to this project. CheerpJ[10] is a commercial product that interprets Java bytecode and emulates a subset of Java programs from a Java jar file delivered to a web page. There was an unsuccessful attempt in 2016 to use this technology for relatively simple PhET[11] applets, but the technology proved fundamentally unscalable, unoptimizable, and generally unusable. </quote> If you can find a good description of the limitations of CheerpJ, I would love to see that. There must be one somewhere. Bob |