Yeah a good portion of the population is PWM sensitive and OLED displays hurt their eyes. Macs are a bit better with the like 10khz modulation, but after a few days they still make my eyes feel like they're burning :/
That's because in Zig that would be seen as a surprise side effect - the allocator is expected when the action is performed, not when it's "prepared", this way you know append() allocates. Otherwise it wouldn't be explicit which Array methods allocated.
The Odin way is useful, too. Depends on what you're building.
The whole argument that you always know when Zig allocates is just wrong, as this shows. They “fixed” the hidden allocation by making it explicit in the append function but now you can pass in the wrong allocator. Not great is it? It is just all so fragile and relying on convention rather than hard checks.
People sometimes pursue a bad idea to incredible lengths and then everything else is justifiable based on that initial, bad idea that just causes much more pain than it solves.
I think it's hard to understand how much better your experience could be if all your software was 10x faster and using 0.1x the resources, since you can't test both experiences side by side
It's like riding a bike with a tiny bit of resistance in the bearings. You will get used to it, and will probably feel like your bike is fine. But if you replace the hub and remove that friction, you will wonder how you ever tolerated riding a bike that way.
I just wonder if it points at something more fundamental. We could have always written the code to use less memory, for example embedded code, but unless constrained we don't.
Lol I have the same thoughts for ChatGPT. How much code are they writing, but the main chat UI moves around like 3 times during load so you constantly click the wrong buttons. How does this not infuriate anyone that works there? I've actually switched to claude's mobile site for more queries now.
Yeah, everybody hates it.
It's called "layout shift" and it's one of the most universally-acknowledged antipatterns in UX. See e.g. CLS (Cumulative Layout Shift), one of the 3 primary KPIs in Google's "Core Web Vitals" (the pseudo-standard set of web perf metrics aimed at quantifying UX quality).
reply