Live data from Hacker News

Web frameworks are transforming from runtime libraries into optimizing compilers

tomdale.net

71–80 of 231 posts

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

#71
post #11

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

What is sad about this? Small sizes are nice but as a consumer I don't care much. If a larger file size means that apps can be produced easier then I have zero objections.

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

#73

Whilst I am in favour of the optimisation of resources (and use these sources) we are willingly moving the "View Source" model to for profit entities like github. In the way the internet has evolved we really should look hard it the elephant in the room: the DOM is for documents - not for interfaces. IMHO optimisation for javascript is just a short term fad (hopefully) and browsers will adopt a more open approach to…

Honest question: apart from nerds, what reason do we have for valuing 'View Source'? I mean, you can't 'View Source' anything of the computer the browser is running on, or the browser itself.

The Web has more reach than any publishing medium in human history (number and variety of consumers, producers, devices, industries, languages, etc.) Many features combine to make it so, and "view source" is one of them.

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

#74

"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…

Closure Compiler is very, very good at producing small code.

It also takes a fair bit of manual effort unless it's handled for you (e.g. ClojureScript, Scala.js).

Output modules in particular demand some very particular attention.

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

#75

Domain specific languages I suppose are the next cool aid. Or languages with a comprehensive macro system (like Elixir) can bridge the gap between these ways of thinking. This feels very frontend focused though - I'm wondering if there is a more holistic approach. I have an idea for a framework/project, that over web sockets, views the browser as a thin client for a server side representation; commands would be sent…

N2O[0] does exactly that. You write your app in Erlang and the framework delivers the changes via websockets to the browser. You can even choose to have the changes computed in the browser through an Erlang -> Js bridge. Pretty cool.

[0] https://github.com/synrc/n2o

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

#76
The author mentions WebAssembly, yet writes at the end :

" and a security model that allows us to forget that we run thousands and thousands of untrusted scripts every day."

WebAssembly is designed to run in a sandbox. I suppose that does not by itself make it completely safe, but it can not be much worse than the current situation, can it?

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

#77

The author mentions WebAssembly, yet writes at the end : " and a security model that allows us to forget that we run thousands and thousands of untrusted scripts every day." WebAssembly is designed to run in a sandbox. I suppose that does not by itself make it completely safe, but it can not be much worse than the current situation, can it?

but isn't wasm something that is supposed to be compiled into native binary? Which means if there's a way to trick the compiler to compile something that looks innocuous, but when run (or somehow exploited) that it does something it's not supposed to?

In chrome, the process sandboxing is supposed to protect you - it doesn't matter if it's wasm or not. Does other impl. of wasm does similar security-wise?

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

#78
post #77

The author mentions WebAssembly, yet writes at the end : " and a security model that allows us to forget that we run thousands and thousands of untrusted scripts every day." WebAssembly is designed to run in a sandbox. I suppose that does not by itself make it completely safe, but it can not be much worse than the current situation, can it?

but isn't wasm something that is supposed to be compiled into native binary? Which means if there's a way to trick the compiler to compile something that looks innocuous, but when run (or somehow exploited) that it does something it's not supposed to? In chrome, the process sandboxing is supposed to protect you - it doesn't matter if it's wasm or not. Does other impl. of wasm does similar security-wise?

> but isn't wasm something that is supposed to be compiled into native binary?

No, it compiles into a binary code of its own. That gives it near-native speed, but it's no "hardware-binary" code.

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

#79

Whilst I am in favour of the optimisation of resources (and use these sources) we are willingly moving the "View Source" model to for profit entities like github. In the way the internet has evolved we really should look hard it the elephant in the room: the DOM is for documents - not for interfaces. IMHO optimisation for javascript is just a short term fad (hopefully) and browsers will adopt a more open approach to…

Honest question: apart from nerds, what reason do we have for valuing 'View Source'? I mean, you can't 'View Source' anything of the computer the browser is running on, or the browser itself.

How do non-nerds become nerds? "View source" can be the lid of the pandora's box for lots of young people who become inspired to be developers.

Alos the web is not just for nerds! HTML is a language that lots of everyday people can write now - it is empowering.

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

#80
post #65

Earlier quoted context omitted.

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

The sadness does not step from the size of a random binary file per se. The sad part is the prevalence of attitudes deemed unprofessional among people of a certain profession. It's sad for example, that with all the technologies available to us, to imagine what we could have, and compare it with what we do have.

It wouldn't help. If we spent more engineering effort on efficiencies that don't have a substantive effect on consumer response, we're just being inefficient with our time. That will result in less capable software, higher big counts, or higher software prices. Software is written with budgets, and nothing is free.
Post reply on HN