11 ms·
The JVM is already open source. If this matter has indeed been settled, then the litigious organization issue might have been too. WebAssembly doesn't have a GC
by grizzles 11y ago
The JVM is already open source. If this matter has indeed been settled, then the litigious organization issue might have been too. WebAssembly doesn't have a GC, and probably won't for some time. It also doesn't have ~20 years of performance tuning on different microarchitectures the way the JVM does. Benefits include getting scala, clojure, jython, jruby, and about 30 other languages working client side in the browser for free. Not to mention the languages that have been statically compiled will run way faster than the equivalent JS. That would be great for mobile, and the spread of the open web.
- ndesaulniers 11y ago> The JVM is already open source. I can picture Google's lawyers using that in court against Oracle. > then the litigious organization issue might have been too That might is a big MIGHT, the same kind that keeps browser vendors from shipping various media codecs and news companies from using various media streaming protocols. > WebAssembly doesn't have a GC The GC all browsers currently have and will not get rid of that I was referring to was the JavaScript VM. > It also doesn't have ~20 years of performance tuning on different microarchitectures the way the JVM does. And the JVM doesn't have the start up performance of any JS VM. I would estimate the number of exploits to be significantly higher for the JVM, but worth less. > Benefits include getting scala, clojure, jython, jruby, and about 30 other languages working client side in the browser for free. JS is the most compiled to language in existence. Also, my point has been none of this would be free. How do you integrate JVM with DOM? Who's going to rewrite all that? Who's GC cleans up around here? > Not to mention the languages that have been statically compiled will run way faster than the equivalent JS. Are you talking about WebAssembly here? Cause it sounds like you are.
- exabrial 11y agoThe startup performance of HotSpot is largely related to the SDK and class library. Remove it and you have a very expedient startup.
- ndesaulniers 11y agoPull an engine out of a car and it gets lighter, too.
- grizzles 11y agoI don't think this is a significant issue because it's a one time cost. It could be done at browser startup. Even for a cold start, Hotspot and V8 are comparable. $ time java com.Hello real 0m0.096s user 0m0.103s sys 0m0.013s $ time node /tmp/hello.js real 0m0.073s user 0m0.067s sys 0m0.007s
- invalidname 11y agoFunny ;-) I actually worked for Sun/Oracle on VM's but on the embedded not hotspot team. The trick is actually simpler and its called MVM, which is something Sun kept avoiding on the desktop/server for some stupid reason but we did do it on mobile and it made startup almost instant. The trick is to share one VM instance between multiple apps. So when the OS starts you start the VM process and then fork with a lot of the JITted code already in place so you get almost instant startup and reasonable process isolation. In mobile where there are some restrictions this is very practical. On the desktop/server this gets a bit tricky with bytecode manipulation, classloaders etc. But this is totally doable. My personal uninformed theory is that Sun or Oracle didn't do this because they didn't care. MVM has two use cases: faster startup/lower overhead on desktops (they don't care about that). Server efficiency in small scale deployments (which they don't care about either). AFAIK Google did some work on MVM for App Engine Java, but those are just rumors.
- quotemstr 11y agoMVM relies on the runtime system to enforce security isolation. In a system like Android that allows unrestricted loading of native code, this scheme can't work, since there's no way to get arbitrary native code to play along with the runtime security model. Personally, I feel much more confident with the kernel enforcing application isolation than I would feel about relying on the Java security model.
- pron 11y ago> I can picture Google's lawyers using that in court against Oracle. Google chose not to use OpenJDK (and they've obviously not complied with its license so far), so it being open source is irrelevant.
- ossreality 11y agoAre you fucking trolling us? Are you actually literally so young as to not remember Java Applets? I don't think you have any idea of what you want, nor do you realize what you're asking for. You... want... WebAssembly.
- overgard 11y ago> WebAssembly doesn't have a GC, and probably won't for some time. Yeah... because it's assembly. That's the whole point. You don't WANT a GC. It would be the wrong layer to place a GC in. Ask most professional game developers if they would consider using a platform with a GC. They won't, because you can't build a realtime system without stuttering if you're dealing with a GC.
- greggman 11y ago1000s of games have shipped with gc. Every Unreal and Unity game uses gc. Every XNA game used gc. Many of the largest most popular AAA games use gc. So yes we can ask professional game devs if they want a gc. Most will say "yes". Like any tool you know when to use them and when not to
- gruez 11y ago>Many of the largest most popular AAA games use gc Like, actual GC and not smart pointers? I would like a list.
- camgunz 11y agoThese days a great deal of game logic is scripted in a language with GC: C#, JS, and Lua mostly.
- cthalupa 11y agohttps://wiki.unrealengine.com/Garbage_Collection_Overview https://wiki.unrealengine.com/Garbage_Collection_Overview https://en.wikipedia.org/wiki/List_of_Unreal_Engine_games https://en.wikipedia.org/wiki/List_of_Unreal_Engine_games TSubobjectPtr are smart pointers, but regular pointers will still be garbage collected if they are UPROPERTY() and in a class derived from UObject Tim Sweeny talks about GC a bit in https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/sweeny.pdf https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced... The presentation is a little dated, but they're still using GC, so...
- ndesaulniers 11y ago
- pcwalton 11y ago> WebAssembly probably won't [have a GC] for some time Citation needed :) > It also doesn't have ~20 years of performance tuning on different microarchitectures the way the JVM does. JS engines have been tuned very well over the years. Remember that Web Assembly is designed to run in a JS engine.
- pron 11y ago> Remember that Web Assembly is designed to run in a JS engine. Is it? It's a very low-level bytecode that's designed to be efficiently compiled in one pass, and completely unrelated to the JS engine. It isn't meant (at least at this time) to have an optimizing JIT (like HotSpot or V8). It is meant as a good target for languages that don't rely on/can't benefit greatly from good JIT optimizations, such as C/C++ (or Rust). Of course, one could compile a JVM to wasm, provided that wasm allows applications to write to executable memory (which I doubt).
- sunfish 11y agoIt is (though that's not the only thing it's designed for), but in a JS engine setting it only uses a few specific parts of the JS engine, such as the JIT backend to do the actual code generation work and interoperability with JS. Indeed, wasm won't likely ever expose directly executable memory. But in the future it may expose JIT capabilities like creating and calling new functions, declaring "patchable" code fragments which can be manipulated through APIs, and so on, and with these capabilities it isn't unreasonable to think about porting JITing VMs onto wasm.
- rdtsc 11y ago> The JVM is already open source. From what I understand open source and imunity from litigation are orthogonal. Open source code and still be a patent minefield.
- pron 11y agoOpenJDK has a full patent grant[1]. It is 100% open source in every way possible, its use is unrestricted, and it is released under the same license as Linux. AFAIK, Oracle has never sued anyone making use of it for whatever purpose whatsoever. It is important to remind the undisputed fact that -- at least so far -- Google has chosen not to use OpenJDK (or, in any case, they did not comply with its license), and therefore its open source status is irrelevant to the court case. [1]: That grant is automatic, by the open source license. In addition (and unrelated to OpenJDK), there is an explicit patent grant to conformant implementations of Java (be they based on OpenJDK or not).
- rdtsc 11y agoI see, good point. I was saying in general, if something is released as open source, that doesn't usually come with a default immunity from patent litigation.
- rewqfdsa 11y agoOf course, if you don't conform, Oracle will sue you into oblivion. Java is free software as long as you use it in exactly the way Oracle wants, right? It's for this reason that Java is poison to any of my projects. I'll choose Node-fucking-JS over Java, because nobody is going to sue me for using JavaScript the way I want.
- pjmlp 11y agoNo one expects JavaScript to run unchanged across all VMs anyway.
- pron 11y ago> Of course, if you don't conform, Oracle will sue you into oblivion. What? OpenJDK is as free as they come. No conformance with Java necessary, you can do with it whatever you damn well please. You can use it to implement .NET if you want. Oracle has never (to the best of my knowledge) sued anyone for the use (or modification) of OpenJDK.