It gets even better: some implementations (libavformat/wavdec.c) accept files which deviate from the specs in.. interesting ways.

Playing around with hammer, a parser combinator from the langsec.org folks (https://github.com/UpstandingHackers/hammer). In trying to write a RIFF WAVE parser it suddenly dawns on me why length fields are bad.

In RIFF there are chunks with length fields, and one special chunk is LIST. It has sub-chunks which also have length fields. Their total length can be different from that of the LIST. Determining if two RIFF parsers handles mismatched lengths the same way is undecidable.

Might as well share a cool idea a friend of mine told me that's pretty low-tech: closed loop salt water dehumidifier + evaporative cooler. You use saturated salt water to soak up moisture inside, then boil the moisture off outside. The resulting dry air can then be used in a traditional evaporative cooler. Could probably be made to run off of solar heat.

Sadly there are no Mersenne primes beyond 7 that are also on this form, and no primes with popcount < 6 in the range \(2^34 \dots 2^37\)

Hooray for #OEIS! I've been scratching my head for the last few days how to find primes such that repeated squaring has the longest possible cycle, (p-3)/2. I decided to write a program to find such primes by brute force, starting from 5. The resulting sequence gave this match: https://oeis.org/A141305

I now have a much faster test: I only need to check that p is a safe prime, and that 2 is a primitive root of (p-1)/2 😎

Oh hey, someone has thought of a better way to apply Toom-Cook to squaring, namely J. Chung & M.A. Hasan: https://www.lirmm.fr/arith18/papers/Chung-Squaring.pdf

Doing nothing but squaring brings utilization up to 85%, and running times to somewhere between 6-13 years. But this is entirely CPU - there's a plethora of GPU type hardware to make use of as well

There we go: ran on an actual cluster machine. 21 cores nets a 173% speedup! Not the most efficient, but it brings the CPU time estimate down from 50 years to a mere 19 years. Core utilization is just 50%, so another halving seems feasible. Ideally every core would do nothing but modular squaring 100% of the time

Joined Apr 2018