diff --git a/1984/mullender/.gitignore b/1984/mullender/.gitignore index 85c8b08ba..14a439de4 100644 --- a/1984/mullender/.gitignore +++ b/1984/mullender/.gitignore @@ -1,2 +1,3 @@ mullender mullender.alt +gentab diff --git a/1984/mullender/Makefile b/1984/mullender/Makefile index 38f359ecc..f1fab7dff 100644 --- a/1984/mullender/Makefile +++ b/1984/mullender/Makefile @@ -131,6 +131,10 @@ ${PROG}: ${PROG}.c @echo "than a Vax-11 or pdp-11." ${CC} ${CFLAGS} $< -o $@ ${LIBS} +gentab: gentab.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + + # alternative executable # alt: data ${ALT_TARGET} @@ -164,6 +168,7 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} ${RM} -f core + ${RM} -f gentab @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ diff --git a/1984/mullender/README.md b/1984/mullender/README.md index ed1a8de61..39737e044 100644 --- a/1984/mullender/README.md +++ b/1984/mullender/README.md @@ -17,11 +17,11 @@ make all ./mullender ``` -> NOTE: If your machine is not a Vax-11 or pdp-11, this program will +> NOTE: If your machine is not a VAX-11 or PDP-11, this program will > not execute correctly. In later years, machine dependent > code was discouraged. -### Alternative code: +### Alternate code: [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added the alternative code which lets you run this on other systems. He notes though that this was @@ -95,6 +95,30 @@ couldn't! :-) BTW: this remains my (Landon Curt Noll's) all time favorite entries! +Cody found the remarks from [Sjoerd Mullender](/winners.html#Sjoerd_Mullender) +and added the program that was used by the authors to generate the array that he +referred to. Because [a.out.h](a.out.h) is not available in all systems (like macOS) and +more importantly because he wanted it to be as close to as the original as +possible he used a copy of + +in the *fabulous* [Unix History +Repo](https://github.com/dspinellis/unix-history-repo/tree/Research-Release). + +This tool can be built by running: + + +```sh +make gentab +``` + +Cody notes that it does not appear to work in modern systems (unbalanced braces) +or something else is wrong but given that this was done a long time ago on a now +archaic system maybe that is why. He also noted that if the `short`s are not +changed to just `int` it prints out a lot of negative numbers but since +[mullender.c](mullender.c) has a negative number he kept it as is. + +Thank you Cody! + ## Author's remarks: These remarks, found at diff --git a/1984/mullender/a.out.h b/1984/mullender/a.out.h new file mode 100644 index 000000000..75e2ba9fa --- /dev/null +++ b/1984/mullender/a.out.h @@ -0,0 +1,33 @@ +struct exec { /* a.out header */ + int a_magic; /* magic number */ + unsigned a_text; /* size of text segment */ + unsigned a_data; /* size of initialized data */ + unsigned a_bss; /* size of unitialized data */ + unsigned a_syms; /* size of symbol table */ + unsigned a_entry; /* entry point */ + unsigned a_unused; /* not used */ + unsigned a_flag; /* relocation info stripped */ +}; + +#define A_MAGIC1 0407 /* normal */ +#define A_MAGIC2 0410 /* read-only text */ +#define A_MAGIC3 0411 /* separated I&D */ +#define A_MAGIC4 0405 /* overlay */ + +struct nlist { /* symbol table entry */ + char n_name[8]; /* symbol name */ + int n_type; /* type flag */ + unsigned n_value; /* value */ +}; + + /* values for type flag */ +#define N_UNDF 0 /* undefined */ +#define N_ABS 01 /* absolute */ +#define N_TEXT 02 /* text symbol */ +#define N_DATA 03 /* data symbol */ +#define N_BSS 04 /* bss symbol */ +#define N_TYPE 037 +#define N_REG 024 /* register name */ +#define N_FN 037 /* file name symbol */ +#define N_EXT 040 /* external bit, or'ed in */ +#define FORMAT "%06o" /* to print a value */ diff --git a/1984/mullender/gentab.c b/1984/mullender/gentab.c new file mode 100644 index 000000000..069cd89e7 --- /dev/null +++ b/1984/mullender/gentab.c @@ -0,0 +1,54 @@ +#include +#include +#include "a.out.h" + +main(argc, argv) char **argv; +{ + register FILE *fp; + register short pos = 0, c, n; + register char *fmt = ""; + if (argc != 2) { + fprintf (stderr, "Usage: %s file\n", argv[0]); + exit (1); + } + + if ((fp = fopen(argv[1], "r")) == NULL) { + fprintf(stderr, "%s: can't open %s\n", argv[0], argv[1]); + exit(2); + } + + fseek (fp, (long) sizeof (struct exec), 0); + printf("/* portable between VAX and PDP11 */\n\n"); + printf ("short main[] = {\n"); + for (;;) { + if (pos == 0) + printf("\t"); + + c=getc(fp) & 0377; + if (feof(fp)) break; + n = getc(fp) << 8|c; + + switch (rand() % 5) { + case 0: + case 1: + fmt = "%d"; break; + case 2: + fmt = "%u"; break; + case 3: + fmt = "0%o"; break; + case 4: + fmt = "0x%x"; break; + } + + if (32 <= n && n < 127 && (rand() % 4)) fmt = "'%c'"; + printf(n < 8 ? "%d" : fmt, n); + printf(","); + if (pos++ == 8) { + printf("\n"); + pos = 0; + } + else printf(" "); + + printf("};\n"); + } +} diff --git a/1986/marshall/Makefile b/1986/marshall/Makefile index 9c0dfec7c..d9068b441 100644 --- a/1986/marshall/Makefile +++ b/1986/marshall/Makefile @@ -130,7 +130,6 @@ all: data ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c - @echo "NOTE: This entry uses non-standard args to main() that do not work with modern compilers." ${CC} ${CFLAGS} $< -o $@ ${LIBS} # alternative executable diff --git a/1993/Makefile b/1993/Makefile index 9817da871..fd99fb42c 100644 --- a/1993/Makefile +++ b/1993/Makefile @@ -41,7 +41,7 @@ include ../var.mk # IOCCC winners ############### # -WINNERS= cmills dgibson ejb howe jonth leo lmfjyh plummer rince schnitzi vanb +WINNERS= ant cmills dgibson ejb jonth leo lmfjyh plummer rince schnitzi vanb YEAR= 1993 diff --git a/1993/jonth/Makefile b/1993/jonth/Makefile index 0473b57f3..e8cc9660e 100644 --- a/1993/jonth/Makefile +++ b/1993/jonth/Makefile @@ -131,7 +131,6 @@ all: data ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.tmp.c - @echo "NOTE: This entry might not compile when using modern compilers." ${CC} ${CFLAGS} $< -o $@ ${LIBS} ${PROG}.tmp.c: ${PROG}.c diff --git a/1993/lmfjyh/Makefile b/1993/lmfjyh/Makefile index f3c79aca5..5502f2372 100644 --- a/1993/lmfjyh/Makefile +++ b/1993/lmfjyh/Makefile @@ -133,7 +133,8 @@ ${PROG}: ${PROG}.c ${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c ${CP} lmfjyh.c \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c ${CC} ${CFLAGS} \ - \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c -o $@ ${LIBS} + \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c -o $@ ${LIBS} || \ + ${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c # alternative executable # diff --git a/1995/README.md b/1995/README.md index f44ada07f..2fab13124 100644 --- a/1995/README.md +++ b/1995/README.md @@ -1,73 +1,75 @@ -1995 marked the "The Twelfth International Obfuscated C Code Contest" +# 1995 marked the "The Twelfth International Obfuscated C Code Contest" Look at the README.md file for the given winner for information -on how to compile the winner and how to run the winning program. -Look at the winning source and try to figure how it does what it does! -You may then wish to look at the Author's remarks for even more details. +on how to compile and run the winning program. Look at the winning source and +try to figure how it does what it does! You may then wish to look at the +`Author's remarks` section for even more details. -The IOCCC has an official home page: +The IOCCC has an official home page, , which contains +previous winning entries, information about the judges, announcements and much +more. - http://www.ioccc.org +Use `make` to compile entries. It is possible that on BSD or non-Unix +systems the `Makefile` needs to be changed. See the `Makefile` for details. -containing previous winning entries, information about the judges, -announcements and much more. - -Use make to compile entries. It is possible that on BSD or non-unix -systems the makefile needs to be changed. See the Makefile for details. - -Read over the makefile for compile/build issues. Your system may +Read over the `Makefile` for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a -#define). +`#define`). -This year Sriram Srinivasan joined the judging. +This year [Sriram Srinivasan](http://www.malhar.net/sriram/) joined the judging. -The moderator of comp.unix.wizards did not feel that the IOCCC was "wizardly" -enough to be posted to comp.unix.wizards - we will no longer post the -winners to this newsgroup - we'll let you the reader decide for yourself the -wizardlyness of these entries. +The moderator of +[comp.unix.wizards](https://groups.google.com/g/comp.unix.wizards) did not feel +that the IOCCC was "wizardly" enough to be posted to comp.unix.wizards - we will +no longer post the winners to this newsgroup - we'll let you the reader decide +for yourself the wizardry of these entries. -This year there were several people who won more than once -and several previous winners who won this year. The judging was done -without knowledge of the names of the submitters - multiple winners were -a coincidence. Since we tend to discount entries that are similar to -previous winners, these people have had to come with original ideas to -stay in the winners circle. +This year there were several people who won more than once and several [previous +winners](/winners.html) as well. The judging was done without knowledge of the +names of the submitters - multiple winners were a coincidence. Since we tend to +discount entries that are similar to previous winners, these people had to come +with original ideas to stay in the winners circle. -We wish to thank CAIP at Rutgers University for the use of their machines. +We wish to thank [CAIP at Rutgers +University](https://catalogs.rutgers.edu/generated/nb-grad_0305/pg20199.html) +for the use of their machines. -A few notes regarding future contests -------------------------------------- +## A few notes regarding future contests -Due to changes in the Usenix conference calendar, the 1996 contest will -be delayed. Because there will be no Summer 1996 Usenix conference, -the 1996 IOCCC winners will be announced at the Jan 1997 Usenix -conference. +Due to changes in the [USENIX +conference](https://www.usenix.org/conferences/all) calendar, the [1996 +contest](/years.html#1996) will be delayed. Because there will be no Summer +1996 USENIX conference, the 1996 IOCCC winners will be announced at the Jan 1997 +USENIX conference. -The 1996 contest will not open until sometime in October 1996, and will -close sometime around the end of December 1996. The rules for the 1996 -contest have not been formed at this time and are not expected to be -ready for distribution until late September 1996. +The 1996 contest will not open until sometime in October 1996, and will close +sometime around the end of December 1996. The [rules for the 1996 +contest](/1996/rules.txt) have not been formed at this time and are not expected +to be ready for distribution until late September 1996. -Be sure to wait until the 1996 rules are posted before submitting entries. -Rules differ from year to year, sometimes in significant ways. +Be sure to wait until the [1996 rules](/1996/rules.txt) are posted before +submitting entries. Rules differ from year to year, sometimes in significant +ways. Please send us comments and suggestions what we have expressed above. Also include anything else that you would like to see in future contests. Send such email to: - ...!{sun,pacbell,uunet,pyramid}!hoptoad!judges - judges@toad.com - +``` +...!{sun,pacbell,uunet,pyramid}!hoptoad!judges +judges@toad.com +``` If you use, distribute or publish these entries in some way, please drop us a line. We enjoy seeing who, where and how the contest is used. -If you have problems with any of the entries, AND YOU HAVE A FIX, please -email the fix (patch file or the entire changed file) to the above address. +If you have problems with any of the entries, AND IF YOU HAVE A FIX, please +submit a [GitHub pull +request](https://github.com/ioccc-src/temp-test-ioccc/pulls) (with ONE PULL +REQUEST *PER* FIX, please). -Credits -------- +## Credits We would like to thank Barbara Frezza for her role as official chef of the contest. Landon Noll, Larry Bassel and Sriram Srinivasan @@ -75,7 +77,7 @@ appreciated the opportunity to serve as official taste testers. And as usual, the food was excellent. The official menus of the 1995 Obfuscated C Contest dinners were: -Session One: +### Session One: Antipasti: Crudites, olive selection, pickles, cheese selection Soup: Homemade mushroom and green onion soup @@ -84,7 +86,7 @@ Salad: artichoke, red bell peppers, Italian onions, cucumbers Main Course: Pizzas, with a variety of toppings Dessert: Chocolate torte -Session Two: +### Session Two: Antipasti: crudites, olives, roasted red peppers, cheese selection Salad: Mixed greens with vinaigrette @@ -95,16 +97,16 @@ Dessert: Cookie selection, featuring chocolate chocolate chip cookies and chocolate butter cookies -Session Three +### Session Three Antipasti: Crudites, olive selection Salad: Mixed greens with mustard vinaigrette -Main Course: Broiled salmon with lemmon pepper mayonnaise, chard, mixture +Main Course: Broiled salmon with lemon pepper mayonnaise, chard, mixture of white and wild rices Bread: Cheese bread with herbs -Dessert: Chocolate cheesecake (Coutesy of Elizabeth Watson) +Dessert: Chocolate cheesecake (Courtesy of Elizabeth Watson) -Session Four: +### Session Four: Antipasti: Crudites, olive selection, roasted red peppers, cheese selection Bread: Sourdough @@ -114,29 +116,29 @@ Main Course: Surf and Turf--Grilled steaks of salmon and New York steak wild rice Dessert: Chocolate mousse -Session Five: +### Session Five: Antipasti: Crudites, olive selection, pickles Salad: Mixed spring greens with mustard vinaigrette -Main Course: Linguini with a cream sauce of Shiitaki mushrooms and smoked +Main Course: Linguini with a cream sauce of shiitake mushrooms and smoked salmon Bread: Garlic bread -Dessert: Flourless chocolate torte +Dessert: Flour-less chocolate torte -Session Six: +### Session Six: Antipasti: Carrot and celery sticks with cheese spread, olive selection, pickles Bread: Focaccia with black olives and mozzarella cheeses Salad: Mixed spring greens with flowers and mustard vinaigrette Soup: Homemade butternut squash soup with mushrooms -Main Course: Cracked dungeness crab with lemon mayonnaise, broccoli, +Main Course: Cracked Dungeness crab with lemon mayonnaise, broccoli, mixture of white and brown rice Dessert: Key lime pie =-= -Copyright (c) 1996, Landon Curt Noll, Larry Bassel & Sriram Srinivasan. +Copyright (c) 1995, Landon Curt Noll, Larry Bassel & Sriram Srinivasan. All Rights Reserved. Permission for personal, educational or non-profit use is granted provided this this copyright and notice are included in its entirety and remains unaltered. All other uses must receive prior permission in writing diff --git a/2001/anonymous/README.md b/2001/anonymous/README.md index 51174e1d7..82cec013a 100644 --- a/2001/anonymous/README.md +++ b/2001/anonymous/README.md @@ -19,9 +19,9 @@ make supplementary program and the program itself, both of which segfaulted. 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 but a feature inherent -in what it does. He said this took serious debugging and skill (shameless self -promotion but it's true :-) ) and we thank him _very much_! But what needed to -be changed? Although it took a fair bit of debugging it turns out all that +in what it does. + +Although it took a fair bit of debugging it turns out all that needed to be changed was: - `#include ` for `mmap()`. @@ -47,6 +47,13 @@ git diff c48629017117379a52b1a512ef8f2593ca9569c8..efdee208a2bc650256637b9357ddf git diff efdee208a2bc650256637b9357ddfd0de82d2f41..e9a3f77ea3b209e63ac3f9c06bb84ad86e5ea706 anonymous.c ``` +There's an another important point in [bugs.md](/bugs.md) about this entry, +however, in that we're not sure if the entry was supposed to run the program or +not as there is some inconsistency in the author's comments which we think might +have been intentional. + +Thank you Cody for your assistance! + ### WARNING on note from the author The author suggested that this will somewhat destroy the binaries this touches @@ -73,7 +80,8 @@ something funny if you run it on itself as well but see below :-) ./try.me.sh ``` -What happens if the x86 program has already been modified by this program? +What happens if the x86 program has already been modified by this program? The +judges' remarks below might give you a hint! What happens if you try it on another file like [anonymous.c](anonymous.c)? Can you recompile it okay? What if you run it on `anonymous` itself? Can you run the @@ -90,37 +98,49 @@ quite a lot of bit twiddling. This program is an optimizing dynamic binary translator, allowing you to run x86 programs on any machine (x86 or otherwise). -I have included a simple [10 green -bottles](https://www.bbc.co.uk/teach/school-radio/nursery-rhymes-ten-green-bottles/zncyt39) program, already compiled -for the x86. The program 'ten', and its source (dull) are given as info -files. Warning: note that the translator screws around with the binary -you run on it, *will* corrupt the binary to some extent, and may leave -any program you run on it unusable. +I have included a simple [10 Green +Bottles](https://www.bbc.co.uk/teach/school-radio/nursery-rhymes-ten-green-bottles/zncyt39) +[program](anonymous.ten.c) (try `make anonymous.ten`), meant to be compiled in 32-bit. +The program `anonymous.ten`, and its source (dull) are included as data +files. -The build script should give an example command to run. +### Warning + +Note that the translator screws around with the binary you run on it and *might* +corrupt the binary to some extent and in so doing might leave any program you +run on it unusable. + +The build script should give an example command to compile the program. ### Features -Basic Block Cache: Rather than translating each instruction individually -the dynamic binary translator generates a translation for an entire -basic block of subject code. Having translated a block once, the target -code generated will be stored for the duration that the program is -running, so as a program runs its performance will improve, as it hits -cached blocks. This can be clearly observed in the example program, -'ten'. +[Basic Block](https://en.wikipedia.org/wiki/Basic_block) +[Cache](https://en.wikipedia.org/wiki/Cache_(computing)): Rather than +translating each instruction individually the dynamic binary translator +generates a translation for an entire basic block of subject code. Having +translated a block once, the target code generated will be stored for the +duration that the program is running, so as a program runs its performance will +improve, as it hits cached blocks. This can be clearly observed in the example +program, [anonymous.ten](anonymous.ten.c) which must be compiled as a 32-bit +binary. ### Target Library Linking: -The program runs dynamically linked elf binaries, and when the subject -program attempts to make a call to a standard library, the translator -attempts to make an appropriate call to the native system libraries on -the target machine. This involves mangling between different calling -conventions, etc. +The program runs [dynamically +linked](https://en.wikipedia.org/wiki/Dynamic_linker) [ELF +binaries](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format), and +when the subject program attempts to make a call to a standard +[library](https://en.wikipedia.org/wiki/Library_(computing)), the translator +attempts to make an appropriate call to the native system libraries on the +target machine. This involves mangling between different calling conventions, +etc. ### Automatic Endian Detection/Reversal: -There are various problems raised when attempting to run little endian -x86 code on a big endian chip, such as a PPC. These problems are dealt +There are various problems raised when attempting to run little +[endian](https://en.wikipedia.org/wiki/Endianness) +[x86](https://en.wikipedia.org/wiki/X86) code on a big endian chip, such as a +[PPC](https://en.wikipedia.org/wiki/PowerPC). These problems are dealt with in a manner that is entirely transparent to the user. ### Configuration: @@ -145,7 +165,7 @@ compiling the program without any optimization will allow it to run ### Obfuscation -The most obvious part of the obfuscation is probably the mess of defines at the +The most obvious part of the obfuscation is probably the mess of `#define`s at the top. This may seem a somewhat tired old obfuscation - however since many of these macros are (sometimes only) used by the program once it has dynamically recompiled itself, they are only referenced within the source code from within @@ -160,8 +180,8 @@ Buried under all this, and the fact that the entire program is just a call to `exit()`, there are some nice subtle little obfuscations. For example, you may notice that there are a couple of macros that use the `##` preprocessor operator to build pairs of functions. One of these -macros is used to build to pairs of functions of which only one has -local variables which shadow global variables; so one modifies the +macros is used to build pairs of functions of which only one has +local variables which shadow global variables: so one modifies the global state, and the other doesn't. There is also quite a nice trick where I wave a magic wand, and a chunk of code @@ -173,12 +193,13 @@ on to the next line of code. ### Limitations -Due to space limitations only a handful of instructions are supported; -these instructions which are supported are supported in somewhat -non-conventional ways: chunks of the architecture (e.g. flags) are just -ignored, the elf loader does not really load the elf binary, the target -library linking can only pass up to 3 parameters to the target library -function, etc. +Due to space limitations only a handful of instructions are supported; these +instructions which are supported are supported in somewhat non-conventional +ways: chunks of the architecture (e.g. flags) are just ignored, the ELF +[loader](https://en.wikipedia.org/wiki/Loader_(computing)) does not really load +the [ELF binary](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format), +the target [library linking](https://en.wikipedia.org/wiki/Linker_(computing)) +can only pass up to 3 parameters to the target library function, etc. In short, please consider this a full disclaimer for any bug that may turn up - yes the program is unsafe, but it's pretty cool anyway. diff --git a/2001/anonymous/try.me.sh b/2001/anonymous/try.me.sh index 4cc1af804..1df9c1838 100755 --- a/2001/anonymous/try.me.sh +++ b/2001/anonymous/try.me.sh @@ -1,24 +1,31 @@ #!/usr/bin/env bash -make clobber -make all 2>/dev/null -echo "$ cp anonymous.ten anonymous.ten.bak" 1>2 -cp anonymous.ten anonymous.ten.bak -echo "$ ./anonymous anonymous.ten" 1>&2 -./anonymous anonymous.ten -echo "$ ./anonymous.ten" 1>&2 -./anonymous.ten -echo "$ diff -s anonymous.ten anonymous.ten.bak" 1>&2 -diff -s anonymous.ten anonymous.ten.bak -echo "$ od anonymous.ten > ten.od" 1>&2 -od anonymous.ten > ten.od -echo "$ od anonymous.ten.bak > ten.bak.od" 1>&2 -od anonymous.ten.bak > ten.bak.od -echo "$ diff ten.bak.od ten.od" 1>&2 -diff ten.bak.od ten.od -echo "$ ./anonymous.ten > ten.txt" 1>&2 -./anonymous.ten > ten.txt -echo "$ ./anonymous.ten.bak > ten.bak.txt" 1>&2 -./anonymous.ten.bak > ten.bak.txt -echo "$ diff -s ten.txt ten.bak.txt" 1>&2 -diff -s ten.txt ten.bak.txt +make clobber >/dev/null 2>&1 + +if [[ $(make anonymous.ten >/dev/null 2>&1) ]]; then + + make anonymous 2>/dev/null + echo "$ cp anonymous.ten anonymous.ten.bak" 1>&2 + cp anonymous.ten anonymous.ten.bak + echo "$ ./anonymous anonymous.ten" 1>&2 + ./anonymous anonymous.ten + echo "$ ./anonymous.ten" 1>&2 + ./anonymous.ten + echo "$ diff -s anonymous.ten anonymous.ten.bak" 1>&2 + diff -s anonymous.ten anonymous.ten.bak + echo "$ od -t x1 anonymous.ten > ten.od" 1>&2 + od -t x1 anonymous.ten > ten.od + echo "$ od -t x1 anonymous.ten.bak > ten.bak.od" 1>&2 + od -t x1 anonymous.ten.bak > ten.bak.od + echo "$ diff ten.bak.od ten.od" 1>&2 + diff ten.bak.od ten.od + echo "$ ./anonymous.ten > ten.txt" 1>&2 + ./anonymous.ten > ten.txt + echo "$ ./anonymous.ten.bak > ten.bak.txt" 1>&2 + ./anonymous.ten.bak > ten.bak.txt + echo "$ diff -s ten.txt ten.bak.txt" 1>&2 + diff -s ten.txt ten.bak.txt +else + echo "cannot compile anonymous.ten.c as 32-bit, sorry." + exit 1 +fi diff --git a/2012/tromp/Makefile b/2012/tromp/Makefile index e5aa7851e..410cfcbf0 100644 --- a/2012/tromp/Makefile +++ b/2012/tromp/Makefile @@ -113,7 +113,7 @@ ENTRY= tromp PROG= ${ENTRY} # OBJ= ${PROG}.o -DATA= how13 primes.blc uni.blc uni8.Blc bf.Blc hw.bf deflate.Blc inflate.Blc \ +DATA= how.md primes.blc uni.blc uni8.Blc bf.Blc hw.bf deflate.Blc inflate.Blc \ parse.Blc symbolic.Blc primes.pl TARGET= ${PROG} ${PROG}64 # diff --git a/2014/skeggs/Makefile b/2014/skeggs/Makefile index 4cc43f2aa..8f5237b1f 100644 --- a/2014/skeggs/Makefile +++ b/2014/skeggs/Makefile @@ -58,7 +58,7 @@ ARCH= # Defines that are needed to compile # -CDEFINE= -DCC="${CC} -fPIC" +CDEFINE= -DCC='"${CC} -fPIC"' # Include files that are needed to compile # diff --git a/2018/burton2/Makefile b/2018/burton2/Makefile index 5674d7e69..9d62e68f5 100644 --- a/2018/burton2/Makefile +++ b/2018/burton2/Makefile @@ -120,7 +120,7 @@ TARGET= ${PROG} ALT_OBJ= ALT_TARGET= -EXTRA_DATA= ansi c++11 c++14 c++98 c11 c99 discrepancies \ +EXTRA_DATA= ansi c++11 c++14 c++98 c11 c99 discrepancies.md \ test01.c test02.c test03.c test04.c test05.c test06.c test07.c \ test08.c test09.c test10.c test11.c test12.c test13.c test14.c \ iocccbug01.c iocccbug02.c iocccbug03.c iocccbug04.c iocccbug05.c \ diff --git a/2020/kurdyukov3/README.md b/2020/kurdyukov3/README.md index 33fe32747..a0d0a503f 100644 --- a/2020/kurdyukov3/README.md +++ b/2020/kurdyukov3/README.md @@ -47,6 +47,13 @@ It is interesting how well smeonoe can raed txet wtih lots of tyops in it. How well can you raed porg.c, C prgoarm that is in the shpae of an SD card (or is it a pnuch crad)? +BTW: this funny reading of English (which also works with several other +languages) is called +[typoglycemia](https://www.mrc-cbu.cam.ac.uk/personal/matt.davis/Cmabrigde/) +(the article however is incorrect in stating that if the letters were more +jumbled or if other words were formed one could not read it: we know of some who +can in fact do exactly that). + ## Author's remarks: ### Letter Mixer ### diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 25a94edd4..4a4f3b6a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,21 +2,28 @@ ## Submit to the IOCCC -0. Verify that the IOCCC is open for submissions. -1. If the IOCCC is open, you need to register as a contestant. -See: how to enter for how to register. +0. Verify that the [IOCCC is open](https://www.ioccc.org/index.html#enter) for +submissions. + +1. If the IOCCC is open, you need to register as a contestant. See [how to +enter](https://www.ioccc.org/index.html#enter) for how to register. + 2. Once you have been registered, you will receive an email message for how to -prepare your entries for submission, -and how to upload the compressed tarballs to our submission portal. -3. Once the IOCCC closes, -the judges will select the winning entries, -announce them on the @IOCCC mastodon feed, -notify the winners via email using their previously registered email address, -and upload the winning code to the ioccc-src/winner repo -which in turn will cause them to be displayed on the IOCCC winners page. +prepare your entries for submission, and how to upload the compressed tarballs +to our submission portal. + +3. Once the [IOCCC](https://www.ioccc.org/index.html#enter) closes, the judges +will select the [winning entries](https://www.ioccc.org/years.html) announce them +on the [@IOCCC mastodon feed](https://fosstodon.org/@ioccc), notify the winners +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 (meta-data as well as source code) -by using a GitHub pull request -against the master branch of the ioccc-src/winner repo. +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/bin/extract_winner_handles.sh b/bin/extract_winner_handles.sh new file mode 100755 index 000000000..ee344667e --- /dev/null +++ b/bin/extract_winner_handles.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +grep -o '' winners.html |sed -e 's,//g' + diff --git a/bugs.md b/bugs.md index 3a2156bd1..039bf54c3 100644 --- a/bugs.md +++ b/bugs.md @@ -191,8 +191,18 @@ NOTE: we're still locating entries and working on fixes with this status so we'r ready for help. We will remove this when we are. Entries with this status might or might not have a bug possibly depending on the -system. In these entries we don't have the appropriate systems to test and fix -any problems. +system. In these entries it's unknown if there is a bug and sometimes it's +because we do not remember and sometimes we don't have the appropriate system or +environment to test and fix any possible problems. + +## STATUS: might not be completely functional - can you confirm? + +NOTE: we're still locating entries and working on fixes with this status so we're not yet +ready for help. We will remove this when we are. + +Although these entries _appear_ to work for one or more reasons we're unsure if +they are completely functional. Can you confirm this? Please let us know so we +can fix it! ## STATUS: probable bug (possibly depending on system) - please help test and if necessary fix @@ -955,8 +965,9 @@ that? According to `lldb` it is: (XID (*)(...)) $0 = 0x00000001003cd374 (libX11.6.dylib`XCreateWindow) ``` -so `w == XCreateWindow()`. But it never actually finishes its call; modifying -the code a bit and we see that it crashes before it returns: +so `w == XCreateWindow()` (which can also be seen in the code). But it never +actually finishes its call; modifying the code a bit and we see that it crashes +before it returns: ``` @@ -1092,14 +1103,26 @@ fire](https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing))! :-) ). # 2001 ## [2001/anonymous](2001/anonymous/anonymous.c) ([README.md](2001/anonymous/README.md)) +## STATUS: might not be completely functional - can you confirm? + +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in +both the entry and the supplementary program (both segfaulted) and it appears to +work in that it does do what the author suggests. However there is an +inconsistency in remarks about whether it should _execute_ the program it's run +on after modification or if it should _only modify_ it. With Cody's fix it +modifies the program, only works on 32-bit ELF binaries (by design) and the +binary still works but we do not know if it's supposed _additionally_ run it. +Can you confirm? Please let us know! + + ## STATUS: INABIAF - please **DO NOT** fix [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it -works in modern systems but he notes that the program -[anonymous.ten.c](2001/anonymous/anonymous.ten.c) **MUST** be compiled as a -32-bit ELF binary! This because the program acts on 32-bit ELF binaries. If you -cannot use `-m32` on this file the program **will** almost certainly crash but -in no case will it work properly. +works (it segfaulted - but see above) in modern systems but he notes that the +program [anonymous.ten.c](2001/anonymous/anonymous.ten.c) **MUST** be compiled +as a 32-bit ELF binary! This is because the program only works on 32-bit ELF +binaries. If you cannot use `-m32` on the files it acts on the program **will** +almost certainly crash but in no case will it work properly. This means that for macOS it will not work. Why will this not work in macOS? Because Apple saw to it to make it very hard to compile 32-bit binaries (thanks @@ -1178,6 +1201,7 @@ that version 2.95 works but maybe others do as well. Do you have a fix? We would appreciate your help! Do you have a fix for 64-bit compilation? Please provide it! + ## [2001/kev](2001/kev/kev.c) ([README.md](2001/kev/README.md) ## STATUS: INABIAF - please **DO NOT** fix diff --git a/tmp/author-wins.csv b/tmp/author-wins.csv new file mode 100644 index 000000000..d349eae84 --- /dev/null +++ b/tmp/author-wins.csv @@ -0,0 +1,7 @@ +Brian_Westley,1987_westley,1988_westley,1989_westley,1990_westley,1991 westley,1992_westley,1994_westley,1996_westley,2001_westley, +Cody_Boone_Ferguson,2018_ferguson,2020_ferguson1,2020_ferguson2, +David_Korn,1987_korn, +Don_Yang,2015_yang,2018_yang,2019_yang,2020_yang, +Jack_Applin,1985_applin,1986_applin,1988_applin, +Matt_Zucker,2011_zucker, +Ondrej_Adamovsky,2019_adamovsky, diff --git a/tmp/winner-handles.csv b/tmp/winner-handles.csv new file mode 100644 index 000000000..bb33a7760 --- /dev/null +++ b/tmp/winner-handles.csv @@ -0,0 +1,197 @@ +Aaron_Grothe +Adar_Zeitak +Adrian_Cable +Adrian_Mariano +Aidan_Thornton +Alan_De_Smet +Albert_van_der_Horst +Alex_Deckmyn +Alexander_Prishchepov +Anders_Gavare +Andrea_Marangoni +Andreas_Gustafsson +Andrew_Shapiro +Andy_Sloane +Anonymous_1984 +Anonymous_2004 +Anonymous_2005 +Anonymous_2015 +Anthony_C_Howe +Anton_Algmyr +Arch_D_Robison +Arne_Heizmann +Baruch_Nissenbaum +Bas_de_Bakker +Ben_Lynn +Bernd_Meyer +Brent_Burley +Brian_Westley +Bruce_Holloway +Byron_Rakitzis +Carl_Banks +Carl_Shapiro +Carlos_Duarte +Cel_Skeggs +Chris_King +Christian_Dupont +Christopher_Mills +Christopher_Night +Cody_Boone_Ferguson +Col_G_L_Sicherman +Craig_Schneiderwent +Daniel_Fischer +Daniel_J._Bernstein +Daniel_Vik +Dave_Burton +Dave_Decot +David_Applegate +David_Gibson +David_Goodenough +David_Korn +David_Madore +David_Van_Brackle +Dean_Swift +Derek_Anderson +Diomidis_Spinellis +Dominik_Muth +Don_Dodson +Don_Yang +Doron_Osovlanski +Doug_Beardsley +E_Jay_Berkenbilt +Ed_Luke +Ed_Lycklama +Edward_Giles +Edward_Rosten +Eric_Marshall +Eryk_Kopczynski +Esko_Nuutila +Etienne_Duble +Fabrice_Bellard +Ferenc_Deak +Francois_Boutines +Frans van Dorsselaer +Freek_Wiedijk +Garry_Glendown +Gavin_Barraclough +Gavin_Buttimore +Gil_Dogon +Glyn_Anderson +Gopi_Reddy +Gregor_Richards +Heather_Downs +Ian_Collier +Ian_Phillipps +Ilya_Kurdyukov +Immanuel_Herrmann +J_David_Lowe +Jack_Applin +James_A_Woods +James_Bonfield +Jan_Stein +Jari_Arkko +Jason_Orendorff +Jay_Vosburgh +Jeff_Newbern +Jeff_Weisberg +Jens_Schweikhardt +Jetro_Lauha +Jim_Hague +John_Dalbec +John_Tromp +John_Williams +Jon_Thingvold +Jonathan_Hoyle +Joshua_Karns +Jyrki_Holopainen +Karl_F._Fox +Ken_Huffman +Kevin_Pulo +Kimmo_Fredriksson +Larry_Jones +Larry_Wall +Laurion_Burchall +Lennart_Augustsson +Leonid_A_Broukhis +Lord_Zarbon +Maarten_Litmaath +Marcin_Ciura +Mark_Biggar +Mark_Isaak +Mark_Plummer +Mark_Schnitzius +Mary_Ann_Horton +Matt_Zucker +Maurizio_Monge +Mauro_Persano +Michael_Ash +Michael_Birken +Michael_H_Pawka +Michael_Savastio +Mike_Laman +Moxen_N_Briddlebane +NATORI_Shin +Nathan_Otterness +Nathan_Sidwell +Neil_Mix +Nicholas_Carlini +Nick_Johnson +Nicolas_Ollinger +Ondrej_Adamovsky +Ora_Lassila +Oscar_Toledo +Oskar_von_der_Luehe +Paul_Dale +Paul_E_Black +Paul_Eggert +Paul_Heckbert +Peter_Eastman +Peter_J_Ruczynski +Peter_Klausler +Philip_Blakely +Pierre-Philippe_Coupard +Qiming_HOU +Raphael_Meyer +Raymond_Cheong +Robbert_van_Renesse +Robert_Heckendorn +Roemer_B_Lievaart +Ron_McFarland +Sandro_Maffiodo +Scott_Vokes +Sean_Barrett +Sean_Dorward +Sebastian_Deorowicz +Selene_Makarios +Seonghoon_Kang +Shinichiro_Hamaji +Sjoerd_Mullender +Spencer_Hines +Steinar_Hamre +Stephen_Sykes +Stig_Hemmer +Szabolcs_Borsanyi +Szymon_Rusinkiewicz +Taketo_Konno +Teemu_Rantanen +Tero_Kivinen +Thaddaeus_Frogley +Thomas_A_Fine +Thomas_P_John +Thomas_Stewart +Thor_Eldby +Timo_Poikola +Tom_Torfs +Tony_Finch +Tsukasa_Hamano +Uri_Goren +V_Chia +Vern_Paxson +Vincent_Weaver +Volker_Diels-Grabsch +Walter_Bright +Yusuke_Endoh +Yves-Marie_Morgan +bsoup +tsoj +winner_handle diff --git a/tmp/winners.csv b/tmp/winners.csv index 4811fbcec..da5fd7de3 100644 --- a/tmp/winners.csv +++ b/tmp/winners.csv @@ -59,7 +59,7 @@ deckmyn,Alex Deckmyn,Alex_Deckmyn,null,alex.deckmyn@gmail.com,BE,null,null,null, decot,Dave Decot,Dave_Decot,null,null,null,null,null,null, deorowicz,Sebastian Deorowicz,Sebastian_Deorowicz,http://sun.aei.polsl.pl/~sdeor/,sdeorowicz@gmail.com,null,null,null,null, diels-grabsch,Volker Diels-Grabsch,Volker_Diels-Grabsch,https://njh.eu,v@njh.eu,DE,null,null,null, -dodson,Don Dodson,Don_Dodson,http://www.neta.com/~dodson/,null,null,null,null,null, +dodson,Don Dodson,Don_Dodson,http://www.neta.com/~dodson/,null,US,null,null,null, dogon,Gil Dogon,Gil_Dogon,null,gil.jade@gmail.com,IL,null,null,null, dorsselaer,Frans van Dorsselaer,Frans van Dorsselaer,null,frans@biabv.com,null,null,null,null, dorward,Sean Dorward,Sean_Dorward,null,null,null,null,null,null, diff --git a/tmp/winning_handles.txt b/tmp/winning_handles.txt new file mode 100644 index 000000000..431ca3d89 --- /dev/null +++ b/tmp/winning_handles.txt @@ -0,0 +1,321 @@ +1984_anonymous +1984_decot +1984_laman +1984_mullender +1985_applin +1985_august +1985_lycklama +1985_shapiro +1985_sicherman +1986_applin +1986_august +1986_bright +1986_hague +1986_holloway +1986_marshall +1986_pawka +1986_stein +1986_wall +1987_biggar +1987_heckbert +1987_hines +1987_korn +1987_lievaart +1987_wall +1987_westley +1988_applin +1988_dale +1988_isaak +1988_litmaath +1988_phillipps +1988_reddy +1988_robison +1988_spinellis +1988_westley +1989_fubar +1989_jar.1 +1989_jar.2 +1989_ovdluhe +1989_paul +1989_robison +1989_roemer +1989_tromp +1989_vanb +1989_westley +1990_baruch +1990_cmills +1990_dds +1990_dg +1990_jaw +1990_pjr +1990_scjones +1990_stig +1990_tbr +1990_theorem +1990_westley +1991_ant +1991_brnstnd +1991_buzzard +1991_cdupont +1991_davidguy +1991_dds +1991_fine +1991_rince +1991_westley +1992_adrian +1992_albert +1992_ant +1992_buzzard.1 +1992_buzzard.2 +1992_gson +1992_imc +1992_kivinen +1992_lush +1992_marangon +1992_nathan +1992_vern +1992_westley +1993_ant +1993_cmills +1993_dgibson +1993_ejb +1993_jonth +1993_leo +1993_lmfjyh +1993_plummer +1993_rince +1993_schnitzi +1993_vanb +1994_dodsond1 +1994_dodsond2 +1994_horton +1994_imc +1994_ldb +1994_schnitzi +1994_shapiro +1994_smr +1994_tvr +1994_weisberg +1994_westley +1995_cdua +1995_dodsond1 +1995_dodsond2 +1995_esde +1995_garry +1995_heathbar +1995_leo +1995_makarios +1995_savastio +1995_schnitzi +1995_spinellis +1995_vanschnitz +1996_august +1996_dalbec +1996_eldby +1996_gandalf +1996_huffman +1996_jonth +1996_rcm +1996_schweikh1 +1996_schweikh2 +1996_schweikh3 +1996_westley +1998_banks +1998_bas1 +1998_bas2 +1998_chaos +1998_df +1998_dlowe +1998_dloweneil +1998_dorssel +1998_fanf +1998_schnitzi +1998_schweikh1 +1998_schweikh2 +1998_schweikh3 +1998_tomtorfs +2000_anderson +2000_bellard +2000_bmeyer +2000_briddlebane +2000_dhyang +2000_dlowe +2000_jarijyrki +2000_natori +2000_primenum +2000_rince +2000_robison +2000_schneiderwent +2000_thadgavin +2000_tomx +2001_anonymous +2001_bellard +2001_cheong +2001_coupard +2001_ctk +2001_dgbeards +2001_herrmann1 +2001_herrmann2 +2001_jason +2001_kev +2001_ollinger +2001_rosten +2001_schweikh +2001_westley +2001_williams +2004_anonymous +2004_arachnid +2004_burley +2004_gavare +2004_gavin +2004_hibachi +2004_hoyle +2004_jdalbec +2004_kopczynski +2004_newbern +2004_omoikane +2004_schnitzi +2004_sds +2004_vik1 +2004_vik2 +2005_aidan +2005_anon +2005_boutines +2005_chia +2005_giljade +2005_jetro +2005_klausler +2005_mikeash +2005_mynx +2005_persano +2005_sykes +2005_timwi +2005_toledo +2005_vik +2005_vince +2006_birken +2006_borsanyi +2006_grothe +2006_hamre +2006_meyer +2006_monge +2006_night +2006_sloane +2006_stewart +2006_sykes1 +2006_sykes2 +2006_toledo1 +2006_toledo2 +2006_toledo3 +2011_akari +2011_blakely +2011_borsanyi +2011_dlowe +2011_eastman +2011_fredriksson +2011_goren +2011_hamaji +2011_hou +2011_konno +2011_richards +2011_toledo +2011_vik +2011_zucker +2012_blakely +2012_deckmyn +2012_dlowe +2012_endoh1 +2012_endoh2 +2012_grothe +2012_hamano +2012_hou +2012_kang +2012_konno +2012_omoikane +2012_tromp +2012_vik +2012_zeitak +2013_birken +2013_cable1 +2013_cable2 +2013_cable3 +2013_dlowe +2013_endoh1 +2013_endoh2 +2013_endoh3 +2013_endoh4 +2013_hou +2013_mills +2013_misaka +2013_morgan1 +2013_morgan2 +2013_robison +2014_birken +2014_deak +2014_endoh1 +2014_endoh2 +2014_maffiodo1 +2014_maffiodo2 +2014_morgan +2014_sinon +2014_skeggs +2014_vik +2014_wiedijk +2015_burton +2015_dogon +2015_duble +2015_endoh1 +2015_endoh2 +2015_endoh3 +2015_endoh4 +2015_hou +2015_howe +2015_mills1 +2015_mills2 +2015_muth +2015_schweikhardt +2015_yang +2018_algmyr +2018_anderson +2018_bellard +2018_burton1 +2018_burton2 +2018_ciura +2018_endoh1 +2018_endoh2 +2018_ferguson +2018_giles +2018_hou +2018_mills +2018_poikola +2018_vokes +2018_yang +2019_adamovsky +2019_burton +2019_ciura +2019_diels-grabsch1 +2019_diels-grabsch2 +2019_dogon +2019_duble +2019_endoh +2019_giles +2019_karns +2019_lynn +2019_mills +2019_poikola +2019_yang +2020_burton +2020_carlini +2020_endoh1 +2020_endoh2 +2020_endoh3 +2020_ferguson1 +2020_ferguson2 +2020_giles +2020_kurdyukov1 +2020_kurdyukov2 +2020_kurdyukov3 +2020_kurdyukov4 +2020_otterness +2020_tsoj +2020_yang