News for hackers. Stuff that matters.
Re:I Bought Apple Silicon by Apocryphon on Friday December 18, 2020 @05:12PM (#25472712)
> Spotify, Slack, Discord, Facebook, Twitter, LinkedIn, all the annoying bloated websites, which I used to hate so much for the past months, now run like if they were the most optimized websites on the internet.

This is just going to encourage bloat and inefficiency, isn't it? Note: this has nothing to do with specifically Apple Silicon but just any computing improvements in general.

Re:I Bought Apple Silicon by 0xCMP on Friday December 18, 2020 @05:18PM (#25472765)
Yes, but that's pretty much how it goes. Jonathan Blow had a rant on release of the M1 Macs saying it literally didn't matter because computers were already really fast and the problem has been, and will continue to be, that if the processor/system is faster then software will be written slower to hit the magical response time expected.

Kind of a cynical take... but is he wrong?

Re:I Bought Apple Silicon by samatman on Friday December 18, 2020 @10:02PM (#25474590)
We used to have a saying "Moore giveth, and Gates taketh away".

But I see two reasons why the M1 is a big deal, even given the bloat tax.

One is simple power efficiency. These chips run cool and fast, and Intel laptop chips don't. No amount of hyperefficient code is going to get you a real 18 hours of battery life on last year's MacBook Air.

The other one is Apple's proven track record of integrating custom hardware and software, into something which is greater than the sum of its parts. Ever since I got an iPad Pro, I've been quietly frustrated with the user interface of MacBooks. It's just not physics-smooth, and the iPad just is.

I just got one of the 16" MacBook Pros for work, and it's pretty loaded, and it's a good computer— by the standards previous to the M1. Battery life could be better; overheats sometimes with serious fan noise, for no good reason, although each update to Catalina appears to substantially reduce this.

I figured I could get five years on this rig. No way. I might make it to 2022, but I know terminal gearlust when I see it. Whatever Apple sticks in the next release of the 16", I'm craving it already.

Re:I Bought Apple Silicon by computing on Friday December 18, 2020 @10:09PM (#25474624)
"What Andy giveth, Bill taketh away" (Andy Moore, Bill Gates)

https://en.wikipedia.org/wiki/Andy_and_Bill%27s_law

Re:I Bought Apple Silicon by dreamcompiler on Friday December 18, 2020 @10:24PM (#25474706)
Andy Grove. Moore's first name is Gordon.
Re:I Bought Apple Silicon by computing on Saturday December 19, 2020 @12:34AM (#25475352)
Grove, my bad.
Re:I Bought Apple Silicon by Betelgeuse90 on Saturday December 19, 2020 @08:19AM (#25477232)
Wow man I'm really feeling that. I also have a great 16" and I'm experiencing similar issues with it. The new M1 MacBook Air is already as fast as my machine and costs less than half. It's bonkers. I use two external monitors however and the Air doesn't support that, so that's one thing keeping me away from the new M1. I imagine the new 16" MacBook Pros will support more than one external monitor, and I don't think I'd be able to stop myself from getting one.
Re:I Bought Apple Silicon by ATsch on Friday December 18, 2020 @05:29PM (#25472866)
Given it's Jonathan Blow, I feel compelled to say yes.

More seriously, while program overheads have undoubtedly gotten higher, that's always been in exchange for something else, even if non-technical, like a better developer experience and platform support. Nobody writes slow programs on purpose, but people are very willing to trade it off for things that are more important in the grand scheme of things. Low level programmers love to smugly pretend that those tradeoffs do not exist but they do.

Re:I Bought Apple Silicon by zamfi on Friday December 18, 2020 @05:46PM (#25473014)
> Nobody writes slow programs on purpose, but people are very willing to trade it off for things that are more important in the grand scheme of things

Wait, of course they write slow programs on purpose, because "premature optimization is the root of all evil," right? A developer might use Electron because it's "fast enough" and halves your development time, and "fast enough" is always a perceptual metric, and not a technical one.

Faster hardware means even less optimization is needed before something is shippable -- great for developers! -- and a recipe for software continuing to feel just as slow as before, because we only optimize until it's "fast enough".

And despite the M1, or any of the advances of the last decade, the perceptual line that is "fast enough" hasn't changed.

EDIT: Yes of course Knuth was talking about optimizing noncritical paths, but the sprit he’s espousing lives on in system design: use electron, or something else that makes your product more maintainable and easier to understand (because you didn’t build your own bespoke cross-platform app scaffold, and electron is well-documented, etc.), until you’re sure you can’t anymore. Well, the bar for “can’t” is raised every time there’s more cpu to support rapid, maintainable, “nonoptimal” development, and here we are.

Re:I Bought Apple Silicon by doggosphere on Friday December 18, 2020 @06:00PM (#25473143)
> Wait, of course they write slow programs on purpose, because "premature optimization is the root of all evil," right? A developer might use Electron because it's "fast enough" and halves your development time, and "fast enough" is always a perceptual metric, and not a technical one.

That's not writing a slow program on purpose; that's accepting a tradeoff of speed for deliverability. Writing a slow program on purpose means intentionally adding code to make it slower with no other consequence.

"Fast enough" can be measured in ms latency for UX purposes. Ex: Websites test and benchmark themselves on load time because they know sales/pageviews decrease after too long.

Re:I Bought Apple Silicon by zamfi on Friday December 18, 2020 @07:49PM (#25473914)
> accepting a tradeoff of speed for deliverability

So...making a purposeful decision that results in your program being slower...is not “writing slow programs on purpose”? They’re definitely not slow by accident.

No one but artists (this is not a dig at artists, in fact I love them and teach them to program at an art school) would take “writing slow programs on purpose” to mean “adding useless code to slow things down”.

It’s all about making decisions that prioritize the perceived latency at the expense of anything else.

Re:I Bought Apple Silicon by cwyers on Friday December 18, 2020 @08:52PM (#25474259)
There is a difference between deciding "we don't need to be fast" and deciding "we need to be slow."
Re:I Bought Apple Silicon by Turing_Machine on Friday December 18, 2020 @10:53PM (#25474855)
Code that makes your software able to run on a completely different platform with minimal further development cost isn't "useless". Quite the contrary.

And you're not adding it "to slow things down". You're adding it to make it possible to run at all on the other platform.

Re:I Bought Apple Silicon by zamfi on Saturday December 19, 2020 @02:14AM (#25475750)
I guess I wasn’t clear — this is my point! You’re adding it because it has huge benefits, and one cost is it slows things down. You are still making an explicitly decision to use something that makes your app slower, no?
Re:I Bought Apple Silicon by baumandm on Friday December 18, 2020 @07:19PM (#25473717)
There's a significant difference in meaning between "write slow programs on purpose" and "write programs that are fast enough but not faster."
Re:I Bought Apple Silicon by dragonwriter on Friday December 18, 2020 @05:53PM (#25473077)
> Wait, of course they write slow programs on purpose, because "premature optimization is the root of all evil," right?

No, the first is not the meaning of the second.

Re:I Bought Apple Silicon by adrusi on Friday December 18, 2020 @06:05PM (#25473188)
Warnings against premature optimization suggest a two-pass strategy, where in the first pass you avoid trading increased performance for increased labor, and then in the second pass you do whatever is needed to make the performance good enough.

The faster the underlying platform, the less work is required to get to "good enough" performance, so this strategy absolutely leads to software not getting faster as hardware gets faster, and the only way for an end-user to get their software to run fast is to have faster hardware than is typical for the target market for that software.

I don't think it's much of a stretch to call a development paradigm that causes software to never get faster even as hardware improves "writing slow programs on purpose."

Re:I Bought Apple Silicon by dragonwriter on Friday December 18, 2020 @06:53PM (#25473561)
> Warnings against premature optimization suggest a two-pass strategy, where in the first pass you avoid trading increased performance for increased labor, and then in the second pass you do whatever is needed to make the performance good enough.

No. The argument against premature optimization is not about labor vs. performance tradeoffs (but about correctness and maintainability vs. performance tradeoffs), nor is it about the entire code base, but about non-critical elements.

Quoth Knuth: “Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.”

Thinking about and designing for broad performance concerns even though it adds to initial implementation time is not against the adage; it’s when you are compromising clarity and ability to reason about the code to shave off microseconds on a path without a clear reason to believe that its going to be hit often enough that those microseconds matter in the big picture that you are engaging in premature optimization of the type targeted by the expression.

EDIT:

> I don’t think it’s much of a stretch to call a development paradigm that causes software to never get faster even as hardware improves “writing slow programs on purpose.”

If that is its explicit intent, sure; if it is a side effect, no. In any case, blaming such a paradigm on the adage against premature optimization is misplaced.

Re:I Bought Apple Silicon by adrusi on Saturday December 19, 2020 @12:23AM (#25475304)
You're right, I guess it's the cargo cult interpretation of "premature optimization is the root of all evil" that's the issue.
Re:I Bought Apple Silicon by zamfi on Saturday December 19, 2020 @02:16AM (#25475758)
That the adage was intended to address a narrower case does not invalidate your argument, friend!

People should, and do, make tradeoffs for maintainability over speed — and this is still choosing to make your app slow — whether Knuth meant it or not.

Re:I Bought Apple Silicon by zamfi on Friday December 18, 2020 @07:44PM (#25473876)
> No. The argument against premature optimization is not about labor vs. performance tradeoffs (but about correctness and maintainability vs. performance tradeoffs), nor is it about the entire code base, but about non-critical elements.

If true, I envy your ability to produce correct, maintainable code without labor!

Re:I Bought Apple Silicon by erik_seaberg on Friday December 18, 2020 @06:15PM (#25473289)
Part of the reason for writing the slow version is that you need to profile it to find out where the problems actually are, because intuition is not a very good guide. Some of the worst bottlenecks seem tiny but happen so frequently they add up, while a lot of things that sounded slow don’t actually matter.
Re:I Bought Apple Silicon by carlmr on Saturday December 19, 2020 @04:07AM (#25476226)
That's also the thing with premature. I would agree with you that premature is before you know what's slow. But if you have a CI Profiling run showing a few hotspots it's not premature anymore. Still people quote this adage.

Further there are things you should know are usually performance issues, that I would expect you to avoid entirely, except with good reason. Using O(N²) or worse algorithms on big collections when there are much faster alternatives in the standard library of your language for example. I don't think these good habits are premature optimization.

Re:I Bought Apple Silicon by jimnotgym on Friday December 18, 2020 @07:07PM (#25473646)
We are looking at Electron as a potential way to write once for all platforms, not least to be able to run on Mojave, Catalina and Big Sur without a breaking change every 12 months. The software is in the 'run once every few months' category, so for me the optimisation required is not anything to do with speed or memory usage, and more about not getting nailed by Apple's latest change of direction.
Re:I Bought Apple Silicon by matthewmacleod on Saturday December 19, 2020 @06:36AM (#25476786)
That’s nonsense though. Native Mac apps built years ago continue to work completely fine on the latest OS releases.
Re:I Bought Apple Silicon by Apocryphon on Friday December 18, 2020 @05:52PM (#25473069)
One wonders if VC-funded startups or "move fast and break things" firms like Facebook or Uber (as opposed to say '90s Microsoft or Sun or IBM or Bell Labs) becoming the vanguard advancing the cutting edge of some categories of software has created perverse incentives that reward this behavior. A cultural shift in Silicon Valley software development.
Re:I Bought Apple Silicon by ATsch on Friday December 18, 2020 @06:00PM (#25473152)
People used to talk about Java in the same way people talk about electron now so I feel like that's a definite no.
Re:I Bought Apple Silicon by nalekberov on Friday December 18, 2020 @07:04PM (#25473621)
Programs written in Java runs on top JVM. On the other hand programs written for Electron comes bundled with Chromium. And we all know how it manages memory.
Re:I Bought Apple Silicon by mapgrep on Friday December 18, 2020 @09:04PM (#25474323)
The JVM is fast today after 25 years of optimization and some serious improvements in the underlying processors (even with the Moore’s law failure of maybe half that period).

It was not fast at all when the Java hype was peaking in the late 90s. I knew a dotcom era startup that replaced a bunch of Perl with Java and my friends complained it had fewer features and was much slower.

Re:I Bought Apple Silicon by nalekberov on Saturday December 19, 2020 @07:12AM (#25476938)
Java's selling point was portability, and did it very well, it was faster than programs written in interpreted languages, well it was and still is slightly slower than programs written in C and likes.

Programs written on Electron rely solely on web technologies, I always avoid these programs, one simple chat application eats up to half a GB of memory, no I am not going to increase my machine's memory in order to run those programs.

Re:I Bought Apple Silicon by Apocryphon on Friday December 18, 2020 @11:58PM (#25475182)
One wonders how fast Electron will be in 25 years, if it lasts that long.
Re:I Bought Apple Silicon by sudosysgen on Friday December 18, 2020 @08:10PM (#25474021)
The relative penalty for using Java over C is so much smaller than Electron over Java or Electron over C
Re:I Bought Apple Silicon by Turing_Machine on Friday December 18, 2020 @10:51PM (#25474844)
For cases on the edge, the penalty for not using Electron is that you don't get to use the software at all, because the developer doesn't have the personnel or budget to port it to multiple platforms.

Real software that does a job you need it to do is much better than hypothetical software that will do the same job faster.

Re:I Bought Apple Silicon by sudosysgen on Saturday December 19, 2020 @02:04PM (#25480134)
That's not really true. There's very few software that wouldn't exist if it weren't for Electron.

You don't need to port Electron tier-software. This was a solved issue long ago. Code it in Java, Python etc... Or Use Rust/C/C++ and a cross platform toolkit.

Re:I Bought Apple Silicon by groby_b on Saturday December 19, 2020 @01:57PM (#25480057)
Given that people whine if an app costs 99 cents, and that a lot of people proudly copy commercial software without paying... Maybe it's not just developers at fault here.

There are plenty of devs who'd be happy to ship extremely high quality, small & fast code. It's just that very few people want to pay for it.

Re:I Bought Apple Silicon by zeroc8 on Monday December 21, 2020 @03:53AM (#25493233)
One of the problems is, that Microsoft failed to provide a decent native framework for their platform. WinRT/C++ now kind of fits the bill, but MS still doesn't seem to push it in any way. I've recently switched to the Mac and I'm learning Swift/SwiftUI/Metal right now. Apple has its act together, writing native platforms using those technologies is a dream come true.
Re:I Bought Apple Silicon by 0xCMP on Friday December 18, 2020 @06:33PM (#25473440)
> Given it's Jonathan Blow, I feel compelled to say yes.

This is also how I felt watching the video, but on the other hand I have a really hard time finding serious faults with his point.

HN keeps things light. My personal website is super light. But the product I work on? What's a few MB gzipped down to less than a MB? 100ms? 300ms? Who can tell the difference[0].

[0]: I can, but certainly not the people who the feature matters to much of the time.

Re:I Bought Apple Silicon by hadsed on Friday December 18, 2020 @07:55PM (#25473952)
And even if you could, you're getting more value by getting that thing sooner. Or an even better argument: in the end, maybe it took just enough resources at the quality you got to even be born in the current market.

Yeah most things are frivolous... you can survive without a better camera in your phone for another year. But that ham-fisted implicit cultural aspect is what also brings people medical devices 5-10 years sooner than it could have. We all know these gains compound over time. So maybe it's ok if our programs are a little slow. We buy the truly mission critical technology faster with that frivolity.

But I'll also say, I still get mad at my phone and throw it pretty often. Just the way it is.

Re:I Bought Apple Silicon by sudosysgen on Friday December 18, 2020 @08:13PM (#25474044)
It's not an either or. Cutting edge technology has always been a bit slow and rough around the edges. That's not an excuse for your chatroom client to use 450MB of RAM.
Re:I Bought Apple Silicon by ChrisMarshallNY on Friday December 18, 2020 @05:31PM (#25472892)
> Nobody writes slow programs on purpose

No, but we are in a place where most development projects are really "stitching" dependencies together, and those dependencies can get heavy.

On the other hand, this may help apps written in things like Ionic to speed up like crazy, because WebKit is now insanely fast.

Re:I Bought Apple Silicon by ATsch on Friday December 18, 2020 @05:55PM (#25473090)
> we are in a place where most development projects are really "stitching" dependencies together

Is there anything wrong with that, though? If there's any common thread in the history of computing, it's that progress happens when things become abstracted enough to allow for another layer of building blocks. That's not to say that those layers don't have a cost, or we don't need to learn how to do them well, but gluing together components is really all software development has ever been.

Re:I Bought Apple Silicon by ChrisMarshallNY on Friday December 18, 2020 @08:20PM (#25474094)
It's both good and bad; depending on how much care is taken in selecting dependencies.

It's hard to use a lot of dependencies, regardless of their quality, without introducing bloat. Lots of redundancies.

For example, each dependency may have its own messaging or thread management system, or its own memory management system.

Or it may include other dependencies that have their own "special sauce."

For myself, I use lots of little packages; mostly written by Yours Troolie, and only occasionally use third-party dependencies.

Each of my packages is usually crafted towards a certain discrete function, and has its own project lifecycle. I think that's a good thing about using dependencies. I believe that modules with encapsulated lifecycles are a good way to ensure quality (or not, if I "choose poorly," as the Knight Templar said in the Indiana Jones movie).

Re:I Bought Apple Silicon by geodel on Friday December 18, 2020 @08:50PM (#25474250)
> Nobody writes slow programs on purpose,

Well problem is developers are not writing fast programs on purpose. That they did not write slow on purpose but it nevertheless turned out to be slow is real problem to me as a user.

Re:I Bought Apple Silicon by flohofwoe on Saturday December 19, 2020 @09:25AM (#25477570)
> Nobody writes slow programs on purpose

True, but nobody writes fast programs on purpose either, only "fast enough" programs. The optimization work stops as soon as it "feels" fast enough and, this "feels fast enough" has been the same over the last few decades no matter how fast the underlying hardware is. Any advance in hardware will ineviatably be eaten by software within a year or two. That's why running old software on new hardware feels so increadibly fast.

I also disgree that we got better developer- or user-experience out of the "deal". Most commercially developed applications have a "peak version", but still continue to be stuffed with new features that nobody asked for. E.g. name one feature that was added to Microsoft Word, Outlook or Excel in the last two versions which really added to the "user experience".

Re:I Bought Apple Silicon by sigotirandolas on Saturday December 19, 2020 @05:29PM (#25481868)
Not just old software, but with a lot of open source software you usually have a spectrum of choice between more basic, lightweight software and more elaborate, heavyweight software. Think LXDE vs XFCE vs KDE vs Gnome as desktop environments, or nano vs Sublime vs Code/Atom vs IntelliJ as text editors, for example.

However, when it comes some software areas prone to capture, there's not only no choice, but rather a multitude of incompatible-by-design options. Due to WFH, I need to have four different bloated chat/videoconference software on all the time which all offers the same features to me. When I want to watch a live stream, I need to open YouTube or Twitch or Facebook Live which all offer the same basic functionality but no one is interested in standardizing their interface so I can just point my familiar video player to it (at least without it breaking all the time due to cat-and-mouse fights between the platform and open source developers).

I'm not generally in favour of regulation, but mandating some basic degree of interoperability so platform and software can compete separately seems like the only option.

Re:I Bought Apple Silicon by eivarv on Friday December 18, 2020 @06:15PM (#25473283)

    More seriously, while program overheads have undoubtedly gotten higher, that's always been in exchange for something else, even if non-technical, like a better developer experience and platform support.
Software architecture usually entails trade-offs in many directions, between NFRs, etc. – but it feels to me like the intepretation of the performance-scale (as well as developer experience, really) is warped by two things:

- Many devs aren't familiar with the real breadth of possibilities and discount some approaches without understanding them (using "developer experience", "platform support", and "too low level" as excuses), thereby skewing towards familiarity and preference. As most devs are familiar with web tech, this tends to win out. Other legitimate issues might not be even be understood (HCI, attack surface, accessibility, etc.)

- The performance hit might not be significant enough to notice on a dev-grade machine (e.g. M1-processor, 32GB of RAM, etc.) and/or in isolation, but will become noticable when regular users run several apps built using the same heavy stack.

The latter is particularly apparent if you try to run multiple Electron-apps simultaneously on a low-to-medium specced laptop – which I find pretty egregious as a user, as multitasking computer systems has been a thing for a while now.

My interpretation is that many people (or companies) will usually write software that's no more performant than what they can get away with – which can be summed up, if cynically, as "users won't see any major performance gain or increase in capability in their day-to-day usage because of shitty software."

Re:I Bought Apple Silicon by zarkov99 on Friday December 18, 2020 @07:23PM (#25473739)
The thing is the tradeoff makes more sense for the developer, who gets his job done quicker, than to the customer who pays for the sloppy bloat every time he uses the software.
Re:I Bought Apple Silicon by curyous on Friday December 18, 2020 @07:01PM (#25473605)
Slow code is usually written due to ignorance rather than choice. Lots of people only know OOP, which is slow and unoptimisable by default.
Re:I Bought Apple Silicon by pushrax on Friday December 18, 2020 @05:26PM (#25472841)
Carmack famously also has declared "I would rather have magic software over magic hardware" - the context being that we're using current hardware to a small fraction of its potential.

Still, I feel there's a lot of software I use that is hard to optimize or no longer developed, and I'm certainly happy to have it run faster given new hardware. As a programmer I also like being able to be lazier and still have usable software. Higher level languages, GC, less thinking about access patterns and debugging prefetch problems, etc.

Re:I Bought Apple Silicon by will_pseudonym on Friday December 18, 2020 @05:33PM (#25472905)
The software being written being slower is of course enabled by those hardware improvements, but 1) the slow software is due to those technical inefficiencies making software easier/less expensive to produce, and 2) we can still make fast software by not using those inefficient means.

That said, there's something of a problem with that though, because by making 1) more and more prevalent, it makes 2) more expensive due to fewer people choosing to work in that manner. Similar to how consumer technology goods get much less expensive, but have many more defects and issues. That "race to the bottom" makes cheap things cheaper, but makes more expensive things more difficult to make. I don't know what that phenomenon is called specifically, but it's definitely something I've been frustrated by in nearly every industry and product category.

Re:I Bought Apple Silicon by Apocryphon on Friday December 18, 2020 @05:39PM (#25472958)
I think you're definitely onto something, and what you're describing is a reoccurring pattern of modern society chasing after quick gains and optimizing certain metrics (e.g. short-term profit) over other considerations.

It's not that people or organizations were necessarily more considerate or contemplative in the past, it's just that the processes or technological improvements (e.g. better hardware) weren't there to allow those races to the bottom. And maybe the systems we were living under didn't reward that behavior as much.

Re:I Bought Apple Silicon by markstos on Friday December 18, 2020 @06:00PM (#25473147)
There's also a counterculture of projects that are lightweight alternatives: Sway as a lightweight window manager (among many lightweight WMs), musl vs libc, libressl vs openssl, gemini vs http, Alpine Linux vs Ubuntu, Alacritty as a blazing fast terminal.

This software culture is visible on Linux than macOS, but it's alive and thriving.

Re:I Bought Apple Silicon by x3sphere on Friday December 18, 2020 @08:44PM (#25474219)
Yeah, sorta wrong. Sure, computers are already really fast, but the big thing with the M1 Macs for me is that they've finally came out with a laptop that doesn't heat up like crazy when I'm using it for moderately demanding tasks.

Also every laptop I've had prior, would get pretty hot or the fan would get quite loud when connected to an external display. This M1 is completely silent when doing that AND it doesn't throttle.

Re:I Bought Apple Silicon by pushrax on Friday December 18, 2020 @11:55PM (#25475172)
We have had passively cooled high performance devices for a while. M1 Macs are a great step, but it's more useful to compare them with previous gen mobile devices (iPad Pro 2018 ran faster than the 13" MBP at the time). Bringing ARM SoCs to laptops is also not new (e.g. Surface Pro X from Oct 2019), but I agree it's worth noting that Apple is doing a great job of it. Best x86 translation out there.
Re:I Bought Apple Silicon by zarkov99 on Friday December 18, 2020 @07:21PM (#25473732)
A little wrong. It does matter that the thing is always cool to the touch and it can run all day, even under heavy load. That is pretty new to my knowledge.
Re:I Bought Apple Silicon by throw0101a on Friday December 18, 2020 @07:31PM (#25473784)
Perhaps x86 has been 'fast enough' for most people, but the M1 is as fast (or faster) using less power. Even if the M1 was 'only' as fast as other chips, then it's performance-per-watt would still be impressive.

Further, as someone who deals with HPC at $WORK, our (medical) researchers always want faster.

Re:I Bought Apple Silicon by heavyset_go on Friday December 18, 2020 @07:45PM (#25473881)
Similar to how taser training for law enforcement involves being tased themselves, I think Electron developers should have to use old computers for an extended period of time as their Electron development machines, just so they get an idea of what it feels like to be a user of their apps.
Re:I Bought Apple Silicon by ReactiveJelly on Saturday December 19, 2020 @12:21AM (#25475295)
They should have old computers as their manual testing machines forever, not any finite period.
Re:I Bought Apple Silicon by blub on Saturday December 19, 2020 @10:25AM (#25477932)
For a moment, I thought you were gonna suggest that Electron developers should be tased in order to make them associate using Electron with pain.
Re:I Bought Apple Silicon by heavyset_go on Saturday December 19, 2020 @03:42PM (#25480979)
If they don't learn their lesson from using the old computers, then this can be a last resort.
Re:I Bought Apple Silicon by mhh__ on Friday December 18, 2020 @08:21PM (#25474099)
Although it's a complete pain to standardize the results, you can have benchmarks as part of your CI (It's a bit easier if you can use some kind of normalised measurement like cache misses per loop iteration, but rdpmc generally isn't allowed - or even available from the OS).

Latency from the user perspective is a bit harder, although I guess for a webpage you could run it headless into a video recording then time how long to go from a blank screen to showing information?

Re:I Bought Apple Silicon by jschwartzi on Saturday December 19, 2020 @03:54PM (#25481095)
Sure but the fact that you need benchmarks and big performance optimizations in a chat app is a sign that your approach is very inefficient and slow. Especially considering the same feature set was available 30 years ago in computers that were less capable than my wrist watch.
Re:I Bought Apple Silicon by hnick on Friday December 18, 2020 @11:19PM (#25474984)
I really like the idea behind Facebook's 2G Tuesdays, but I'm not sure if it helped achieve anything apart from PR, or if it's still going.
Re:I Bought Apple Silicon by an_opabinia on Friday December 18, 2020 @11:54PM (#25475168)
Ad networks are strongly incentivized to perform well on slow devices, since they are paid per impression. In contrast the most valuable clicks almost always occur on the most expensive devices.
Re:I Bought Apple Silicon by ancris on Saturday December 19, 2020 @03:20AM (#25476029)
Then Facebook goes ahead and builds Messenger for desktop on top of Electron.

If facebook doesn't have the money for the engineering effort to build a native messenger app, I don't know who does

Re:I Bought Apple Silicon by throw0101a on Friday December 18, 2020 @07:28PM (#25473764)
> This is just going to encourage bloat and inefficiency, isn't it?

Same as it ever was:

> Wirth's law is an adage on computer performance which states that software is getting slower more rapidly than hardware is becoming faster.

> The adage is named after Niklaus Wirth, who discussed it in his 1995 article "A Plea for Lean Software".[1][2]

[…]

> Other common forms use the names of the leading hardware and software companies of the 1990s, Intel and Microsoft, or their CEOs, Andy Grove and Bill Gates, for example "What Intel giveth, Microsoft taketh away"[7] and Andy and Bill's law: "What Andy giveth, Bill taketh away".[8]

* https://en.wikipedia.org/wiki/Wirth%27s_law

* https://en.wikipedia.org/wiki/Andy_and_Bill%27s_law

Re:I Bought Apple Silicon by Eric_WVGG on Friday December 18, 2020 @05:59PM (#25473129)
> Visual Studio Code is now optimized for Apple Silicon… and it works and it's snappy. I hated that app on my last laptop, it was very slow and bloated

I was thinking the same thing as I read this bit. I’m still on an Intel Mac and recently switched from VSC to Panic’s Nova editor, highly polished and 100% native.

If bloated code runs fast on an M1, imagine how native code performs? I’m trying very hard to excise as much Electron garbage from my life as possible.

Re:I Bought Apple Silicon by zimpenfish on Friday December 18, 2020 @07:35PM (#25473805)
> If bloated code runs fast on an M1, imagine how native code performs?

As an example, Minecraft on the 16GB M1 Pro running under Rosetta 2 runs much better (near-constant 60fps with everything on default, no fans, imperceptible heat) than on the 32GB i9 Pro (peaks about 40fps with everything turned down, full fans, will burn you unless you disable Turbo Boost).

I'm looking forward to a native JVM and seeing if it gets even better.

Re:I Bought Apple Silicon by rsynnott on Friday December 18, 2020 @08:44PM (#25474217)
Knock yourself out: https://www.azul.com/downloads/zulu-community/?package=jdk

(I assume you can sub in your own JDK with Minecraft? Never used it)

Re:I Bought Apple Silicon by zimpenfish on Saturday December 19, 2020 @03:37AM (#25476099)
Found https://gist.github.com/tanmayb123/d55b16c493326945385e81545... which uses Zulu to run Minecraft - was a lot of faff to get running, no sound, decent perf, definitely more heat than normal MC running on R2 though.
Re:I Bought Apple Silicon by selectodude on Friday December 18, 2020 @10:29PM (#25474737)
I'm pretty sure it just calls Java. Whichever interpreter pops up it'll use.
Re:I Bought Apple Silicon by Nextgrid on Saturday December 19, 2020 @06:18PM (#25482233)
The modern Minecraft launcher allows you to specify the Java binary to use.
Re:I Bought Apple Silicon by ksec on Saturday December 19, 2020 @04:56AM (#25476401)
It is very very very rare you see this on HN, VSC is slow and bloated. You only ever see people claiming it is fast, or fast enough, or very little difference to Sublime.

The bar of quality are quite low for lot of people.

Re:I Bought Apple Silicon by HJain13 on Saturday December 19, 2020 @10:50AM (#25478116)
People who are using VSC are adding more value to this world than those who are complaining about VSC being slow
Re:I Bought Apple Silicon by megablast on Friday December 18, 2020 @11:18PM (#25474977)
Xcode also runs well, wheee as A few weeks ago it was 10 seconds for inserting a new line.
Re:I Bought Apple Silicon by basicneo on Friday December 18, 2020 @07:21PM (#25473730)
One person's "bloat and inefficiency" is another person's "features at low cost".

We simply wouldn't have the services we have today at their low price if our hardware didn't offer them more breathing room.

As inefficiency tips more towards degradation in machines, more emphasis will be given to efficiency.

Re:I Bought Apple Silicon by mortenjorck on Friday December 18, 2020 @05:38PM (#25472947)
If, in a year or two, everyone at a tech company is building and testing on Apple Silicon machines, it could very well lead to major performance blindspots.

While you can profile performance in any web inspector, I think a good product team should keep a base-spec Windows laptop on hand to see how it all comes together for users who may not have the kind of hardware they design and develop on.

Re:I Bought Apple Silicon by svachalek on Friday December 18, 2020 @05:32PM (#25472897)
Back in 1989 I ran an application called GeoWorks on my Commodore 64. It had a paint program and WYSIWYG word processor and both applications and documents ran in the C64's available RAM of... 38k?

Roughly 1/100000 of what's on a low end computer today. On a CPU that ran at 1MHz and took many clock cycles per instruction.

In other words, yes but that's nothing new.

Re:I Bought Apple Silicon by Wowfunhappy on Friday December 18, 2020 @07:06PM (#25473637)
Of course, the programs couldn't render as many pixels or colors at once, couldn't insert photographs, videos, or complex tables and charts, couldn't load complex fonts or otherwise handle nuanced typography, etc etc.

There's a heck of a lot of pointless bloat. But at least some of the extra power has gone to useful features!

Today feels different. If Slack really have any significant features that couldn't be done on computers 15 years ago?

Re:I Bought Apple Silicon by mapgrep on Friday December 18, 2020 @09:22PM (#25474412)
GEOS was written largely in assembly from everything I’ve read.

Apparently this and other things did not go over well with developers (apparently the apps needed to be done at least partly in assembly too). Wikipedia:

GeoWorks attempted to get third-party developers but was unable to get much support due to expense of the developer kit — which ran $1,000 just for the manuals — and the difficult programming environment, which required a second PC networked via serial port in order to run the debugger.

Even though PC/GEOS is referred to as an "operating system", it still requires DOS in order to load. GEOS and its applications were written in a mix of 8086 assembly (Espire) and C (GOC), both with non-standard language extensions to support the object-oriented design.[5][9]

Re:I Bought Apple Silicon by pvg on Friday December 18, 2020 @08:14PM (#25474050)
It's worth thinking about what happens when you touch your phone's screen or reach for your trackpad/mouse and scroll a bit, at 60fps. That's a basic gesture that involves a gazillion C64s of everything.
Re:I Bought Apple Silicon by Dylan16807 on Friday December 18, 2020 @08:32PM (#25474159)
I'm thinking about it.

Processing the touches into events should take 1 C64 of power or less.

Scrolling shouldn't significantly more difficult. 1 C64 for this.

The screen is much higher resolution, so we need the power to render that, but that's offloaded to the GPU and the GPU doesn't even need to leave idle frequencies.

60fps, well what was the C64? Whatever, multiply the resources by 10.

We've now accounted for... 20 C64s of power.

Re:I Bought Apple Silicon by pvg on Friday December 18, 2020 @09:04PM (#25474317)
but that's offloaded to the GPU

It's a little odd to exclude the supercomputer your computer comes with to help with scrolling.

Re:I Bought Apple Silicon by Dylan16807 on Friday December 18, 2020 @10:37PM (#25474775)
Thankfully, the GPU hasn't been afflicted with terrible inefficient slowness for 2D programs. The interesting questions lie in what the CPU is doing and wasting time on.

And, I mean, the C64 offloaded rasterization to a different chip too.

Re:I Bought Apple Silicon by jimsmart on Saturday December 19, 2020 @05:53AM (#25476601)
To scroll the screen on the C64 actually involved a non-trivial amount of CPU usage, because the hardware can only shift the screen by up to 7 pixels, so every 8 pixels, one has to manage all of that because the VIC chip can't — this involves offset copying all of the screen RAM, which can be done over previous frames, and same for the colour RAM, except this must be done in realtime (because the colour RAM has fixed location / cannot double buffer). Doing all of this actually takes a significant proportion of available CPU time per frame in C64 games. And that's just for the character-based graphics mode, not the bitmap graphics mode — which you simply have not got a chance in hell at scrolling on the C64, because the VIC offers no assistance here and the CPU is nowhere near fast enough to do it.

Don't even get me started on drawing more than 8 sprites!

(Ex C64 games programmer here)

Re:I Bought Apple Silicon by rmu09 on Saturday December 19, 2020 @04:53AM (#25476386)
I think you either severely overestimate the capabilities of a C64 or underestimate what it takes to put a modern user interface experience together.

The C64 had a resolution of 320x200 pixels with 16 colors. That would cover about 1,5 square inches on a modern phone (modulo the colors, another factor of 6 to 10). You could not dream of re-rendering the whole screen with any FPS number. Games had to resort to all kind of tricks to create a smooth experience, and whatever was put on screen was pre-rendered content combined in clever ways. Calculations involving floating point like a mandelbrot set in said resolution took hours to days per _frame_.

Re:I Bought Apple Silicon by Dylan16807 on Saturday December 19, 2020 @06:29AM (#25476757)
Increasing the DPI doesn't affect the CPU, only the GPU, and it's the CPU causing problems. So please ignore pixel count when explaining why a "modern user interface" requires so much more computation that it can't react to input in 15 milliseconds.

And the C64 does re-render every frame, because there's not enough memory for a frame buffer!

I'm not worried about games here, and word processors don't need fractals.

Re:I Bought Apple Silicon by psadri on Friday December 18, 2020 @11:13PM (#25474949)
The sad part is that most developers will be using these faster machines and to them their software will seem super snappy. But the poor folks with non-state of the art machines will experience much slower experiences. It creates a dynamic where other users are forced to upgrade just to use basic software.

In the past, I developed on old hardware (or at least tested on old hardware). If the software was performant on my old machine, it was bound to be fine for most others.

Re:I Bought Apple Silicon by honzajavorek on Saturday December 19, 2020 @10:00AM (#25477767)
It's already the case with JavaScript bloat, which destroys performance and network efficiency of the internet in many countries.
Re:I Bought Apple Silicon by teabee89 on Friday December 18, 2020 @05:27PM (#25472850)
Yes, it's a variant of the Jevons paradox: https://en.wikipedia.org/wiki/Jevons_paradox
Re:I Bought Apple Silicon by yumraj on Friday December 18, 2020 @08:18PM (#25474073)
Most likely yes, but if x86 keeps on lagging behind then hopefully not since the developers of these will need to make sure these work ok on x86 also.
Re:I Bought Apple Silicon by s1k3s on Friday December 18, 2020 @05:34PM (#25472920)
I've enjoyed high level programming so far (think Java, Swift). But for the sake of argument, I'm gonna say this: high level languages (& their runtime environments) take control over the code that the programmer writes. Speaking of "computing environments", I'm unease with the fact that I don't really know that my Swift program is doing in the background, and more so, the fact that the vendor (Oracle, Google, Apple etc) tries so hard to prevent me from finding out.
Re:I Bought Apple Silicon by rsynnott on Friday December 18, 2020 @08:46PM (#25474223)
> I'm unease with the fact that I don't really know that my Swift program is doing in the background, and more so, the fact that the vendor (Oracle, Google, Apple etc) tries so hard to prevent me from finding out.

Eh? Apple's fairly clear about what Swift is doing in the background (which isn't much, really; boring ol' reference counting).

This might apply more to Java, mind you. There are no secrets, but most people probably aren't going to investigate exactly what the JIT or GC are doing.

Re:I Bought Apple Silicon by zepto on Friday December 18, 2020 @08:09PM (#25474015)
Swift really isn’t doing anything “in the background”.

There is no virtual machine, and nothing is happening other than your code and the libraries you use.

It’s only high level from the point of view of the type system.

Re:I Bought Apple Silicon by Wowfunhappy on Friday December 18, 2020 @10:49PM (#25474833)
> and the fact that the vendor (Oracle, Google, Apple etc) tries so hard to prevent me from finding out.

Are there any specific instances you’re thinking of here? Java, Go, and even Swift all are open source.

Re:I Bought Apple Silicon by matthewmacleod on Saturday December 19, 2020 @06:45AM (#25476821)
I'm unease with the fact that I don't really know that my Swift program is doing in the background

I don’t really understand your complaint here. The Swift runtime library is pretty limited - basically just allocation and reflection. The compiler spits out machine code that you can look at. Where is the “background” you are thinking of?

Re:I Bought Apple Silicon by Triv888 on Friday December 18, 2020 @05:30PM (#25472879)
but that's not new, CPUs/etc have been getting faster since forever and games are already super-bloated
Re:I Bought Apple Silicon by raverbashing on Friday December 18, 2020 @05:39PM (#25472950)
Yep

I remember being shocked when I first read a game requiring 16MB of RAM (yes, 16MB, get off my lawn).

Re:I Bought Apple Silicon by whywhywhywhy on Friday December 18, 2020 @05:59PM (#25473130)
You have to take into account of the capabilities and willingness to work on optimization of the average developer over time too.
Re:I Bought Apple Silicon by Apocryphon on Friday December 18, 2020 @06:00PM (#25473156)
Not to mention organizations' willingness to entertain those engineering initiatives, never mind prioritizing them.
Re:I Bought Apple Silicon by sorokod on Saturday December 19, 2020 @04:36AM (#25476337)
Many producer consumer systems really; roads-traffic, predator-prey. It a very common emergent behavior.
Re:I Bought Apple Silicon by megablast on Friday December 18, 2020 @11:16PM (#25474963)
Having slower noisier computers didn’t stop the bloat.
Re:I Bought Apple Silicon by ReactiveJelly on Saturday December 19, 2020 @12:23AM (#25475303)
And when confronted with "Faster CPUs will cause slower software!" the only actionable is what? Purposely build slower CPUs? That consumers won't want to buy?

If I ever meet the king of software I could ask him to make faster software, but I haven't found him in the phonebook yet.

Re:I Bought Apple Silicon by threeseed on Friday December 18, 2020 @05:21PM (#25472797)
Not really.

They are cross-platform apps which still need to run well on the 95% of other computers which don't have the M1 chip.

Re:I Bought Apple Silicon by Apocryphon on Friday December 18, 2020 @05:23PM (#25472815)
Note: this has nothing to do with specifically Apple Silicon but just any [dramatic] computing improvements in general.
Re:I Bought Apple Silicon by threeseed on Friday December 18, 2020 @05:35PM (#25472927)
But this is a dramatic computing improvement limited to 5% of the computing market.

This isn't like with web browsers where it impacted everyone.

Re:I Bought Apple Silicon by TuringNYC on Friday December 18, 2020 @05:21PM (#25472798)
>> This is just going to encourage bloat and inefficiency, isn't it? Note: this has nothing to do with specifically Apple Silicon but just any computing improvements in general.

If it does, Wintels are not going to be pleasant environments for users. Wintel laptops would need to up to 32gb/64gb RAM