Author:
- Name: Adrian Cable
Location: US - United States of America (United States)
To build:
make all
Bugs and (Mis)features:
Some terminal applications do not handle all Unicode characters adequately.
On Linux, it is better to enjoy this entry on gnome-terminal
or an equivalent modern terminal emulator.
To use:
./prog
Try:
./try.sh
Judges’ remarks:
We had a few minutes of amazement and fun while figuring that the is something fishy 🐠 wit the prog.c source code.
Those who follow the philosophy of “seeing is believing” are likely to be “deceived” when they try to view the prog.c source code in a terminal window:
cat 2024/cable2/prog.c
HINT: There is a command line flag to the cat(1)
tool may provide a clue.
HINT: For those who might not be familiar with the U”string” literal prefix: When using the U literal prefix, anything inside the quotes is encoded as UTF-32.
HINT TO FUTURE SUBMITTERS: Now that we have awarded this clever entry, please understand that this salmon is now old hat. What was murky waters for IOCCC28 in 2024 will, in the future, be immediately seen through when analyzing future submissions to the IOCCC. In other words, to win a future IOCCC, you will need to do MORE than simply employing this fun obfuscation trick! :-)
Author’s remarks:
Salmon: a most fishy submission
About
This program obviously prints the squares of the numbers from 1 to 10. Or does it? The author got a little hungry for char-grilled salmon, and there’s clearly something fishy going on with those unused #defines. Or is there? What the actual f*sh is going on here? Follow the three steps below for maximum enjoyment.
Step 1:
cat prog.c
Step 2:
make clobber all
Step 3:
./prog
Scratch head. Then, slap head with fish.
You may suspect there’s something fishy with the Makefile
, but you would be wrong. It just invokes cc -o prog prog.c
You may suspect cat
might be eating the salmon in step 1 (see 2015/endoh2
), but you would be even wronger. Confirm by looking at the program source using GitHub or emacs
or nano
.
You are probably now even more confused, in which case, return to step 1.
Inventory for 2024/cable2
Primary files
- prog.c - entry source code
- Makefile - entry Makefile
- prog.orig.c - original source code
- try.sh - script to try entry
Secondary files
- 2024_cable2.tar.bz2 - download entry tarball
- README.md - markdown source for this web page
- .entry.json - entry summary and manifest in JSON
- .gitignore - list of files that should not be committed under git
- .path - directory path from top level directory
- index.html - this web page