@TrisH0x2A I made it clear they're not expected or required to get through all parts, although 2 or 3 of dozens did. It was only meant to see if they can recognize and assert the limits of their code and where difficulties will arise. Many couldn't do that, which is scary for safety. (2/2)
@TrisH0x2A I used to ask questions during technical interviews related to this, starting simple: write a function to produce the truncated mean of two uint64_t, documenting preconditions if any. Then: remove preconditions, then track the fractional part, then do the same over a range. (1/2)
Russian climbs Everest using ONLY ARMS
Rustam Nabiev, who lost both legs years ago, became the first person in history to climb Mount Everest using only his arms
He proudly raised the Russian flag atop Mount Everest to show that ‘strong people live in Russia’, according to TASS
@Waffl3x Same. Unfortunately, I think the only way people reliably understand contracts is when a language forces them to be explicitly proven. That's where effort should be focused, IMO, but people tend to fear that road. Proof assistants gaining in popularity is a good sign, at least.
RIP Tony Hoare. 😢
I only met him a couple times many years ago at MSR and was not accomplished enough at the time to have much useful to say, but he sure cast a long shadow over the field...
@yutongwu111140 Part of the motivation of generalized non-type-template-params was to avoid variadic chars for strings. You can instead do this with a char array member, a constructor, and ctad to allow for stuff like your_template<"hello">. No variadics required and less heavy for the compiler.
@nicbarkeragain What are you trying to "fix"? In C++ it's UB to read from the inactive member of a union (even if the inactive member is the same type as the active one). You can't read via the int if the bool is active (or neither) and you can't read via the bool if the int is (or neither).
@Waffl3x@joseph_h_garvin@tsoding There are many advantages to making void a complete regular type. Much of the C++ standard itself needs special-cases right now because of how void is specified, as well as the standard library, user libraries, and user code.
@Waffl3x@tsoding The void type in C, C++ and other c-like languages is logically a monostate type, not an uninhabitable type. There are prvalues of type void, and functions that return void actually do return to the caller (unlike functions that have an uninhabitable return type).
@ofirg7@TravisMWhitaker Callers statically prove the predicates. More generally there are properties an abstract machine can rely on and are provable but aren't checkable (even in tests) or aren't efficiently checkable. Widening a contract/doing runtime checking only superficially makes a function total
dark (2017) your crown as netflix’s best original series about supernatural threats happening in a small town and teenagers and adults having to put the pieces together as they discover a hole in the fabric of their reality hasn’t tilted in the slightest
@ChShersh Yes, also phrases like "I'm just being pragmatic", which can be totally reasonable if correct, but is sometimes a way to rationalize an implementation that is buggy or broken yet is getting thrown into production anyway. An excuse to create technical debt while feeling justified.
@SonOfRostam@pikuma All of this becomes more clear if you consider a discrete universe that is not infinite, but even in a continuous one, it is not obvious that "real" numbers "exist" in the world rather than just being practical tools we use to model behaviors, much as we do with complex numbers.
@SonOfRostam@pikuma Where do you feel that your "square root of 2" is physically "in" the universe as opposed to just being an abstraction that you in practice will discretize at some point? Even if you stay purely inside of the mathematics, you don't need arbitrary reals to represent algebraics.