[-] o11c@programming.dev 1 points 11 months ago

To be fair, Secure Boot is actively hostile toward dual-booting in the first place. Worst of all, it might seem to work for a while then suddenly start causing errors sometime later.

[-] o11c@programming.dev 1 points 1 year ago

It's because unicode was really broken, and a lot of the obvious breakage was when people mixed the two. So they did fix some of the obvious breakage, but they left a lot of the subtle breakage (in addition to breaking a lot of existing correct code, and introducing a completely nonsensical bytes class).

[-] o11c@programming.dev 1 points 1 year ago

The problem is that GLIBC is the only serious attempt at a libc on Linux. The only competitor that is even trying is MUSL, and until early $CURRENTYEAR it still had worldbreaking standard-violating bugs marked WONTFIX. While I can no longer name similar catastrophes, that history gives me little confidence.

There are some lovely technical things in MUSL, but a GLIBC alternative it really is not.

[-] o11c@programming.dev 1 points 1 year ago

That's misleading though, since it only cares about one side, and ignores e.g. the much faster development speed that dynamic linking can provide.

[-] o11c@programming.dev 1 points 1 year ago

That still doesn't explain why duck typing is ever a thing beyond "I'm too lazy to write extends BaseClass". There's simply no reason to want it.

[-] o11c@programming.dev 1 points 1 year ago

Then - ignoring dunders that have weird rules - what, pray tell, is the point of protocols, other than backward compatibility with historical fragile ducks (at the cost of future backwards compatibility)? Why are people afraid of using real base classes?

The fact that it is possible to subclass a Protocol is useless since you can't enforce subclassing, which is necessary for maintainable software refactoring, unless it's a purely internal interface (in which case the Union approach is probably still better).

That PEP link includes broken examples so it's really not worth much as a reference.

(for that matter, the Sequence interface is also broken in Python, in case you need another historical example of why protocols are a bad idea).

[-] o11c@programming.dev 1 points 1 year ago

Aside: Note that requests is sloppy there, it should use either raise ... from e to make the cause explicit, or from None to hide it. Default propagation is supposed to imply that the second exception was unexpected.

[-] o11c@programming.dev 1 points 1 year ago

One problem is that Rust doesn't support tagged unions. enum is regrettably solving a different problem, but since it's the only hammer we have, it's abused for this kind of thing. This often leads to having to write match error ... unreachable.

[-] o11c@programming.dev 1 points 1 year ago

The default handling is pretty important.

What I find more interesting are 1. the two-argument form of iter, and 2. the __getitem__ auto-implementation that causes there to be two incompatible definitions of Iterable.

(btw your comments are using accidental formatting; use backticks: __next__)

[-] o11c@programming.dev 1 points 1 year ago

Note that by messing with a particular module's __path__ you can turn it into a "package" that loads from arbitrary directories.

[-] o11c@programming.dev 1 points 1 year ago

I likewise don't really use Godot, but for graphics in general, the 4th coordinate is important, even if it is "usually" 1. It's most obvious to correctly interpolate near the poles of a sphere with a single rectangular texture, but think for a minute what "near" means.

Back to the main point though: the important things we normally rely on for matrix math are associativity (particularly, for exponentiation!) and anticommutativity (beware definitions that are sloppy about "inverse").

[-] o11c@programming.dev 1 points 1 year ago
from __future__ import annotations
view more: ‹ prev next ›

o11c

joined 1 year ago