Live data from Hacker News

CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

leaningtech.com

131–140 of 179 posts

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#131

On the flip side, is there a JVM-based Wasm interpreter? JNI is great and all, but I love the thought of compiling native code to WASM to provide a single package for all plaform without extra redundant packages.

I wrote https://github.com/cretz/asmble which has an AOT compiler and interpreter for WASM. Haven't worked on it for a while though.

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#132
post #41

Earlier quoted context omitted.

Considering the time-limit of JIT compilation, I'd say almost certainly yes. AOT can analyze code basically forever (ask C++ compilers), so there's a whole class of time-intensive optimizations that JIT simply cannot do. I'd personally always bet on AOT performance to beat JIT - to convince me otherwise is what I would require evidence for.

GraalVM native compiled binaries rarely beat out their JIT compiled counterparts - is that enough evidence? The time spent optimizing is more than enough when you can focus the resources for the actually relevant parts.

> is that enough evidence?

It's some evidence. Perhaps the HotSpot thing outperforms AOT on its own, it could be true.

Somewhat equivalent to HotSpot but in AOT would be GraalVM's profile guided optimization. If runtime information is what brings JIT its advantage, then PGO could bring the same advantage to AOT. I don't have any hard data though.

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#133

With this and Ruffle, we will soon return to the days of Internet Explorer 6 but with 4k monitors! All we need now is to run ActiveX. I think BottledWine can run Windows executables in the browser, how hard would it be to simulate the ActiveX bindings?

THE SYSTEM. IS DOWN. THE SYSTEM. IS DOWN.

Always a pleasant surprise to see how well Ruffle works with the HR website: https://homestarrunner.com/sbemails/45-techno

The only thing I'm missing is the ability to find the easter eggs by hitting the tab key like you could do with Flash...

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#134
post #122
post #87

Earlier quoted context omitted.

>as a fan of Blazor I really dislike this stuff. It's easy-ish to write, but it's like the authors of it hate everything about the web. SPAs do a lot of annoying stuff, and blazor encourages all of it. I really hope things swing back away from this grotesque tight binding between the server and the client.

I think you’re a little misconceived, WebAssembly runs entirely in the client and have no bindings to the server, as far as the server is concerned such apps may as well be static HTML. This is Blazor WebAssembly. It will be just as trivial to run such on Mac, Linux or Windows server or any other plain web servers. TeaVM seems to be the same except it compiles Java to JavaScript which means has fast startup times. We…

Ah, sure, for whatever WASM variant you're referring to. Whichever form of blazor I use pretty obviously makes calls back to the server to interact with client state on a per-event basis. If the backend has to restart, the clients all lose connection and die. I won't pretend to be an expert in the framework, or even C#. I had avoided both until recently, and this introduction hasn't made me particularly fond of either.

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#135
post #130
post #57

Earlier quoted context omitted.

>If only we could get a new version of Java for the browser. Something more of a scripting language that is not compiled but interpreted. Could probably knock out a proof of concept in a week, might call it Javascript or something... I get the joke. It is sad though how Java didn't end up being the ubiquitous runtime for browsers... It started off so promising... Compiling source to byte code is really fast in Java (…

> It's amazing how badly the Java ball got dropped. It still boggles my mind that Sun Microsystems fully owned the tech for the only ubiquitous browser plugin for full fledged applications with > 95% deployment and somehow screwed it up and went out of business a few years later. Despite all their engineering prowess it seems like they just couldn't make Java work seamlessly and smoothly. I'd like to think it was jus…

I worked at Sun during that time period, and as much as they liked to pretend they were a software business, they were a hardware business whose primary feature was software, which is really, really not the same thing.

They never really figured out how to be in the software business if it wasn't in service of selling hardware. Such an amazing fail.

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#136
post #67

Earlier quoted context omitted.

When everything else fails, you can just boot up a full Windows VM: https://copy.sh/v86/?profile=windows98

If you run Windows and are jonesing for some ActiveX action, and want to be really careful, you can run WSL, run LXDE on WSL, and run https://copy.sh/v86/?profile=windows98 on Firefox on LXDE[1]. That’s maybe enough layers of indirection to make ActiveX safe :-) [1] https://imgur.com/a/VHYehLQ

Maaaybe!

This reminds me of the time I was running Linux on my desktop PC back in high school. I'd just received a very suspicious .exe email attachment, and to demonstrate Linux's inherent safety (despite not running any antivirus software!) to a friend, I double-clicked it – and Wine, invoked through binfmt_misc, perfectly emulated the virus it contained, writing garbage to my home directory (fortunately mostly the emulated Windows directories in it!).

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#137
post #130
post #57

Earlier quoted context omitted.

>If only we could get a new version of Java for the browser. Something more of a scripting language that is not compiled but interpreted. Could probably knock out a proof of concept in a week, might call it Javascript or something... I get the joke. It is sad though how Java didn't end up being the ubiquitous runtime for browsers... It started off so promising... Compiling source to byte code is really fast in Java (…

> It's amazing how badly the Java ball got dropped. It still boggles my mind that Sun Microsystems fully owned the tech for the only ubiquitous browser plugin for full fledged applications with > 95% deployment and somehow screwed it up and went out of business a few years later. Despite all their engineering prowess it seems like they just couldn't make Java work seamlessly and smoothly. I'd like to think it was jus…

I graduated college around that time. Microsoft held an event on campus that took two hours, explaining how great it is to work at Microsoft. A month later Sun came to campus and spent two hours telling us how awful Microsoft is and we shouldn't have anything to do with them. What they didn't do was tell us why we should want to work for Sun. On a larger scale, Sun did seem to lose focus and concentrate too much on getting Microsoft back for making a faster and more stable JVM. What they didn't do was come up with improvements that users wanted. At least not at the rate they should have.

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#138
Using anything other than Javascript in the browser is absolute madness, and I'm a python dude.

Learning the limitations, workarounds and build processes for using anything other than Javascript is going to take longer than just learning Javascript. I get it for moving large C++ applications onto the web, I get it for occasional fiddly bits and pieces like maybe a codec. But new web front end code in anything other than Javascript? Nah.

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#139

Using anything other than Javascript in the browser is absolute madness, and I'm a python dude. Learning the limitations, workarounds and build processes for using anything other than Javascript is going to take longer than just learning Javascript. I get it for moving large C++ applications onto the web, I get it for occasional fiddly bits and pieces like maybe a codec. But new web front end code in anything other t…

[deleted]

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#140

With this and Ruffle, we will soon return to the days of Internet Explorer 6 but with 4k monitors! All we need now is to run ActiveX. I think BottledWine can run Windows executables in the browser, how hard would it be to simulate the ActiveX bindings?

anyone remember dhtml, which allowed adding powerpoint-like transitions to hyperlinks?

(Ignoring the other posts defining what DHTML is/was..) if you would like that sort of functionality on the Web, Chrome is only too happy to oblige: https://developer.chrome.com/docs/web-platform/view-transiti...
Post reply on HN