• 0 Posts
  • 57 Comments
Joined 3 years ago
cake
Cake day: June 18th, 2023

help-circle


  • mkwt@lemmy.worldtoProgrammer Humor@programming.devClosing programs
    link
    fedilink
    arrow-up
    98
    arrow-down
    2
    ·
    2 months ago

    Windows does, in fact, have signals. They’re just not all the same as Unix signals, and the behavior is different. Here’s a write-up.

    You’re correct there is no “please terminate but you don’t have to” signal in Windows. Windowless processes sometimes make up their own nonstandard events to implement the functionality. As you mentioned, windowed processes have WM_CLOSE.

    Memory access violations (akin to SIGSEGV), and other system exceptions can be handled through Structured Exception Handling.


  • It was also common to have a single step mode, where the CPU advances one cycle per switch press. Very useful for debugging.

    And you could frequently read out the contents of registers directly on rows of lights. This led to the trope of the blinky light computer in Star Trek (original series) and elsewhere. Because the lights would flash in various patterns when the computer was running, as the register contents changed. But in the single step mode you could interpret the values.










  • A bunch of answers but nothing talking about modern consumer devices.

    • The OS code on a computer is stored on a “drive”, usually flash memory, but it has to be loaded into RAM to actually run.
    • the OS code is usually not encrypted when it’s in RAM. Processors don’t decrypt the code directly on the fly.
    • it is relatively common nowadays for the stuff on the drives to be fully encrypted. This can include the OS, it the OS code can be on a separate partition that’s not encrypted.
    • For all the major operating systems, there’s not a lot of value in keeping the binary code secret, because they all leak out eventually, anyway.
    • If it’s encrypted, the OS code has to be decrypted when it is loaded off the drive into RAM. This is done by a separate “firmware” software during boot.
    • the keys needed for boot up cryptography are usually stored in dedicated chips that ship with modern computers. These are called things like TPM or “secure enclave”.
    • the chips are hardened against physical attacks that could reveal the keys.
    • usually the passphrase is part of an encryption key that encrypts the real encryption key that encrypts the whole disk. Wrong passphrase means the computer is incapable of decrypting the real key.

  • Adding this because I don’t see it explained anywhere else:

    It takes 60/100 votes to pass the budget bills in the Senate, instead of 51, because the Senate still has a filibuster. The minority Democrats have the power to stop the vote from coming up by simply talking on the floor forever until the Republicans give up and go home.

    The 53-47 vote was for a cloture motion, which is to put time limits on debate on a particular budget bill. The rules don’t let Dems filibuster the cloture motion for obvious reasons, so that vote happened. But it takes 60 votes to pass cloture, so it went down.

    Now, there are some resolutions that don’t involve coming to a compromise:

    • the Democrats could choose not to do the filibuster. Then the bill would come up, and they could all vote against it, but it could pass on 53 votes.
    • the Senate could change the rules to get rid of filibuster. This is usually called the “nuclear option” because it removes the 60 vote barrier using a rules vote that only needs 51 to pass. The procedure is to make someone actually start a filibuster, then raise a point of order that filibustering member is taking too long. The Parliamentarian will deny the point of order based on the current rules, but that can be appealed to the whole Senate on a majority vote. And the point of order is not debatable.

  • The Federal gov in the US has a “road legal” standard for commercial motor vehicles like trucks and buses. The feds also have minimum rules for headlights, brake lights and turn signals on passenger cars.

    Everything else in terms of road legality is a state law in each of the 50 states.

    The reason is the Constitution gives the feds power to regulate interstate commerce (i.e. big commercial vehicles that frequently cross state lines). The feds do not have the general “police power” that states have to pass laws on whatever.


  • This chart is easier to understand if you make the following substitutions:

    • Toy Lang --> high level language (except brainfuck really is a low level toy language)
    • System Lang --> low level language
    • Obsolete Lang --> old programming language, regardless of obsolescence status
    • Nu Lang --> newer programming language

    After understanding this construction, I fail to find any humor in this.

    Why is ECMAScript here and not JavaScript?

    Among other things, “JavaScript” is a trademark of Oracle.