From ac41f07a83f21255769c99af21ee85cb00b30f85 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 6 Jun 2023 16:59:53 -0700 Subject: [PATCH] move fix thanks a file, update top level html links, rename CONTRIBUTING.md The fix thank you's have been moved from `README.md` to `thanks-for-fixes.md`. **WARNING**: Some mistakes may have been made in doing this. We presume later changes by others will correct any issues. The `CONTRIBUTING.md` was renamed `how-to-enter.md`. A 3rd line of links was added to top level html such as `contact.html`, `index.html`, `judges.html`, `winners.html`, and `years.html`. Improved blank line use in a number (but not all) `README.md` files. --- 1990/scjones/README.md | 7 +- 1990/tbr/README.md | 14 +- 1990/theorem/README.md | 21 +- 1990/westley/README.md | 12 +- 1991/brnstnd/README.md | 11 +- 1991/dds/README.md | 26 +- 1991/westley/README.md | 12 +- 1992/adrian/README.md | 17 +- 1992/gson/README.md | 21 +- 1992/kivinen/README.md | 17 +- 1992/lush/README.md | 15 +- 1992/westley/README.md | 10 +- 1993/jonth/README.md | 18 +- 1993/leo/README.md | 7 +- 1993/lmfjyh/README.md | 8 +- 1993/plummer/README.md | 11 +- 1993/rince/README.md | 4 +- 1993/schnitzi/README.md | 8 +- 1993/vanb/README.md | 9 +- 1994/ldb/README.md | 18 +- 1994/schnitzi/README.md | 14 +- 1994/shapiro/README.md | 18 +- 1994/westley/README.md | 11 +- 1995/cdua/README.md | 14 +- 1995/garry/README.md | 9 +- 1996/august/README.md | 12 +- 1996/dalbec/README.md | 15 +- 1996/eldby/README.md | 11 +- 1996/gandalf/README.md | 8 +- 1996/westley/README.md | 16 +- 1998/chaos/README.md | 5 +- 1998/schnitzi/README.md | 12 +- 1998/schweikh1/README.md | 27 +- 2000/anderson/README.md | 9 +- 2000/briddlebane/README.md | 5 +- 2000/dlowe/README.md | 9 +- 2000/jarijyrki/README.md | 10 +- 2000/natori/README.md | 15 +- 2000/thadgavin/README.md | 14 +- 2001/anonymous/README.md | 67 +-- 2001/bellard/README.md | 36 +- 2001/cheong/README.md | 11 +- 2001/coupard/README.md | 7 +- 2001/ctk/README.md | 9 +- 2001/dgbeards/README.md | 15 +- 2001/herrmann2/README.md | 13 +- 2001/kev/README.md | 17 +- 2001/westley/README.md | 17 +- 2004/arachnid/README.md | 12 +- 2004/burley/README.md | 11 +- 2004/gavin/README.md | 16 +- 2004/kopczynski/README.md | 10 +- 2004/newbern/README.md | 11 +- 2005/aidan/README.md | 8 +- 2005/anon/README.md | 12 +- 2005/giljade/README.md | 30 +- 2005/mynx/README.md | 21 +- 2006/birken/README.md | 14 +- 2006/borsanyi/README.md | 8 +- 2006/monge/README.md | 13 +- 2006/night/README.md | 12 +- 2006/sloane/README.md | 18 +- 2006/toledo2/README.md | 14 +- 2006/toledo3/README.md | 11 +- 2011/eastman/README.md | 12 +- 2011/goren/README.md | 10 +- 2011/richards/README.md | 8 +- 2011/vik/README.md | 12 +- 2012/kang/README.md | 10 +- 2012/tromp/README.md | 8 +- 2012/vik/README.md | 12 +- 2013/birken/README.md | 17 +- 2013/cable3/README.md | 16 +- 2014/maffiodo1/README.md | 10 +- 2014/vik/README.md | 8 +- 2015/endoh3/README.md | 13 +- 2015/yang/README.md | 7 +- 2018/poikola/README.md | 11 +- 2019/ciura/README.md | 12 +- 2019/diels-grabsch1/README.md | 10 +- 2019/diels-grabsch2/README.md | 10 +- 2019/karns/README.md | 12 +- bugs.md | 2 +- contact.html | 24 +- faq.md | 20 +- how-to-bugfix.md | 31 ++ CONTRIBUTING.md => how-to-enter.md | 10 +- index.html | 20 +- judges.html | 24 +- thanks-for-fixes.md | 793 ++++++++++++++++++++++++++++- winners.html | 24 +- years.html | 28 +- 92 files changed, 1326 insertions(+), 761 deletions(-) create mode 100644 how-to-bugfix.md rename CONTRIBUTING.md => how-to-enter.md (70%) diff --git a/1990/scjones/README.md b/1990/scjones/README.md index e1ffcfc23..3c1a73ada 100644 --- a/1990/scjones/README.md +++ b/1990/scjones/README.md @@ -6,13 +6,13 @@ SDRC Milford, OH 45150 US + ## To build: ```sh make all ``` - Modern compilers failed to compile this entry: ```c @@ -26,9 +26,6 @@ but we were able to get it to compile with modern compilers by specifying the `-ansi` flag with a tip from [Yusuke Endoh](/winners.html#Yusuke_Endoh). Thank you Yusuke! -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) pointed out that the -compiler option `-trigraphs` would also have worked. - ## To run: @@ -36,6 +33,7 @@ compiler option `-trigraphs` would also have worked. ./scjones ``` + ## Judges' remarks: The addition of trigraphs has made it easier to make programs hard to read. It @@ -69,6 +67,7 @@ standpoint) character sets. In short, it should be very widely portable. As an extra added attraction, all of the lines are under 72 characters long, which would allow for sequence numbers to be punched in columns 73-80 :-). + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1990/tbr/README.md b/1990/tbr/README.md index 916b1ae7f..8afbe15c8 100644 --- a/1990/tbr/README.md +++ b/1990/tbr/README.md @@ -19,17 +19,10 @@ US make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with -modern compilers; `exit(3)` returns void but the function was used in a binary -expression so this wouldn't even compile. Cody also changed the code to use -`fgets()` instead of `gets()` so one would not get a warning about the use of -`gets()` at linking time or execution, the latter case causing confusing output -due to the warning being interspersed with the program's output. Thank you Cody -for your assistance! - For the original version with `gets()` see the [archive tarball](/archive/archive-1990.tar.bz2). + ## To run: ```sh @@ -42,6 +35,7 @@ NOTE: globs do not work with this entry. Why? NOTE: `exit` does not work and neither does `logout`. To exit try sending ctrl-d or ctrl-c (or kill it from another terminal :-) ). + ## Try: ```sh @@ -57,8 +51,8 @@ vi tbr.c What happens if you try using `cd -` to return to previous directory? What about `cd` with no args? -## Judges' remarks: +## Judges' remarks: This program touches on a well known Unix utility, the 6th edition Bourne Shell (`/bin/sh`), whose original source was considered to be extremely obfuscated by @@ -86,6 +80,7 @@ e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||(exit(1),0):5;} It has the `exit()` returns void fix but not the `gets()` to `fgets()` fix applied. + ## Author's remarks: ### Rot13: @@ -144,6 +139,7 @@ applied. Gurer vf whfg bar reebe zrffntr, gur dhrfgvba znex, ohg url, gung'f nyy rq qbrf gbb. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1990/theorem/README.md b/1990/theorem/README.md index ca82b074c..b406660d1 100644 --- a/1990/theorem/README.md +++ b/1990/theorem/README.md @@ -13,24 +13,6 @@ US make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed some bugs that -impacted the usability of this program including some segfaults under modern -systems (and possibly in some cases earlier systems) with this entry. -Originally we noted that the 4 trailing args '0 0 0 0' were required on systems -that dump core when NULL is dereferenced but this problem showed itself in -modern systems even with the 4 '0 0 0 0'. He also fixed a segfault if not enough -args are specified and fixed the code so that the generated `fibonacci.c` -actually works; before it just printed `0` over and over again (since it did not -work anyway a segfault prevention was added here). He also fixed some array -addressing (some of which might not be strictly necessary but as he was testing -the `fibonacci.c` bug he ended up changing it anyway). Finally he changed this -program to use `fgets()` not `gets()` to make it safer and to prevent a warning -about `gets()` at linking or runtime. Thank you Cody for your assistance! - -[Yusuke Endoh](/winners.html#Yusuke_Endoh) pointed out that `atof` nowadays -needs `#include ` which was used in order to get this to work -initially (prior to this the output was incomplete). Thank you Yusuke! - ## To run: @@ -69,6 +51,7 @@ if (a[1]==NULL||a[2]==NULL||a[3]==NULL||a[4]==NULL||a[5]==NULL) return 1; be changed to just test the value of `A` when `a` is argv and `A` is argc? + ## Judges' remarks: The program's source implements four functions, all from the @@ -137,6 +120,7 @@ knife](https://en.wikipedia.org/wiki/Swiss_Army_knife) included! :-) When this program was first shown at the 1990 Summer Usenix conference, it received a standing ovation; a first for a contest entry. + ## Author's remarks: Differential equations are solved via the Runge-Kutta method, which guarantees @@ -148,6 +132,7 @@ Sorting is accomplished with a standard shell sort. Note that the sorting and reversing is limited to files with fewer than 500 lines, each less than 99 characters long. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1990/westley/README.md b/1990/westley/README.md index 8f8a8f5cf..a1beb73b8 100644 --- a/1990/westley/README.md +++ b/1990/westley/README.md @@ -7,23 +7,20 @@ St. Paul, MN 55104 US + ## To build: ```sh make all ``` + ## To run: ```sh ./westley number ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern -systems. It had `1s` in places for a short int which was changed to just `1`. -Since it's instructional to see the differences he has provided an alternate -version with the original code. See below. Thank you Cody for your assistance! - NOTE: this program will enter an infinite loop if input is not a number > 0. ### INABIAF - it's not a bug it's a feature :-) @@ -42,9 +39,7 @@ NOTE: this entry will very likely crash or do something else without an arg. ### Alternate code: -To see how C has changed over the years Cody provided the original source in -[westley.alt.c](westley.alt.c). If you have an old enough compiler try: - +If you have an old enough compiler try and to see how C has changed over the years: ```sh make alt @@ -91,6 +86,7 @@ on some systems. My personal favorite lint complaint is Also obviously, `(char)lotte` and `(char*)lie` are incompatible types... + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1991/brnstnd/README.md b/1991/brnstnd/README.md index 436a7b453..e488242ee 100644 --- a/1991/brnstnd/README.md +++ b/1991/brnstnd/README.md @@ -3,20 +3,13 @@ Daniel J. Bernstein New York University + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern -systems. There were two invalid operands to binary expression (`char *` and -`void` and `int` and `void`) to resolve and additionally a mis-feature of the C -pre-processor which no longer works had to be changed as well in order to get -this to compile. In particular the macro `C`, defined as `C =G` to make `+=` and -similar operators no longer works. The invalid operands to binary expressions -were resolved with the comma operator. Thank you Cody for your assistance! - ## Try: @@ -44,6 +37,7 @@ this entry. To have a chance to compile under a modern CPP, we had to replace `#D` with `#define`. + ## Author's remarks: This is an interpreter for the programming language SORTA, a systems @@ -184,6 +178,7 @@ matching, reading from files into strings, and encrypting the string pool to further confuse the judges. I don't think I can fit this into the size limit, unfortunately. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1991/dds/README.md b/1991/dds/README.md index 221ba038b..fb60366cd 100644 --- a/1991/dds/README.md +++ b/1991/dds/README.md @@ -5,12 +5,14 @@ Greece Mastodon: + ## To build: ```sh make all ``` + ## To run: ```sh @@ -18,18 +20,10 @@ make all ./a.out 2>/dev/null ``` - -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault that -prevented this entry from working at all and made an alternate version -that works with `clang`. The alternate code, described below, is what is needed -for clang. Reading it might be instructive even if you have gcc. - The segfault which was always triggered was due to the code `*q>' '&&(*q)--;`. This seems odd at first glance but it's pointing to `s` which was read-only memory as a `char *s`. It's now a `char s[]`. -Thank you Cody for your assistance! - NOTE: for `clang` you'll likely have to use the alternate code described below. @@ -42,6 +36,7 @@ something funny. These are a mild nuisance but are considered a feature not a bug. We challenge you to fix it for learning if you wish. See also [bugs.md](/bugs.md). + ## Try: With gcc, make and run as follows: @@ -66,13 +61,15 @@ What happens if you give the program a C program like itself? Try: You'll get errors yes but what does the generated file look like? What about other types of files? + ### Alternative code: -The alternative code, provided by Cody, allows this entry to work successfully + +The alternative code allows this entry to work successfully even with clang. He notes that unfortunately it's something of a hack or maybe even a kludge. This however seems important because it works well and allows for -not messing with the `s` string which is quite complicated. For all Cody knows -even changing the length could break functionality and indeed the length would +not messing with the `s` string which is quite complicated. +Even changing the length could break functionality and indeed the length would have to be longer for this to work with clang. How does it work? The code (which you will see in [dds.c](dds.c)) does a `return @@ -83,8 +80,8 @@ that the compilation failed with clang (because it didn't use `make` so no [LANDER.BAS](LANDER.BAS)) due to a return from `main()` without a return value and the use of functions not yet declared. -Now as noted since the string `s` is complicated and because Cody did not want -to inadvertently mess something up he changed that code to `system("make a");` +Now as noted since the string `s` is complicated and to not +inadvertently mess something up he changed that code to `system("make a");` and then added the right rule to the Makefile. Thus for the alternative version you now need both `make` and `cc`. If you use gcc you may change the system() call to what was given in this description to get a more authentic feel. If you @@ -97,8 +94,6 @@ make clobber alt ./a 2>/dev/null ``` -Thank you Cody for your assistance! - ## Judges' remarks: @@ -170,6 +165,7 @@ decision tree is implemented in order to match the statements. (Of course the `s` string is encoded by adding one to every character of it just to confuse you). + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1991/westley/README.md b/1991/westley/README.md index 89a8e3dbc..7ca2569d3 100644 --- a/1991/westley/README.md +++ b/1991/westley/README.md @@ -7,20 +7,13 @@ St. Paul, MN 55104 US + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in -this program which prevented it from working. The problem was that the read-only -char array `char *z[]` was being written to. The fix was to change it to `char -z[][100]` in two spots (see if you can determine why two places, not one!). Why -100 when the longest string is < 100? Because a shorter value caused strange -output and it's easier to just choose a larger value that works without having -to find the correct value. Thank you Cody for your assistance! - ## To run: Make and run as follows: @@ -110,6 +103,7 @@ ttt: I win! Redirects stderr to `/dev/null` by default. If you need errors or warnings use `-e`. + ## Judges' remarks: Can you figure out why the board looks different than the @@ -136,6 +130,7 @@ you can win tic-tac-toe, that there can be acceptable draws. Try not to cheat (even though it's very easy :-) ), the computer has not learned how to catch you doing it. + ## Author's remarks: A tic-tac-toe self-modifying program that "learns". This C program @@ -267,6 +262,7 @@ If you want a program that never loses, simply replace the string sbhaq. N grzcyngr vf fpnaarq sebz obggbz gb gbc, evtug gb yrsg (v.r. zbir 9 vf grfgrq svefg, gura 8, qbja gb zbir 1). + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1992/adrian/README.md b/1992/adrian/README.md index 1c823a263..cace3ce4e 100644 --- a/1992/adrian/README.md +++ b/1992/adrian/README.md @@ -6,6 +6,7 @@ University of Washington Mercer Island, WA 98040 US + ## To build: ```sh @@ -13,20 +14,6 @@ make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the location -that it used `gets()` to be `fgets()` instead to make it safer and to prevent -annoying warnings during compiling, linking or runtime (interspersed with the -program's output). One might think that simply changing the gets() to fgets() -(with stdin) would work but it did not because `fgets()` stores the newline and -`gets()` does not. The code was relying on not having this newline. With -`fgets()` the code `if(A(Y)) puts(Y);` ended up printing an extra line which -made the generation of some files (like `adhead.c`) fail to compile (`gets()` -does not store the newline but `fgets()` does). Why? There was a blank line -after a `\` at the end of the first line of a macro definition! Thus the code -now first trims off the last character of the buffer read to get the same -correct functionality but in a safe way. Thank you Cody for your assistance! - - ## Try: ```sh @@ -49,6 +36,7 @@ about regular expressions and state machines. NOTE: Some compilers have had trouble optimizing this entry. + ## Author's remarks: ### ADrian's GREP (adgrep) @@ -259,6 +247,7 @@ introducing extra lines into one of the programs. The program will produce at least one warning and possible several when compiled depending on the compiler. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1992/gson/README.md b/1992/gson/README.md index 36d05923d..1f7658f2b 100644 --- a/1992/gson/README.md +++ b/1992/gson/README.md @@ -6,33 +6,20 @@ Arentikuja 1 D 305 00410 Helsinki Finland + ## To build: ```sh make all ``` + ## To run: ```sh ./ag word word2 word3 < /path/to/dictionary ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the buffer size -in such a way that gets() should be safe (theoretically) as it comes from the -command line (though it can also read input from stdin after starting the -program). Ideally `fgets()` would be used but this is a more problematic. -Previously it had a buffer size of 256 which could easily overflow. In this -entry `gets()` is used in a more complicated way: first `m` is set to `*++p` in -a for loop where `p` is argv. Later `m` is set to point to `h` which was of size -\256. `gets()` is called as `m = gets(m)`) but trying to change it to use -fgets() proved more a problem. Since the input must come from the command line -Cody changed the buffer size to `ARG_MAX+1` which should be enough (again -theoretically) especially since the command expects redirecting a dictionary -file as part of the command line. This also makes it possible for longer strings -to be read (in case the `gets()` was not used in a loop). Thank you Cody for -your assistance! - ## Try: @@ -59,7 +46,7 @@ Then using the proper dictionary: ``` -## Judges' comment: +## Judges' remarks: Recently some newspapers printed amusing anagrams of one of the names listed above. Run this program to find the anagrams they @@ -74,6 +61,7 @@ cat README.md | ./mkdict.sh > words Then try using the program as shown above with the file `words`. + ## Author's remarks: The name of the game: @@ -266,6 +254,7 @@ algorithms are outlined in the rot-13 encoded spoiler below. bs gur jbeq zngpurq ol gung vaibpngvba, naq pbclvat gur punenpgref bs gur jbeq qverpgyl sebz fgnaqneq vachg gb fgnaqneq bhgchg. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1992/kivinen/README.md b/1992/kivinen/README.md index 39824617d..9f9cbfd06 100644 --- a/1992/kivinen/README.md +++ b/1992/kivinen/README.md @@ -20,20 +20,6 @@ compile. macOS users running Mountain Lion and later will need to download and install [XQuartz](https://www.xquartz.org) in order to compile and run this entry. -It was observed that on modern systems this goes much too quick. [Yusuke -Endoh](/winners.html#Yusuke_Endoh) created a patch that calls `usleep()` but -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) thought the value was -too slow so he made it a macro in the Makefile `Z`, defaulting at 15000. You can -reconfigure it like: - -```sh -make clobber Z=1000 all -``` - -Yusuke also noted that there is a bug in the program where right after starting -it moves towards the right but if you click the mouse it goes back. Thank you -Yusuke! - ## Try: @@ -48,8 +34,8 @@ Yusuke! See also the author's remarks for other variations. -## Judges' remarks: +## Judges' remarks: The type of entertainment depends on number of arguments you have with the program. :-) @@ -137,6 +123,7 @@ the better it is. The exit value of zero means you have won. The game has a cheat system, which can be found after examining the event loop at the end of program. It is not a bug, it's a feature! + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1992/lush/README.md b/1992/lush/README.md index 89907b340..76b7e24f4 100644 --- a/1992/lush/README.md +++ b/1992/lush/README.md @@ -6,29 +6,20 @@ P.O. Box 6176 Mississippi State, MS 39762 US + ## To build: ```sh make all ``` + ## To run: ```sh ./runme.sh ``` - -[Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a patch which makes this -work with gcc. Due to how it works (see Judges' remarks below) this will not -work with clang. Thank you Yusuke! - -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made it use `fgets()` -instead of `gets()` to prevent annoying warnings getting in the way and also -added the `runme.sh` script to demonstrate it (using make was problematic). Cody -notes that unfortunately this does not work with clang due to different compiler -messages. Thank you Cody! - For the original entry see the [archive tarball](/archive/archive-1992.tar.bz2). @@ -38,12 +29,14 @@ The program uses error messages issued by the C Preprocessor to generate its message to the world. One program's error is another program's data! + ## Author's remarks: This program is yet another "Hello World." program with a twist. The string Hello World has been encoded in the error messages the compiler generates when compiling the source. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1992/westley/README.md b/1992/westley/README.md index 2cb99a8f2..8e799d977 100644 --- a/1992/westley/README.md +++ b/1992/westley/README.md @@ -7,6 +7,7 @@ St. Paul, MN 55104 US + ## To build: ```sh @@ -14,13 +15,6 @@ make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for clang by -changing the third and fourth arg of main() to be ints inside main(); clang -requires args 2 - 4 to be `char **`. He also fixed it so that the program would -not segfault if not enough args were specified. He did the same for the -alternative version (see below) provided by the author (the original can be seen -in the author's remarks below). Thank you Cody for your assistance! - ## To run: If lost: @@ -69,6 +63,7 @@ To find the approximate place where this entry was judged, type: ./whereami 37 -122 (- means west of meridian) ``` + ## Author's remarks: Run the program with your latitude & longitude as integer @@ -159,6 +154,7 @@ joined together as one 160-character line and listed. You should see: ...going down the left edge if your terminal auto-wraps at 80 characters. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1993/jonth/README.md b/1993/jonth/README.md index f199b4855..904256597 100644 --- a/1993/jonth/README.md +++ b/1993/jonth/README.md @@ -6,6 +6,7 @@ Sogn Studentby 8231 N 0858 Oslo Norway + ## To build: ```sh @@ -17,21 +18,6 @@ compile. macOS users running Mountain Lion and later will need to download and install [XQuartz](https://www.xquartz.org) in order to compile and run this entry. -Both [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) and [Yusuke -Endoh](/winners.html#Yusuke_Endoh) fixed this so that it -will work with modern systems. Yusuke provided some fixes of the X code and Cody -fixed the C pre-processor directives so that it would compile. It used to be -that you could get away with code like: - -```c -G int i,j -K case -``` - -and expect `G;` to equate to `int i, j;` (though it's now a long) and `K` to mean -`case` but that's no longer the case so the offending lines had `#define` -prepended to them. Thank you Yusuke and Cody for your assistance! - ## To run: @@ -39,6 +25,7 @@ prepended to them. Thank you Yusuke and Cody for your assistance! ./jonth # must be run on an X11 server ``` + ## Judges' remarks: Use `h` and `l` to shift objects left or right. Use `k` to @@ -58,6 +45,7 @@ after initialization hidden by the well defined macros `t`, `u` and `F`. This program is highly portable as it runs on a "Notebook" size SPARC. This program will not work on machines where `sizeof(int)!=sizeof(void *)`. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1993/leo/README.md b/1993/leo/README.md index 1f5e333b2..af2a707b8 100644 --- a/1993/leo/README.md +++ b/1993/leo/README.md @@ -6,15 +6,13 @@ Moscow Centre of SPARC Technology 89-1-95 Moscow Russia + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with -modern compilers. Thank you Cody! - ## To run: @@ -34,6 +32,7 @@ where: [colors] is the number of possible colors (1 to 15) (default: 6) + ## Judges' remarks: By default, the number of colors is 6. You may specify a @@ -43,6 +42,7 @@ for instructions of how to play. We look forward to more entries from the newer members of the International Internet community. + ## Author's remarks: This program plays @@ -107,6 +107,7 @@ judges-387> ./mind 40 # we have guessed the number ``` + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1993/lmfjyh/README.md b/1993/lmfjyh/README.md index d98b499c9..bc1e7eb3c 100644 --- a/1993/lmfjyh/README.md +++ b/1993/lmfjyh/README.md @@ -3,6 +3,7 @@ Jyrki Holopainen Finland + ## To build: This entry will not compile with gcc < 2.3.3 as it relied on a bug which was @@ -37,10 +38,10 @@ If you have gcc < 2.3.3 (i.e. the entry can compile): ./lmfjyh ``` + ### Alternate code -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate -version which does what the program did with gcc < 2.3.3. To use: +To use: ```sh make alt @@ -49,8 +50,6 @@ make alt Use `lmfjyh.alt` as you would `lmfjyh` above. Note that other code could also be done with this bug; see the author's remarks for more details. -Thank you Cody! - ## Judges' remarks: @@ -196,6 +195,7 @@ tools supporting it. The advantages over the traditional methods are, however, so great that there is no doubt that this method will be new standard. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1993/plummer/README.md b/1993/plummer/README.md index b8c9c4771..6ee035a9d 100644 --- a/1993/plummer/README.md +++ b/1993/plummer/README.md @@ -5,6 +5,7 @@ Mark Plummer Fallston, MD, 21047 US + ## To build: ```sh @@ -25,6 +26,7 @@ where: NOTE: an alternate version exists. See Alternate code section below. + ## Try: ```sh @@ -34,9 +36,7 @@ NOTE: an alternate version exists. See Alternate code section below. ### Alternate code: -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate -version which uses `usleep()` so you can see what is happening with faster -systems. To use: +To use: ```sh @@ -51,19 +51,19 @@ If you wish to change the time to sleep (default `200`) you can do so like: make clobber CDEFINE="-DZ=50" alt ``` + #### Try: ```sh ./plummer.alt xyzzyzzyx 5555 ``` -Thank you Cody! - ### INABIAF - it's not a bug it's a feature :-) This entry will very likely crash or do something else if you run it without enough args. + ## Judges' remarks: For extra credit: What happens when 'number' contains non-numeric @@ -122,6 +122,7 @@ The inspiration for this program came from actual code which dealt with scanning for a unique temporary filename by appending a successively larger number to the end of a string. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1993/rince/README.md b/1993/rince/README.md index 1e91c8620..df6b21999 100644 --- a/1993/rince/README.md +++ b/1993/rince/README.md @@ -13,8 +13,6 @@ England make all ``` -[Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a patch to get this to work -in modern systems. Thank you Yusuke! ## To run: @@ -26,6 +24,7 @@ where: `[cabbage]` is a CABBAGE description file (default: `rince.c`) + ## Judges' remarks: The author has provided several CABBAGE files for your amusement: @@ -210,6 +209,7 @@ There is no 'end of game' checking method. Hence games like Sokoban rely on the user to decide when they have had enough. Also, there is no quit mechanism other than control C. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1993/schnitzi/README.md b/1993/schnitzi/README.md index ba0f07494..fc1d0b0d2 100644 --- a/1993/schnitzi/README.md +++ b/1993/schnitzi/README.md @@ -13,10 +13,6 @@ US make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this use `fgets()` -not `gets()` to make it safer and to prevent an annoying warning with compiling -and/or linking and/or runtime, the latter of which is interspersed with the -output of the program itself. Thank you Cody for your assistance! ## To run: @@ -33,6 +29,7 @@ where This entry will segfault if the file cannot be opened. This is not a bug. + ## Try: ```sh @@ -56,6 +53,7 @@ What is cat ? What is cat? ``` + ## Judges' remarks: After this program prints the contents of 'file', ask it @@ -81,6 +79,7 @@ NOTE: If you have a ' in the question this entry might fail. NOTE: The author may also be contacted at: marks@aldrin.ksc.nasa.gov. + ## Author's remarks: I wanted to write a program that would read in a text file in @@ -126,6 +125,7 @@ question into individual words with a recursive call. The text for the info file, by the way, consists largely of headlines from the Weekly World News. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1993/vanb/README.md b/1993/vanb/README.md index ec7c96480..ab19c27e4 100644 --- a/1993/vanb/README.md +++ b/1993/vanb/README.md @@ -6,17 +6,13 @@ ISX Corporation Marietta, GA 30067 US + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with -clang. The problem was that the third arg to main() was not a `char **`. Instead -`O5()` (which was `main()`) is now its own function which main() calls with the -right parameters. Thank you Cody for your assistance! - ## To run: @@ -38,6 +34,7 @@ hexadecimal and decimal numbers. What happens if you use something other than valid digits? + ## Judges' remarks: The octal expression may contain: @@ -57,6 +54,7 @@ one should surround the expression in single quotes. It is a good thing that this program consists of only one expression, otherwise it might become hard to understand. :-) + ## Author's remarks: The program does no error checking - erroneous expressions will @@ -218,6 +216,7 @@ int octal( int intermediate ) `F` and `C` work similarly. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1994/ldb/README.md b/1994/ldb/README.md index eea52c413..167c47a12 100644 --- a/1994/ldb/README.md +++ b/1994/ldb/README.md @@ -4,26 +4,13 @@ Laurion Burchall US + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so it would -compile and work with modern compilers. The problem was that `srand()` returns -void but it was used in a `||` expression. Thus the comma operator was needed. -Cody also changed the entry to use `fgets()` instead of `gets()` to make it safe -for lines greater than 231 in length and to prevent a warning at linking or at -runtime, the latter of which can be interspersed with output of the program. -Note that this now prints a newline after the output but this seems like a -worthy compromise for making it safer (fixing it is more problematic than it is -worth). In macOS another line of output would be shown anyway namely the warning -that it uses gets(). A subtlety about this fix: if a line is greater than 231 in -length if the program chooses that line it might print the first 231 characters -or it might print (up to) the next 231 characters and so on. Thank you Cody for -your assistance! - ## To run: @@ -44,6 +31,7 @@ printf "The International Obfuscated C Code Contest\n by Laurion Burchall" | ./ldb ``` + ## Judges' remarks: Trigraphs are natural obfuscators. Most C-beautifiers become C-uglifiers @@ -52,11 +40,13 @@ because they don't handle them correctly. Can you figure out how it prints a given random line (or if the line is longer than 231 characters, part of that line) from stdin? + ## Author's remarks: All input lines must be under 232 characters long. The compiling platform should be ASCII based. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1994/schnitzi/README.md b/1994/schnitzi/README.md index ebdb2ca82..c0df8fa5e 100644 --- a/1994/schnitzi/README.md +++ b/1994/schnitzi/README.md @@ -14,12 +14,14 @@ US make all ``` + ## To run: ```sh ./schnitzi < textfile ``` + ## Try: ```sh @@ -27,16 +29,6 @@ make all ./schnitzi < /etc/passwd ``` -NOTE: the buffer size is very small at 100. It's easy to fix the buffer size but -it is not as easy to change it to `fgets()`. [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson) gives some hints in the -[bugs.md](/bugs.md) file on how this entry works which might be useful in order -to get this to use `fgets()` which would prevent a warning at linking or -runtime, the latter of which is interspersed with the output of the program. The -file [schnitzi.alt.c](schnitzi.alt.c) has this to get anyone started, should -they wish to tackle it (Cody might in time). The problem with changing the buffer -size is that even when it works the generated output (see judges' remarks below) -will not be 100% correct duplication of the program. ### Alternate code: @@ -60,6 +52,7 @@ Compare the output of the program with its source. Sure the output is different, but there is more than meets the `diff`'s eye. Can you find out why? + ## Author's remarks: ### SPOILER: @@ -111,6 +104,7 @@ needed to pad it put it over the limit -- it nearly filled a 79 by this other version to anyone interested -- contact me by email at schnitzi@east.isx.com. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1994/shapiro/README.md b/1994/shapiro/README.md index 7a445f164..4eaee76bf 100644 --- a/1994/shapiro/README.md +++ b/1994/shapiro/README.md @@ -6,27 +6,13 @@ Campus Box 216 Boulder, CO 80309-0216 US + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a bug on systems -where `EOF != -1`. The problem is that `getc()` and the related functions do not -return `-1` on EOF or error but rather `EOF`. However `EOF` is not required to be -`-1` but merely an int < 0 and this program assumed that `getc()` will return -`-1` on EOF or error, not `EOF`. On systems where `EOF != -1` it could result in -an infinite loop (for the same reason one should not use `EOF` for the `getopt()` -functions as they return `-1` when all options are parsed (for details on the -definition of `EOF` see `7.21 Input/output` subsection 1 of the -standard)). An interesting problem occurred where changing the `-1` to `EOF` -caused both `warning: illegal character encoding in string literal` and `error: -source file is not valid UTF-8`. But since `EOF` is simply an int < 0 and making -the loop condition check that the return value is >= 0 does not cause a -compilation error and it functions correctly it will address the systems where -`EOF != -1` just as if it checked for `!= EOF`. Thank you Cody for your -assistance! ## To run: @@ -34,6 +20,7 @@ assistance! ./shapiro & ``` + ## Try: ```sh @@ -100,6 +87,7 @@ All of which are harmless (famous last words). This may or may not work on non ASCII systems (I could not find one to test it on.) + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1994/westley/README.md b/1994/westley/README.md index e7070bce9..c37ba054d 100644 --- a/1994/westley/README.md +++ b/1994/westley/README.md @@ -7,6 +7,7 @@ St. Paul, MN 55105 US + ## To build: ```sh @@ -18,12 +19,12 @@ where you get messages as compiler errors. Depending on the compiler line you will get different error messages and one compiler line will make you win the game! + ## To run: There is no running as such. See below. - ## Try: But for something more interesting try compiling it with @@ -37,21 +38,20 @@ cc -Describe -Drain westley.c NOTE: your terminal should be set to 80 columns, 8 character tabs, and wraparound. + ## Judges' remarks: Not all compiler errors are bad. For spoilers see the end of the notes from the author below. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) converted the spoiler -compiler options to be compiler commands and added a script -[spoiler.sh](spoiler.sh) to automate the spoiler commands provided by the author -to make it easier to see the game in action. Thank you Cody! To use: +To use: ```sh ./spoiler.sh ``` + ## Author's remarks: This program, in accordance with the rules, compiles into a legal @@ -132,6 +132,7 @@ Note that the game has no real state information; you can type these commands in any order, at any time. Also note that word order is unimportant. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1995/cdua/README.md b/1995/cdua/README.md index 81ba826fa..c5319cee3 100644 --- a/1995/cdua/README.md +++ b/1995/cdua/README.md @@ -7,18 +7,15 @@ Damaia 2720 Amadora Portugal + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it -would work with macOS. Once it could compile it additionally segfaulted under -macOS which he also fixed. Thank you Cody for your assistance! - NOTE: on modern systems this was hard to see it solve it in real time because it -goes so quickly so Cody added an alternate version which makes it easier with +goes so quickly so an alternate version which makes it easier with modern systems to see the maze actually being solved in real time. We encourage you to use that version but we keep the original here to both preserve the original code (the bug fixes notwithstanding) and it will also let you see just @@ -42,8 +39,9 @@ solving the maze. See [bugs.md](/bugs.md) for more details. This version uses `usleep(3)` with the `Z` (defined in the Makefile, default `3000`) microseconds to make it easier to see the maze being solved in real time. You can redefine Z to reconfigure it in case it's going too slow, too -fast :-) or you're doing some strange experiment like making it 100000 (which -Cody did for fun :-) ). To compile and use without reconfiguring the 3000 +fast :-) or you're doing some strange experiment like making it 100000. + +To compile and use without reconfiguring the 3000 microseconds, try: ```sh @@ -76,6 +74,7 @@ Why? This could be used as the basis of an a-maze-ing screen exerciser. + ## Author's remarks: A program that generates a maze, and then solves it, all this being @@ -83,6 +82,7 @@ seen by the user. Some highlights of obfuscation are: 3 steps functions in one - main(), several recursive calls with conditional actions, and just one (big and ugly) statement to solve the maze. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1995/garry/README.md b/1995/garry/README.md index 20b6aa329..7dc612526 100644 --- a/1995/garry/README.md +++ b/1995/garry/README.md @@ -4,6 +4,7 @@ Garry Glendown Germany + ## To build: ```sh @@ -26,6 +27,7 @@ make all ./garry < README.md ``` + ### Alternate code: While it may not have been the intention of the author, the @@ -33,11 +35,6 @@ judges noted that the C pre-processed version (with the `#include`s left intact) looked very much like a rat "dropping core". See [garry.alt.c](garry.alt.c) and judge for yourself! -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed it -so that it will compile with modern compilers. The problem was a missing `int` for -the `f` variable. He felt it was important that it works because the layout does -indeed look to him like a rat is dropping core. Thank you Cody! - To use try: ```sh @@ -53,6 +50,7 @@ Use `garry.alt` as you would `garry` above. The author was kind enough to provide a less obfuscated version of the source called [garry.fmt.c](garry.fmt.c). + ## Author's remarks: This program is a file filter, designed to do environment-expansion and @@ -91,6 +89,7 @@ $ echo '$TEST$' | ./garry Hello ``` + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1996/august/README.md b/1996/august/README.md index 6185a6e36..9ade1591c 100644 --- a/1996/august/README.md +++ b/1996/august/README.md @@ -10,6 +10,7 @@ Lennart Augustsson make all ``` + ## To run: ```sh @@ -25,15 +26,6 @@ or use gcc. The above should print a `!` followed by a newline. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in -this program that prevented it from working right but he notes it hangs in -macOS. It works fine in linux. This is because macOS has clang, not gcc, even -the gcc binary. He observed that with specific compiler flags it hangs in linux -too and perhaps it's related to this in macOS; maybe other flags are needed but -he doesn't know (at least not yet). He provided a bit more information in -[bugs.md](/bugs.md) for anyone who wants to have a go at providing a fix for -other compilers. As there are a lot of commands to try he also added -[try.sh](try.sh). Thank you Cody for your assistance! ## Try: @@ -94,6 +86,7 @@ We (the judges) recommend that you spend some time studying this entry as it surely will make the 'best of the IOCCC' list. It was very well received by those who attended the IOCCC BOF. + ## Author's remarks: This program is a bytecode interpreter. This fact is not @@ -288,6 +281,7 @@ stars: "*"* Well, that is enough ranting for now. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1996/dalbec/README.md b/1996/dalbec/README.md index 3dbccd6cf..31555c266 100644 --- a/1996/dalbec/README.md +++ b/1996/dalbec/README.md @@ -6,24 +6,13 @@ Canfield, OH 44406 US + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) proposed a fix for this -to compile with clang and Landon implemented it after some discussion. The -reason Cody did not do it is because he thought it was the wrong output but as -it happens the try section below was worded a bit confusingly. He looked at -[Yusuke Endoh's](/winners.html#Yusuke_Endoh) analysis found -[here](https://mame-github-io.translate.goog/ioccc-ja-spoilers/1996/dalbec.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp) -but he missed that Yusuke added a '...' after the result which made him think -the fix was wrong. Cody also made the recommended change of the author to make -it so that each number is printed on a line by itself rather than having a long -string of numbers on the same line. Thank you Cody for your assistance and -thanks to Yusuke for confirming the output is correct! - ## To run: @@ -54,6 +43,7 @@ We (the judges) recommend that you take the time needed to understand how this program works. The source is small enough to make the effort reasonable, and complex enough to make it interesting. + ## Author's remarks: This program assumes that your terminal wraps lines automatically. @@ -89,6 +79,7 @@ where `a==0`. - to recursively call itself in the main loop. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1996/eldby/README.md b/1996/eldby/README.md index 6e6a4b5df..3b6e93a84 100644 --- a/1996/eldby/README.md +++ b/1996/eldby/README.md @@ -6,12 +6,14 @@ Roedtvetvn 20 (Home address) 0955 Oslo Norway + ## To build: ```sh make all ``` + ## To run: ```sh @@ -29,11 +31,7 @@ NOTE: to reset the sanity of your terminal after this program ends try `reset`. ### Alternate code: -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) provided an alternate -version which uses `usleep()` in between writing the output for those who are -sensitive to text flashing by rapidly (it affects him too but he also thinks it -moves too fast nowadays anyway). The default sleep duration is `35000` but you can -change it at compilation like: +The default sleep duration is `35000` but you can change it at compilation like: ```sh make CFLAGS+="-DZ=20000" clobber alt @@ -41,19 +39,20 @@ make CFLAGS+="-DZ=20000" clobber alt Use `eldby.alt` as you would `eldby`. -Thank you Cody! ## Judges' remarks: We were impressed by the author's ability to render spheres in 3D in a very small chunk of code. + ## Author's remarks: This program shows flying spheres. The program eats CPU on lesser equipped systems. The program will run until termination. Terminal must be vt100 or better with 80 columns and 24 rows or more. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1996/gandalf/README.md b/1996/gandalf/README.md index b15466577..865426cdf 100644 --- a/1996/gandalf/README.md +++ b/1996/gandalf/README.md @@ -8,16 +8,13 @@ Surrey GU1 4AP England + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile -and work with modern systems. As he loved the references in the code that could -not compile he just commented out as little as possible to get this to compile. -Thank you Cody for your assistance! ## To run: @@ -44,6 +41,7 @@ Care to guess why these execute differently? Only the compiler knows ... ok maybe other things like the author, the judges and maybe you too? + ## Judges' remarks: For misleading C pre-processor output, try: @@ -52,10 +50,12 @@ For misleading C pre-processor output, try: cc -E gandalf.c ``` + ## Author's remarks: The program requires an ASCII system. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1996/westley/README.md b/1996/westley/README.md index e179b41cf..16f841089 100644 --- a/1996/westley/README.md +++ b/1996/westley/README.md @@ -6,6 +6,7 @@ St. Paul, MN 55105 US + ## To build: ```sh @@ -13,19 +14,6 @@ make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in -this entry as well as it displaying environmental variables. Although the -scripts showed correct output, it somewhat lessened the usability because they -segfaulted and showed (an) environmental variable, interspersed with the output -of the program. With the fix they no longer have this problem. If `argc < 5` -(`argv[4]` is referenced) it will not do anything and it will not segfault -either - this was caused by the body of the for() loop which is now empty (it -doesn't appear to be needed at all at least modernly). Note that you should -check the [westley.alt.c](westley.alt.c) file when reading the author's -comments. To see how to use the original see below. Thank you Cody for your -assistance! - - ## To run: ```sh @@ -75,6 +63,7 @@ We are amazed at how much is being done with only one relatively short line. We think you will as well if you take the time to understand it. + ## Author's remarks: This 1-line program allows various analog ASCII clocks to print out the time; @@ -129,6 +118,7 @@ Note that the hands move in a quantum fashion; 3:59 looks deceptively like 2:59, since the hour hand will be at the 3 position. It won't move until both hands click over at 4:00. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1998/chaos/README.md b/1998/chaos/README.md index 895b27456..e05a68be1 100644 --- a/1998/chaos/README.md +++ b/1998/chaos/README.md @@ -22,9 +22,6 @@ Or you can build this entry without the `halfdelay()` call by: make chaos_nohalf ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added a call to -`endwin()` to restore terminal sanity (echo etc.) when exiting the program. -Thank you Cody for your assistance! ## To run: @@ -33,6 +30,7 @@ Thank you Cody for your assistance! ./chaos ``` + ## Judge's Comments: This is the author's first IOCCC entry. We thought the entry was @@ -86,6 +84,7 @@ in front, some reflected from the rear) looks really odd. And it sometimes hangs. So just don't fly through objects. You'll be happier. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1998/schnitzi/README.md b/1998/schnitzi/README.md index 8ecc3085e..8bf04f9b3 100644 --- a/1998/schnitzi/README.md +++ b/1998/schnitzi/README.md @@ -7,12 +7,14 @@ Atlanta, GA 30309 US + ## To build: ```sh make all ``` + ## To run: ```sh @@ -20,6 +22,7 @@ make all make sort ``` + ## Try: ```sh @@ -33,12 +36,6 @@ echo 324 >> data ./sort < data ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed invalid data -types which prevented this entry from working, causing a segfault. This showed -itself in two parts which required two fixes, one for linux and further changes -for macOS. He also fixed a segfault (after printing garbage) when the arg -specified evaluated to 0. Thank you Cody for your assistance! - ### INABIAF - it's not a bug it's a feature :-) NOTE: the larger the number given to the program the longer the output becomes @@ -49,7 +46,7 @@ lines! ## Judges' remarks: This is a beautiful program. How can a program with no conditional (except for -the fixes for modern systems made by Cody) behavior at all have output which +the fixes for modern systems) behavior at all have output which depends on anything? For hints on deciphering this, see below past the Author's Comments; @@ -122,6 +119,7 @@ other functions all the time. Or, almost all the time. So how does `h` get set, and what to? + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/1998/schweikh1/README.md b/1998/schweikh1/README.md index 2f20085e1..e74cbefbc 100644 --- a/1998/schweikh1/README.md +++ b/1998/schweikh1/README.md @@ -7,27 +7,13 @@ D-71384 Weinstadt Germany + ## To build: ```sh make all ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern -systems (it did not work at all). He also made it so that if a file fails to -open it does not return but rather skips the reading of the file. Doing this -lets the entry work right. - -What was wrong? The call to `freopen()` was incorrect with the second arg (the -mode) being instead `5+__FILE__`. It now is `"r"`. There was also a call to -`fopen()` that was wrong where the mode was instead `44+__FILE__`. Interestingly -enough though this did not seem to be an issue though I cannot explain why. He -notes that it works fine with `clang` as well as `gcc` (which is what is used -but in macOS - see below for alternate code - `gcc` is clang). - -Additionally Cody provided an alternate version for macOS. See below for the -alternate version. Thank you Cody for your assistance! - ## To run: @@ -37,14 +23,13 @@ alternate version. Thank you Cody for your assistance! ### Alternate code: -As noted above [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made an -alternate version that works with macOS but there are some important notes as +As noted above the alternate version works with macOS but there are some important notes as well as a description of how it works (spoilers for the original version as well). -Cody said that at least with his MacBook Pro Max with the M1 chip some header -files report an unsupported architecture and unsupported compiler (error, -warning). However the defines are still found okay. +An MacBook Pro Max with the M1 chip some header files report an +unsupported architecture and unsupported compiler (error, warning). +However the defines are still found okay. For this alternate version you will need the command line tools which you can install like: @@ -103,6 +88,7 @@ gcc invocation anyway. Anyone who uses egcs and has no plain gcc will need to frob the source anyway and can be expected to do the right thing with `${CC}`. So use gcc. + ## Author's remarks Important! This program, if it compiles at all, is mis-compiled by many @@ -303,6 +289,7 @@ does what it should. From the goals: "To stress C compilers with unusual code." That describes exactly my modest attempts... + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2000/anderson/README.md b/2000/anderson/README.md index 1c2c3ee97..98023d8e3 100644 --- a/2000/anderson/README.md +++ b/2000/anderson/README.md @@ -6,16 +6,13 @@ Desa Bojong Cikupa, Tangerang, 15710 Indonesia + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed this entry to -use `fgets()` instead of `gets()` to make it safer and to prevent annoying -warnings from showing up at linking or runtime. Thank you Cody! - ## To run: @@ -23,12 +20,14 @@ warnings from showing up at linking or runtime. Thank you Cody! echo something | ./anderson ``` + ## Try: ```sh echo Obfuscate | ./anderson ``` + ## Judges' remarks: This small program might be a nice addition to a digital personal @@ -40,6 +39,7 @@ very cleverly obscured without the use of a single `#define`! Reformatting this program by hand :-) is the easiest way to understand what is going on. + ## Author's remarks: This program is a simple filter that translates ASCII text into @@ -91,6 +91,7 @@ This program is a great teaching tool for learning the semaphore code; and if you don't have any flags handy you can just use two copies of the source file. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2000/briddlebane/README.md b/2000/briddlebane/README.md index 7c9586702..2f5786021 100644 --- a/2000/briddlebane/README.md +++ b/2000/briddlebane/README.md @@ -4,14 +4,13 @@ Moxen N. Briddlebane Lord Zarbon + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile -in systems that require one to explicitly link in `libm`. Thank you Cody! ## To run: @@ -42,6 +41,7 @@ inclusive!). Without this it results in an error in the encoding of the way it assigns variables to memory) it will terminate "decrepit" with the character `'\200'` (the last value of `F`) instead of `'\0'`. + ## Author's remarks: This program was broadcast from deep within the Zarbonic Cluster @@ -62,6 +62,7 @@ it is necessary to resort to trigonometric functions to handle it. One of the real mysteries involves the numbers `114` and `2`, which are, according to Lord Zarbon, very deliberate. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2000/dlowe/README.md b/2000/dlowe/README.md index 2f39ef7b8..eb103e707 100644 --- a/2000/dlowe/README.md +++ b/2000/dlowe/README.md @@ -4,6 +4,7 @@ David Lowe US + ## To build: ```sh @@ -16,11 +17,6 @@ The following bit of perl may help determining the values you need: perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"' ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile -with more recent perl versions; the symbol now `PL_na` was once `na`. He notes -that this entry crashes under macOS but it works under linux after this change. -Thank you Cody for your assistance! - ## To run: @@ -34,6 +30,7 @@ Thank you Cody for your assistance! echo "13 14 15 16 17 + - * / p" | ./dlowe ``` + ## Judges' remarks: When this entry was submitted the rules of the IOCCC did not prohibit @@ -49,6 +46,7 @@ The judges' remarks contain a clue to the hidden command :-). * The IOCCC uses an anonymous judging process which keeps the identity of the submitters hidden until all the prize winners have been selected. + ## Author's remarks: ### Usage @@ -277,6 +275,7 @@ Also, Perl 5 is bundled with the following OS distributions: AIX 4.3.3+, FreeBSD 3.0+, IRIX 6.4+, every Linux distribution, NetBSD, OpenBSD, and DEC Tru64 5.0+, again according to the Perl people. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2000/jarijyrki/README.md b/2000/jarijyrki/README.md index 9c5a7b3d9..cc496a0fd 100644 --- a/2000/jarijyrki/README.md +++ b/2000/jarijyrki/README.md @@ -12,6 +12,7 @@ Forsellesintie 1-3A10 Finland + ## To build: ```sh @@ -20,10 +21,6 @@ make You will need X11 header files and libraries installed to build this program. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made it easier to -compile this by adding `X11/` to the includes of `Xlib.h` and `keysym.h`. Thank -you Cody! - ## To run: @@ -33,6 +30,7 @@ you Cody! You will need a system capable of displaying the results of X Window programs. + ## Try: ```sh @@ -63,6 +61,8 @@ And observe that it matches what you had in the previous run! NOTE: changing the dimension parameters (see the authors' comments) renders existing spreadsheet files unusable. + + ## Judges' remarks: This entry is one of those that makes you wonder why some commercial software @@ -70,6 +70,7 @@ needs tens to hundreds of megabytesgigabytes to install! This entry does not simply do the basics, it includes graphing features. All this program needs now is a flight simulator! + ## Author's remarks: ### 1. OVERVIEW @@ -462,6 +463,7 @@ to a new name by exchanging it on the command line and in the program with another character. Note that there are *no* free characters in the program currently. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2000/natori/README.md b/2000/natori/README.md index ca67af85f..e488a25af 100644 --- a/2000/natori/README.md +++ b/2000/natori/README.md @@ -6,16 +6,13 @@ Rigakubu 7-goukan 311 Hongou 7-3-1, Bunkyou-ku, Tokyo Japan + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern -compilers. Depending on the compiler it would either segfault when run or not -compile at all (gcc and clang respectively). Thank you Cody for your assistance! - ## To run: @@ -23,19 +20,20 @@ compile at all (gcc and clang respectively). Thank you Cody for your assistance! ./natori ``` + ## Try: ```sh echo "Do or do not. There is no try." ``` + ### Alternate code: The author noted that those in the southern hemisphere might want to change -`acos(l/2)` into `acos(-l/2)`. Cody went ahead and made an alt version to do -this. +`acos(l/2)` into `acos(-l/2)`. -To run: +To run the alternate code that supports the southern hemisphere: ```sh make alt @@ -43,6 +41,7 @@ make alt Use `natori.alt` as you would `natori`. + ## Judges' remarks: Here is a nice compact program that changes with the phase of the moon. @@ -54,6 +53,7 @@ own non-traditional prototype for main(). We have had uglify this program in order to try and prevent C compilers form failing to compile due to the unusual arg types of the main() function. + ## Author's remarks: This program outputs a rough image of the moon in its current phase. @@ -63,6 +63,7 @@ The main obfuscation of this entry is its complicated double recursion People living in the southern hemisphere may want to change `acos(l/2)` into `acos(-l/2)`. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2000/thadgavin/README.md b/2000/thadgavin/README.md index 82f7dda1f..d3360ffc3 100644 --- a/2000/thadgavin/README.md +++ b/2000/thadgavin/README.md @@ -12,6 +12,7 @@ Creature Labs Cambridge UK, CB4 1DE + ## To build: ```sh @@ -21,10 +22,7 @@ make NOTE: the author suggested `-O6` but at least some gcc versions support no more than level 3 which is what the Makefile has. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed the code and -added an appropriate make rule so that the SDL version works independent from -the curses version (using the same code). To use it: - +To use the SDL version works independentlt from the cueses version: ```sh make thadgavin_sdl @@ -32,11 +30,6 @@ make thadgavin_sdl Use `thadgavin_sdl` as you would `thadgavin` below. -Thank you Cody for your assistance! - -To see the craziness of the SDL fix (because of a design choice of the SDL1 -developers) see the log for commit dd0b26b5d6325e8b6fdef1232156c8bb8c66613f. Be -prepared for a surprise. ## To run: @@ -58,6 +51,7 @@ screen. echo "Do or do not. There is no try." ``` + ## Judges' remarks: This entry is a nice play by the rules. It can use curses, if the @@ -65,6 +59,7 @@ SDL graphic library is not present, and is quite good at that, but the colors used in graphic mode (16 bit depth) are unfortunately less than dazzling. We could not test this entry in DOS mode. + ## Authors' remarks: ### To run under DOS: @@ -109,6 +104,7 @@ At least 3 minutes taken 3 times a day when tired. Do not exceed 3 times recommended dose. May cause sickness, dizziness, nausea. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/anonymous/README.md b/2001/anonymous/README.md index fa43c2908..1add8ac17 100644 --- a/2001/anonymous/README.md +++ b/2001/anonymous/README.md @@ -3,75 +3,21 @@ The author wishes to remain anonymous Great Britain + ## To build: ```sh make ``` + ## To run: ```sh ./anonymous x86_program ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed both the -supplementary program and the program itself (both of which segfaulted and once -that was fixed only the binary was modified; it was not run but according to the -author's remarks it should be executed). He managed to do this with linux -but it will not work with macOS (see [bugs.md](/bugs.md) for why this is); _this -is not a bug, it's a feature_ inherent in what it does! - -The following had to be done in order to get this to work: - -- `#include ` for `mmap()` and `munmap()`. -- have `main()` call another function which is no longer a recursive function; -this prevented `main()` from entering an infinite recursive loop. - -Without either of these it would crash and prevent modification of the 32-bit -[ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) (not elf :-) ) -binary. But again see [bugs.md](/bugs.md) here. - -The following change was also made to be more portable, in case the constants -`PROT_READ` and/or `PROT_WRITE` are not standardised: - -Change `3` in the call to `mmap()` to be `PROT_READ|PROT_WRITE`: just in case -`PROT_READ|PROT_WRITE` does not equal 3 (though it seems to be equal in both -macOS and linux). - -There was one other thing that had to be done though. Since the program used to -recursively call (infinite recursion, seemingly) `main()` and since that cannot -be done what had to be done instead is after the new function (`pain()` since it -was a pain to fix :-) ) returns to first call `munmap()` and `close()` (else one -would get text file busy error) and then the program can call `execv()` again -like the function `pain()` (was in `main()`) did but with a slight change. See -commit `2159caec4677e0f25ad704a74e04c8196fd6c343` for more details. - -Notice that the location of the calls to `munmap()` and `close()` followed by -`execv()` _does matter_! - -NOTE: there might be educational value to see the progress of this fix; if you -wish to see, try: - -```sh -git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..93aa8d79f208dcccc3c5a2370a727b5cf64e9c53 anonymous.c -git diff 93aa8d79f208dcccc3c5a2370a727b5cf64e9c53..c48629017117379a52b1a512ef8f2593ca9569c8 anonymous.c -git diff c48629017117379a52b1a512ef8f2593ca9569c8..efdee208a2bc650256637b9357ddfd0de82d2f41 anonymous.c -git diff efdee208a2bc650256637b9357ddfd0de82d2f41..e9a3f77ea3b209e63ac3f9c06bb84ad86e5ea706 anonymous.c -git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..2159caec4677e0f25ad704a74e04c8196fd6c343 anonymous.c -git diff 2159caec4677e0f25ad704a74e04c8196fd6c343..4bc03de321612869aebf855850c6500df95cb6ef anonymous.c -``` - -Finally to see from start to finish: - -```sh -git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..4bc03de321612869aebf855850c6500df95cb6ef anonymous.c -``` - -Cody also added a [program](anonymous.bed.c) like [anonymous.ten.c](anonymous.ten.c) -[Ten Green Bottles](https://en.wikipedia.org/wiki/Ten_Green_Bottles) but which -sings [Ten in the Bed](https://allnurseryrhymes.com/ten-in-the-bed/). Why? For -fun and so that there's another program that is a bit different (it uses a `char +For fun and so that there's another program that is a bit different (it uses a `char *[]` array for example) that this program will still work on. To use: ```sh @@ -82,7 +28,6 @@ make anonymous.bed.64 # if unable to use -m32 ./anonymous.bed.64 ``` -Thank you Cody for your assistance! ## Try: @@ -102,6 +47,7 @@ program successfully after it without recompiling? NOTE: if the 32-bit version cannot be compiled the script will at least run the alternate version of the [anonymous.ten](anonymous.ten.c) program. + ## Judges' remarks: Is emulation the sincerest form of flattery? This small program does @@ -121,9 +67,9 @@ the program will fail to execute it and might not even touch it. ### WARNING on note from the author The author suggested that this will somewhat destroy the binaries this touches -but Cody did not observe this. It does indeed modify the files as the script +but others did not observe this. It does indeed modify the files as the script below will show you (though not all files are modified: can you figure out why -that is?) but Cody did not notice any problems in using them. Perhaps it's +that is?) but others did not notice any problems in using them. Perhaps it's something he's not aware of possibly including the fact that the modification might or might not be complete. If you follow the try commands below you will notice that although the binaries do differ it's not many differences and the @@ -262,6 +208,7 @@ just C programs that generate C code as their output. Enjoy and thanks! + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/bellard/README.md b/2001/bellard/README.md index 407ba683a..7203ae8ce 100644 --- a/2001/bellard/README.md +++ b/2001/bellard/README.md @@ -6,49 +6,20 @@ Fabrice Bellard France + ## To build: ```sh make ``` + ## To run: ```sh ./bellard file ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) partially fixed this -but he notes that this will not work without (according to the author) i386 -linux or else some skill in resolving the portability issues. As it is it -segfaults in 64-bit linux (and as expected macOS). He fixed an earlier segfault -so that at least the file can be opened (but perhaps that will be wrong in i386 -linux?) and he also changed some of the macro used to what they evaluate to but -mostly he kept it the same. - -Cody also fixed [bellard.otccex.c](bellard.otccex.c) so it does not segfault and -seemingly works okay (it did not work at all). The main problem was that some -ints were being used as pointers. Also the Fibonacci sequence (`fib()`) will -overflow at `n > 48` so this is checked prior to running the function. Either -way unfortunately this entry seems to not work in 64-bit linux or macOS. See -below portability notes. Thank you Cody for your assistance! - - -### Portability notes: - -With a tip from [Yusuke Endoh](/winners.html#Yusuke_Endoh) we rediscovered the -author's [web page for this program](https://bellard.org/otcc/) where it is -stated that this will only work in i386 linux. The author also stated in the -remarks in this document that they used [gcc -2.95.2](https://ftp.gnu.org/gnu/gcc/gcc-2.95.2/gcc-everything-2.95.2.tar.gz) but -we don't know if that's relevant or not. - -Yusuke offered a modification which is not needed with gcc but with some -versions of `clang` it is. With `gcc` we can get away with `-rdynamic -fno-pie --Wl,-z,execstack` which solves the problem of execution in memory but any -compiler that does not support this would not work. Thus we use the modification -by Yusuke. Thank you Yusuke! - ## Try: @@ -56,10 +27,12 @@ by Yusuke. Thank you Yusuke! ./bellard bellard.otccex.c ``` + ## Judges' remarks: `` :-) + ## Author's remarks: `OTCC` is an Obfuscated Tiny C Compiler for i386-linux. It generates @@ -183,6 +156,7 @@ and some functions are used before being defined. `OTCC` uses the dynamic linker to resolve symbols with `dlsym()`, so `-ldl` must be used when you compile and link it. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/cheong/README.md b/2001/cheong/README.md index f21626ebe..cf3b6430b 100644 --- a/2001/cheong/README.md +++ b/2001/cheong/README.md @@ -4,19 +4,13 @@ Raymond Cheong US + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with -clang by adding another function that is allowed to have a third arg as an int, -not a `char **`. He chose pain() because it's a four letter word that would -match the format and because it's pain that clang forces this. :-) This fix -makes a point of the author's notes on portability no longer valid, btw. Thank -you Cody for your assistance! - ## To run: @@ -37,6 +31,7 @@ This program will very likely crash or do something different without an arg. ./cheong 05305265226926441255040573044986873789 ``` + ## Judges' remarks: Be sure to give an even number of digits in the argument. Add a @@ -45,6 +40,7 @@ leading 0 if needed. The source code is nice, compact, and self documenting as all good programs should be! :-) + ## Author's remarks: ### Operation @@ -109,6 +105,7 @@ with fixed-width font) Thanks goes out to Bobby Rohde for numerous suggestions on how to shorten the program. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/coupard/README.md b/2001/coupard/README.md index a113e753c..e23d5f42e 100644 --- a/2001/coupard/README.md +++ b/2001/coupard/README.md @@ -7,18 +7,21 @@ ATTN : Pierre-Philippe Coupard Lindon, UT 84042 US + ## To build: ```sh make ``` + ## To run: ```sh ./coupard ``` + ## Try: ```sh @@ -35,8 +38,6 @@ something like: ./coupard | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio ``` -Thanks go to [Yusuke Endoh](/winners.html#Yusuke_Endoh) for providing a proper -command line (see [/2013/endoh3/README.md](2013/endoh3/README.md). ## Judges' remarks: @@ -44,6 +45,7 @@ You may need to run this a few times to understand exactly what is being said. You might even need to look somewhere on your desktop, your arm or the wall for confirmation. + ## Author's remarks: Past years' IOCCC entries do many marvellous things in small packages, @@ -159,6 +161,7 @@ When linting the program with `lclint`, it complains about a huge list of things that, if corrected to make lint happy, would probably double the size of the source code. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/ctk/README.md b/2001/ctk/README.md index 6cead0621..de5b290cc 100644 --- a/2001/ctk/README.md +++ b/2001/ctk/README.md @@ -5,22 +5,20 @@ Chris King Foster, RI, 02825 US + ## To build: ```sh make ``` + ## To run: ```sh ./ctk ``` -The ANSI escape codes were no longer valid but [Yusuke -Endoh](/winners.html#Yusuke_Endoh) provided a patch to fix the ANSI escape -codes. This works with macOS as well. Thank you Yusuke! - ## Try: @@ -31,6 +29,7 @@ echo "Do or do not. There is no try." Make sure to hit `q` to exit or else your terminal will be messed up (to restore it you can try `stty sane` or `reset`). + ## Judges' remarks: No matter how careful you are, this guy eventually crashes. Most people @@ -38,6 +37,7 @@ can make at least one successful road trip without crashing. This is, of course, another of the retro games. + ## Author's remarks: This is a game based on an Apple ][ Print Shop Companion [Easter @@ -57,6 +57,7 @@ vertically!). [1]: https://en.wikipedia.org/wiki/Easter_egg_(media)#In_computing + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/dgbeards/README.md b/2001/dgbeards/README.md index 68c964983..aceb0b5fc 100644 --- a/2001/dgbeards/README.md +++ b/2001/dgbeards/README.md @@ -6,25 +6,27 @@ Southern Adventist University Cleveland, TN 37312 US + ## To build: ```sh make ``` + ## To run: ```sh ./dgbeards ``` + ### Alternate code: The author provided a way to speed it up a bit and also how to make it so it -doesn't crash on losing. [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson) made this alternate version with -the former change (the idea of crashing when losing is too good to fix in his -opinion). To compile: +doesn't crash on losing. + +To compile: ```sh make alt @@ -33,16 +35,17 @@ make alt Use `dgbeards.alt` as you would `dgbeards` above. Can you find a flaw in this version that the author did not note? - ## INABIAF - it's not a bug it's a feature! :-) This game crashes if it loses. + ## Try: See if you can figure out how to make the computer always lose. It's a very simple thing to do. Read the author's remarks for clues. + ## Judges' remarks: This is probably the worst AI we've ever seen. So, then, why did @@ -57,6 +60,7 @@ I appreciate the realism. BTW: if your goal is to lose and you do does that mean you win? :-) What does winning mean in a game you're supposed to lose at? + ## Author's remarks: ### FAQ @@ -244,6 +248,7 @@ This bug can be fixed in a number of ways, but there is a way that adds only one byte to the source code. In the statement `s=(e=-V(n-1,o))>s?Y=G,e:s;` change the `>` to a `>=` and the bug will be gone. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/herrmann2/README.md b/2001/herrmann2/README.md index 8134d45c7..e7f60f0c6 100644 --- a/2001/herrmann2/README.md +++ b/2001/herrmann2/README.md @@ -4,22 +4,13 @@ Immanuel Herrmann Germany + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with -both 64-bit and 32-bit compiles by changing most of the `int`s (all but that in -`main`) to `long`s. He also fixed it to compile with clang by changing the args -of main to be `int` and `char **` respectively and changing specific references -to the `argv` arg, casting to `long` (was `int` but the 64-bit fix requires -`long`) which was its old type. The original file, used for demonstration -purposes, as well as if you want to see if your system works with the original -code (in which case see below Alternate code section), is in -[herrmann2.alt.c](herrmann2.alt.c). Thank you Cody for your assistance! - ## To run: @@ -93,6 +84,7 @@ make alt Use `herrmann2.alt` as you would `herrmann2` above. + ## Judges' remarks: Be careful when staring at the source code - your eyes might cross, but @@ -264,6 +256,7 @@ the include files has to be provided. In the build script, I assume that the path is `/usr/include`, but this can easily be adapted. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/kev/README.md b/2001/kev/README.md index 6ebb48f2d..19f00b1bd 100644 --- a/2001/kev/README.md +++ b/2001/kev/README.md @@ -5,12 +5,14 @@ Australia

Mastodon: + ## To build: ```sh make ``` + ## To run: ```sh @@ -21,10 +23,8 @@ make NOTE: each player's paddle is at the bottom and the opponent at the top. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) slowed down the ball -just a tad as it went too fast for the speed at which the paddles move even when -holding down the movement keys. If you need to change the speed you can -reconfigure it like (say for over a network and not the same host): +If you need to change the speed you can reconfigure it like (say +for over a network and not the same host): ```sh make clobber SPEED=50 all # default value which is very fast @@ -33,6 +33,7 @@ make clobber SPEED=50 all # default value which is very fast There is an alternate version which lets you use the arrow keys to control your paddle. See below Alternate code. + ## Try: ```sh @@ -40,11 +41,10 @@ paddle. See below Alternate code. ./kev localhost ``` + ### Alternate code: -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) provided an alternate -version which lets you use the arrow keys on your keyboard instead of the more -awkward ',' and '.'. To use: +To use: ```sh make alt @@ -55,7 +55,6 @@ Use `kev.alt` as you would `kev`. What happens if you use both, one in one terminal and the other in another terminal? -Thank you Cody! ## Judges' remarks: @@ -67,6 +66,7 @@ How many games come out at $50 and still require you to wait for a patch to come out before you can play multiplayer? This one works out of the box. + ## Author's remarks: @@ -214,6 +214,7 @@ architectures need to have the same character systems (i.e. don't try mixing ASCII and EBCDIC). It is independent of endianness though. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2001/westley/README.md b/2001/westley/README.md index 140a5a51b..26794a615 100644 --- a/2001/westley/README.md +++ b/2001/westley/README.md @@ -4,30 +4,28 @@ Brian Westley US + ## To build: ```sh make ``` + ## To run: ```sh ./westley ``` -## Try: -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added the script -[westley.sh](westley.sh) to automate a heap of commands that we, the IOCCC -judges, suggested, as well as some additional ones that he thought would be fun. -These include the below sort and punch card versions that he added, described -below, based on the author's remarks. Thank you Cody! +## Try: ```sh ./westley.sh ``` + ### Alternate code: An alternate version of this entry, [westley.alt.c](westley.alt.c), is provided. @@ -51,8 +49,8 @@ Use `westley.sort` as you would `westley` above. ### Punch card code: The author also stated that if you just sort the code you'll get the with -`sort`) version that just prints out the punch card. Cody put this in -[westley.punch.c](westley.punch.c) specifically so that Westley can punch +`sort`) version that just prints out the punch card. The +[westley.punch.c](westley.punch.c) code specifically so that Westley can punch everyone in the face! :-) This is also compiled by default. To use, try: @@ -61,6 +59,7 @@ To use, try: echo 'Brian Westley does it again!' | ./westley.punch 2>/dev/null ``` + ## Judges' remarks: Try copying the source to a new file and changing around the @@ -76,6 +75,7 @@ We find it amazing that with just 28 lines of code (not counting comments and blank lines) there are `28!` or ``304,888,344,611,713,860,501,504,000,000`` versions of the program, all valid C! + ## Author's remarks: [Punch cards](https://en.wikipedia.org/wiki/Punched_card), or Hollerith cards, @@ -206,6 +206,7 @@ all legal C. \*\* all cards must be face down, nine-edge first, of course. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2004/arachnid/README.md b/2004/arachnid/README.md index 80e224522..e58e5ef61 100644 --- a/2004/arachnid/README.md +++ b/2004/arachnid/README.md @@ -4,18 +4,21 @@ Nick Johnson New Zealand + ## To build: ```sh make ``` + ## To run: ```sh ./arachnid [mazefile] ``` + ## Try: ```sh @@ -32,12 +35,10 @@ Navigation is through the use of the `wasd` inverted-T formation on QWERTY keyboards. Rogue players, vi users, and Dvorak typists are invited to get lost (or use the alt version)! + ### Alternate code -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate -version which allows those like himself used to `h`, `j`, `k` and `l` movement -keys to not get lost. Non rogue players, vi users and Dvorak typists are invited -to get lost (or use the original version)! To use: +To use: ```sh make alt @@ -45,8 +46,6 @@ make alt Use `arachnid.alt` as you would `arachnid` above. -Thank you Cody! - ## Judges' remarks: @@ -82,6 +81,7 @@ explorers out there. You can explore the maze using the `w`,`a`,`s`, and `d` keys. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2004/burley/README.md b/2004/burley/README.md index c34917e50..10cd44930 100644 --- a/2004/burley/README.md +++ b/2004/burley/README.md @@ -3,19 +3,13 @@ Brent Burley US + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile with -clang which requires that the first arg of main() be an int and the remaining -args to be a `char **`. He notes that he could not get the entry to work with -gcc before the fix and it does not work with clang either; see -[/bugs.md](/bugs.md) for information here. Thank you Cody for your assistance! - - ## To run: @@ -33,6 +27,7 @@ information on how to play. echo "Do or do not. There is no try." ``` + ## Judges' remarks: This is a [draw poker](https://en.wikipedia.org/wiki/Draw_poker) program. You @@ -75,6 +70,7 @@ the program so this "strategy" no longer works? Notice the clever use of `setjmp()` and `longjmp()` calls. Can you keep track of what state is being saved and restored? + ## Author's remarks: This program plays draw poker. What is unusual about it is that it @@ -83,6 +79,7 @@ are really three statements if you count the variable declarations.) To keep things simple, I have avoided the C preprocessor and tricky statements such as `if`, `for`, `do`, `while`, `switch`, and `goto`. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2004/gavin/README.md b/2004/gavin/README.md index 72833968e..1127ed64d 100644 --- a/2004/gavin/README.md +++ b/2004/gavin/README.md @@ -10,12 +10,14 @@ UK make ``` + ## To run: ```sh ./gavin ``` + ## Try: To enjoy the results (on a Linux/x86 machine): @@ -62,18 +64,6 @@ vi README.md Press and hold any key. -### Alternate method: - -[Yusuke Endoh](/winners.html#Yusuke_Endoh) provided the `kernel` and `fs.tar` -files which can be used if you cannot normally use this entry. Instead of -generating the files just use the files provided, found under the [img/](img/) -directory. Note that the `img/fs.tar` extracts into `fs/` so you will have to -fix the tarball; this is done this way to prevent extraction from the entry -directory overwriting the files and causing `make clobber` to wipe some of them -out. - -Thank you Yusuke! - ## Judges' remarks: @@ -103,6 +93,7 @@ What you can do and what you cannot do in such programs? The program called `prim`, written by the judges, computes and prints prime numbers. + ## Author's remarks: This is a 32-bit multitasking operating system for x86 computers, @@ -174,6 +165,7 @@ at which a Linux bootloader loads an x86 kernel image). \* ;-) + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2004/kopczynski/README.md b/2004/kopczynski/README.md index 0d0078c50..853754211 100644 --- a/2004/kopczynski/README.md +++ b/2004/kopczynski/README.md @@ -4,22 +4,20 @@ Eryk Kopczynski Poland + ## To build: ```sh make ``` + ## To run: ```sh ./kopczynski < input_file ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) reported that this -entry cannot be optimised by the compiler if it's to work. He also added the -file [kopczynski-a](kopczynski-a) to demonstrate what happens when art more like -a letter is fed to the program. Thank you Cody! ## Try: @@ -43,6 +41,7 @@ What happens? What happens if you feed the program source to the program? Can you figure out why? + ### Alternate code The judges modified the program to print its result. The original @@ -59,6 +58,7 @@ Then try: echo $? ``` + ## Judges' remarks: What is in a line? A lot when you obfuscate the way Eryk Kopczynski @@ -84,6 +84,7 @@ Here is a related puzzle: how to continue the sequence: With certain arguments, you can alter the exit value / output. Can you figure out how and why? + ## Author's remarks: The program proves it is not as hard to recognize numbers. The current @@ -196,6 +197,7 @@ figuring how arguments can be used to alter the exit value. 10. Finally, the program tries to be as concise as possible. Some obfuscation comes from this. For additional obfuscation and conciseness, `if` means `while`. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2004/newbern/README.md b/2004/newbern/README.md index decab0d3e..17990b31f 100644 --- a/2004/newbern/README.md +++ b/2004/newbern/README.md @@ -3,18 +3,13 @@ Jeff Newbern US + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) and Landon individually -fixed this to work with clang. Cody then turned the second arg to main, which -clang requires to be a `char **`, to be not the same name as a function defined -earlier in the code and to use that variable which `main()` used. Thank you Cody -for your assistance! - ## To run: @@ -22,6 +17,7 @@ for your assistance! ./newbern [file.dat arg] ``` + ## Try: ```sh @@ -29,11 +25,13 @@ for your assistance! echo SOS | ./newbern ``` + ## Judges' remarks: The program is formatted using the same font glyphs as the example data file. + ## Author's remarks: This is a configurable banner-like program. @@ -62,6 +60,7 @@ The program assumes an ASCII operating environment. The program is best viewed with tab-stops set to 8. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2005/aidan/README.md b/2005/aidan/README.md index e1d8a9c84..cc90cbea9 100644 --- a/2005/aidan/README.md +++ b/2005/aidan/README.md @@ -4,12 +4,14 @@ Aidan Thornton United Kingdom + ## To build: ```sh make ``` + ## To run: ```sh @@ -20,10 +22,6 @@ make where `seed` is a number. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed the test script, -described by the author in their remarks, to refer to the proper compiled -program (it's hardcoded) which was never done which broke the script. Thank you -Cody! ## Try: @@ -33,6 +31,7 @@ Cody! ./aidan 42 ``` + ## Judges' remarks: Are you puzzled about puzzles? This entry might puzzle you @@ -311,6 +310,7 @@ that way somehow... So basically, just what you'd normally expect in an IOCCC entry. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2005/anon/README.md b/2005/anon/README.md index a6148ce13..9bf2f5687 100644 --- a/2005/anon/README.md +++ b/2005/anon/README.md @@ -2,6 +2,7 @@ Anonymous + ## To build: ```sh @@ -11,12 +12,14 @@ make NOTE: if your shell does not support `stty` then see the alternate version described in the section below. + ## To run: ```sh ./anon x y [z] ``` + ## Try: ```sh @@ -24,13 +27,10 @@ described in the section below. ./anon 3 3 3 ``` + ### Alternate version: -The author stated that if `stty` does not work right on your system you can -compile it differently so that the program does not use `stty`. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) set this up so that one -need not update the [Makefile](Makefile). There's a fun thing here that will be -mentioned below as well. Thank you Cody! To use this version: +To use this version: ```sh make alt @@ -69,6 +69,7 @@ puzzle to a whole new dimension! While you puzzle out this puzzle, we invite you to take a good LONG look how and WHY `main()` is recursively called and how the runtime stack is used. + ## Author's remarks: ### ABOUT THE GAME ITSELF @@ -509,6 +510,7 @@ necessitated the removal of this code. And besides, the game is more addictive when it's sometimes unsolvable. Especially when it taunts the user with a smiley. :-) + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2005/giljade/README.md b/2005/giljade/README.md index 18a3dcc6d..74ef47dce 100644 --- a/2005/giljade/README.md +++ b/2005/giljade/README.md @@ -4,6 +4,7 @@ Gil Dogon Israel + ## To build: ```sh @@ -21,34 +22,13 @@ Hopefully this will be resolved in time where there is no need for an alternate version but it's a complicated one. See also the [bugs.md](/bugs.md) file for more information. + ## To run: ```sh ./giljade ``` -After Landon fixed the entry to compile with clang (but see above and below) -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) noticed this does not -work at all in modern systems. He fixed this to work but he notes that the fix -to let clang compile it breaks the self-test feature. - -The problem that was showing up is that with either optimising or if anything -but 32-bit (as in `-m32`) was used it would not work (at least in 64-bit -systems?). The optimising cannot be used still but it now works with both 32-bit -and 64-bit. The solution has to do with the size difference between `int` and -`long` so that the `long*E` is now `int*E`. This solves a specific problem for -linux (32-bit, 64-bit) and macOS (arm64). - -But as noted there is another problem with clang: the self-test feature only -completely works with the original version ([giljade.alt.c](giljade.alt.c)), not -the one that will compile with clang ([giljade.c](giljade.c)). The alternate -version, which will not compile with clang, is the only one that passes the -self-tests. If your compiler does not have the defect that clang has about arg -types to `main()` see the Alternate code section below at least for the -self-test feature. - -Thank you Cody for your assistance! - ### INABIAF - it's not a bug it's a feature! :-) If the program source file is not lying in the same directory this program will @@ -56,6 +36,7 @@ very likely crash or do something strange. This entry requires that both `sed` and `cc` are in the path. + ## Try: ```sh @@ -69,6 +50,7 @@ vi out Press ^F (control F) repeatedly. + ### Alternate code: This version will work only with compilers that let you have alternate types to @@ -81,6 +63,7 @@ make alt Use `giljade.alt` as you would `giljade` above. + #### Try: ```sh @@ -88,6 +71,7 @@ Use `giljade.alt` as you would `giljade` above. ./giljade.alt out ``` + ## Judges' remarks: This entry takes editorial in how it deals with its output. After using @@ -102,6 +86,7 @@ s=s^(b=s&s-1^s) ... and understand why it is found in the source code. + ## Author's remarks: ### So what do we have here ? @@ -226,6 +211,7 @@ tricky. Just try to change the program, and use the self test to see what happens ... + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2005/mynx/README.md b/2005/mynx/README.md index 5d567a7ea..2bcc784e5 100644 --- a/2005/mynx/README.md +++ b/2005/mynx/README.md @@ -4,16 +4,13 @@ Anthony Howe + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that the -[configure](source/configure) script (which is not needed but part of the entry) -would work with compilers that have by default `-Werror` like clang in macOS. -Thank you Cody! ## To run: @@ -25,7 +22,6 @@ You can specify a port by appending to the domain `:port`. See notes below on the issue of https. - ## Try: ```sh @@ -33,9 +29,9 @@ the issue of https. ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) pointed out that this -will not work for https initially for two reasons. For a starting point see the -alternate code section below. +Some have pointed out that this will not work for https initially +for two reasons. For a starting point see the alternate code section below. + ### Alternate code: @@ -47,9 +43,9 @@ as well as it used to. If one were to try and connect to `http://www.ioccc.org` with this entry they'll just get a 301 error. In case someone can come up with a clever pipeline or some other hack or -workaround (perhaps [stunnel](https://www.stunnel.org)), Cody added the alt code -which does scan for https. Futile, maybe, in which case just enjoy it for what -it was. To compile: +workaround (perhaps [stunnel](https://www.stunnel.org)), + +To compile: ```sh @@ -66,6 +62,7 @@ the URL like: but again unless you have a clever workaround or hack to the problem, this sadly won't work. + ## Judges' remarks: This little `mynx` will give any [Fiery @@ -74,6 +71,7 @@ complement to last years winning [hibachi](/2004/hibachi/src/hibachi.c). The judges double dare any eager Obfuscationalists to submit the missing pieces to get a functioning LAMP stack. + ## Author's remarks: I was rather impressed by last year's mini webserver. So much so that @@ -119,6 +117,7 @@ Manifest: configure pre-built configure script ``` + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2006/birken/README.md b/2006/birken/README.md index 794838256..4759f709b 100644 --- a/2006/birken/README.md +++ b/2006/birken/README.md @@ -1,26 +1,23 @@ # EDAMAME Award -## (Electronic Design Automation - Mechanical Abstract Machine Emulator) - Michael Birken US + ## To build: ```sh make ``` + ## To run: ```sh ./birken < file.tofu ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in -macOS with this entry. The problem was a missing `+1` for strlen() with -malloc(). This prevented it from working. Thank you Cody for your assistance! ## Try: @@ -33,8 +30,13 @@ malloc(). This prevented it from working. Thank you Cody for your assistance! etc. + ## Judges' remarks: +Q: EDAMAME? + +A: Electronic Design Automation - Mechanical Abstract Machine Emulator + What is TUFO? It's not a veggy friendly food, nor it is Verilog or VHDL. It is not even Pascal! @@ -52,6 +54,7 @@ And for those who are still confused: > > + ## Author's remarks: If man is capable of creating [tofu](http://en.wikipedia.org/wiki/Tofu) [hot @@ -72,6 +75,7 @@ out the one who discovers the hidden program within the source. Note that the shape of the source is a wave, not a waveform. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2006/borsanyi/README.md b/2006/borsanyi/README.md index e46959d33..980a9161d 100644 --- a/2006/borsanyi/README.md +++ b/2006/borsanyi/README.md @@ -4,15 +4,13 @@ Szabolcs Borsanyi United Kingdom s.borsanyi at sussex dot ac dot uk + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed (the Makefile) -under some systems where the `lpthread` was not implicitly linked in. Thank you -Cody! ## To run: @@ -20,12 +18,14 @@ Cody! ./borsanyi string > file.gif ``` + ## Try: ```sh ./borsanyi ioccc@example.com > example.gif ``` + ## Judges' remarks: This entry uses a very user-friendly representation of the font @@ -37,6 +37,7 @@ recognition tools. The amount of imagination necessary to recognise the @ character will certainly challenge a few anti-CAPTCHA tools. + ## Author's remarks: ### Email address to gif converter @@ -98,6 +99,7 @@ output is used for a binary output, which might cause problems. To avoid most caveats, the program does not output the octet `0x0a`. The program assumes the use of ASCII. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2006/monge/README.md b/2006/monge/README.md index d88326249..2deca22ce 100644 --- a/2006/monge/README.md +++ b/2006/monge/README.md @@ -4,6 +4,7 @@ Maurizio Monge Italy + ## To build: Make sure you have the SDL1 (not SDL2!) development environment installed. @@ -12,14 +13,6 @@ Make sure you have the SDL1 (not SDL2!) development environment installed. make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) pointed out that -without SDL1 (**not** SDL2) this will not link because two functions that are -used were removed from SDL2. Since SDL1 is still available and since changing -the code to use SDL2 would be more complicated he decided to change the Makefile -to use `sdl-config` not `sdl2-config`. Nevertheless he points out that the entry -requires x86/x86_64 CPUs. Without it it might very well segfault (for instance -it segfaulted on his MacBook Pro with the M1 chip). - ## To run: @@ -27,6 +20,7 @@ it segfaulted on his MacBook Pro with the M1 chip). ./monge expression ... ``` + ## Try: ```sh @@ -37,6 +31,7 @@ it segfaulted on his MacBook Pro with the M1 chip). Incorrect formulas will ungracefully crash the program. + ## Judges' remarks: For those who are familiar with the previous [IOCCC winners](/winners.html), @@ -52,6 +47,7 @@ At the time of judging we were too mesmerized by the graphics to realize it; and, after all, this entry does take a special effort to work on both `i386` and `x86_64`. Portable it is! :) + ## Author's remarks: ### For the impatient: @@ -209,6 +205,7 @@ floating point offset to where the value was actually calculated. When zooming, the best match is searched, and if the offset is too big (`>1`) the pixel is recalculated. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2006/night/README.md b/2006/night/README.md index a2449c481..74884213e 100644 --- a/2006/night/README.md +++ b/2006/night/README.md @@ -4,12 +4,14 @@ Christopher Night US + ## To build: ```sh make ``` + ## To run: ```sh @@ -19,17 +21,17 @@ make There is an alternate version that supports arrow keys. See the alternate code section below. + ## Try: ```sh echo "Do or do not. There is no try." ``` + ### Alternate code: -As [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) is a lost :-) `vim` -user he took the author's remarks to add support back for arrow keys. To use -compile like: +To compile: ```sh @@ -38,8 +40,6 @@ make alt Use `night.alt` as you would `night` above. -Thank you Cody! - ## Judges' remarks: @@ -55,6 +55,7 @@ There is a nice way to cheat. If you don't want to figure it out you can look at (translation from Japanese so it's not perfect) . + ## Author's remarks: Don't worry; this is not a self-reproducing program, as you might at @@ -146,6 +147,7 @@ following two macros to: Code on! + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2006/sloane/README.md b/2006/sloane/README.md index 061e77b17..40176940e 100644 --- a/2006/sloane/README.md +++ b/2006/sloane/README.md @@ -3,22 +3,13 @@ Andy Sloane US + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this entry to -work with clang which is stricter on the type of args to main(). Curiously -although clang requires the types of args to be strictly correct it allows for -only one arg which he made it as the second arg was not used and this allows for -a closer match to the original format of the entry. He also made sure that the -Makefile links in `libm` as not all systems do this by default. Since the author -suggested that the lack of certain `#include`s might break the program in some -systems he added `-include ...` to the Makefile as well. Thank you Cody for your -assistance! - ## To run: @@ -40,10 +31,10 @@ movements. See the alternate code section below. echo "Do or do not. There is no try." ``` + ### Alternate code: -The alternate version, provided by [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson), uses `usleep()` so one can enjoy +The alternate version uses `usleep()` so one can enjoy the entry with modern systems and which will not be too stimulating for those who have a problem with fast moving text (like himself). It uses the `Z` macro as the parameter to `usleep()` which you can override. The default is @@ -62,13 +53,13 @@ make CDEFINE="-DZ=70000" clobber alt Use `sloane.alt` as you would `sloane` above. -Thank you Cody! ## Judges' Comments: Looks almost good enough to eat, dunnit? I suppose you could argue that, at first blush, this looks like a self-reproducing program. + ## Author's remarks: This program doesn't require any special build options, other than that it @@ -123,6 +114,7 @@ In increasing order of difficulty: - How is the "IOCCC 2006" logo encoded? Can you put something else in its place? Can you find a smaller encoding? + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2006/toledo2/README.md b/2006/toledo2/README.md index c25512b11..cf69b3def 100644 --- a/2006/toledo2/README.md +++ b/2006/toledo2/README.md @@ -5,26 +5,22 @@ Familia Toledo Mexico + ## To build: ```sh make ``` + ## To run: ```sh ./toledo2 ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in -this program which was making it fail to work under macOS - it did not seem to -be a problem under linux, at least not fedora. The problem was wrong variable -types - implicit `int`s instead of `FILE *`s. It now works with both macOS and -linux. Thank you Cody! - To end execution press `ctrl-z`. As mentioned in the author's remarks and in the -below section, it is supposed to crash on termination though Cody noted this +below section, it is supposed to crash on termination though some noted this does not seem to happen in macOS. He asks ironically: 'if it's supposed to crash and it does not crash is it actually a bug or is it a feature? :-)' @@ -35,6 +31,7 @@ By design this program is supposed to crash on termination. You must type in caps (except in strings) and this program is indeed case-sensitive. + ## Try: ```sh @@ -60,6 +57,7 @@ remarks. See also [bugs.md](/bugs.md) for more details. + ## Judges' remarks: We're impressed! Last year, it was a @@ -80,6 +78,7 @@ file referred in the author's remarks); walking in a maze of twisty little passages all alike is easier than understanding the code! + ## Author's remarks: This program emulates a complete [Intel(r) @@ -260,6 +259,7 @@ The BIOS is tailor made for this emulator, and helps to simplify it. programmer can develop its C programs using only one function. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2006/toledo3/README.md b/2006/toledo3/README.md index 169c7ae6a..b4c06e371 100644 --- a/2006/toledo3/README.md +++ b/2006/toledo3/README.md @@ -5,24 +5,20 @@ Familia Toledo Mexico + ## To build: ```sh make ``` + ## To run: ```sh ./toledo3 [1 | 2 | 3 [b]] ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a crash and a -display problem in this entry so that it now works in modern (64-bit) systems. -The problem was that it relied on 32-bits so some `int`s were changed to -`long`s. At this time we don't have an easy way to test this theory but it might -be that using `-m32` would let this work in 32-bit systems. Thank you Cody for -your assistance! ## Try: @@ -30,6 +26,7 @@ your assistance! ./toledo3 1 ``` + ### Alternate versions: The author provided two additional versions, [toledo3-sbar.c](toledo3-sbar.c) @@ -46,6 +43,7 @@ since it's clearly spelled out in the code. The interesting question is whether this is easier or harder to understand than the code for Deep Blue. + ## Author's remarks: There are so many text-based chess programs, what is that of @@ -131,6 +129,7 @@ rules) creates a status display about gameplay on the window title bar. Using [toledo3-txt.c](toledo3-txt.c) turns this into being purely text based. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2011/eastman/README.md b/2011/eastman/README.md index ed08aecd1..148dae088 100644 --- a/2011/eastman/README.md +++ b/2011/eastman/README.md @@ -3,18 +3,21 @@ Peter Eastman + ## To build: ```sh make ``` + ## To run: ```sh ./eastman ``` + ## Try: Quit the program. Resize your terminal window. Run it again. @@ -25,13 +28,6 @@ Quit the program. Resize your terminal window. Run it again. NOTE: to restore your cursor in your shell, try `reset`. -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) tested this with -[macOS Ventura](https://www.apple.com/macos/ventura/) with the M1 chip for -the author (who tested [OS X 10.7 -(Lion)](https://en.wikipedia.org/wiki/OS_X_Lion) and [fedora -10](https://fedoraproject.org/wiki/Releases/10/FeatureList)) and reported that -it works fine. - ## Judges' remarks: @@ -46,6 +42,7 @@ size itself to the initial geometry of your terminal. If you are ambitious, make the font really small and the window really large for hi-res graphics! + ## Author's remarks: This program uses ANSI graphics to recreate the classic Boing Ball demo from @@ -101,6 +98,7 @@ when I can calculate it from the return value of `usleep()` instead? And I could have written `usleep(80000)`, but `usleep(79383)` just looks so much better. And so on. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2011/goren/README.md b/2011/goren/README.md index 4c929f1b2..6cc513117 100644 --- a/2011/goren/README.md +++ b/2011/goren/README.md @@ -3,23 +3,20 @@ Uri Goren + ## To build: ```sh make ``` + ## To run: ```sh echo "some text" | ./goren ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for macOS. -Before the fix it segfaulted. It worked fine under linux. After fixing it it was -noticed that the author stated it does not work for 64-bit so it was then tested -as a 32-bit binary (linux) and 64-bit binary (linux, macOS) and both work. It -was fixed by changing some `int`s to `long`s. Thank you Cody! ## Try: @@ -27,6 +24,7 @@ was fixed by changing some `int`s to `long`s. Thank you Cody! echo "Hello, world!" | ./goren ``` + ## Judges' remarks: In the words of [René François Ghislain Magritte Magritte](http://en.wikipedia.org/wiki/Rene_Magritte): @@ -47,6 +45,7 @@ echo '| is just a representation of a pipe because I say so! So stuff it!' | ./g something happens! Why? + ## Author's remarks: This program was written in homage to [Rene @@ -97,6 +96,7 @@ mostly with gcc on Linux. It doesn't support 64 bits (due to integer-pointer casts, and a >>31). It does work on 64-bit Linux, because all functions are below 4GB. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2011/richards/README.md b/2011/richards/README.md index d3c932986..a107318f4 100644 --- a/2011/richards/README.md +++ b/2011/richards/README.md @@ -3,22 +3,20 @@ Gregor Richards + ## To build: ```sh make ``` + ## To run: ```sh ./richards ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a minor problem -that showed up in both linux and macOS. He notes however that as of this time -this entry does not work with macOS. See [bugs.md](/bugs.md) for more details. -Thank you Cody! ## Try: @@ -38,6 +36,7 @@ not the rule abuse) in a different way. The author claims that his calculator does just-in-time compilation. What would you do to prove or disprove his claim without attempting to unravel the source? + ## Author's remarks: This is an implementation of the classic UNIX @@ -89,6 +88,7 @@ flags: * owcc 1.9 + x86 + Windows: Needs `-DNM -DAH -fno-stack-check` * gcc 4.4.5 + sh4: -O0 works, higher optimization levels don't work for unknown reasons. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2011/vik/README.md b/2011/vik/README.md index 8dc72df8d..a800edc5b 100644 --- a/2011/vik/README.md +++ b/2011/vik/README.md @@ -4,12 +4,14 @@ Daniel Vik + ## To build: ```sh make ``` + ## To run: ```sh @@ -25,6 +27,7 @@ The author stated that the program will crash if no argument is passed tot he program though we note that your computer might also [halt and catch fire](https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)) :-) + ## Try: ```sh @@ -41,12 +44,10 @@ Alternatively, you can use: It is possible to download a number of Mod files from [The Mod Archive](http://modarchive.org). + ### Alternate code: -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson), though he feels -slightly sick :-), added a version for Windows based on the author's comments -(along with looking up the function for the right header file). To build try the -alt rule of the Makefile. Assuming that `make` is similar enough try: +Assuming that `make` is similar enough try: ```sh make alt @@ -55,6 +56,7 @@ make alt Use `vik.alt` as you would `vik` above. + ## Judges' remarks: This entry converts .MOD audio files to a playable stream @@ -77,6 +79,7 @@ NOTE: The [randowan.mod](randowan.mod) and [mad_world.mod](mad_world.mod) files created by [Henrik Bertilsson](http://www.translucentboy.com) and are included with his permission. + ## Author's remarks: ### Introduction @@ -191,6 +194,7 @@ _setmode(_fileno(stdout), 0x8000); The program only runs when a valid MOD file is passed as argument. If no argument is passed, the program crashes. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2012/kang/README.md b/2012/kang/README.md index fdedc5a18..42048f2b4 100644 --- a/2012/kang/README.md +++ b/2012/kang/README.md @@ -4,23 +4,20 @@ Seonghoon Kang + ## To build: ```sh make ``` + ## To run: ```sh echo "full spelling of an English cardinal numeral less than a quadrillion" | ./kang ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the code to -accept the proper German for four 'vier' where before it was spelt with the -sound of V (fier not vier). But was this a bug or a feature? He's on the fence -here but he went ahead and did it anyway as it seems useful. Thank you Cody! - ## Try: @@ -52,7 +49,6 @@ What does it get right? What does it get wrong? Finally why does it get what it gets wrong wrong? - ## Judges' remarks: The judges were able to appreciate the Indo-European language family @@ -64,6 +60,7 @@ colloquial year numbers of the last millennium. We've added a linefeed to the print format for convenience. + ## Author's remarks: ### Synopsis @@ -187,6 +184,7 @@ in my website in July 2011. Sun Park and others have reviewed it and let me aware of possible improvements. I'd also like to thank Seo Sanghyeon for proof-reading remarks. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2012/tromp/README.md b/2012/tromp/README.md index 0e6c35a51..8c9d1e99e 100644 --- a/2012/tromp/README.md +++ b/2012/tromp/README.md @@ -4,6 +4,7 @@ John Tromp + ## To build: ```sh @@ -12,6 +13,7 @@ make all # On a 64-bit machine (default) make tromp32 # On a 32-bit machine ``` + ## To run: ```sh @@ -20,6 +22,7 @@ make tromp32 # On a 32-bit machine Use `./tromp32` as you would `./tromp` if on a 32-bit machine. + ## To run: ```sh @@ -27,6 +30,7 @@ cat ascii-prog.blc data | ./tromp -b cat binary-prog.Blc data | ./tromp ``` + ## Try: ```sh @@ -35,11 +39,12 @@ cat binary-prog.Blc data | ./tromp cat primes.blc | ./tromp -b | ./primes.pl ``` -### Selected Judges Remarks: +## Judges' remarks: The judges dare to say that the data files this entry is processing are more obfuscated than the entry itself. + ## Author's remarks: This program celebrates the close connection between obfuscation and conciseness, @@ -527,6 +532,7 @@ A call-by-name lambda-calculus machine Higher Order Symbol. Comput. 20, 3 (September 2007), 199-207. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2012/vik/README.md b/2012/vik/README.md index 4efa10f73..213b8e7b7 100644 --- a/2012/vik/README.md +++ b/2012/vik/README.md @@ -4,6 +4,7 @@ Daniel Vik + ## To build: ```sh @@ -55,6 +56,7 @@ program or if invalid arguments or images of mismatching sizes or unsupported pixel formats though we note that your computer might also [halt and catch fire](https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)) :-) + ## Try: ```sh @@ -64,12 +66,10 @@ fire](https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)) :-) ./vik d ioccc-in-chocolate.png > restored-ioccc.png ``` + ### Alternate code: -Based on the author's description it should be able to get this entry to work -for Windows. With his instructions [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson) added the alternate version that -does this for the few who might use Windows. To compile: +For those few who might use Windows, To compile: ```sh make alt @@ -77,8 +77,6 @@ make alt Use `vik.alt` as you would `vik` above. -We're not sure whether we want to thank Cody or not for this :-) and he's not -sure if he wants to be thanked either :-) but we appreciate it nonetheless. ## Judges' remarks: @@ -90,6 +88,7 @@ Can you discern hidden pieces of chocolate in ![chocolate in ioccc](chocolate-in-ioccc.png "Chocolate in IOCCC") + ## Author's remarks: ### Introduction @@ -188,6 +187,7 @@ as well as the scan line filters. All these features were quite easy to add, much thanks to the (actually pretty good) design of the code. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2013/birken/README.md b/2013/birken/README.md index 8fffd02db..c026f0b22 100644 --- a/2013/birken/README.md +++ b/2013/birken/README.md @@ -4,6 +4,7 @@ Michael Birken + ## To build: ```sh @@ -17,6 +18,7 @@ WARNING: if you have a problem with flashing colours please consider whether you should try this entry or not. This problem can also occur with the alternate version but to a lesser degree depending on how it's configured. + ## To run: ```sh @@ -36,12 +38,13 @@ perl -e 'map{map{print int(rand()*8);}(0..16);print chr(10);}(0..30);' | tr '[0- BIRKEN=birken.alt ./demo.sh ``` + ### Alternate code: -Along with the [demo.sh](demo.sh), based on the author's recommendations, -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate -version for this entry which allows one to control how fast the painting is -done. To compile: +The alternate version for this entry which allows one to control +how fast the painting is done. + +To compile: ```sh @@ -52,7 +55,7 @@ Finding the 'right' default value was a fine line; the default, 15000 microseconds (0.015 seconds), will take quite a while to finish but it allows one to more easily see what is going on. Even easier to see would be 25000 but these values make it quite slow and one could easily lose interest. Like some -other entries where Cody made this type of alternate version he made it +other entries where this was made an alternate version he made it configurable at compile time. If you wish to speed it up by 100% you can instead do: @@ -70,8 +73,6 @@ slower value shouldn't be a problem. Use `birken.alt` as you would `birken` above. -Thank you Cody! - ## Judges' remarks: @@ -90,6 +91,7 @@ it's even been [put on MIT's Green Building](http://hacks.mit.edu/Hacks/by_year/2012/tetris/). Using it for painting by numbers looks like a novel idea. + ## Author's remarks: ### About This Document @@ -515,6 +517,7 @@ The origin of the remaining files are described below: * [snoo.txt](snoo.txt) - 8-bit version of [Snoo](https://www.reddit.com/r/Snoo/), [Reddit](https://www.reddit.com)'s alien mascot + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2013/cable3/README.md b/2013/cable3/README.md index c29f21e92..48c095539 100644 --- a/2013/cable3/README.md +++ b/2013/cable3/README.md @@ -3,29 +3,20 @@ Adrian Cable + ## To build: ```sh make ``` + ## To run: ```sh ./cable3 bios-image-file floppy-image-file [harddisk-image-file] ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile -with modern systems. The problems were that `localtime()` is used differently -and `time.h` being included (with SDL2 in macOS - but see below) there was a -conflicting function type. This appeared to be a problem with macOS and only -when SDL2 was included (but which as noted next it cannot be). The other problem -is that this entry uses SDL functions that were removed from SDL2 so the -Makefile has to use `sdl-config` and not `sdl2-config`. Thus the removal of -localtime probably does not have to be done after all. He left it there in case -some implementation of SDL1 also has this problem. Thank you Cody for your -assistance! - ## Try: @@ -33,6 +24,7 @@ assistance! ./runme ``` + ## Judges' remarks: This entry weighs in at a magical 4043 bytes (8086 nibbles, 28,301 @@ -45,6 +37,7 @@ correctly display console applications that use ANSI graphics. Update: This entry now has its own web page + ## Author's remarks: ### A tiny but highly functional PC emulator/virtual machine @@ -236,6 +229,7 @@ Screenshots of some of these applications running (on Mac OS X) are provided for A lot of compiler warnings are produced by clang. Missing type specifiers, control reaching the end of functions without returning values, incompatible pointer type assignments, and some precedence warnings, all necessary to keep the source size down. Other compilers are likely to produce similar warnings. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2014/maffiodo1/README.md b/2014/maffiodo1/README.md index 20b86b0fb..2dfc27bfe 100644 --- a/2014/maffiodo1/README.md +++ b/2014/maffiodo1/README.md @@ -4,6 +4,7 @@ + ## To build: This entry requires SDL to be installed. See the [faq.md](/faq.md) if you don't @@ -13,9 +14,6 @@ know how to do this for your system. make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed the build for -this entry: it does not require SDL2 but SDL1 so there were linking errors. -Thank you Cody! ## To run: @@ -23,6 +21,7 @@ Thank you Cody! cat mario.level | ./prog 320 200 800 300 128 144 mario.rgba mario8.wav 10343679 ``` + ## Try: ```sh @@ -42,14 +41,14 @@ starwars # animated Star Wars 'film' ``` NOTE: the author stated that the sky colour is incorrect in some versions of -macOS, offering a workaround. Cody tested this out in the most recent macOS +macOS, offering a workaround. Others tested this out in the most recent macOS version and this does not seem to be a problem any more. As he played (and beat) the entire series many times years ago he can confirm that the sky is more or less correct though it's possible that because he's practically blind he might have missed something :-) He guesses that the problem might have been the version of `SDL1` but he does not know this either way. -Cody notes ironically that the author stated that in Super Mario Bros one cannot +Others notes ironically that the author stated that in Super Mario Bros one cannot go through walls but there are known glitches where you can in some areas (as he recalls this also applied to the arcade version, Mario Bros, but he cannot confirm this now) :-) @@ -322,6 +321,7 @@ justification for the sprites for Mario are the same for this game. Long live [The Great Giana The Sisters](http://en.wikipedia.org/wiki/The_Great_Giana_Sisters) !! :) + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2014/vik/README.md b/2014/vik/README.md index 6d9b9e402..f46b04a30 100644 --- a/2014/vik/README.md +++ b/2014/vik/README.md @@ -6,18 +6,21 @@ US + ## To build: ```sh make ``` + ## To run: ```sh ./prog > foo.c ``` + ## Try: ```sh @@ -26,6 +29,7 @@ echo 'Want to hear me beep?' | ./prog > audio_file.raw echo 'No. I want chocolate!' | ./prog | mplayer -demuxer rawaudio - ``` + ## Judges' remarks: This program sets a new tone for obfuscation. But do you understand @@ -44,9 +48,6 @@ might speak to your coding style? If not, then perhaps: might help? :-) -NOTE: In 2020 [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) found a -minor bug when working on his [Enigma machine entry](../../2020/ferguson2); see -his [README.md](../../2020/ferguson2/README.md) for details (search for `vik`). ## Author's remarks: @@ -100,6 +101,7 @@ However I found some man made recordings on that decode reasonable well. If a recording doesn't decode, you could try to pre-process the input with a narrow bandpass filter on the frequency of the transmission. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2015/endoh3/README.md b/2015/endoh3/README.md index 8500b0993..944548ed2 100644 --- a/2015/endoh3/README.md +++ b/2015/endoh3/README.md @@ -4,18 +4,21 @@ Yusuke Endoh Mastodon: [@mame@ruby.social](https://ruby.social/@mame) + ## To build: ```sh make ``` + ## To run: ```sh ./prog ``` + ## Try: ```sh @@ -46,14 +49,6 @@ q Observe what happens when you hit enter or another character! Send EOF to end the program. -The author, [Yusuke Endoh](/winners.html#Yusuke_Endoh), supplied the additional -source files, which [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) -added to the repo for us. He wrote on his [analysis of the -entry](https://mame-github-io.translate.goog/ioccc-ja-spoilers/2015/endoh3.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp) -that there are others as well but we don't seem to have them and he didn't -provide them on his page. We've not yet contacted him for a copy but we will in -time. Thank you Yusuke! - ## Judges' remarks: @@ -66,6 +61,7 @@ A question for inquisitive readers: is the implemented subset of PDP-11 instructions Turing-complete? (For a clue, see the end of the author's remarks.) If in doubt, use [APOUT](https://github.com/DoctorWkt/Apout). + ## Author's remarks: ### Hint / Compatibility @@ -243,6 +239,7 @@ Note: the program writes a binary to stdout. -16401,-23136,-28110,11874,-18945,1879,2,0,-32256,-20996,-18169,29220,12,0,0,0, 335,-27277,-30776,20480,0}; + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2015/yang/README.md b/2015/yang/README.md index 96340c849..43e6a1afd 100644 --- a/2015/yang/README.md +++ b/2015/yang/README.md @@ -3,15 +3,13 @@ Don Yang + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed an unfortunate -typo in the Makefile that was preventing some of the files from compiling -properly, trying instead to compile already compiled code. Thank you Cody! ## To run: @@ -19,6 +17,7 @@ properly, trying instead to compile already compiled code. Thank you Cody! echo Some text | ./prog ``` + ## Try: ```sh @@ -57,6 +56,7 @@ NOTE: the author calls the program `Fuuko` and so the source file referred to in their remarks uses `fuuko.c`. The [Makefile](Makefile) will compile everything so you need not worry about this. + ## Author's remarks: `Fuuko` is a [sea star](https://en.wikipedia.org/wiki/Starfish) generator. Feed @@ -151,6 +151,7 @@ The process of writing this program can be seen by opening Code layout is inspired by [Ibuki Fuuko](https://clannad.fandom.com/wiki/Fuko_Ibuki), for her love of sea stars. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2018/poikola/README.md b/2018/poikola/README.md index 80b7dea6b..ecd706c54 100644 --- a/2018/poikola/README.md +++ b/2018/poikola/README.md @@ -4,18 +4,13 @@ Timo Poikola + ## To build: ```sh make ``` -NOTE: some have reported that Terminal.app in macOS does not work and one might -need a different terminal emulator like that from -[XQuartz](https://www.xquartz.org) but [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson) reported that this works fine in -macOS Ventura with Terminal.app. YMMV of course. - ## To run: @@ -23,6 +18,7 @@ macOS Ventura with Terminal.app. YMMV of course. ./prog ``` + ## Try: On terminal supports 24 bit color, has black background, and size at least 125x38, try: @@ -31,6 +27,7 @@ On terminal supports 24 bit color, has black background, and size at least 125x3 ./prog ``` + ## Judges' remarks: It is said by some students of Astronomy: @@ -42,6 +39,7 @@ Many [Mnemonic variations](http://www.star.ucl.ac.uk/%7Epac/obafgkmrns.html) exi You might wish, on a star, to better understand the colors being displayed. And those in the deep south might wish to go north for a better view. + ## Author's remarks: ### How to build: @@ -156,6 +154,7 @@ the Caesar cipher with the key 18. Lzw xajkl tsffwj ak wfugvwv mkafy AWWW 754 xdgslk gf dafw 47. Al ak hjaflwv gfdq gf dalldw-wfvasf esuzafwk. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2019/ciura/README.md b/2019/ciura/README.md index 98db513c3..55824060c 100644 --- a/2019/ciura/README.md +++ b/2019/ciura/README.md @@ -2,18 +2,21 @@ Marcin Ciura + ## To build: ```sh make ``` + ## To run: ```sh ./getwords.sh en | grep .. | ./prog string ``` + ## Try: ```sh @@ -30,12 +33,6 @@ make ./ru.sh ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed invalid bytes -error in `tr` in the scripts. He notes that at least on his systems (macOS and -fedora linux) the alternative languages do not work. Perhaps that is the wrong -locale or it's unable to come up with perfect pangrams but one will not get -errors now (it did not work before the fixes either). Thank you Cody for your -assistance! ### Alternate code: @@ -50,6 +47,7 @@ make alt Use `prog.alt` as you would `prog` above. + ## Judges' remarks: A few letters, one at a time, with no repeats. How many different ways can this @@ -62,6 +60,7 @@ bags few lynx. Speaking of jumping, can you rewrite the code to remove all of the goto jumps in this code? + ## Author's remarks: ### What is this? @@ -190,6 +189,7 @@ With the supplied [Makefile](Makefile), both `gcc` and `clang` compile compilation with `gcc -std=c90`, add `-Wno-format` to `CSILENCE` in `Makefile`. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2019/diels-grabsch1/README.md b/2019/diels-grabsch1/README.md index 04a70d1f6..7f1958185 100644 --- a/2019/diels-grabsch1/README.md +++ b/2019/diels-grabsch1/README.md @@ -3,17 +3,13 @@ Volker Diels-Grabsch + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made the author's -statement that the entry compiles cleanly true by fixing `warning: a function -declaration without a prototype is deprecated in all versions of C ` (in -main()). Not strictly necessary but if he's making fixes he might as well. Thank -you Cody! ## To run: @@ -21,6 +17,7 @@ you Cody! ./prog < file > file.Z ``` + ## Try: ```sh @@ -35,6 +32,7 @@ cmp ref.Z dg1.Z # Oops, the files differ zcat < dg1.Z | cmp - ../mills/Shakespeare.txt # Decompresses correctly. What is going on? ``` + ## Judges' remarks: Finally, IOCCC now has its own text compression program, and it is short enough @@ -46,6 +44,7 @@ Can you explain why the zero file compresses identically by the entry and the standard compress tool, but the text file compresses differently? The judges know. :) + ## Author's remarks: ### A tiny "compress" tool: @@ -77,6 +76,7 @@ right now. And exactly the same shape. Nevertheless, it is portable C99 code that runs on 32-bit and 64-bit platforms. It compiles without warnings on both GCC and Clang even with `-Wextra and -Weverything`. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2019/diels-grabsch2/README.md b/2019/diels-grabsch2/README.md index d1dc7c6c9..4237a1a94 100644 --- a/2019/diels-grabsch2/README.md +++ b/2019/diels-grabsch2/README.md @@ -3,17 +3,13 @@ Volker Diels-Grabsch + ## To build: ```sh make ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made the author's -statement that the entry compiles cleanly true by fixing `warning: a function -declaration without a prototype is deprecated in all versions of C` (in -main()). Not strictly necessary but if he's making fixes he might as well. Thank -you Cody! ## To run: @@ -21,12 +17,14 @@ you Cody! ./prog ``` + ## Try: ```sh sha512sum prog.c || shasum -a 512 prog.c ``` + ## Judges' remarks: Before running this one, stay calm. Chill out, have a cup of tea. Is this bad? @@ -34,6 +32,7 @@ Before running this one, stay calm. Chill out, have a cup of tea. Is this bad? To understand what is going on here, please check if you are dreaming, or are you dreaming that you are dreaming? Or is it, wake up from the simulation? + ## Author's remarks: ### Almost a hash collision: @@ -189,6 +188,7 @@ of them by at least 4 bits, or both by 2. Or, one splits the 67 bits asymmetrically? I was unable to make it work with 2 parts, but that doesn't have to mean anything. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/2019/karns/README.md b/2019/karns/README.md index 6be137a80..7b3ff5e78 100644 --- a/2019/karns/README.md +++ b/2019/karns/README.md @@ -2,25 +2,20 @@ Joshua Karns + ## To build: ```sh make ``` + ## To run: ```sh ./prog < textfile_that_fits_on_the_screen ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) reported that with `-O` -level > 0 this program segfaults (sometimes?). He's not sure why as it worked -fine before on the same systems tested but `-O0` appears to fix the problem in -both macOS and linux. Perhaps this is the problem that the author reported where -it sometimes segfaults but Cody did not try debugging it. Thank you Cody for -your assistance! - ## Try: @@ -39,6 +34,7 @@ the terminal, like: ./demo.sh ``` + ## Judges' remarks: If you typically get lost in mazes, watching this program run might -- or might @@ -54,6 +50,7 @@ see the @ sign as well as the exclamation mark. A puzzle for the reader: Can you change the program to consider a diagonal movement as one step? + ## Author's remarks: ### The Program: @@ -107,6 +104,7 @@ not encountered this myself). - The program could be obfuscated much further. - The program contains some unused code and data. + ## Copyright and CC BY-SA 4.0 License: This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. diff --git a/bugs.md b/bugs.md index 6f9815ea8..e8e3350c7 100644 --- a/bugs.md +++ b/bugs.md @@ -1,4 +1,4 @@ -# BUGS and (MIS)FEATURES +# Bugs and (Mis)features There are a number of known problems with IOCCC winners: many of which have to do with differences between today's compiler environments diff --git a/contact.html b/contact.html index 75af45e33..a51bd0e50 100644 --- a/contact.html +++ b/contact.html @@ -7,19 +7,27 @@ -
IOCCC

+
IOCCC
Logo by winner Matt Zucker

The International Obfuscated C Code Contest

-

[ The judges | -IOCCC home page | -How to enter | + +

+

+The judges | +IOCCC home page | FAQ | +How to enter | Contacting the IOCCC -
-IOCCC news | +

+IOCCC news | People who have won | -Winning entries ]

-
+Winning entries +

+Known Bugs & (Mis)features | +How to fix an IOCCC winner | +Thanks for the fixes | +A bit of web site history +

diff --git a/faq.md b/faq.md index 007c982d9..c1365603b 100644 --- a/faq.md +++ b/faq.md @@ -3,16 +3,24 @@
IOCCC

The International Obfuscated C Code Contest

-

[ The judges | + +

+

+The judges | IOCCC home page | -How to enter | FAQ | +How to enter | Contacting the IOCCC -
-IOCCC news | +

+IOCCC news | People who have won | -Winning entries ]

-
+Winning entries +

+Known Bugs & (Mis)features | +How to fix an IOCCC winner | +Thanks for the fixes | +A bit of web site history +

diff --git a/how-to-bugfix.md b/how-to-bugfix.md new file mode 100644 index 000000000..bb2b5687f --- /dev/null +++ b/how-to-bugfix.md @@ -0,0 +1,31 @@ +# How to fix an IOCCC entry + +If you see a problem with an IOCCC entry, first check the +[known bugs](bugs.md) file. In some cases what you might think +of as a bug is instead a known feature. On some cases the +bug is known, but no fix has ever been submitted. In other +cases you may have found a new problem. + +If you do have a fix, and the [known bugs](bugs.md) file **does +not recommend against fixing it**, then please opening a [GitHub pull +request](https://github.com/ioccc-src/winner/pulls) against the master +[branch](https://github.com/ioccc-src/winner/branches) of the [ioccc-src/winner +repo](https://github.com/ioccc-src/winner) repo. + +BTW: A **problem** is not limited to the code itself. Fixing typos in files such +as "_README.md_" files, fixing issues in a "_Makefile_", or otherwise correcting an +IOCCC winner is **VERY MUCH WELCOME**! Please use the same [GitHub pull +request](https://github.com/ioccc-src/winner/pulls) process against the master +[branch](https://github.com/ioccc-src/winner/branches) of the [ioccc-src/winner +repo](https://github.com/ioccc-src/winner) repo. + +**Please help us fix typos and / or otherwise improve the write-up** of +how IOCCC winning entries are presented! + +And of course, an IOCCC winner's may update their own entries +(metadata as well as source code and any extra files) by opening a +[GitHub pull request](https://github.com/ioccc-src/winner/pulls) +against the master [branch](https://github.com/ioccc-src/winner/branches) +of the [ioccc-src/winner repo](https://github.com/ioccc-src/winner) +repo. +e diff --git a/CONTRIBUTING.md b/how-to-enter.md similarity index 70% rename from CONTRIBUTING.md rename to how-to-enter.md index 4a4f3b6a9..21b555b90 100644 --- a/CONTRIBUTING.md +++ b/how-to-enter.md @@ -1,4 +1,4 @@ -# Contributing to the IOCCC +# How to submit to the IOCCC ## Submit to the IOCCC @@ -19,11 +19,3 @@ via email using their previously registered email address, and upload the winning code to the [winner repo](https://github.com/ioccc-src/winner) repo which in turn will cause them to be displayed on the [IOCCC winning entries page](https://www.ioccc.org/years.html). - -## Updating your winning entries - -If you are an IOCCC winner, you may update your entries (metadata as well as -source code and any extra files) by opening a [GitHub pull -request](https://github.com/ioccc-src/winner/pulls) against the master -[branch](https://github.com/ioccc-src/winner/branches) of the [ioccc-src/winner -repo](https://github.com/ioccc-src/winner) repo. diff --git a/index.html b/index.html index 39613f3bb..b161a8686 100644 --- a/index.html +++ b/index.html @@ -43,22 +43,28 @@ then consider making pull requests against the temp-test-ioccc GitHub repo.
-

[ The judges | +

+

+The judges | IOCCC home page | -How to enter | FAQ | +How to enter | Contacting the IOCCC -
+

IOCCC news | People who have won | -Winning entries ]

+Winning entries +

+Known Bugs & (Mis)features | +How to fix an IOCCC winner | +Thanks for the fixes | +A bit of web site history +


-

The source winners of the 27th IOCCC have been released. Congratulations!

-

The IOCCC is currently CLOSED.

Right now, you CANNOT register as a contestant with the IOCCC,
@@ -68,6 +74,8 @@ nor can you submit an entry because the IOCCC is yet NOT open.

You may also check on the status.json for the current status of the IOCCC. +Additional details in the how to enter may be of further help. +


diff --git a/judges.html b/judges.html index 175bbc3b5..33833b852 100644 --- a/judges.html +++ b/judges.html @@ -7,19 +7,27 @@ -
IOCCC

+
IOCCC
Logo by winner Matt Zucker

The International Obfuscated C Code Contest

-

[ The judges | -IOCCC home page | -How to enter | + +

+

+The judges | +IOCCC home page | FAQ | +How to enter | Contacting the IOCCC -
-IOCCC news | +

+IOCCC news | People who have won | -Winning entries ]

-
+Winning entries +

+Known Bugs & (Mis)features | +How to fix an IOCCC winner | +Thanks for the fixes | +A bit of web site history +

diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index bb5a7e8ab..a187c5715 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1,27 +1,41 @@ # Thanks for all the fixes -.. and all the fish. :-) +.. and thanks for all the fish. :-) + ## Thank you honor roll There are several people who have contributed to the above mentioned -several thousand changes and important improvements. We call out the -extensive contributions of [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) -who is responsible for many of the improvements. +several thousand changes and important improvements. -From the [IOCCC judges](https://www.ioccc.org/judges.html): Thank you **very much** [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson) for the extensive -efforts in helping improve the IOCCC presentation of past IOCCC -winners! +We call out the extensive contributions of [Cody Boone +Ferguson](/winners.html#Cody_Boone_Ferguson) who is responsible for +many of the improvements. Thank you **very much** for the +extensive efforts in helping improve the IOCCC presentation of past +IOCCC winners! -## Thank you list +Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a number of +important bug fixes to a number of past IOCCC winners. Some of +those fixes were very technically challenging. Thank you **very +much** for your help! + +A good number of the [past winners of the IOCCC](winners.html) +tested, identified and helped correct and/or improve the write-ups +of follow IOCCC winners for the year that they won. The list of +those past winners is too long to mention: nevertheless the +[IOCCC judges](judges.html) **very much appreciate** those who +helped improve the presentation of their follow IOCCC winners. + + +## Thank you list since 2021 Jan 01 To avoid having to change numerous "_README.md_" files to add thank you notes, we centralize them below. The [IOCCC judges](https://www.ioccc.org/judges.html) wish to recognize the many important contributions to the IOCCC presentation of past IOCCC winners. -We are pleased to note the many contributions on a winner by winner basis. +We are pleased to note the many contributions, **made since 2021 Jan 01**, +on a winner by winner basis. ## [1984/decot](1984/decot/decot.c) ([README.md](1984/decot/README.md])) @@ -65,9 +79,7 @@ through linux! NOTE: originally this entry did not print a newline prior to returning to the shell, after the output (despite having `\n` in the string - why?) but to make it more friendly to users Cody made it print a `\n` prior to returning to the -shell. - -Thank you Yusuke and Cody for your help! +shell. Thank you Yusuke and Cody for your help! ## [1985/lycklama](1985/lycklama/lycklama.c) ([README.md](1985/lycklama/README.md])) @@ -136,6 +148,7 @@ alarming warning at compiling, linking or runtime. systems. The problem was 'assignment to cast is illegal, lvalue casts are not supported'. For the original file see below. Thank you Cody for your assistance! + ## [1988/dale](1988/dale/dale.c) ([README.md](1988/dale/README.md])) [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern @@ -181,6 +194,7 @@ so Cody changed the lines to be in the form of: #define foo bar ``` + ## [1988/isaak](1988/isaak/isaak.c) ([README.md](1988/isaak/README.md])) [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work for @@ -190,6 +204,7 @@ alternative version. The original version is in [1988/isaak/isaak.alt.c](1988/isaak/isaak.alt.c). + ## [1988/phillipps](1988/phillipps/phillipps.c) ([README.md](1988/phillipps/README.md])) [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern @@ -206,6 +221,7 @@ assistance! An alternate version was provided by Cody for this so that it works for compilers like clang. + ## [1989/fubar](1989/fubar/fubar.c) ([README.md](1989/fubar/README.md])) [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) got this to work with @@ -234,6 +250,7 @@ you know how? Cody provided an alternate version based on the author's remarks. See the README.md for details. + ## [1989/paul](1989/paul/paul.c) ([README.md](1989/paul/README.md])) [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault under @@ -241,6 +258,7 @@ macOS. The problem was that the int (from `#define f`) should be a long. This became apparent when he was using lldb and saw that the type of a pointer was long. Thank you Cody for your assistance! + ## [1989/robison](1989/robison/robison.c) ([README.md](1989/robison/README.md])) Yusuke Endoh fixed this to compile under modern systems. @@ -248,7 +266,7 @@ Yusuke Endoh fixed this to compile under modern systems. ## [1989/tromp](1989/tromp/tromp.c) ([README.md](1989/tromp/README.md])) -We used a patch from [Yusuke Endoh](/winners.html#Yusuke_Endoh) +We used a patch from [Yusuke Endoh](/winners.html#Yusuke_Endoh) to get this to compile under gcc. Thank you Yusuke for your assistance! [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) got this to work with @@ -275,6 +293,7 @@ decided later. Cody added an alternate version which allows certain compilers to compile the code, based on the author's remarks. + ## [1990/cmills](1990/cmills/cmills.c) ([README.md](1990/cmills/README.md])) Yusuke got this to work in modern systems (it resulted in a bus error). @@ -296,6 +315,8 @@ prototype to `fopen()` and made this use `fgets()` instead of `gets()` to make it safer and to prevent an annoying and potentially alarming warning at compiling and/or linking and/or runtime. Thank you Cody for your assistance! +The alternative code was provided by Cody. + ## [1990/jaw](1990/jaw/jaw.c) ([README.md](1990/jaw/README.md])) @@ -313,164 +334,908 @@ Endoh](/winners.html#Yusuke_Endoh). Thank you Yusuke for your implementation of ## [1990/scjones](1990/scjones/scjones.c) ([README.md](1990/scjones/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) pointed out that the +compiler option `-trigraphs` would also have worked. + + ## [1990/tbr](1990/tbr/tbr.c) ([README.md](1990/tbr/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with +modern compilers; `exit(3)` returns void but the function was used in a binary +expression so this wouldn't even compile. Cody also changed the code to use +`fgets()` instead of `gets()` so one would not get a warning about the use of +`gets()` at linking time or execution, the latter case causing confusing output +due to the warning being interspersed with the program's output. Thank you Cody +for your assistance! + + ## [1990/theorem](1990/theorem/theorem.c) ([README.md](1990/theorem/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed some bugs that +impacted the usability of this program including some segfaults under modern +systems (and possibly in some cases earlier systems) with this entry. +Originally we noted that the 4 trailing args '0 0 0 0' were required on systems +that dump core when NULL is dereferenced but this problem showed itself in +modern systems even with the 4 '0 0 0 0'. He also fixed a segfault if not enough +args are specified and fixed the code so that the generated `fibonacci.c` +actually works; before it just printed `0` over and over again (since it did not +work anyway a segfault prevention was added here). He also fixed some array +addressing (some of which might not be strictly necessary but as he was testing +the `fibonacci.c` bug he ended up changing it anyway). Finally he changed this +program to use `fgets()` not `gets()` to make it safer and to prevent a warning +about `gets()` at linking or runtime. Thank you Cody for your assistance! + +[Yusuke Endoh](/winners.html#Yusuke_Endoh) pointed out that `atof` nowadays +needs `#include ` which was used in order to get this to work +initially (prior to this the output was incomplete). Thank you Yusuke! + + ## [1990/westley](1990/westley/westley.c) ([README.md](1990/westley/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern +systems. It had `1s` in places for a short int which was changed to just `1`. +Since it's instructional to see the differences he has provided an alternate +version with the original code. See below. + +Cody provided the original source in [westley.alt.c](westley.alt.c). +Thank you Cody for your assistance! + + ## [1991/brnstnd](1991/brnstnd/brnstnd.c) ([README.md](1991/brnstnd/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern +systems. There were two invalid operands to binary expression (`char *` and +`void` and `int` and `void`) to resolve and additionally a mis-feature of the C +pre-processor which no longer works had to be changed as well in order to get +this to compile. In particular the macro `C`, defined as `C =G` to make `+=` and +similar operators no longer works. The invalid operands to binary expressions +were resolved with the comma operator. Thank you Cody for your assistance! + + ## [1991/dds](1991/dds/dds.c) ([README.md](1991/dds/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault that +prevented this entry from working at all and made an alternate version +that works with `clang`. The alternate code, described below, is what is needed +for clang. Reading it might be instructive even if you have gcc. + + ## [1991/westley](1991/westley/westley.c) ([README.md](1991/westley/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in +this program which prevented it from working. The problem was that the read-only +char array `char *z[]` was being written to. The fix was to change it to `char +z[][100]` in two spots (see if you can determine why two places, not one!). Why +100 when the longest string is < 100? Because a shorter value caused strange +output and it's easier to just choose a larger value that works without having +to find the correct value. Thank you Cody for your assistance! + + ## [1992/adrian](1992/adrian/adrian.c) ([README.md](1992/adrian/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the location +that it used `gets()` to be `fgets()` instead to make it safer and to prevent +annoying warnings during compiling, linking or runtime (interspersed with the +program's output). One might think that simply changing the gets() to fgets() +(with stdin) would work but it did not because `fgets()` stores the newline and +`gets()` does not. The code was relying on not having this newline. With +`fgets()` the code `if(A(Y)) puts(Y);` ended up printing an extra line which +made the generation of some files (like `adhead.c`) fail to compile (`gets()` +does not store the newline but `fgets()` does). Why? There was a blank line +after a `\` at the end of the first line of a macro definition! Thus the code +now first trims off the last character of the buffer read to get the same +correct functionality but in a safe way. Thank you Cody for your assistance! + + ## [1992/gson](1992/gson/gson.c) ([README.md](1992/gson/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the buffer size +in such a way that gets() should be safe (theoretically) as it comes from the +command line (though it can also read input from stdin after starting the +program). Ideally `fgets()` would be used but this is a more problematic. +Previously it had a buffer size of 256 which could easily overflow. In this +entry `gets()` is used in a more complicated way: first `m` is set to `*++p` in +a for loop where `p` is argv. Later `m` is set to point to `h` which was of size +\256. `gets()` is called as `m = gets(m)`) but trying to change it to use +fgets() proved more a problem. Since the input must come from the command line +Cody changed the buffer size to `ARG_MAX+1` which should be enough (again +theoretically) especially since the command expects redirecting a dictionary +file as part of the command line. This also makes it possible for longer strings +to be read (in case the `gets()` was not used in a loop). Thank you Cody for +your assistance! + + ## [1992/kivinen](1992/kivinen/kivinen.c) ([README.md](1992/kivinen/README.md])) +It was observed that on modern systems this goes much too quick. [Yusuke +Endoh](/winners.html#Yusuke_Endoh) created a patch that calls `usleep()` but +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) thought the value was +too slow so he made it a macro in the Makefile `Z`, defaulting at 15000. You can +reconfigure it like: + +```sh +make clobber Z=1000 all +``` + +Yusuke also noted that there is a bug in the program where right after starting +it moves towards the right but if you click the mouse it goes back. Thank you +Yusuke! + + ## [1992/lush](1992/lush/lush.c) ([README.md](1992/lush/README.md])) +[Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a patch which makes this +work with gcc. Due to how it works (see Judges' remarks below) this will not +work with clang. Thank you Yusuke! + +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made it use `fgets()` +instead of `gets()` to prevent annoying warnings getting in the way and also +added the `runme.sh` script to demonstrate it (using make was problematic). Cody +notes that unfortunately this does not work with clang due to different compiler +messages. Thank you Cody! + + ## [1992/westley](1992/westley/westley.c) ([README.md](1992/westley/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for clang by +changing the third and fourth arg of main() to be ints inside main(); clang +requires args 2 - 4 to be `char **`. He also fixed it so that the program would +not segfault if not enough args were specified. He did the same for the +alternative version (see below) provided by the author (the original can be seen +in the author's remarks below). Thank you Cody for your assistance! + + ## [1993/jonth](1993/jonth/jonth.c) ([README.md](1993/jonth/README.md])) +Both [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) and [Yusuke +Endoh](/winners.html#Yusuke_Endoh) fixed this so that it +will work with modern systems. Yusuke provided some fixes of the X code and Cody +fixed the C pre-processor directives so that it would compile. It used to be +that you could get away with code like: + +```c +G int i,j +K case +``` + +and expect `G;` to equate to `int i, j;` (though it's now a long) and `K` to mean +`case` but that's no longer the case so the offending lines had `#define` +prepended to them. Thank you Yusuke and Cody for your assistance! + + ## [1993/leo](1993/leo/leo.c) ([README.md](1993/leo/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with +modern compilers. Thank you Cody! + + ## [1993/lmfjyh](1993/lmfjyh/lmfjyh.c) ([README.md](1993/lmfjyh/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate +version which does what the program did with gcc < 2.3.3. Thank you Cody! + + ## [1993/plummer](1993/plummer/plummer.c) ([README.md](1993/plummer/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate +version which uses `usleep()` so you can see what is happening with faster +systems. Thank you Cody! + + ## [1993/rince](1993/rince/rince.c) ([README.md](1993/rince/README.md])) +[Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a patch to get this to work +in modern systems. Thank you Yusuke! + + ## [1993/schnitzi](1993/schnitzi/schnitzi.c) ([README.md](1993/schnitzi/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this use `fgets()` +not `gets()` to make it safer and to prevent an annoying warning with compiling +and/or linking and/or runtime, the latter of which is interspersed with the +output of the program itself. Thank you Cody for your assistance! + + ## [1993/vanb](1993/vanb/vanb.c) ([README.md](1993/vanb/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with +clang. The problem was that the third arg to main() was not a `char **`. Instead +`O5()` (which was `main()`) is now its own function which main() calls with the +right parameters. Thank you Cody for your assistance! + + ## [1994/ldb](1994/ldb/ldb.c) ([README.md](1994/ldb/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so it would +compile and work with modern compilers. The problem was that `srand()` returns +void but it was used in a `||` expression. Thus the comma operator was needed. +Cody also changed the entry to use `fgets()` instead of `gets()` to make it safe +for lines greater than 231 in length and to prevent a warning at linking or at +runtime, the latter of which can be interspersed with output of the program. +Note that this now prints a newline after the output but this seems like a +worthy compromise for making it safer (fixing it is more problematic than it is +worth). In macOS another line of output would be shown anyway namely the warning +that it uses gets(). A subtlety about this fix: if a line is greater than 231 in +length if the program chooses that line it might print the first 231 characters +or it might print (up to) the next 231 characters and so on. Thank you Cody for +your assistance! + + ## [1994/schnitzi](1994/schnitzi/schnitzi.c) ([README.md](1994/schnitzi/README.md])) +NOTE: the buffer size is very small at 100. It's easy to fix the buffer size but +it is not as easy to change it to `fgets()`. [Cody Boone +Ferguson](/winners.html#Cody_Boone_Ferguson) gives some hints in the +[bugs.md](/bugs.md) file on how this entry works which might be useful in order +to get this to use `fgets()` which would prevent a warning at linking or +runtime, the latter of which is interspersed with the output of the program. The +file [schnitzi.alt.c](schnitzi.alt.c) has this to get anyone started, should +they wish to tackle it (Cody might in time). The problem with changing the buffer +size is that even when it works the generated output (see judges' remarks below) +will not be 100% correct duplication of the program. + + ## [1994/shapiro](1994/shapiro/shapiro.c) ([README.md](1994/shapiro/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a bug on systems +where `EOF != -1`. The problem is that `getc()` and the related functions do not +return `-1` on EOF or error but rather `EOF`. However `EOF` is not required to be +`-1` but merely an int < 0 and this program assumed that `getc()` will return +`-1` on EOF or error, not `EOF`. On systems where `EOF != -1` it could result in +an infinite loop (for the same reason one should not use `EOF` for the `getopt()` +functions as they return `-1` when all options are parsed (for details on the +definition of `EOF` see `7.21 Input/output` subsection 1 of the +standard)). An interesting problem occurred where changing the `-1` to `EOF` +caused both `warning: illegal character encoding in string literal` and `error: +source file is not valid UTF-8`. But since `EOF` is simply an int < 0 and making +the loop condition check that the return value is >= 0 does not cause a +compilation error and it functions correctly it will address the systems where +`EOF != -1` just as if it checked for `!= EOF`. Thank you Cody for your +assistance! + + ## [1994/westley](1994/westley/westley.c) ([README.md](1994/westley/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) converted the spoiler +compiler options to be compiler commands and added a script +[spoiler.sh](spoiler.sh) to automate the spoiler commands provided by the author +to make it easier to see the game in action. Thank you Cody! + + ## [1995/cdua](1995/cdua/cdua.c) ([README.md](1995/cdua/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it +would work with macOS. Once it could compile it additionally segfaulted under +macOS which he also fixed. Cody also provided the Alternate code for fun :-) ). +Thank you Cody for your assistance! + + ## [1995/garry](1995/garry/garry.c) ([README.md](1995/garry/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed it +so that it will compile with modern compilers. The problem was a missing `int` for +the `f` variable. He felt it was important that it works because the layout does +indeed look to him like a rat is dropping core. Thank you Cody! + + ## [1996/august](1996/august/august.c) ([README.md](1996/august/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in +this program that prevented it from working right but he notes it hangs in +macOS. It works fine in linux. This is because macOS has clang, not gcc, even +the gcc binary. He observed that with specific compiler flags it hangs in linux +too and perhaps it's related to this in macOS; maybe other flags are needed but +he doesn't know (at least not yet). He provided a bit more information in +[bugs.md](/bugs.md) for anyone who wants to have a go at providing a fix for +other compilers. As there are a lot of commands to try he also added +[try.sh](try.sh). Thank you Cody for your assistance! + + ## [1996/dalbec](1996/dalbec/dalbec.c) ([README.md](1996/dalbec/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) proposed a fix for this +to compile with clang and Landon implemented it after some discussion. The +reason Cody did not do it is because he thought it was the wrong output but as +it happens the try section below was worded a bit confusingly. He looked at +[Yusuke Endoh's](/winners.html#Yusuke_Endoh) analysis found +[here](https://mame-github-io.translate.goog/ioccc-ja-spoilers/1996/dalbec.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp) +but he missed that Yusuke added a '...' after the result which made him think +the fix was wrong. Cody also made the recommended change of the author to make +it so that each number is printed on a line by itself rather than having a long +string of numbers on the same line. Thank you Cody for your assistance and +thanks to Yusuke for confirming the output is correct! + + ## [1996/eldby](1996/eldby/eldby.c) ([README.md](1996/eldby/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) provided an alternate +version which uses `usleep()` in between writing the output for those who are +sensitive to text flashing by rapidly (it affects him too but he also thinks it +moves too fast nowadays anyway). Thank you Cody! + + ## [1996/gandalf](1996/gandalf/gandalf.c) ([README.md](1996/gandalf/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile +and work with modern systems. As he loved the references in the code that could +not compile he just commented out as little as possible to get this to compile. +Thank you Cody for your assistance! + + ## [1996/westley](1996/westley/westley.c) ([README.md](1996/westley/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in +this entry as well as it displaying environmental variables. Although the +scripts showed correct output, it somewhat lessened the usability because they +segfaulted and showed (an) environmental variable, interspersed with the output +of the program. With the fix they no longer have this problem. If `argc < 5` +(`argv[4]` is referenced) it will not do anything and it will not segfault +either - this was caused by the body of the for() loop which is now empty (it +doesn't appear to be needed at all at least modernly). Note that you should +check the [westley.alt.c](westley.alt.c) file when reading the author's +comments. To see how to use the original see below. Thank you Cody for your +assistance! + + ## [1998/chaos](1998/chaos/chaos.c) ([README.md](1998/chaos/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added a call to +`endwin()` to restore terminal sanity (echo etc.) when exiting the program. +Thank you Cody for your assistance! + + ## [1998/schnitzi](1998/schnitzi/schnitzi.c) ([README.md](1998/schnitzi/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed invalid data +types which prevented this entry from working, causing a segfault. This showed +itself in two parts which required two fixes, one for linux and further changes +for macOS. He also fixed a segfault (after printing garbage) when the arg +specified evaluated to 0. + +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made an +alternate version that works with macOS but there are some important notes as +well as a description of how it works (spoilers for the original version as +well). Thank you Cody for your assistance! + + ## [1998/schweikh1](1998/schweikh1/schweikh1.c) ([README.md](1998/schweikh1/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern +systems (it did not work at all). He also made it so that if a file fails to +open it does not return but rather skips the reading of the file. Doing this +lets the entry work right. + +What was wrong? The call to `freopen()` was incorrect with the second arg (the +mode) being instead `5+__FILE__`. It now is `"r"`. There was also a call to +`fopen()` that was wrong where the mode was instead `44+__FILE__`. Interestingly +enough though this did not seem to be an issue though I cannot explain why. He +notes that it works fine with `clang` as well as `gcc` (which is what is used +but in macOS - see below for alternate code - `gcc` is clang). + +Additionally Cody provided an alternate version for macOS. See below for the +alternate version. Thank you Cody for your assistance! + + ## [2000/anderson](2000/anderson/anderson.c) ([README.md](2000/anderson/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed this entry to +use `fgets()` instead of `gets()` to make it safer and to prevent annoying +warnings from showing up at linking or runtime. Thank you Cody! + + ## [2000/briddlebane](2000/briddlebane/briddlebane.c) ([README.md](2000/briddlebane/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile +in systems that require one to explicitly link in `libm`. Thank you Cody! + + ## [2000/dlowe](2000/dlowe/dlowe.c) ([README.md](2000/dlowe/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile +with more recent perl versions; the symbol now `PL_na` was once `na`. He notes +that this entry crashes under macOS but it works under linux after this change. +Thank you Cody for your assistance! + + ## [2000/jarijyrki](2000/jarijyrki/jarijyrki.c) ([README.md](2000/jarijyrki/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made it easier to +compile this by adding `X11/` to the includes of `Xlib.h` and `keysym.h`. Thank +you Cody! + + ## [2000/natori](2000/natori/natori.c) ([README.md](2000/natori/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern +compilers. Depending on the compiler it would either segfault when run or not +compile at all (gcc and clang respectively). Cody provided alternate code that +supports the southern hemisphere. Thank you Cody for your assistance! + + ## [2000/thadgavin](2000/thadgavin/thadgavin.c) ([README.md](2000/thadgavin/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed the code and +added an appropriate make rule so that the SDL version works independent from +the curses version (using the same code). + +To see the craziness of the SDL fix (because of a design choice of the SDL1 +developers) see the log for commit dd0b26b5d6325e8b6fdef1232156c8bb8c66613f. Be +prepared for a surprise. Thank you Cody for your assistance! + + ## [2001/anonymous](2001/anonymous/anonymous.c) ([README.md](2001/anonymous/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed both the +supplementary program and the program itself (both of which segfaulted and once +that was fixed only the binary was modified; it was not run but according to the +author's remarks it should be executed). He managed to do this with linux +but it will not work with macOS (see [bugs.md](/bugs.md) for why this is); _this +is not a bug, it's a feature_ inherent in what it does! + +The following had to be done in order to get this to work: + +- `#include ` for `mmap()` and `munmap()`. +- have `main()` call another function which is no longer a recursive function; +this prevented `main()` from entering an infinite recursive loop. + +Without either of these it would crash and prevent modification of the 32-bit +[ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) (not elf :-) ) +binary. But again see [bugs.md](/bugs.md) here. + +The following change was also made to be more portable, in case the constants +`PROT_READ` and/or `PROT_WRITE` are not standardised: + +Change `3` in the call to `mmap()` to be `PROT_READ|PROT_WRITE`: just in case +`PROT_READ|PROT_WRITE` does not equal 3 (though it seems to be equal in both +macOS and linux). + +There was one other thing that had to be done though. Since the program used to +recursively call (infinite recursion, seemingly) `main()` and since that cannot +be done what had to be done instead is after the new function (`pain()` since it +was a pain to fix :-) ) returns to first call `munmap()` and `close()` (else one +would get text file busy error) and then the program can call `execv()` again +like the function `pain()` (was in `main()`) did but with a slight change. See +commit `2159caec4677e0f25ad704a74e04c8196fd6c343` for more details. + +Notice that the location of the calls to `munmap()` and `close()` followed by +`execv()` _does matter_! + +NOTE: there might be educational value to see the progress of this fix; if you +wish to see, try: + +```sh +git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..93aa8d79f208dcccc3c5a2370a727b5cf64e9c53 anonymous.c +git diff 93aa8d79f208dcccc3c5a2370a727b5cf64e9c53..c48629017117379a52b1a512ef8f2593ca9569c8 anonymous.c +git diff c48629017117379a52b1a512ef8f2593ca9569c8..efdee208a2bc650256637b9357ddfd0de82d2f41 anonymous.c +git diff efdee208a2bc650256637b9357ddfd0de82d2f41..e9a3f77ea3b209e63ac3f9c06bb84ad86e5ea706 anonymous.c +git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..2159caec4677e0f25ad704a74e04c8196fd6c343 anonymous.c +git diff 2159caec4677e0f25ad704a74e04c8196fd6c343..4bc03de321612869aebf855850c6500df95cb6ef anonymous.c +``` + +Finally to see from start to finish: + +```sh +git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..4bc03de321612869aebf855850c6500df95cb6ef anonymous.c +``` + +Cody also added a [program](anonymous.bed.c) like [anonymous.ten.c](anonymous.ten.c) +[Ten Green Bottles](https://en.wikipedia.org/wiki/Ten_Green_Bottles) but which +sings [Ten in the Bed](https://allnurseryrhymes.com/ten-in-the-bed/). + +Thank you Cody for your assistance! + + ## [2001/bellard](2001/bellard/bellard.c) ([README.md](2001/bellard/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) partially fixed this +but he notes that this will not work without (according to the author) i386 +linux or else some skill in resolving the portability issues. As it is it +segfaults in 64-bit linux (and as expected macOS). He fixed an earlier segfault +so that at least the file can be opened (but perhaps that will be wrong in i386 +linux?) and he also changed some of the macro used to what they evaluate to but +mostly he kept it the same. + +Cody also fixed [bellard.otccex.c](bellard.otccex.c) so it does not segfault and +seemingly works okay (it did not work at all). The main problem was that some +ints were being used as pointers. Also the Fibonacci sequence (`fib()`) will +overflow at `n > 48` so this is checked prior to running the function. Either +way unfortunately this entry seems to not work in 64-bit linux or macOS. See +below portability notes. Thank you Cody for your assistance! + +### Portability notes: + +With a tip from [Yusuke Endoh](/winners.html#Yusuke_Endoh) we rediscovered the +author's [web page for this program](https://bellard.org/otcc/) where it is +stated that this will only work in i386 linux. The author also stated in the +remarks in this document that they used [gcc +2.95.2](https://ftp.gnu.org/gnu/gcc/gcc-2.95.2/gcc-everything-2.95.2.tar.gz) but +we don't know if that's relevant or not. + +Yusuke offered a modification which is not needed with gcc but with some +versions of `clang` it is. With `gcc` we can get away with `-rdynamic -fno-pie +-Wl,-z,execstack` which solves the problem of execution in memory but any +compiler that does not support this would not work. Thus we use the modification +by Yusuke. Thank you Yusuke! + + ## [2001/cheong](2001/cheong/cheong.c) ([README.md](2001/cheong/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with +clang by adding another function that is allowed to have a third arg as an int, +not a `char **`. He chose pain() because it's a four letter word that would +match the format and because it's pain that clang forces this. :-) This fix +makes a point of the author's notes on portability no longer valid, btw. Thank +you Cody for your assistance! + + ## [2001/coupard](2001/coupard/coupard.c) ([README.md](2001/coupard/README.md])) +Thanks go to [Yusuke Endoh](/winners.html#Yusuke_Endoh) for providing a proper +command line (see [/2013/endoh3/README.md](2013/endoh3/README.md). + + ## [2001/ctk](2001/ctk/ctk.c) ([README.md](2001/ctk/README.md])) +The ANSI escape codes were no longer valid but [Yusuke +Endoh](/winners.html#Yusuke_Endoh) provided a patch to fix the ANSI escape +codes. This works with macOS as well. Thank you Yusuke! + + ## [2001/dgbeards](2001/dgbeards/dgbeards.c) ([README.md](2001/dgbeards/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this alternate version with +the former change (the idea of crashing when losing is too good to fix in his +opinion). + + ## [2001/herrmann2](2001/herrmann2/herrmann2.c) ([README.md](2001/herrmann2/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with +both 64-bit and 32-bit compiles by changing most of the `int`s (all but that in +`main`) to `long`s. He also fixed it to compile with clang by changing the args +of main to be `int` and `char **` respectively and changing specific references +to the `argv` arg, casting to `long` (was `int` but the 64-bit fix requires +`long`) which was its old type. The original file, used for demonstration +purposes, as well as if you want to see if your system works with the original +code (in which case see below Alternate code section), is in +[herrmann2.alt.c](herrmann2.alt.c). Thank you Cody for your assistance! + + ## [2001/kev](2001/kev/kev.c) ([README.md](2001/kev/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) slowed down the ball +just a tad as it went too fast for the speed at which the paddles move even when +holding down the movement keys. + +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) provided an alternate +version which lets you use the arrow keys on your keyboard instead of the more +awkward ',' and '.'. Thank you Cody! + + ## [2001/westley](2001/westley/westley.c) ([README.md](2001/westley/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added the script +[westley.sh](westley.sh) to automate a heap of commands that we, the IOCCC +judges, suggested, as well as some additional ones that he thought would be fun. +These include the below sort and punch card versions that he added, described +below, based on the author's remarks. Thank you Cody! + + ## [2004/arachnid](2004/arachnid/arachnid.c) ([README.md](2004/arachnid/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate +version which allows those like himself used to `h`, `j`, `k` and `l` movement +keys to not get lost. Non rogue players, vi users and Dvorak typists are invited +to get lost (or use the original version)! Thank you Cody! + + ## [2004/burley](2004/burley/burley.c) ([README.md](2004/burley/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile with +clang which requires that the first arg of main() be an int and the remaining +args to be a `char **`. He notes that he could not get the entry to work with +gcc before the fix and it does not work with clang either; see +[/bugs.md](/bugs.md) for information here. Thank you Cody for your assistance! + + ## [2004/gavin](2004/gavin/gavin.c) ([README.md](2004/gavin/README.md])) +[Yusuke Endoh](/winners.html#Yusuke_Endoh) provided the `kernel` and `fs.tar` +files which can be used if you cannot normally use this entry. Instead of +generating the files just use the files provided, found under the [img/](img/) +directory. Note that the `img/fs.tar` extracts into `fs/` so you will have to +fix the tarball; this is done this way to prevent extraction from the entry +directory overwriting the files and causing `make clobber` to wipe some of them +out. Thank you Yusuke! + + ## [2004/kopczynski](2004/kopczynski/kopczynski.c) ([README.md](2004/kopczynski/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) reported that this +entry cannot be optimised by the compiler if it's to work. He also added the +file [kopczynski-a](kopczynski-a) to demonstrate what happens when art more like +a letter is fed to the program. Thank you Cody! + + ## [2004/newbern](2004/newbern/newbern.c) ([README.md](2004/newbern/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) and Landon individually +fixed this to work with clang. Cody then turned the second arg to main, which +clang requires to be a `char **`, to be not the same name as a function defined +earlier in the code and to use that variable which `main()` used. Thank you Cody +for your assistance! + + ## [2005/aidan](2005/aidan/aidan.c) ([README.md](2005/aidan/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed the test script, +described by the author in their remarks, to refer to the proper compiled +program (it's hardcoded) which was never done which broke the script. Thank you +Cody! + + ## [2005/anon](2005/anon/anon.c) ([README.md](2005/anon/README.md])) +The author stated that if `stty` does not work right on your system you can +compile it differently so that the program does not use `stty`. +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) set this up so that one +need not update the [Makefile](Makefile). There's a fun thing here that will be +mentioned below as well. Thank you Cody! + + ## [2005/giljade](2005/giljade/giljade.c) ([README.md](2005/giljade/README.md])) +After Landon fixed the entry to compile with clang (but see above and below) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) noticed this does not +work at all in modern systems. He fixed this to work but he notes that the fix +to let clang compile it breaks the self-test feature. + +The problem that was showing up is that with either optimising or if anything +but 32-bit (as in `-m32`) was used it would not work (at least in 64-bit +systems?). The optimising cannot be used still but it now works with both 32-bit +and 64-bit. The solution has to do with the size difference between `int` and +`long` so that the `long*E` is now `int*E`. This solves a specific problem for +linux (32-bit, 64-bit) and macOS (arm64). + +But as noted there is another problem with clang: the self-test feature only +completely works with the original version ([giljade.alt.c](giljade.alt.c)), not +the one that will compile with clang ([giljade.c](giljade.c)). The alternate +version, which will not compile with clang, is the only one that passes the +self-tests. If your compiler does not have the defect that clang has about arg +types to `main()` see the Alternate code section below at least for the +self-test feature. Thank you Cody for your assistance! + + ## [2005/mynx](2005/mynx/mynx.c) ([README.md](2005/mynx/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that the +[configure](source/configure) script (which is not needed but part of the entry) +would work with compilers that have by default `-Werror` like clang in macOS. + +Cody also added the alt code which does scan for https. Futile, maybe, +in which case just enjoy it for what it was. Thank you Cody! + + ## [2006/birken](2006/birken/birken.c) ([README.md](2006/birken/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in +macOS with this entry. The problem was a missing `+1` for strlen() with +malloc(). This prevented it from working. Thank you Cody for your assistance! + + ## [2006/borsanyi](2006/borsanyi/borsanyi.c) ([README.md](2006/borsanyi/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed (the Makefile) +under some systems where the `lpthread` was not implicitly linked in. Thank you Cody! + + ## [2006/monge](2006/monge/monge.c) ([README.md](2006/monge/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) pointed out that +without SDL1 (**not** SDL2) this will not link because two functions that are +used were removed from SDL2. Since SDL1 is still available and since changing +the code to use SDL2 would be more complicated he decided to change the Makefile +to use `sdl-config` not `sdl2-config`. Nevertheless he points out that the entry +requires x86/x86_64 CPUs. Without it it might very well segfault (for instance +it segfaulted on his MacBook Pro with the M1 chip). + + ## [2006/night](2006/night/night.c) ([README.md](2006/night/README.md])) +As [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) is a lost :-) `vim` +user he took the author's remarks to add support back for arrow keys. Thank you Cody! + + ## [2006/sloane](2006/sloane/sloane.c) ([README.md](2006/sloane/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this entry to +work with clang which is stricter on the type of args to main(). Curiously +although clang requires the types of args to be strictly correct it allows for +only one arg which he made it as the second arg was not used and this allows for +a closer match to the original format of the entry. He also made sure that the +Makefile links in `libm` as not all systems do this by default. Since the author +suggested that the lack of certain `#include`s might break the program in some +systems he added `-include ...` to the Makefile as well. Thank you Cody for your +assistance! + +The alternate version was provided by [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson). +Thank you Cody! + + ## [2006/toledo2](2006/toledo2/toledo2.c) ([README.md](2006/toledo2/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in +this program which was making it fail to work under macOS - it did not seem to +be a problem under linux, at least not fedora. The problem was wrong variable +types - implicit `int`s instead of `FILE *`s. It now works with both macOS and +linux. Thank you Cody! + + ## [2006/toledo3](2006/toledo3/toledo3.c) ([README.md](2006/toledo3/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a crash and a +display problem in this entry so that it now works in modern (64-bit) systems. +The problem was that it relied on 32-bits so some `int`s were changed to +`long`s. At this time we don't have an easy way to test this theory but it might +be that using `-m32` would let this work in 32-bit systems. Thank you Cody for +your assistance! + + ## [2011/eastman](2011/eastman/eastman.c) ([README.md](2011/eastman/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) tested this with +[macOS Ventura](https://www.apple.com/macos/ventura/) with the M1 chip for +the author (who tested [OS X 10.7 +(Lion)](https://en.wikipedia.org/wiki/OS_X_Lion) and [fedora +10](https://fedoraproject.org/wiki/Releases/10/FeatureList)) and reported that +it works fine. + + ## [2011/goren](2011/goren/goren.c) ([README.md](2011/goren/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for macOS. +Before the fix it segfaulted. It worked fine under linux. After fixing it it was +noticed that the author stated it does not work for 64-bit so it was then tested +as a 32-bit binary (linux) and 64-bit binary (linux, macOS) and both work. It +was fixed by changing some `int`s to `long`s. Thank you Cody! + + ## [2011/richards](2011/richards/richards.c) ([README.md](2011/richards/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a minor problem +that showed up in both linux and macOS. He notes however that as of this time +this entry does not work with macOS. See [bugs.md](/bugs.md) for more details. +Thank you Cody! + + ## [2011/vik](2011/vik/vik.c) ([README.md](2011/vik/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson), though he feels +slightly sick :-), added a version for Windows based on the author's comments +(along with looking up the function for the right header file). To build try the +alt rule of the Makefile. + + ## [2012/kang](2012/kang/kang.c) ([README.md](2012/kang/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the code to +accept the proper German for four 'vier' where before it was spelt with the +sound of V (fier not vier). But was this a bug or a feature? He's on the fence +here but he went ahead and did it anyway as it seems useful. Thank you Cody! + + ## [2012/tromp](2012/tromp/tromp.c) ([README.md](2012/tromp/README.md])) +XXX - no thank you text was found - XXX + + ## [2012/vik](2012/vik/vik.c) ([README.md](2012/vik/README.md])) +Based on the author's description it should be able to get this entry to work +for Windows. With his instructions [Cody Boone +Ferguson](/winners.html#Cody_Boone_Ferguson) added the alternate version that +does this for the few who might use Windows. + +We're not sure whether we want to thank Cody or not for this :-) and he's not +sure if he wants to be thanked either :-) but we appreciate it nonetheless. + + ## [2013/birken](2013/birken/birken.c) ([README.md](2013/birken/README.md])) +Along with the [demo.sh](demo.sh), based on the author's recommendations, +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate +version for this entry which allows one to control how fast the painting is +done. Thank you Cody! + + ## [2013/cable3](2013/cable3/cable3.c) ([README.md](2013/cable3/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile +with modern systems. The problems were that `localtime()` is used differently +and `time.h` being included (with SDL2 in macOS - but see below) there was a +conflicting function type. This appeared to be a problem with macOS and only +when SDL2 was included (but which as noted next it cannot be). The other problem +is that this entry uses SDL functions that were removed from SDL2 so the +Makefile has to use `sdl-config` and not `sdl2-config`. Thus the removal of +localtime probably does not have to be done after all. He left it there in case +some implementation of SDL1 also has this problem. Thank you Cody for your +assistance! + + ## [2014/maffiodo1](2014/maffiodo1/maffiodo1.c) ([README.md](2014/maffiodo1/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed the build for +this entry: it does not require SDL2 but SDL1 so there were linking errors. +Thank you Cody! + + ## [2014/vik](2014/vik/vik.c) ([README.md](2014/vik/README.md])) +NOTE: In 2020 [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) found a +minor bug when working on his [Enigma machine entry](../../2020/ferguson2); see +his [README.md](../../2020/ferguson2/README.md) for details (search for `vik`). + + ## [2015/endoh3](2015/endoh3/prog.c) ([README.md](2015/endoh3/README.md])) +The author, [Yusuke Endoh](/winners.html#Yusuke_Endoh), supplied the additional +source files, which [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) +added to the repo for us. He wrote on his [analysis of the +entry](https://mame-github-io.translate.goog/ioccc-ja-spoilers/2015/endoh3.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp) +that there are others as well but we don't seem to have them and he didn't +provide them on his page. We've not yet contacted him for a copy but we will in +time. Thank you Yusuke! + + ## [2015/yang](2015/yang/prog.c) ([README.md](2015/yang/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed an unfortunate +typo in the Makefile that was preventing some of the files from compiling +properly, trying instead to compile already compiled code. Thank you Cody! + + ## [2018/poikola](2018/poikola/prog.c) ([README.md](2018/poikola/README.md])) +NOTE: some have reported that Terminal.app in macOS does not work and one might +need a different terminal emulator like that from +[XQuartz](https://www.xquartz.org) but [Cody Boone +Ferguson](/winners.html#Cody_Boone_Ferguson) reported that this works fine in +macOS Ventura with Terminal.app. YMMV of course. + + ## [2019/ciura](2019/ciura/prog.c) ([README.md](2019/ciura/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed invalid bytes +error in `tr` in the scripts. He notes that at least on his systems (macOS and +fedora linux) the alternative languages do not work. Perhaps that is the wrong +locale or it's unable to come up with perfect pangrams but one will not get +errors now (it did not work before the fixes either). Thank you Cody for your +assistance! + + ## [2019/diels-grabsch1](2019/diels-grabsch1/prog.c) ([README.md](2019/diels-grabsch1/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made the author's +statement that the entry compiles cleanly true by fixing `warning: a function +declaration without a prototype is deprecated in all versions of C ` (in +main()). Not strictly necessary but if he's making fixes he might as well. Thank +you Cody! + + ## [2019/diels-grabsch2](2019/diels-grabsch2/prog.c) ([README.md](2019/diels-grabsch2/README.md])) +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made the author's +statement that the entry compiles cleanly true by fixing `warning: a function +declaration without a prototype is deprecated in all versions of C` (in +main()). Not strictly necessary but if he's making fixes he might as well. Thank +you Cody! + + ## [2019/karns](2019/karns/prog.c) ([README.md](2019/karns/README.md])) + +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) reported that with `-O` +level > 0 this program segfaults (sometimes?). He's not sure why as it worked +fine before on the same systems tested but `-O0` appears to fix the problem in +both macOS and linux. Perhaps this is the problem that the author reported where +it sometimes segfaults but Cody did not try debugging it. Thank you Cody for +your assistance! diff --git a/winners.html b/winners.html index ffb9e1c84..eae7c3af7 100644 --- a/winners.html +++ b/winners.html @@ -7,19 +7,27 @@ -
IOCCC

+
IOCCC
Logo by winner Matt Zucker

The International Obfuscated C Code Contest

-

[ The judges | -IOCCC home page | -How to enter | + +

+

+The judges | +IOCCC home page | FAQ | +How to enter | Contacting the IOCCC -
-IOCCC news | +

+IOCCC news | People who have won | -Winning entries ]

-
+Winning entries +

+Known Bugs & (Mis)features | +How to fix an IOCCC winner | +Thanks for the fixes | +A bit of web site history +

[ A   diff --git a/years.html b/years.html index 204601900..acf39bed9 100644 --- a/years.html +++ b/years.html @@ -8,21 +8,27 @@ -

IOCCC
-
+
IOCCC
Logo by winner Matt Zucker

The International Obfuscated C Code -Contest
-
-

[ The judges | -IOCCC home page | -How to enter | +Contest


+ +

+

+The judges | +IOCCC home page | FAQ | +How to enter | Contacting the IOCCC -
-IOCCC news | +

+IOCCC news | People who have won | -Winning entries ]

-
+Winning entries +

+Known Bugs & (Mis)features | +How to fix an IOCCC winner | +Thanks for the fixes | +A bit of web site history +
[ 2020 | 2019 | 2018 | 2015 | 2014 | 2013 | 2012 | 2011 | 2006 | 2005 | 2004 | 2001 | 2000 | 1998 | 1996 | 1995 | 1994 | 1993 | 1992 | 1991 | 1990 | 1989 | 1988 | 1987 | 1986 | 1985 | 1984 | ALL ]