HNHacker News
TopNewBestAskShowJobs

a1369209993

3,448 karma · joined May 22, 2013

submissionscomments
a1369209993··on Pet parrots prefer live video-calls
Why wouldn't they? Humans can recognize black and white images on a 1960s-era videophone prototype as another human they are interacting with in real-time, and it's not like parrots have any significant difficulty recognizing other parrots in general.
a1369209993··on I Built an Ld_preload Worm
> These extensions are standard PHP extensions, so they are the same for each process and user.

Then with static linking, the maximum memory requirement is 70MB for said extensions (statically linked into the PHP executable).

a1369209993··on Planes in 3D Space
> However, unless the equation is normalized, the distance could be scaled in unusual ways that are less than useful.

> > []the[] point not on a plane will evaluate to 1

They mean the vertex (of the tetrahedron). The signed distance function is scaled such that the (single remaining) vertex that isn't at distance 0 (by construction) will instead be at distance 1. So the distance is always scaled in a unique well-defined way (assuming not all four points are coplanar). Whether that way of scaling is useful depends on your use case, of course.

a1369209993··on Show HN: I made a programmable computer from NAND gates
Conversely, PMOS logic has the exact opposite problem - NAND gates are parallel, while NOR gate are series.

Meanwhile, CMOS logic inherits both of these problems (in return for better performance in general), but due to semiconductor chemistry, PMOS transistors are weaker than NMOS ones (which was why NMOS was more widely used than PMOS in the first place), so NAND gates have two strong transistors in series and two weak transistors in parallel, which gives a better worst-case switching speed than a NOR gate (where the weak transistors are in series, and so switch noticably slower). This is where "NANDs are used for everything" comes from.

a1369209993··on NPR suspends veteran editor as it grapples with his public criticism
> Will people who hear it hear the second or the first?

Definitely unambiguously the first unless they're the ones trying to "well acshually" it. At the point of the second you're not even talking about burgers - the maximum cheapness calories per dollar is a five gallon jug of corn syrup or something.

a1369209993··on How I tripped over the Debian weak keys vulnerability
Are you sure they were talking about UUID collisions in a idealized/theoretical system? If you generate UUIDs using, for example, a random number generator with only a 16-bit seed, you absolutely will see collisions, for much the same reasons as in TFA.
a1369209993··on Gigantic Aluminium Spiders
> We have our space elevator!

Out of context, that sounds like a kite. Can it be used in locations that are not very windy (like, for example, space)?

a1369209993··on A simple, (as-of-yet unidentified) asymmetric Authenticated Key Exchange
> the RNG isn't initialized

Or used.

sk_identity is static over the lifetime of the device, so doesn't need new entropy.

sk_device is generated after pk_user is recieved, so can use HASH(sk_identity,pk_user) as entropy. This results in the same pk_device for every session with a given pk_user, which theoretically enables traffic analysis, but the security model implies traffic analysis is out-of-scope.

signature and enc_sig might need entropy as well, but can still use HASH(sk_identity,pk_user).

a1369209993··on Commission opens non-compliance investigations against Alphabet, Apple and Meta
Dibs on !0A Aangstrom.
a1369209993··on Optimizing the Particle Life: From 400 to 4M particles
On my machine, the complier constant-folds the multiplication, producing a single-precision add for `mul_as_float` and a convert-t-to-double, double-precision-add, convert-sum-to-single for `mul_as_double`. I missed the `+=` in your original comment, but adding a float to a double does implicitly promote it like that, so you'd actually need:

  t += (float)((double)0.02f * (float)17);
to achieve the "and then converting the result [of the multiplication] to float" (rather than keeping it a double for the addition) from your original comment. (With the above line in mul_as_double, your test code no longer finds a counterexample, at least when I ran it.)

If you ask for higher-precision intermediates, even implicitly, floating-point compliers will typically give them to you, hoped-for efficiency of single-precision be damned.

a1369209993··on Optimizing the Particle Life: From 400 to 4M particles
> I believe this helps because 0.02 is a double and [...] can produce a different answer

In principle, not quite. The real/unavoidable(-by-the-compiler) problem is that 0.02 is a not a diadic rational (not representable exactly as some integer over a power of two). So its representation (rounded to 52 bits) as a double is a different real number than its representation (rounded to 23 bits) as a float. (This is the same problem as rounding pi or e to a double/float, but people tend to forget that it applies to all diadic irrationals, not just regular irrationals.)

If, instead of `0.02f` you replaced `0.02` with `(double)0.02f` or `0.015625`, the optimization should in theory still apply (although missed optimization complier bugs are of course possible).

a1369209993··on Grok
Six is plural.
a1369209993··on On clock faces, 4 is Expressed as IIII, not IV
> you can have a single die that cuts XVIIIII, and use it iv times

To be a bit more explicit, you use the the die four (4) times, and get 4 Xs, 4 Vs, and 4*IIIII = 20 Is, which is exactly right for I II III IIII V VI VII VIII IX X XI XII. Using IV would mean a 5 Vs, but only 4 Xs, and 17 Is, so you couldn't cut a full set with a single die without using a much larger die (= more work making and using the die) or having extra pieces (= wasted material) left over.

a1369209993··on HTTP/2 and HTTP/3 explained
> -highly accomplished and highly experienced engineers were actually too stupid

> -these highly experienced guys actually knew what they were doing

> What seems more likely?

Well, when you put it that way... the former. By a large margin.

a1369209993··on Swirling Forces, Crushing Pressures Measured in the Proton
> There is no single continuous function that can do this

Nitpick: that should be "no single continuous deterministic function"; it's (relatively) very easy to sample uniformly randomly from the unit circle orthogonal to a given non-zero vector, but that won't give, for example, approximately the same result on two consecutive video frames, such that you could usefully orient the camera with that direction "up".

a1369209993··on YX Problem
> It's something like '([^a]|a[^b]|a$)*'.

And, proving that any curt correction of a silly error will likely contain its own silly error, I think that should actually be '^([^a]|a[^b]|a$)*$', since grep defaults to searching rather than matching.

a1369209993··on YX Problem
> Often X really is something possible-but-difficult

If "I'll need a research team and five years" is actually a valid answer to X (eg: X="How do I determine if a given jpeg image contains a bird?", at least... uh, five years ago), then it's a valid answer for the purposes of answering both X and Y. The problem is people giving incorrect/non-answers like "you shouldn't do that", and then pretending they answered the question because they also gave a (presumed for the sake of argument to be correct) answer to some different question, Y.

a1369209993··on YX Problem
> (Solution complexity grows with length of the string within which we are searching)

No it doesn't. It's something like '([^a]|a[^b]|a$)*'.

In general it scales like '([^a]|a([^b]|$)|ab([^c]|$)|abc([^d]|$)|...)*' (ie, quadratically with the length of the needle, if I haven't overlooked a optimization), but the complement of a regular language is regular, and fixed strings are always regular, so it's always a pure regular expression (including being independent of haystack length).

a1369209993··on Statistical Process Control: A Practitioner's Guide (2022)
> "Stable" [...] means that you have a mean and variance

And software development, as a process, does not have a (finite) mean or variance.

> I think bugs should be stable if you normalize it by a size metric.

Bugs approximately follow a heavy-tailed distribution, such that as the number of samples increases, the empirical average work to fix (and possibly other measures of severity) does not converge to any finite value, but instead increases without bound. (I think roughly logarithmicly, but don't quote me on that.)

In particular, it doesn't satisfy the requirements of the central limit theorem, so a lot of statistical techniques work poorly or not at all on software projects that are large enough, individually, to do statistics on (as opposed to doing statistics on populations of software projects, which seems to mostly work, usually).

a1369209993··on How video games use lookup tables
> I use a table because the random order is a grab bag (to ensure rows aren't starved of updates)

I think the search keyword for this is "quasirandom", FWIW.

a1369209993··on Herbgrind analyzes binaries to find inaccurate floating point expressions
Strictly speaking, unambiguous decimal representation - such as Ryu and its less-efficient predecessors - is unconventional, but I agree that it's correct and should be the default. (That's the "0.1 + 0.2 = 0.30000000000000004 ≠ 0.3" in my comment.) My point is that it should also be easy to get a natural representation that corresponds closely to the actual bits of the float, in rouchly the same way that 0xAAAB corresponds closely to the actual bits of (int16_t)-21845, and so gives you a chance to notice that something weird is going on when, for example, you encounter a multiplication by -21845. (Something like hex(*(uint64_t*)&x) can work, but makes printf %A look beautifully readable by comparison. Also most languages - especially interpreted ones - manage to be inferior to C in this respect.)
a1369209993··on Herbgrind analyzes binaries to find inaccurate floating point expressions
> to make floats less scary for the common people?

The obvious thing would be making sure that it's easy to get a unambiguous, natural representation of what a float value actually is. (Similar to what C printf %a specifiers produce, rather than something like Ryu float-to-decimal, which is useful for what a float value means for human-readable purposes.)

   0X1.999999999999AP-4
  +0X1.999999999999AP-3
  =0X1.3333333333334P-2
  ≠0X1.3333333333333P-2
is ugly (and could be improved[0]), but far more understandable (and less superstition-inspiring) than:

  0.1 + 0.2 = 0.30000000000000004 ≠ 0.3
0: At the very least, please make it easy to get "0xA.BCDEFp+1", with capital "ABCDEF" and lowercase "xp", so the digits look like digits and the punctuation looks like punctuation.
a1369209993··on Coroutines in C (2000)
No, it's frequently bad advice to consider something. See eg https://www.xkcd.com/1445/.
a1369209993··on John C. Dvorak on Intel's First Neural Network Chip in 1990
> Gordon Moore believed []Intel's next ISA[] would last the lifetime of Intel

> deliver a 16-bit microprocessor in 1979. [...] the new "8086" ISA

> Intel's original 8800 project was renamed iAPX-432 and finally announced in 1981

I mean, he wasn't wrong...

a1369209993··on iMessage with PQ3 Cryptographic Protocol
Do you mean:

> There are essentially no mainstream systems that don't [use PQC/ECC hybrid cryptosystems?].

If so, good. I'll admit my expectations are a bit biased from having to deal with projects that go out of their way to produce defective software (eg DRM, malicious abuse of undefined behaviour by compliers, cloudflare and other captcha-walls, etc) so I tend to assume the worst by default.

a1369209993··on iMessage with PQ3 Cryptographic Protocol
> There's a weird fear in my mind that all these "post quantum algorithms" are so complicated, with such a large surface area, that they may hide flaws.

That's correct (emphasis on "may", of course), and is why it's absolutely imperative to always use PQC/ECC hybrid cryptosystems rather than pure PQC. See eg [0] for a more detailed explanation.

0: https://blog.cr.yp.to/20240102-hybrid.html

a1369209993··on Enhancing Factorio with SAT solvers
Strictly speaking it hardly ever actually matters, but yeah I usually use N=8 just so I don't have to care.

It should definitely be a even number so that if your machine layout doesn't work modulo 7 tiles (=1 wagon-length), you can group up pairs and use 14 tiles, but it might be helpful to use N=6 or N=12, and sometimes build modulo 21 tiles. (I haven't needed/tryed that so far, so I can't comment on how well it works.)

a1369209993··on Why isn't the <html> element 100% supported on caniuse.com?
> Not [sure] if it's included
a1369209993··on Enhancing Factorio with SAT solvers
> Belt balancing is necessary when unloading trains, as otherwise uneven consumption can lead to some chests/wagons running out of resources

Not in general, actually. If you standardize on N-wagon trains, and build assemblers (et al) in groups of N, each assembler can take inputs from one wagon in lockstep with N-1 other assemblers taking from the N-1 other wagons, and since productivity is deterministic[0], they'll also produce outputs in lockstep.

This means that as long as all your input trains are balanced (they should be, by being completely full), all your output trains will also be balanced. Science labs are same as any other machine, just without output, and trains feeding a logistics network can unload into active provider chests.

In practice I pretty much only use balancers for a: mining outposts, or b: random kludges, at least when and if I'm using trains as my main transport mechanism.

0: Ask me about quality once 2.0 drops; for now I just special-case uranium processing.

a1369209993··on Why isn't the <html> element 100% supported on caniuse.com?
> when I think we can safely say they do in fact support the html element.

Not if it's included, but I use wget a lot. Checking src/html-url.c, it does not, in fact, support <html> at all (treating it as a unrecognized tag).

← PreviousPage 2 of 34Next →