HN2new | past | comments | ask | show | jobs | submitlogin

The last thing I want in my browser is a JVM.


The brower already has a VM, and from the same people and the same principles who made the Java JVM JIT and the fast Smalltalk one back in the 90s...

Lars Bak, the v8 head:

"In 1994, he joined LongView Technologies LLC, where he designed and implemented high performance virtual machines for both Smalltalk and Java. After Sun Microsystems acquired LongView in 1997, Bak became engineering manager and technical lead in the HotSpot team at Sun's Java Software Division where he developed a high-performance Java virtual machine.".


I heard at one point that Hotspot had crossed a million lines of code. Looks like V8 is close to 2 million sLOC.

The same source says SpiderMonkey is about 540k sLOC.

Bak has learned a lot of lessons along the way I'm sure, and unless Cliff Click decides to write VMs again (sounds like he's semi-retired, doing something else) then he may be the best person for the job. But nobody's perfect. For me this is Exhibits A-C.


The JVM actually had a lot of features that are slowly appearing in JavaScript. Standard bytecode format (like WebAssembly), security/authentication (origin, content security policy)...

One day JS engines will add cryptographic signatures to replace the complex origin rules and they will unify the WebAssembly workflow with the JavaScript code pipeline and we'll have a full JVM again.


> One day JS engines will add cryptographic signatures to replace the complex origin rules

Signed HTTP exchanges might give you that already, AFAICT.


Maybe I'm just ignorant, but haven't browsers nearly become just a VM for JavaScript? Rendering documents is sometimes incidental. I'm not sure Swing would actually be worse than HTML5.


Layout is actually difficult and offers a great many interesting problems when you try to parallelize it or efficiently use GPU acceleration. There are a lot of constraints and text is difficult to size and render.


Layout is automated (and hopefully repeatable) typesetting.

The other thing Donald Knuth is famous for is getting so fed up with typesetting for his books, he created a document format to help him keep his sanity. And then went way way down that rabbit hole instead of finishing his book series. One might argue that's not sanity-preserving.


Sometimes the detour is the journey.


Agreed, layout is probably more difficult problem and definitely the area with more potential for improvements ("forced reflow" anyone?) whereas JS engines are already at the point of quickly diminishing returns.


Could the GeForce 3090 be fast enough to handle it?


An Intel GMA 950 can handle accelerating browsers. It's less about raw power and more about just being able to efficiently split up the workload to get the page rendered and visible in as little time as possible.


There's already a VM. If Graal really brings better performance then I don't mind.


I wonder if anyone is already trying to build that. A browser based on graaljs and java rendering engine. I wonder if you could take firefox mobile and do it. I'm assuming its html/css rendering engine is in Java/Kotlin.


We had that in the early days — Java applets. But the paradigm was a little different because they were essentially Java programs and not JavaScript.


Why?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: