• 0 posts
  • 40 comments
Joined 3 years ago
Cake day: June 18th, 2023
  • 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.

  • 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.

  • Optional type annotations started to enter Python around 3.8, and they have really improved the experience. Even if nothing enforces the annotations, the IDEs can pick them up and show them to you in all the usual places.

  • That number is at the high end of what I usually see for consulting work. The high hourly rate has to cover all of the HR and accounting overhead, invoicing, marketing, business development, and the opportunity cost of short term engagement vs. long term engagements.

  • One time I did this thing with an internal calibration program where the user had to type floats into a text box. I set it up so that every key stroke was validated so that the string in the box had to parse as a valid number within the assigned range at all intermediate steps.

    Everyone hated that.