Live data from Hacker News

Web frameworks are transforming from runtime libraries into optimizing compilers

tomdale.net

141–150 of 231 posts

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

#141
post #92
post #11

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

According to https://sweetpricing.com/blog/2017/02/average-app-file-size/ , the average iOS app file size is 38MB. It's much higher for more highly downloaded (and feature-rich) apps; it's probably higher for recent apps. So 40MB for an iOS app may or may not count as “small”, depending on the comparison set. But it is small compared to the historical size of applications. 40MB is 0.5% the RAM of an 8MB iPhone. My fi…

Facebook app on iPhone is reporting at 1.02 GB for me. Most space used with the exception of storage-based applications like photos/music.

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

#142
post #65

Earlier quoted context omitted.

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.

How would you like it if a car mechanic left extra garbage in your car because he has no time to clean it and you don't know what's underneath the hood anyway so who cares!

It's kind of hard to trust someone with that attitude, don't you think?

Yet we waste CPU/RAM/Disk space on consumer's devices without hardly giving it a second thought.

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

#143
post #123

Earlier quoted context omitted.

And we (my generation) weren't! "View Source" is not the only way to start on your way to nerddom, but it is, or at least was at some point in time, an important one.

I find computer magazines and programming books more relevant, and those aren't going away.

An opposing data point: I can't recall the last time I used a physical programming book for anything other than a monitor riser (being so thick, they're fantastic for this). And I am from the generation where those books were how you learned to program.

Every resource I consume today is either in HTML or PDF form.

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

#144

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.

> I mean, you can't 'View Source' anything of the computer the browser is running on, or the browser itself.

Says you:-)

When I'm running SLIME in emacs talking to SBCL, I can type M-. to look up definitions of SLIME elisp, Swank Lisp and so forth, all the way into emacs's C core and the SBCL internals (more Lisp code). This sort of capability has existed since the 80s at least, and maybe even further back.

Yes, yes, I know: I sound like a broken record, extolling the capabilities dynamic systems give one. But they're awesome, and they've been around forever, and they're well-tested, and they perform well enough. It really is a shame the tech world keeps on chasing the new & shiny (and half-baked) instead of improving the wonderful stuff we've had for decades.

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

#145
post #123

Earlier quoted context omitted.

And we (my generation) weren't! "View Source" is not the only way to start on your way to nerddom, but it is, or at least was at some point in time, an important one.

I find computer magazines and programming books more relevant, and those aren't going away.

Maybe, but why not all of that? And some more?

Two other things that helped push me into the nerd side when I was a kid:

- QBasic shipping with the OS on my first computer

- Video games that shipped with map editors (Abuse, StarCraft, Unreal Tournament - the latter actually gave access to most of the source code through it)

I'm in favour of everything that exposes the inner workings of computers. Software, in particular, shouldn't be a black box, even if 99% of the time everyone (developers included) treat it as such.

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

#146
> Our job now is figuring out how to adapt the ideas of high-performance native code while preserving what makes the web great: URLs, instant loading, and a security model that allows us to forget that we run thousands and thousands of untrusted scripts every day.

URLs are indeed part of what makes the web great. So, too, is being able to read a document on any device imaginable, from a desktop with multiple monitors to a VT100 to a Plan 9 terminal window to a laptop to a watch to a phone to the custom OS I'm building in my free time. Non-progressively-enhancing JavaScript kills that entirely.

Also, I don't think the security model of the web allows or enables us to forget that we're running thousands (hundreds of thousands?) of untrusted scripts; I think it just encourages us to. Really, we shouldn't forget it at all. The web security model — while nothing to sneer at — has enabled wholesale violations of privacy and the reduction of human beings to marketing data.

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

#147
post #124

Earlier quoted context omitted.

Because for many consumers, 40MB where it could be 4MB means e.g. 5 minutes of download instead of 30 seconds, or 4% of their data plan instead of 0.4%. And waste is kind of like honesty - if you are wasteful with this, you're probably wasteful with everything else. Like with storage usage, which is a hard constraint on anything but top-of-the-line mobile phones. Like with network usage. Like with energy usage , whic…

How do you know the 40MB download wasn't aggressively optimized down from 400MB? Equating larger file size with lower quality is presumptuous. Is there any known correlation? Equating larger file size with lower honesty seems dishonest to me. Optimizing takes time, sometimes a lot of time. I know because I've spent a lot of time optimizing file sizes to fit on game consoles, taking xbox360 games over to the Wii for e…

> How do you know the 40MB download wasn't aggressively optimized down from 400MB?

I don't; I thought the context made it clear, that I meant relatively trivial apps that do little but are bloated internally.

> Is there any known correlation

Possibly, I don't know. But I also learned that heuristic from experience. When large app sizes are justified, you usually see this in functionality.

> That's a significant waste of precious time (and money) for a developer.

OTOH from a consumer point of view, you're saving time by externalizing your waste on me. I know that "optimize everything" isn't the right answer, but so IMO isn't "optimize nothing". If you save one dev day by wasting each user's 10 minutes over their use of the app, those 10 minutes multiplied by 100k users suddenly become over two man-years of wasted time.

I know that you can't compare users' time to developers' time 1:1, but the scale at which those decisions affect people is still worth minding. Especially for other resources, as e.g. electricity usage does add up pretty much linearly, unlike small time periods.

> We (humans) waste a lot of things that are much more important than people's data plans. Gasoline and food, for examples. Why haven't we reduced those 10x? It is possible.

And many people are working on it too. I find wasting those things to be bad as well.

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

#148

> The trend started by minifiers like UglifyJS and continued by transpilers like Babel will only accelerate. Not to be pedantic, but are UglifyJS and Babel "frameworks"? Not a Ember user, so maybe Ember has some sort of built-in source code transformer and that's what the author is referring to? I think the basic idea that JavaScript developers, especially those working in a browser environment, will increasingly wri…

> Not to be pedantic, but are UglifyJS and Babel "frameworks"?

The article doesn't make that claim, which kinda invalidates the "pedantry strawman" the rest of your comment is based on.

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

#149

Earlier quoted context omitted.

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...

When I was a kid and started doing that, I thought that the compiled scripts were written like this, and I was fascinated (and terrified) by how complex they were.

I recall being both impressed by the complexity and either annoyed or impressed by how well formatted the raw HTML output was.

"How can they possibly stand to work on this when it's all jumbled together on one line??"

I would manually pretty-print so I could actually read what was going on, and now I still like to output tidier HTML when I can, even if no one is ever going to see it.

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

#150
post #141
post #92

Earlier quoted context omitted.

According to https://sweetpricing.com/blog/2017/02/average-app-file-size/ , the average iOS app file size is 38MB. It's much higher for more highly downloaded (and feature-rich) apps; it's probably higher for recent apps. So 40MB for an iOS app may or may not count as “small”, depending on the comparison set. But it is small compared to the historical size of applications. 40MB is 0.5% the RAM of an 8MB iPhone. My fi…

Facebook app on iPhone is reporting at 1.02 GB for me. Most space used with the exception of storage-based applications like photos/music.

I knew it was big, but didn't think it was that bad.

I'm not familiar with iOS, does that figure include the apps locally cached data and/or embedded resources (I imagine retina images and icons could add up quickly) or is that mostly Facebooks infamously bloated codebase?

Post reply on HN