What does HackerNews think of pluotsorbet?

[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.

Language: Java

> - 3rd party clients. That worked initially, but WA was quite aggressive in breaking them, and once e2ee was added they stopped working.

Yeah, that happened. :/ I was mostly in favor of a light touch, but e2ee would have been a hard cutoff anyway, and we didn't have the desire to make a compliance program for 3rd party clients, so they just got the boot whenever they caused inconvenience. There would usually be a flurry of activity around individual changes, but afaik, third parties saw the writing on the wall when e2ee started showing up.

> - we wrote a j2me VM in Javascript (https://github.com/mozilla/pluotsorbet) to run the S40 version :) Perf was not good enough when dealing with java threads.

Wow, that's impressive! (and kind of terrible!) Were you able to leverage this for other things, I hope?

> - we collaborated with a company (OpenMobile) to run the Android app in a container, rendering in a DOM element. That was a pain in term of OS integration, and OpenMobile finally didn't get the distribution agreement from WA.

I was unaware of this. That's interesting to hear about. I think you're right from your earlier post, that user count would have pushed WA the other way, and that lack of WA support made it harder to get user count. Samsung (Tizen) and Jio (KaiOS) got WA to make clients by subsidizing handsets and leveraging user counts / other business relations; s40 got a client because Nokia was clearly going to sell at least a few million of them (s40 predates WA, of course, but the earlier ones never ran WA); same with WP7, although no client until 7.5, because the platform was missing pieces.

WebOS didn't get a client because the platform was missing pieces and didn't survive long enough to add them (lack of WA support wasn't really an issue, given the timing). MeeGo didn't get a client because Nokia cancelled the N9 before they launched it, and limited the release.

We actually wrote an entire jvm in javascript to try to get the J2ME version of WhatsApp working. It actually did work, but not well enough to be considered polished, and I think they must have discontinued the J2ME implementation as feature phones became more and more rare.

https://github.com/mozilla/pluotsorbet

Why do you assume didn't try anything?

We actually:

- have been friendly to 3rd party clients developers, like Loquim (https://loqui.im/). Once WA turned on e2e encryption, the situation for 3rd party clients changed from "difficult but fun" to "mostly impossible".

- wrote a JVM in JS to run the S40 version of WA (https://github.com/mozilla/pluotsorbet).

- partnered with a company specialized in bringing android apps to other OSes (they had Windows Phone support for instance).

Mozilla was so eager to get WhatsApp on Firefox OS that it wrote a proof of concept J2ME.js interrupter [1] (repurposing Shumway's Flash-to-JS JIT) to run WhatsApp's Java applet. But WhatsApp was not interested. This was a big blow because lack of WhatsApp support was one of the top complaints or deal breakers for Firefox OS users in its initial markets.

[1] https://github.com/mozilla/pluotsorbet

Yeah, it would be awesome to have this open-source, with the help of the community one can achieve great things.

There was this project for FirefoxOS to support J2ME apps -- https://github.com/mozilla/pluotsorbet It would be great to have something like that for "nostalgic" reasons. Many feature phones' users remember J2ME apps, games especially, very fondly. Check out also this J2ME project, which could potentially be ported to KaiOS as well: https://github.com/XerTheSquirrel/SquirrelJME

Also, have you considered some kind of support for "content blocking" (like in iOS, or in the form of typical browser plugin-ins), of course, I'm not saying that ANY content should be blocked by default. But taking into account that devices with KaiOS wouldn't be very powerful, it could be really useful to have such an option to avoid "unnecessary" stuff when browsing the Internet...

Anyway, keep up good work!

A similar project from Mozilla: https://github.com/mozilla/pluotsorbet

It was targeted toward running J2ME apps on FirefoxOS phones. With that project dead it's no longer under active development.

I don't think you ever saw the one I'm talking about. It was done in collaboration with a partner and was never released. Also, lawyers were involved ;)

You likely saw the other attempt using the J2ME-in-js implementation: https://github.com/mozilla/pluotsorbet

That was too slow and never shipped in commercial devices either.

To get good performance on running JVM or .NET WASM will probably need more than just GC support. JVM/.NET JITs rely on inline-caches that aren't currently expressible in WASM. There are ideas about ways to make this work, but it will be a while.

The other thing preventing the use of JVM or .NET is that porting the runtimes over isn't easy. i.e. You can already run this bytecode in a browser but it isn't widely used. (http://jsil.org/, https://github.com/decatur/j2js-compiler, https://github.com/plasma-umass/doppio, https://github.com/mozilla/pluotsorbet etc)

WhatsApp was the big missing app for Firefox OS. In Mozilla's target markets, WhatsApp was huge but the company didn't want to invest any engineering resources to support Firefox OS, understandably. Firefox OS was an unproven OS with no market share and no J2ME support.

In response, Mozilla Research started a "j2me.js" project to try running the WhatsApp J2ME app in JavaScript, sharing some code with the Shumway project to run Flash content. If that worked well enough, maybe WhatsApp would become interested. It did actually kinda work, but the project did not proceed for a number of reasons. Also, j2me.js was renamed "PluotSorbet", due to trademark concerns:

https://github.com/mozilla/pluotsorbet

Mozilla had been working on a "j2me.js" VM called PluotSorbet. The primary use case was to host J2ME apps on Firefox OS.

https://github.com/mozilla/pluotsorbet