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

+117
View File
@@ -0,0 +1,117 @@
#!/usr/bin/env make
#
# 2011 makefile
#
# Copyright (C) 2011, Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis.
#
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
# See: http://creativecommons.org/licenses/by-sa/3.0/
################
# tool locations
################
#
SHELL= /bin/bash
CP= cp
CPP= cpp
GUNZIP= gunzip
LD= ld
MAKE= make
RM= rm
SED= sed
TAR= tar
TRUE= true
# optimization
#
# Most compiles will safely use -O2. Some can use only -O1 or -O.
# A few compilers have broken optimizers or this entry make break
# under those buggy optimizers and thus you may not want anything.
#
OPT= -O2
# bitness
#
# Some entries require 32-bitness,
# other entries require 64-bitess.
# By default we assume nothing.
#
ARCH=
# default flags for ANSI C compilation
#
CFLAGS= -Wall -W -ansi ${ARCH} ${OPT} -lm
# ANSI compiler
#
# Set CC to the name of your ANSI compiler.
#
CC= cc
##############################
# Special flags for this entry
##############################
#
ENTRY= eastman
DATA=
#################
# build the entry
#################
#
all: ${ENTRY} ${DATA}
@${TRUE}
${ENTRY}: ${ENTRY}.c
${CC} ${CFLAGS} ${ENTRY}.c -o ${ENTRY}
# alternative executable
#
alt:
@${TRUE}
###############
# utility rules
###############
#
everything: all alt
clean:
${RM} -f ${ENTRY}.o
clobber: clean
${RM} -f ${ENTRY}
nuke: clobber
@echo gnab gib!
install:
@echo "Surely you're joking Mr. Feynman!"
# backwards compatibility
#
build: all
##################
# 133t hacker rulz
##################
#
love:
@echo 'not war?'
haste:
$(MAKE) waste
waste:
@echo 'waste'
easter_egg:
@echo you expected to mis-understand this $${RANDOM} magic
@echo chongo '<was here>' "/\\oo/\\"
@echo Readers shall not be disallowed from being unable to partly misunderstand this final echo.
@${TRUE}
+23
View File
@@ -0,0 +1,23 @@
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <sys/ioctl.h>
main() {
short a[4];ioctl
(0,TIOCGWINSZ,&a);int
b,c,d=*a,e=a[1];float f,g,
h,i=d/2+d%2+1,j=d/5-1,k=0,l=e/
2,m=d/4,n=.01*e,o=0,p=.1;while (
printf("\x1b[H\x1B[?25l"),!usleep(
79383)){for (b=c=0;h=2*(m-c)/i,f=-
.3*(g=(l-b)/i)+.954*h,c<d;c+=(b=++
b%e)==0)printf("\x1B[%dm ",g*g>1-h
*h?c>d-j?b<d-c||d-c>e-b?40:100:b<j
||b>e-j?40:g*(g+.6)+.09+h*h<1?100:
47:((int)(9-k+(.954*g+.3*h)/sqrt
(1-f*f))+(int)(2+f*2))%2==0?107
:101);k+=p,m+=o,o=m>d-2*j?
-.04*d:o+.002*d;n=(l+=
n)<i||l>e-i?p=-p
,-n:n;}}
+118
View File
@@ -0,0 +1,118 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="GENERATOR" content="mkd2html 2.1.3 DL=DISCOUNT">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet"
type="text/css"
href="../hint.css">
<title>Best ball</title>
</head>
<body>
<h1>Best ball</h1>
<p>Peter Eastman<br>
<a href="&#x6d;&#x61;&#105;&#108;&#116;&#111;&#58;&#112;&#101;&#116;&#x65;&#114;&#46;&#101;&#x61;&#115;&#x74;&#109;&#97;&#110;&#64;&#103;&#x6d;&#97;&#105;&#108;&#46;&#99;&#x6f;&#109;">&#112;&#101;&#x74;&#101;&#114;&#x2e;&#101;&#x61;&#x73;&#x74;&#x6d;&#97;&#x6e;&#64;&#x67;&#109;&#97;&#105;&#108;&#x2e;&#99;&#111;&#x6d;</a></p>
<h2>Judges' comments:</h2>
<h3>To build:</h3>
<pre><code>make eastman
</code></pre>
<h3>To run:</h3>
<pre><code>./eastman
</code></pre>
<h3>Try:</h3>
<pre><code>Quit the program. Resize your terminal window. Run it again.
</code></pre>
<h3>Selected Judges Remarks:</h3>
<p>This round program will generate a classic spherical result!</p>
<p>You will need a terminal capable of displaying coloured ANSI
characters (for example an xterm or a Terminal.app window).</p>
<p>You might also want to turn off any scrollback history. The program will
size itself to the initial geometry of your terminal.</p>
<p>If you are ambitious, make the font really small and the window really
large for hi-rez graphics!</p>
<h2>Author&rsquo;s comments:</h2>
<p>This program uses ANSI graphics to recreate the classic Boing Ball demo from
the Commodore Amiga. See http://www.youtube.com/watch?v=-ga41edXw3A if you
aren&rsquo;t familiar with it. Back in its day, this demo inspired lust and awe in
geeks around the world.</p>
<p>The graphics are raytraced, with procedural textures on the ball and the back
wall. I did cheat a little to simplify the calculations: it uses a parallel
projection, but textures the back wall to look as if there were a floor being
viewed in perspective. The shadow is also just part of the texture, not an
actual raytraced shadow.</p>
<p>This program automatically adapts to the size of the terminal it is running in,
so try enlarging the window to get higher resolution. Don&rsquo;t resize while the
program is running, though. It only checks the size once, when it starts up.</p>
<p>To compile:</p>
<p>cc -lm ball.c</p>
<p>Portability:</p>
<p>It should be completely portable. I&rsquo;ve tested with gcc on Mac OS X 10.7 and
Fedora 10. I would expect it to work in any Unix-like environment.</p>
<p>Obfuscation:</p>
<p>I have merged expressions wherever possible, making extensive use of ternary
operators, commas, return values of assignment operators, etc. The entire
raytracing computation, include ray intersection tests and procedural texture
evaluations, is a single expression involving 41 operators.</p>
<p>Variables are named alphabetically in the order they are declared.</p>
<p>The third argument to ioctl() should really be a &ldquo;struct winsize&rdquo;, and I should
then look up the ws_row and ws_col fields, but that makes it way too obvious
what I&rsquo;m doing there. Since a winsize just contains four unsigned shorts, I
replaced it with an array. And since all the values will be much less than
32767, I further simplified the type to just short[].</p>
<p>A wonderful thing about ANSI graphics is that it produces nearly unintelligible
code. Consider the printf spec to print a single space in a desired color:
&ldquo;\x1B[%dm &rdquo;. I could have done something to further obfuscate it, but it&rsquo;s
already indistinguishable from line noise, so why bother?</p>
<p>There are lots of other minor obfuscations to make the code less obvious. For
example, I could have written the outer loop as while(1), but why write a 1
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.</p>
<hr />
<!--
(c) Copyright 1984-2012, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
[judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
-->
<TABLE><TR>
<TD><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a></TD>
<TD><P>&copy; Copyright 1984-2012,
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
- All rights reserved<BR>
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
<TD>&nbsp;<!--<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
</TR></TABLE>
</body>
</html>
+91
View File
@@ -0,0 +1,91 @@
# Best ball
Peter Eastman
<peter.eastman@gmail.com>
## Judges' comments:
### To build:
make eastman
### To run:
./eastman
### Try:
Quit the program. Resize your terminal window. Run it again.
### Selected Judges Remarks:
This round program will generate a classic spherical result!
You will need a terminal capable of displaying coloured ANSI
characters (for example an xterm or a Terminal.app window).
You might also want to turn off any scrollback history. The program will
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-rez graphics!
## Author's comments:
This program uses ANSI graphics to recreate the classic Boing Ball demo from
the Commodore Amiga. See http://www.youtube.com/watch?v=-ga41edXw3A if you
aren't familiar with it. Back in its day, this demo inspired lust and awe in
geeks around the world.
The graphics are raytraced, with procedural textures on the ball and the back
wall. I did cheat a little to simplify the calculations: it uses a parallel
projection, but textures the back wall to look as if there were a floor being
viewed in perspective. The shadow is also just part of the texture, not an
actual raytraced shadow.
This program automatically adapts to the size of the terminal it is running in,
so try enlarging the window to get higher resolution. Don't resize while the
program is running, though. It only checks the size once, when it starts up.
To compile:
cc -lm ball.c
Portability:
It should be completely portable. I've tested with gcc on Mac OS X 10.7 and
Fedora 10. I would expect it to work in any Unix-like environment.
Obfuscation:
I have merged expressions wherever possible, making extensive use of ternary
operators, commas, return values of assignment operators, etc. The entire
raytracing computation, include ray intersection tests and procedural texture
evaluations, is a single expression involving 41 operators.
Variables are named alphabetically in the order they are declared.
The third argument to ioctl() should really be a "struct winsize", and I should
then look up the ws_row and ws_col fields, but that makes it way too obvious
what I'm doing there. Since a winsize just contains four unsigned shorts, I
replaced it with an array. And since all the values will be much less than
32767, I further simplified the type to just short[].
A wonderful thing about ANSI graphics is that it produces nearly unintelligible
code. Consider the printf spec to print a single space in a desired color:
"\x1B[%dm ". I could have done something to further obfuscate it, but it's
already indistinguishable from line noise, so why bother?
There are lots of other minor obfuscations to make the code less obvious. For
example, I could have written the outer loop as while(1), but why write a 1
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.
--------------------------------------------------------------------------------
<!--
(c) Copyright 1984-2012, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
[judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
-->