A Prime Number Algorithm by E.W. Dijkstra as presented in
A.S. Tanenbaum - General-Purose Macro Processor as a Poor Man's Compiler-Compiler, IEEE TOSE, Sol.SE-2, No.2, JUNE 1976
translated and refactored into idiomatic lua.
-
The commit history contains a detailed account of the refactoring process.
-
Read more: http://heinrichhartmann.com/2016/04/03/Dijkstra's-Prime-Number-Algorithm.html
-
Hacker News Discussion: https://news.ycombinator.com/item?id=11429163