These seem like some fairly standard approaches for reducing memory usage. I can't help to think that the approach of joining several distinct list into a single one in some way undercuts Rust's safety guarantees.
If you previous had three distinct Vec objects, then Rust would guarantee that you can't index out of bounds. If you now put all those objects into a single Vec and rely on offsets, then you now open the door to indexing out of range of these sub-slices without any panics.
It's a minor point, and it doesn't really invalidate the optimization, but I'm surprised the article didn't mention it.
I think it’s more of a time vs code tradeoff, if done properly.
For example in the Vec case, you could theoretically build an alternative which encodes the “three sections” property internally, and ensures correctness at construction time for the pointers. Not as completely safe as a Vec, but you can still get similar benefits for the “business logic”.
But I agree, just having a custom structure that does not provide a safe wrapper around this would be sacrificing standard guarantees.
It's the exact thing Rust is made to protect against, on a more local scale. Every memory corruption bug is just an out-of-bounds index that wasn't protected against.
No. He's wrong that every memory error is out-of-bounds access (spatial memory safety). There's also use-after-free (temporal memory safety). Arguably type confusion too but that's a grey area.
You can make a wrapper type that abstracts the offset lookup logic with a safe interface. If it's a transparent struct then rust will compile it away into nothing but you still get the abstraction in your code.
Sure, and usually one of the ways Rust serves us is with safety guarantees.
Which isn’t to say this optimization is a bad idea, just to say it’s sort of a straw man to imply coding in Rust to take advantage of safety guarantees is “serving Rust”
I don't think Molyneux's issue ever was due to industry pressure. The guy made some great games back in the day, but as long as he has been in the spotlight he has been known for overpromising and underdelivering.
Don't get me wrong, a game like Fable was pretty good, but it was nowhere near what he was effectively selling back when it was known as Project Ego.
That Molyneux chose to make a mindless clicker as his first game with 22cans really can't be blamed on anything or anyone other than Peter himself.
I've seen variants of this comment for many years. The alternative to "web UI slop" would presumably be one of the many native toolkits.
I see it in a different way. The fact that "web UI slop" has managed to make great inroads on the desktop is an indictment of the state of native toolkits. If you think it's a problem that desktop apps are being written with web toolkits, the solution for that isn't to shame (as the term "web UI slop" clearly tries to do), but rather to figure out how to improve the native toolkits.
The opportunity to improve those toolkits was always there, and the ball was dropped.
Yes, native UI toolkits are not perfect, even though I consider Qt very close to one (I'm sure naysayers will find nitpicks). In the end, the choice is between the apps that eat 1GB of your RAM and learning to deal with some idiosyncrasies of native toolkits.
There's also just shipping with a Web interface that opens in a browser (like Jupyter, or WebUI apps). Plus there's the option to use the system Webview like Deno Desktop (this), Tauri and Electrobun do by default.
So thankfully we can still have our REPLs with live reloading and nice documentation (MDN, W3schools etc.) and large library of embeddable UI components without most the costs of using electron.
It hasn't made any inroads on the desktop though... all anyone did was just package their own SWA into a self-contained browser that serves its own content. They continue to be websites, with all the pitfalls of them.
I don't need to spend 2GB-4GB of RAM just to have a over-glorified IRC clone!
Also, the native toolkits are fine. Windows has two toolkits, the ShellUI/MFC family (which does everything required, although it doesn't always get hidpi on legacy apps correct; it gets integration for blind people and also unicode/multilingual correct, and also works with touch interfaces), and WinUI does it more modernly (and ticks all the boxes). OSX has its toolkit, seems to nail everything correctly. Linux has Qt (lets ignore GTK for now, only reason you use GTK is if you want to appear Gnome-native), and Qt also does native++ uplifting on other toolkits (ie, native widget + additional feature expansion, plus perfect mimicry of native look for entirely new widgets), plus Qt does everything you need to do correctly and easily.
There are also new UI toolkits coming up through the ranks that are trying to knock Qt off that #1 position. None of the WebUIs would even place in this race.
Web UI toolkits always look non-native, are hard to interpret, often use low contrast (and frankly ugly) colorschemes, are easy to use in ways that do not comply with usability standards across OSes, and usually do nothing for A11Y.
The opportunity to improve those toolkits was always there, and the ball was dropped.
I think the fact that you listed off five toolkits for three different OSes, all of which are "that OS's own toolkit," might point at the root of the problem here.
Windows is so fucking old that I think it has a right to try again.
And, btw, the reason Microsoft even bothered is because (dun dun dunnnn) lots of internal apps at Microsoft were written with Qt, not MFC, and leadership got pissed when they realized (they couldn't tell the difference, since Qt does the native++ technique).
As for Linux, yeah, thats a shitshow. Qt was closed source, Linux isn't, so they made Gtk, but then Qt got open sourced, and then the Gtk guys just kept going. Qt can mimic Gtk3/4 themes and already uses 100% native rendering (same APIs Gtk does).
People keep writing Gtk apps for some reason, and I don't know why. I can get the C++ hate, but Qt has the cleanest C++ I've ever seen.
When I'm on Linux, I use KDE exclusively now (although I'm hoping Cosmic replaces it someday). The apps that use QML are fine even on decade old CPUs with absolute shit iGPUs, still better than even absolutely awfully designed WinUI apps.
Even if SwiftUI, Qt and whatever Windows uses this morning were absolutely perfect, developers would write web UI slop to not have to write three frontends. That, and familiarity with JS are the whole reason.
I grew up with and absolutely adore The Last Ninja series. I'm not going to comment on the size thing because it's so trite.
Instead - here's [0] Ben Daglish (on flute) performing "Wastelands" together with the Norwegian C64/Amiga tribute band FastLoaders. He unfortunately passed away in 2018, just 52 years old.
If that tickled your fancy, here's [1] a full concert with them where they perform all songs from The Last Ninja.
The first time I ever heard The Glitch Mob I had such a clear memory of this games soundtrack come to mind that I mentioned it to my brother soon after (as it was his commodore and his copy of the game I was playing when I was young). I'm not even sure if the song I heard even sounds like the game soundtrack particularly closely, but the connection in my mind was very strong.
This is "just" about providing the official Chrome binary to ARM64 "desktop" Linux.
You've been able to build and run Chromium on ARM Linux for a long time (I'm running it right now), it's just that they haven't provided an officially branded Chrome.
This is a good thing. While Chromium works well, there are a few things (like syncing) that is a bit of a pain to set up.
I did something similar a few years ago. I put together a Pimoroni Interstate 75 (which is an RP Pico with an integrated LED matrix connector), a 32x64 matrix, a NES controller port, designed a simple case for it and made a Tetris. It was a fun project and the first time I had really done anything with hardware.
I've been meaning to do a write up of the project, but I keep putting it off. I wrote the software bits in C++. To speed up iteration (i.e. not have to deploy to real hardware for every tweak to the game code), I made a small web harness that ran the core logic as wasm.
FWIW, and errors aside, I think I agree with the general sentiment. Things added to the C++ library ossify. The ABI concerns, and the general unwillingness to do anything about it, is a big reason why Google largely exited the C++ standard business.
But the conspiracy brained part of me can't help to think that part of this is sour grapes. Vinnie contributed a lot to the failed proposal to add networking (loosely based on ASIO) to the C++ standard. That proposal eventually lost out to the sender/receiver library[0] which is getting added in C++26. That still doesn't have actual networking, but lays the groundwork.
It remains to be seen how well sender/receiver turns out. Given ranges (another Niebler addition), I'm not super optimistic.
If you previous had three distinct Vec objects, then Rust would guarantee that you can't index out of bounds. If you now put all those objects into a single Vec and rely on offsets, then you now open the door to indexing out of range of these sub-slices without any panics.
It's a minor point, and it doesn't really invalidate the optimization, but I'm surprised the article didn't mention it.