4 ms·
Correct, I would be much more impressed with a regex implementing the sieve of Eratosthenes. Not that this is not amusing!
by ykonstant 2y ago
Correct, I would be much more impressed with a regex implementing the sieve of Eratosthenes. Not that this is not amusing!
- thechao 2y agoImplementing the real Sieve is quite a challenge in any language: https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf
- ykonstant 2y agoQuite; motivated by that paper I implemented a decent sieve of Eratosthenes with the standard wheel factorization in Lean 4: https://github.com/ykonstant1/esiv https://github.com/ykonstant1/esiv