5,587 karma · joined Nov 14, 2010 (16y ago) · 954 submissions
comment 1mo ago · link · parent
comment 8mo ago · link · parent
Not only did they not stop the shooter, but they actively prevented parents—who were willing to risk their lives—from intervening. They didn't just not help, they proactively ran interference for the shooter.
comment 8mo ago · link · parent
comment 8mo ago · link · parent
comment 8mo ago · link · parent
1. Still just as heavy. The AirPods Max sound quite good, but they are very heavy, to the point of being fairly uncomfortable after listening for any longer amount of time. This release as the exact same weight as the originals (13.6 oz).
2. Still no off button/position. They stay partially on unless you put them in the awkward and useless "case", which means they're constantly out of power when you want to use them. There's even an obvious fix: the ear cups swivel flat, they could just make this the "power off" position. Solved. But they didn't, so presumably these still have the same problem. There's also no mention of magnetic charging via stand, which would be another way to help alleviate this problem.
If these were even a few ounces lighter and powered off properly, I would buy them for sure. Given this announcement, I guess I will look for something else to replace the old AirPods Max.
comment 1y ago · link · parent
comment 1y ago · link · parent
The only very marginal exception to this is that when both arguments are NaN, the return value will be NaN, but which NaN payload is returned can depend on argument order. But no one ever uses this because it's not specified, so it can't be used reliably for anything useful. The behavior I wish IEEE 754 had specified for this is to define a standard NaN value (or two), and when the return value of an op is NaN, and some of the arguments are non-standard NaNs, then one of those non-standard NaN values must be returned. This doesn't depend on argument order and allows NaN payloads to be reliably propagated, which would let you encode useful debugging information in NaN payloads and know that it will flow through the program.
comment 1y ago · link · parent
Double dispatch feels like kind of a hack, tbh, but it is easier to implement and would certainly be an improvement over Python's awkward `__add__` and `__radd__` methods.
comment 1y ago · link · parent
comment 3y ago · link · parent
- RoundNearest
- RoundNearestTiesAway
- RoundNearestTiesUp
- RoundToZero — rem, div
- RoundFromZero
- RoundUp
- RoundDown — mod, fld (i.e. floor(x/y) but without incorrect corner cases)
Most languages have no way of doing most of these, but then again, they're mostly pretty useless. They're really only useful when you're pairing division with a specific kind of rounding with a remainder that needs to match. Example of whacky remainder behavior in the "familiar" RoundNearest mode (default rounding mode for floating point):
julia> [k => rem(k, 4, RoundNearest) for k=-6:6]
13-element Vector{Pair{Int64, Int64}}:
-6 => 2
-5 => -1
-4 => 0
-3 => 1
-2 => -2
-1 => -1
0 => 0
1 => 1
2 => 2
3 => -1
4 => 0
5 => 1
6 => -2
Wild, huh? Output range for modulus 4 is -2:2 and whether you get -2 or 2 alternates with each cycle around the ring. (Of course, Julia has comprehensive support for all of these because we're a bunch of nerds for this kind of thing.)comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
True; I was careful not to call it that, but treating strings as UTF-8 by convention does make sense.
> It’s not, any unicode-aware text processing does it implicitly. This means any such things processing has to either perform its own validation that the input is valid, or it may fly off the rails entirely if fed nonsense.
In theory, but that's just not how most string operations actually work. If you have two UTF-8 strings and you want to concatenate them, you just concatenate the bytes. It would be ridiculously inefficient to decode the code points in each string and then re-encode them back into a destination buffer. If you have two UTF-8 strings and you want to see if one is a substring of the other and at what byte index, you just look for the bytes of one as a "substring" of the bytes of the other. Again, it would be ridiculously inefficient to decode the code points in each and do matching on code points. But what if the strings aren't valid UTF-8?! Both of those operations work just fine even if the strings aren't valid and produce sensible, intuitive results.
If you're implementing a browser or a terminal that has to actually display UTF-8 as characters then sure, you have to actually decode characters. Similarly, if you're parsing text somehow, then you have to decode characters. But many program only do concatenation and search and other operations like that which are actually implemented in terms of byte sequences, not characters.