Live data from Hacker News

Web frameworks are transforming from runtime libraries into optimizing compilers

tomdale.net

31–40 of 231 posts

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

#32
post #21

> When it comes to eking performance out of hand-authored JavaScript and accompanying runtime libraries, we’ve reached the point of diminishing returns. Are you saying that web developers are writing the best code that they can? That future gains are going to come from more advanced js preprocessors instead of more informed developers? I strongly disagree that we have reached any sort of diminishing returns when it c…

> I think the author would benefit from learning about how web frameworks work, or perhaps how web specs mandate that your browser works. Haha, he is the creator of Ember.js. I think he knows a thing or two about web frameworks ;)

There are a lot of people who create things and learn the hard way what they didn't know at the beginning. Creating Ember and then talking about going back to Flash, says all that needs to be said about his credibility.

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

#33
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 from the browser but defined on the server. I haven't decided how this would work yet fully but it would be interesting to do the DOM diff-ing on the server and have the thin client only transfer the changes. This would hopefully make the initial payload extremely small and the changes being transferred minimal as well.

Are there any projects that do anything like this currently?

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

#34
post #5

I don't think so. Browsers will catch up with what developers want. We have seen that with ActiveX, Flash, Java applets, jQuery etc. Every time tech was needed because "The browser alone is not good enough" the browser became better and made the additional tech obsolete.

I think the effort going into browsers is a double-edged sword. It's nice that we've got so much work going on, pushing new standards, etc. but it's also making browsers more bloated and making it less viable to bring out new browsers. As more stuff gets done in Javascript, and Javascript gains more APIs, browsers like Lynx, Dillo, Netsurf, and umpteen yet-to-be-written ones are becoming less able to browse the Web.…

While I agree with the overall sentiment, browsers like Dillon and Lynx don't even implement HTTP caching correctly (they cache everything regardless of the headers).

JavaScript is not their biggest problem, as they can plug in one of the existing engines (in fact one of the links forks does just that).

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

#35

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.

presumably, the parent commenter laments that you cannot easily decipher the code that drives today's webapps, where as yester-decade's webapp's view-source is simple to decipher (and presumably, learn/copy from).

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

#36
OT, but this jumped out to me:

> In the same way that a compiled Android binary bears little resemblance to the original Java source code

From what I recall, Java binaries actually look a lot like their source code. They're not human-readable of course, but you can decompile them very easily and get fairly good code back out. This made Minecraft an easy game to mod: just decompile a class, change a line or two, recompile, insert back into the JAR and you're done.

Is Android different?

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

#37
post #5

I don't think so. Browsers will catch up with what developers want. We have seen that with ActiveX, Flash, Java applets, jQuery etc. Every time tech was needed because "The browser alone is not good enough" the browser became better and made the additional tech obsolete.

I think the effort going into browsers is a double-edged sword. It's nice that we've got so much work going on, pushing new standards, etc. but it's also making browsers more bloated and making it less viable to bring out new browsers. As more stuff gets done in Javascript, and Javascript gains more APIs, browsers like Lynx, Dillo, Netsurf, and umpteen yet-to-be-written ones are becoming less able to browse the Web.…

> browsers like Lynx... less able to browse the Web.

they are still able to browse the web that they were able to browse back then. You can't expect that the web won't move on.

The only lament is that most websites don't cater for text only/low-resource/disabled users. But that's a different story to the OP of having lots capability/libs/standards.

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

#38
post #20

Earlier quoted context omitted.

Sounds like you need to read up just a little bit on Web Assembly which is compiled from anything including C, C++, Rust and just about any language. Including Python and others. Web Assembly will make syntax irrelevant for web scripting and JavaScript entirely optional depending on how much WebASM is allowed to access.

As soon as Webassembly ships garbage collection and the authors are willed to create a Wasm backend for the given language.

The hope is that one day it will be possible to implement an efficient concurrent GC in WASM. However, right now it still lacks the primitives (e.g. locking primitives, shared memory, and memory barrier instructions).

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

#40

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.

Learning: I learned a big deal of web development (HTML, CSS and JS) from view-source. Tweaking: I sometimes fix broken closed-source/proprietary applications or websites by checking the source and writing a user script. Those two can probably fall into the "Nerd" category, though...
Post reply on HN