diff --git a/2015/endoh3/.gitignore b/2015/endoh3/.gitignore index ea1749132..ccc7d5d68 100644 --- a/2015/endoh3/.gitignore +++ b/2015/endoh3/.gitignore @@ -1 +1,5 @@ prog +ioccc +koch +pi +quine diff --git a/2015/endoh3/Makefile b/2015/endoh3/Makefile index f05711ef3..db3bf84ca 100644 --- a/2015/endoh3/Makefile +++ b/2015/endoh3/Makefile @@ -131,7 +131,7 @@ all: data ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c - ${CC} ${CFLAGS} $< -o $@ ${LIBS} + ${CC} ${CFLAGS} $< -o $@ ${LIBS} ${BACK_TO} # alternative executable # diff --git a/2015/endoh3/README.md b/2015/endoh3/README.md index d8be67338..79f95f909 100644 --- a/2015/endoh3/README.md +++ b/2015/endoh3/README.md @@ -19,11 +19,42 @@ make ### Try: ```sh -make -B BACK_TO=ioccc.c +cc -o koch koch.c prog.c +./koch -./prog +cc -o quine quine.c prog.c +./quine + +cc -o pi pi.c prog.c +./pi +cc -DN=50 -o pi pi.c prog.c +./pi ``` +For `pi.c` the macro `N` determines the number of digits after initial digit +(which we hope you know :-) ). + +And to see the original `mullender.c` in action try the following: + +```sh +cc -o prog prog.c mullender.c +./prog +q +^C # where ^C is ctrl-C, interrupt. +``` + +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' comments: Like Marty and Doc, something nostalgic from 1984 appears live in October of diff --git a/2015/endoh3/koch.c b/2015/endoh3/koch.c new file mode 100644 index 000000000..a4d29ebff --- /dev/null +++ b/2015/endoh3/koch.c @@ -0,0 +1,4 @@ +#ifndef N +#define N 3 +#endif +short main[32768] = { 262, -2, 2, 4, 2, -2, -4, 5575, 130, 3046, 3042, 4227, 32448, 275, 4558, 5575, 18, 58816, -5, 4558, 5575, 18, 58816, -2, 4558, 5575, 18, 58816, -5, 4558, 5575, 18, 282, 32468, 4099, 3027, 32448, 5572, 12, 271, 3044, 32453, 269, 3044, 32453, 266, 3044, 32453, 263, 3044, 32453, 260, 3044, 32453, 257, 32452, 58113, 5577, 42, 3026, 3030, 4995, 3027, 3027, 4295, 5573, 1, 4419, 5569, N, 260, 57604, 57668, 57605, 57605, 32325, 57344, 57664, 57664, 57347, 57347, 4297, 4293, 57349, 5572, 1024, 4353, 57665, 32258, 4418, 5580, 32, 3028, 32388, 32454, 57667, 57667, 5572, 2, 57548, 3028, 57548, 57538, 5572, 8, 57484, 3028, 57484, 5570, N*2+4, 5574, 1022, 4558, 5575, 18, 3024, 4558, 5575, 18, 3024, 4558, 5575, 18, 57539, 4801, 5568, 1, 4418, 3030, 5003, 35076, 0, 1, 32390, 5579, 10, 35076, 0, 1, 32334 }; diff --git a/2015/endoh3/pi.c b/2015/endoh3/pi.c new file mode 100644 index 000000000..58fcd7bf3 --- /dev/null +++ b/2015/endoh3/pi.c @@ -0,0 +1,4 @@ +#ifndef N +#define N 50 +#endif +short main[32768] = { 5568, N*8+1, 257, 281, 32258, 5570, 256, 5578, -2, 3042, 5578, 3, 5571, 256+N*2, 5579, -38, 5571, N+2, 5568, 1, 4744, 3026, 58824, -48, 35076, 1, 1, 32458, 0, 3024, 32256, 57409, 5570, 256, 4739, 3027, 4298, 5570, N*2, 3026, 32384, 257, 258, 32386, 291, 3042, 4099, 57604, 259, 32512, 32451, 257, 32452, 58818, -256, 4739, 3027, 32448, 257, 57601, 32450, 3025, 32320, 57604, 5571, 11, 57669, 259, 32578, 32322, 259, 32451, 32512, 502, 57994, 57674, 58818, 256, 57601, 471, 5570, N*2+2, 3026, 32384, 257, 258, 32386, 289, 3042, 3025, 32320, 57604, 4099, 3027, 32448, 57669, 259, 32578, 32322, 259, 32451, 32512, 501, 57665, 57413, 57409, 57665, 57665, 57665, 57665, 57665, 5571, 254+N*2, 57475, 58059, 57611, 3027, 57669, 58053, 57665, 473, 3040, 5575, 4 }; diff --git a/2015/endoh3/quine.c b/2015/endoh3/quine.c new file mode 100644 index 000000000..f91a78df5 --- /dev/null +++ b/2015/endoh3/quine.c @@ -0,0 +1 @@ +short main[32768] = { 5568, 1, -30460, 126, 22, -8127, 5572, 2, 5189, 4416, 5571, -32768, 259, 32578, 32512, 259, 32452, -8189, 4288, 5573, 158, -6720, -1, -7997, 5570, 11, 5581, 47, -6707, -1, 258, 32260, 259, 32387, 32448, 500, 3029, -8000, -6717, -1, 32468, 258, 5589, 45, 32515, 3044, 5568, 1, 6476, -30460, -2, 1, 4419, -6717, 153, 32456, 4162, -6718, 155, 32438, -30460, 148, 6, 26739, 29295, 8308, 24941, 28265, 13147, 14130, 14390, 8285, 8253, 8315, 13364, 32032, 2619, 32, 44 };