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.

Day 6 progress: 1.75% #watchingpaintdry

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 😎

Joined Apr 2018