News for hackers. Stuff that matters.
Re:CNET is deleting old articles to try to improve its Googl... by midoridensha on Thursday August 10, 2023 @03:42AM (#37073173)
Minifying code for browsers greatly reduces the amount of bandwidth needed to serve web traffic. There's a good reason it's done.

By your logic, there's actually no reason to use compiled code at all, for almost anything above the kernel. We can just use Python to do everything, including run browsers, play video games, etc. Sure, it'll be dog-slow, but you seem to care more about reading the code than performance or any other consideration.

Re:CNET is deleting old articles to try to improve its Googl... by Dalewyn on Thursday August 10, 2023 @04:28AM (#37073490)
I already alluded[1] to the incentives for the host to minify their JavaShit, et al., and you would have a point if it wasn't for the fact that performance otherwise isn't significantly different between minified and full source code as far as the user would be concerned.

[1]: https://news.ycombinator.com/item?id=37072473

Re:CNET is deleting old articles to try to improve its Googl... by midoridensha on Thursday August 10, 2023 @05:07AM (#37073722)
I'm not talking about the browser's performance, I'm talking about the network bandwidth. All that extra JS code in every HTTP GET adds up. For a large site serving countless users, it adds up to a lot of bandwidth.
Re:CNET is deleting old articles to try to improve its Googl... by bee_rider on Thursday August 10, 2023 @10:42AM (#37076779)
Somebody mentioned negligible/deleterious impacts on bandwidth for minified code in that thread, but they seemed to have low certainty. If you happen to have evidence otherwise, it might be informative for them.
Re:CNET is deleting old articles to try to improve its Googl... by mannerheim on Thursday August 10, 2023 @10:52AM (#37076908)
>JavaShit

Glad to see the diversity of HN readers apparently includes twelve year olds.

Anyway, you do realise plenty of languages have compilers with JS as a compilation target, right? How readable do you think that is?

Re:CNET is deleting old articles to try to improve its Googl... by Dalewyn on Thursday August 10, 2023 @06:22PM (#37082507)
>Glad to see the diversity of HN readers apparently includes twelve year olds.

The abuse of JavaScript does not deserve the respect of being called by a proper name.

>Anyway, you do realise plenty of languages have compilers with JS as a compilation target, right? How readable do you think that is?

If you're going to run "compiled" code through an interpreter anyway, is that really compiled code?

Re:CNET is deleting old articles to try to improve its Googl... by mannerheim on Friday August 11, 2023 @11:14AM (#37089622)
>In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language).