Prepare for the winners of **IOCCC28**. > However these are not the 2024 droids you are looking for. :-) The HTML menu (both JavaScript and non-JavaScript) has been updated. The `Status -> Rules and guidelines' have been replaced with two separate menus `Status -> IOCCC rules` and `Status -> IOCCC guidelines`. Added a new top level `social.html` page: built from a new `social.md`. Sorted rules for building specific web pages in the top level `Makefile`. Added `make social` to make the `social.html` page from `social.md`. The `bin/gen-top-html.sh` now is able to process a argument of **social** to process the new top level `social.html` page. Changed `bin/gen-top-html.sh` VERSION from "2.0.0 2025-03-13" to "2.0.1 2025-07-25". Below `About -> Home page` a new `About -> IOCCC social media` menu item as added. Because the menu change touched every HTML file, we changed the general copyright date range for HTML files from "1984-2024" to "1984-2025" due to the extensive changes made for **IOCCC28**. Those markdown files that were modified in 2025 had their copyright date range also changed from "1984-2024" to "1984-2025". Rebuilt tarballs and sitemap due to the extensive HTML rebuilding. Ran `make update` to perform the above.
To build:
make
An alt version exists for those in the southern hemisphere (or those who want to see what it would be in the southern hemisphere). See Alternate version below.
To use:
./natori
Try:
./try.sh
Try running this on different days, say a few days apart (even better if the Moon phase changes), and each time run it several times in a row (or several times in a day).
Also try modifying the code so that it will show another Moon phase based on input or else just by the code itself. Bonus points if you can make it show all.
NOTE: if it's a Full Moon the script won't look as nice.
Alternate code:
The author noted that those in the southern hemisphere might want to change
acos(l/2) into acos(-l/2) which we have done in the alternate version.
Alternate build:
To build the alternate code that works for the southern hemisphere:
make alt
Alternate use:
./natori.alt
Try running this on different days, say a few days apart, and each time run it several times in a row (or several times in a day).
What happens if you run it in the northern hemisphere? Are there any differences?
Can you identify any Moon phases that result in the same output of both versions? Or are there any?
Alternate try:
./try.alt.sh
Like with try.sh, try using this multiple times in a row or throughout the day on different days (if different phases of the Moon you'll see more of a difference, of course).
NOTE: if it's a Full Moon the script won't look as nice.
Judges' remarks:
Here is a nice compact program that changes with the phase of the Moon. Can you figure out how it does it?
The ANSI-C committee, among their multiple misdeeds, broke perfectly fun C
programs by making it intractable for them to declare their own non-traditional
prototype for main(). We have had to uglify this program in order to prevent
C compilers from failing to compile it due to (the now changed) unusual arg
types of the main() function.
Author's remarks:
This program outputs a rough image of the moon in its current phase. The main obfuscation of this entry is its complicated double recursion (without any loop or conditional statement).
People living in the southern hemisphere may want to change acos(l/2)
into acos(-l/2).