Live data from Hacker News

Web frameworks are transforming from runtime libraries into optimizing compilers

tomdale.net

171–180 of 231 posts

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#171

Earlier quoted context omitted.

That's actually really amazing - and I didn't know that, thank you!

It's extremely slow compared to the Java version though.

I think it's about 2x slower.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#172
post #138
post #97

Earlier quoted context omitted.

If you disable the obfuscation, ProGuard code still looks basically the same. I never enable the obfuscation, as my apps are GPL anyway, and I want users to be able to just decompile any version.

Not really - ProGuard does several optimizations (finalization, removal of redundant bytecode instructions, pulling up methods into superclasses, removing needless sublcasses, some fixes to handling exceptions and several other things depending on optimization settings) which change the bytecode output to the point where you don't have a two-way mapping from Java to compiled code anymore.

I know, and it gets a lot worse when using Kotlin, but this ensures that users can always take the compiled binary, and check that it doesn’t use any analytics, tracking, or any proprietary code that might violate their privacy.

This is very important for me.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#173
post #105
post #17

Earlier quoted context omitted.

This was also predated by the Opa "framework" which is indeed a compiler for the web platform, announced in 2009 and released a bit later. At the time, people didn't want to hear about a new language so we had to hide behind a framework. But one of the ideas was that there is no sense in bundling libraries at runtime instead of generating exactly the application code that should run. Cf. http://opalang.org (disclaime…

I was just thinking about Opa the other day - it looked nice but I never used it. People were worried about debugging through the layers of abstraction. Is it still "alive"? You write in the past tense...

It is not really alive as of now. But there is still space for a full stack language and Opa is relevant today. MLstate, the startup behind Opa, shifted to secure communication platforms (built with Opa) and was acquired last year but without Opa itself.

Many things we did became hype later (implemented in OCaml, a functional language, JSX before React - I know Jordan played with Opa before building React) and we still have bits that are missing is today's stacks. The ideal next step would be to join a foundation so that development on the project could resume.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#174
post #11

> a small 40MB iOS app What a sad, sad world we find ourselves to live in.

Indeed, we no longer worry about food, safety and survival and instead our sadness is directed at irrelevant application binary file sizes.

People need to stop pulling these "well what about x?" red herrings in an attempt to undermine the discussion.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#175
post #85

Earlier quoted context omitted.

We were already nerds for a few decades before the browser was invented.

What about the newer nerds who don't have grey beards?

Take a nerd class in high school. Go to nerd university.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#176
It seems like the less code users have access to, the less control they will have over their computers. Example: it might become harder to block tracking and ads, turning the open WWW into something more like mobile phone apps (which are terrible for the freedom of end users).

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#177

It seems like the less code users have access to, the less control they will have over their computers. Example: it might become harder to block tracking and ads, turning the open WWW into something more like mobile phone apps (which are terrible for the freedom of end users).

I think that's the very thesis to the free & open source software movement.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#178

"The trend started by minifiers like UglifyJS and continued by transpilers like Babel will only accelerate." Those were predated by Closure Compiler, which was started with Gmail, and Closure Compiler in some ways still doesn't have an equal. Besides being a fully optimizing compiler, it also has a module system for code splitting, and optimization passes designed to move code at the method/property level from initia…

This seems to be something of a trend in the software library and tool world: A problem emerges. Some early, sharp thinkers create tools which attack the problem in a high level, abstract, powerful way... but also with the rough edges that come with being early. These tools get a few adopters, but not that many because it is difficult to see the value versus the obvious rough edges. Then other sharp thinkers, put off…

I think some of this might be that selection bias. Closure compiler is popular, plenty of not-so-sexy projects have used it since its inception to a great degree of success. I seem to see it with some consistency in the enterprise world. It's never been popular with the HN / startup crowd.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#179
post #169
post #121

Earlier quoted context omitted.

"I'm wondering if there is a more holistic approach." The end game, once WebAssembly is fully integrated into the browser, is to expose the 3D API and/or a high-performance low-level 2D API (or both) and slowly, but surely, a "web browser" will become an environment where you download a full rendering engine for a website, written in an arbitrary language that has WebASM support, and in the end both DOM and JS will b…

James Mickens presents something like this idea: https://www.youtube.com/watch?v=1uflg7LDmzI

Yes, I had the pleasure of seeing him present that live once, though not at that one. I think he was disappointed that people weren't helping him work on it, but I still think that long term the pressures are absolutely inevitable in that direction. It's just that the world at large can't jump there in one shot, it has to get there one very laboriously-worked-out technology at a time first. He's gotten a bit more famous for his sense of humor, but I can attest that he knows his stuff.

Re: Web frameworks are transforming from runtime libraries into optimizing compilers

#180
post #121

Earlier quoted context omitted.

"I'm wondering if there is a more holistic approach." The end game, once WebAssembly is fully integrated into the browser, is to expose the 3D API and/or a high-performance low-level 2D API (or both) and slowly, but surely, a "web browser" will become an environment where you download a full rendering engine for a website, written in an arbitrary language that has WebASM support, and in the end both DOM and JS will b…

As always, the fantastic Gary Bernhardt takes this through to its logical conclusion https://www.destroyallsoftware.com/talks/the-birth-and-death...

First, while presented humorously, I take it somewhat seriously as well. And one place where I disagree with it is that unless you consider WebAssembly as Javascript, it isn't true. It isn't Javascript destined to take over the world, it's WebAssembly.

You will know WebAssembly is here and in charge when the browsers compile Javascript itself into WebAssembly and take at most a 10% performance hit, thus making it the default. Call it 2022 or so.

Post reply on HN