Moonphase: A Cross-Language Early Warning System
2025-06-02
The `moonphase` project offers code snippets in various programming languages to calculate the phase of the moon. These implementations are based on the algorithm from moontool, a GUI program from the 80s by John Walker, which in turn relied on the book *Practical Astronomy With Your Calculator*. The project supports systems languages, scripting languages, and DSLs, with all implementations including test cases and calculating the illuminated fraction of the moon's surface. The project emphasizes concise, self-contained code, ready for copy-pasting into your projects.