> controlled either directly or indirectly by two companies
While many manufacturers physically make Android phones they all functionally play by Google’s rules as a contractual condition to get proprietary gApps.
Amazon even tried to pull off an Android fork without gApps but failed.
The only third option is Huawei’s HarmonyOS if you live in China.
Would have to be F32, no?
I cannot think of any way to enforce "non-zero-ness" of the result without making it return an optional Result<NonZeroF32>, and at that point we are basically back to square one...
> I cannot think of any way to enforce "non-zero-ness" of the result without making it return an optional Result<NonZeroF32>, and at that point we are basically back to square one...
`NonZeroU32::checked_add(self, other: u32)` basically does this, although I'll note it returns an `Option` instead of a `Result` ( https://doc.rust-lang.org/std/num/type.NonZeroU32.html#metho... ), leaving you to `.map_err(...)` or otherwise handle the edge case to your heart's content. Niche, but occasionally what you want.
> `NonZeroU32::saturating_add(self, other: u32)` is able to return `NonZeroU32` though!
I was confused at first how that could work, but then I realized that of course, with _unsigned_ integers this works fine because you cannot add a negative number...
You'd still have to check for overflow, I imagine.
And there are other gotchas, for instance it seems natural to assume that NonZeroF32 * NonZeroF32 can return a NonZeroF32, but 1e-25 * 1e-25 = 0 because of underflow.
I imagine it would be something like Option<NonZeroF32>, since -2.0 + 2.0 would violate the constraints at runtime. This gets us the Option handling problem back.
I think the article would have been better with NonZeroPositiveF32 as the example type, since then addition would be safe.
Exactly, that's the problem: with OIDC the ID provider gets to know which sites you visit. That is unavoidable given how the protocol works. And you don't want to give all that information to the government in the first place.
"99 red balloons" sounds almost quaint and innocent, even ironically a bit darkly refreshing, with its portrayal of the relatively clear threat of cold war nuclear annihilation.
Compare it to the constant flux of threats we now face, all given similar coverage today, large or small, sometimes plausibly real, but often ultimately fictional: brought on for distraction, by deception, incompetence, poor communication, ego, and/or other unethical agenda.
reply