Rust gained support for fallible allocation recently.https://github.com/rust-lang/rfcs/pull/2116 …
-
-
Replying to @whitequark @das_kube and
Not a fan of how any of this stuff ended up at all. :\ Seriously regret wasting so much time contributing to the Rust compiler / standard library now. It was so close to ending up as a great language for low-level use but the standard libraries missed the boat completely.
3 replies 2 retweets 6 likes -
Replying to @CopperheadOS @whitequark and
Aborting on OOM makes complete sense at the application layer. For example, Android forces applications to do everything with transactions and to support being killed / respawned at any point without losing state. That's a good model and it fits perfectly into that.
2 replies 0 retweets 1 like -
Replying to @CopperheadOS @whitequark and
It absolutely does not. It means losing valuable work/data. Android apps do not honor the contract they're supposed to because it's hard to do.
1 reply 0 retweets 1 like -
Replying to @RichFelker @CopperheadOS and
YouTube even loses your scroll position in a huge list if you switch apps, without any kill. Nothing reliably keeps data across getting killed.
1 reply 0 retweets 1 like -
Replying to @RichFelker @whitequark and
Activities are killed and spawned again simply by rotating your screen.
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS @RichFelker and
You don't really know if an app is being killed when it's in the background. That's probably what's happening to YouTube for you. It still being in the least of recent apps doesn't mean it wasn't killed.
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS @RichFelker and
So sure, some apps are buggy. If the YouTube app is wrapping web content, the reason would probably be that it's a lot harder to do this for content in a WebView vs. native content with proper support for it. Browsers make it hard to restore scroll position, etc.
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS @RichFelker and
Using transactions for actual data is easy, as is saving content the user was working on. It's definitely harder to restore the *view* to exactly how it was after dealing with an activity respawn but that's not lost data, it's an inconvenience.
3 replies 0 retweets 0 likes -
Replying to @CopperheadOS @whitequark and
Loss of view is loss of data. Consider a list of all strings length N where you're looking at the one you care about. MVC model is wrong; the view too needs a model behind it.
2 replies 0 retweets 0 likes
Real-world case is of course the one search result you wanted among tens of thousands of junk results, or the one tweet you wanted to reply to in nondeterministic timeline.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.