Hi!

My previous/alt account is yetAnotherUser@feddit.de which will be abandoned soon.

  • 0 Posts
  • 72 Comments
Joined 2 years ago
cake
Cake day: June 1st, 2024

help-circle





  • I meant the old .exe would check the signatures before initializing the official Windows way to update. Effectively have this run whenever you start the application:

    main() {
        if (update_available()) {
            exe_path = download_update()
            if (signature(exe_path) == SIGNATURE) {
                install_update(exe_path)
                restart()
            } else {
                put_up_a_warning_or_something()
                delete(exe_path)
            }
        }
    # Rest of the application
    # ...
    }
    

    The only thing I have no idea how to implement would be the install_update(path) function. But surely this is one way to install updates without signatures recognized by Microsoft, right?

    And if for some reason you aren’t allowed to sign the .exe because this breaks something, then place an unsigned .exe in a signed zip folder.





  • Right, I didn’t consider this.

    But I don’t think a protogen has very high voltages though. Humans produce around 100 W of heat at rest so a protogen cannot produce much more without being significantly hotter. And since P = U * I there’s just so much voltage there can be to actually reach the drowning guy through all that water AND have sufficient current to cause damage.

    I feel like it’s probably safe.


  • I don’t think so? Even if the water were to short and kill the proto, I don’t see why the electricity would travel all the way to the drowning guy unless he’d be touching the proto. People are pretty bad conductors with high resistance and electricity tends to go for the best way to ground.

    Though I’d imagine for very high voltages the electricity may discover your ion-rich blood is a decent enough conductor to make up for the resistance of your skin. Or you may have a cut somewhere bypassing your skin entirely.







  • Even though this isn’t C, but if we take from the C11 draft §6.8.5 point 6 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf):

    An iteration statement whose controlling expression is not a constant expression, that performs no input/output operations, does not access volatile objects, and performs no synchronization or atomic operations in its body, controlling expression, or (in the case of a for statement) its expression-3, may be assumed by the implementation to terminate

    “new Random().nextInt()” might perform I/O though so it could still be defined behavior. Or the compiler does not assume this assumption.

    But an aggressive compiler could realize the loop would not terminate if x does not become 10 so x must be 10 because the loop can be assumed to terminate.