twiss
Joined 13 years ago
Joined 13 years ago
Even better, you could give it some syntactic sugar like `throw IoError{}`? ;)
P.S. I think the `IoError { message, ok }` type is suspiciously close to `Result<(), String>`.. And if you want to return a value in the success case too it'll become even closer. Perhaps it's best to lean into that and find the calling function that can return an IoError as one of the possible values?
Does this mean you have to know the name of the function calling you that's supposed to handle the error? What if you're a library and don't know that?
class Order < ActiveRecord::Base
enum :status, { pending: 0, paid: 1, shipped: 2, refunded: 3 }
def shippable?
paid? && !refunded?
end
end
Bit off-topic but if `:status` is an enum, then `paid? && !refunded?` is equivalent to `paid?`AI still isn't great at counting, I suppose.
> Rising from its humble beginnings as a print newspaper in 1756, The Onion now enjoys a daily readership of 4.3 trillion and has grown into the single most powerful and influential organization in human history.
so I'm pretty sure it's just a joke.
So, if you only want PQC, you'll have to do that manually either way. But, I think you'll find many servers aren't ready for that: https://www.netmeister.org/blog/pqc-use-2026-09.html
However, converting something like 21°C to 69.8°F is indeed silly and should just be 70°F.
Though, that document also states:
> Our research [1] finds that users often make rational decisions on the most used capabilities on the web today — notifications, geolocation, camera, and microphone. All of them have in common that there is little uncertainty about how these capabilities can be abused. In user interviews, we find that people have clear understanding of abuse potentials: notifications can be very annoying; geolocation can be used to track where one was and thus make more money off ads; and camera and microphone can be obviously used to spy on one’s life. Even though there might be even worse abuse scenarios, users aren't entirely clueless what could possibly go wrong.
airborn.io
daniel@<either of those>
[ my public key: https://keybase.io/twiss; my proof: https://keybase.io/twiss/sigs/HVKkcimzcOLJcH5jSs5ybwnbvlRO5cd0t6mIq2LhL0o ]