Add preview of 1984-2019

The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.

One will find HTML commented out with:

    <!-- XXX remove when 2020 is ready
    2020 links here
    XXX remove when 2020 is ready -->

The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks.  Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known.  The following files
have such HTML comment blocks in them.

    ./winners.html
    ./years-spoiler.html
    ./years.html

In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.

The 2020 winner code AND write-ups are NOT part of this set.

p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).
This commit is contained in:
Landon Curt Noll committed 2020-12-30 16:57:03 -08:00
1 parent 28efc67f5d
commit c0663537cb
1683 files changed
+220064

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
# 2006 makefile
#
# Copyright (C) 2006-2009, Landon Curt Noll, Simon Cooper, Peter Seebach
# and Leonid A. Broukhis. All Rights Reserved. Permission for personal,
# educational or non-profit use is granted provided this copyright and
# notice are included in its entirety and remains unaltered. All other
# uses must receive prior permission from the contest judges.
# Special flags for this entry
#
LOCAL_FLAGS= ${CFLAGS} -lm
# data files for this entry
#
DATA=
build: ${ENTRY}
clean:
-${RM} ${ENTRY} ${ENTRY}_orig
clobber: clean
alt:
data:
${ENTRY}: ${ENTRY}.c ${DATA}
${CC} ${LOCAL_FLAGS} ${ENTRY}.c -o ${ENTRY}
+74
View File
@@ -0,0 +1,74 @@
# Homer's Favorite
Andy Sloane
1041 Seneca St.
Hartford, WI 53027
US
## Judges' Comments:
### To build:
make slone
### To run:
./sloane
Looks almost good enough to eat, dunnit? I suppose you could argue that,
at first blush, this looks like a self-reproducing program.
## Selected Author's Comments:
This program doesn't require any special build options, other than that it
uses sin and cos and hence requires the math library.
You will almost certainly get a compiler warning because I declared a bunch
of global ints without types. The code looks better this way, though, I
think. There are also no #includes, so there may be warnings for
undeclared references to printf, etc. There's a chance that my failure to
include math.h or declare sin or cos will make the donut not render
properly -- it's worked on every system I've tried so far though.
You will need some kind of VT100-ish emulation; so while this compiles and
runs OK in Windows, you will need PuTTYcyg or something like that.
The shape of the source gives a hint about its output: it's a little
animation of a shaded donut rotating over an infinite checkerboard. Like
many IOCCC entries, it is thus self-documenting.
I wanted to create something as "pure" as I could - meaning that the
entire source code is shaped into a work of art, without being prefixed
by any #define hacks, or even #includes, _and_ is portable enough to not
require any special libraries to do the animating. I achieved this with
two standard escape codes for clearing the screen and moving the cursor
back to the top-left.
The donut isn't raytraced. It's much simpler than that.
### How is it obfuscated?
There are three main pieces to this program: the donut, the checkerboard,
and the ASCII logo. The first two are programmed in a straightforward way
(with z-buffering even!), but the mathematics for drawing them is
"optimized". The ASCII logo has been shrunk into the smallest I could make
it by any means necessary.
The logo can actually be compressed much better (ironically, by doing
something simpler), but I didn't discover this until well after submitting.
### Puzzles
In increasing order of difficulty:
- Can you change the shading of the donut and checkerboard?
- Can you change the movement rates of the donut, the checkerboard, and
the scrolling logo?
- Can you change the inner/outer radii of the donut? The height/scaling
of the checkerboard?
- How is the "IOCCC 2006" logo encoded? Can you put something else in its
place? Can you find a smaller encoding?
+32
View File
@@ -0,0 +1,32 @@
_,x,y,o ,N;char b[1920] ;p(n,c)
{for(;n --;x++) c==10?y +=80,x=
o-1:x>= 0?80>x? c !='~'?b
[y+x]=c :0: 0:0;}c(
q,l,r) char*l,*r;{while (q>=0)q
=("E" "?yYrIxC{e^}KhE>[|LXbj}" "dOVsJ"
"@" "idOV{Yab[bW}[bW}\\qFywyv{D" "ma\\A"
"" "Ztq?Lyw>e{|Zq>Y\\gq\\qI[tYBe{w" "yvDZE\
vBA[`_" "Lo>}KcqdYrWqKxzKtW]|DXRwsfcUaT\\\
KXw{Y" "RsFwsFwsFw{zaqyaz|FmMpyaoyI\\]cuUw{J"
[_/6] -62>>_++%6&1?r[q]:l[q])-99;return q;}E(a
){for (o=x=a,y=0,_=0;_ <1006;)a=" /\\\n"
"~|_."[c(6,"b" "cd\\a[g","^`" "_e"
"]fh")+8], p( "#$%" "&'()*+,-.1"[ c(11
,"_ac[]\\YZi" "jkm", "`bd^efghXWlV" )+13
]-34,a);}main (k,Z){ float z[1920] ,A=0
,B=0 ,i,j; puts("" "\x1b" "[2J");for(;;
) { float e=sin(A ), n= sin(B),g=cos(
A),m =cos(B);for(k =0;k< 1840;k++)y=-k
/80- 10,o=41+(k%80- 40)*1.3/y+n,N=
A-100.0/y, b[k]= ".#"[o+N&1],z[k] =0;E(
80-(int)(9*B)%250);for(j=0;6.28>j;j+=0.07 )for(
i=0;6.28>i;i+=0.02) { float c=sin(i),d =cos(j
),f=sin(j),h=d+2,D=15/(c*h*e+f*g+5 ),l=cos
(i),t=c *h*g-f*e;x=40+2*D*(l*h*m-t*n),y= 12
+D*(l*h *n+t*m),o=x+80*y,N=8*((f*e-c *d*
g)*m-c* d*e-f*g-l*d*n);if(D>z[o] )z[o]
=D,b[o] =" ..,,-++=#$@"[ N>0?N:0
] ; } printf(
"\x1b[" "H" );for(k =1;1841
>k;k++) putchar (k%80?b [k]:10)
; A += 0.053;B +=0.037 ; } }