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

+203
View File
@@ -0,0 +1,203 @@
#!/usr/bin/env make
#
# 2012 makefile
#
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
# is licensed under:
#
# 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
# Set X11_LIBDIR to the directory where the X11 library resides
#
X11_LIBDIR= /usr/X11R6/lib
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
#
X11_INCDIR= /usr/X11R6/include
# Compiler warnings
#
#CWARN=
CWARN= -Wall -W
#CWARN= -Wall -W -pedantic
# compiler standard
#
#CSTD=
CSTD= -ansi
#CSTD= -std=c99
# compiler bit architecture
#
# Some entries require 32-bitness:
# ARCH= -m32
#
# Some entries require 64-bitess:
# ARCH= -m64
#
# By default we assume nothing:
#
ARCH=
# 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=
#OPT= -O
#OPT= -O1
OPT= -O2
#OPT= -O3
# Libraries needed to build
#
LIBS= -lz
# default flags for ANSI C compilation
#
CFLAGS= ${CWARN} ${CSTD} ${ARCH} ${OPT}
# ANSI compiler
#
# Set CC to the name of your ANSI compiler.
#
# Some entries seem to need gcc. If you have gcc, set
# both CC and MAY_NEED_GCC to gcc.
#
# If you do not have gcc, set CC to the name of your ANSI compiler, and
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
# to disable such programs.
#
CC= cc
#CC=clang
MAY_NEED_GCC= gcc
##############################
# Special flags for this entry
##############################
#
ENTRY= vik
DATA= chocolate.png ioccc.png
ALT_OBJ=
ALT_ENTRY=
#################
# build the entry
#################
#
all: ${ENTRY} ${DATA}
@${TRUE}
${ENTRY}: ${ENTRY}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable
#
alt: ${ALT_ENTRY}
@${TRUE}
# data files
#
data: ${DATA}
@${TRUE}
###############
# utility rules
###############
#
everything: all alt
clean:
${RM} -f ${ENTRY}.o ${ALT_OBJ}
clobber: clean
${RM} -f ${ENTRY} ${ALT_ENTRY}
nuke: clobber
@${TRUE}
dist_clean: nuke
@${TRUE}
install:
@echo "Surely you're joking Mr. Feynman!"
@${TRUE}
# backwards compatibility
#
build: all
@${TRUE}
##################
# 133t hacker rulz
##################
#
love:
@echo 'not war?'
@${TRUE}
haste:
$(MAKE) waste
@${TRUE}
waste:
@echo 'waste'
@${TRUE}
easter_egg:
@echo you expected to mis-understand this $${RANDOM} magic
@echo chongo '<was here>' "/\\oo/\\"
@echo Readers shall be disallowed from not being unable to partly misunderstand this partocular final echo.
# Understand the history of "I Am the Walrus" and
# and in particular John Lennon's remarks on that
# song and you might be confused about these next
# rules in a different way. :-)
#
supernova: nuke
@-if [ -r .code_anal ]; then \
${RM} -f .code_anal_v3; \
else \
echo "You are not expected to understand this"; \
fi
@${TRUE}
deep_magic:
@-if [ -r .code_anal ]; then \
ccode_analysis --deep_magic 1c2c85c7a02c55d1add91967eca491d53c101dc1 --FNV1a_hash 256-bit "${ENTRY}"; \
else \
echo "Understand different"; \
fi
@${TRUE}
magic: deep_magic
@-if [ -r .code_anal ]; then \
ccode_analysis --mode 21701 --level 23209 --FNV1a_hash 256-bit "${ENTRY}"; \
else \
echo "These aren't the droids you're looking for Mr. Spock!"; \
fi
@${TRUE}
Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

+177
View File
@@ -0,0 +1,177 @@
<!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.5a DL=DISCOUNT">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet"
type="text/css"
href="../hint.css">
<title>Best use of cocoa - Bronze award</title>
</head>
<body>
<h1>Best use of cocoa - Bronze award</h1>
<p>Daniel Vik<br>
<a href="&#109;&#97;&#105;&#108;&#116;&#x6f;&#x3a;&#x64;&#x61;&#x6e;&#x69;&#101;&#108;&#x40;&#x76;&#105;&#107;&#46;&#99;&#99;">&#100;&#97;&#x6e;&#105;&#101;&#108;&#x40;&#118;&#x69;&#107;&#46;&#x63;&#x63;</a><br>
<a href="http://danielvik.com/">http://danielvik.com/</a></p>
<h2>Judges' comments:</h2>
<h3>To build:</h3>
<pre><code>make vik
</code></pre>
<p>This entry requires <a href="http://www.zlib.net/">Zlib</a>.</p>
<h3>To run:</h3>
<h4>Embed text (from file or command line):</h4>
<pre><code>./vik e base.png filename &gt; encodedimg.png
# or
./vik e base.png SomeRandomText &gt; encodedimg.png
</code></pre>
<h4>Extract the embedded text:</h4>
<pre><code>./vik d encodedimg.png
</code></pre>
<h4>Embed a PNG into another</h4>
<pre><code>./vik e base.png source.png &gt; encodedimg.png
</code></pre>
<h4>Extract the embedded PNG:</h4>
<pre><code>./vik d encodedimg.png &gt; restored.png
</code></pre>
<h3>Try:</h3>
<pre><code>./vik e ioccc.png chocolate.png &gt; chocolate-in-ioccc.png
./vik e chocolate.png ioccc.png &gt; ioccc-in-chocolate.png
./vik d chocolate-in-ioccc.png &gt; restored-chocolate.png
./vik d ioccc-in-chocolate.png &gt; restored-ioccc.png
</code></pre>
<h3>Selected Judges Remarks:</h3>
<p>References to chocolate had no effect on judging this entry. We
guarantee it.</p>
<p>Can you discern hidden pieces of chocolate in chocolate-in-ioccc.png ?</p>
<h2>Author&rsquo;s comments:</h2>
<h2>Introduction</h2>
<p>This program is a steganography application for embedding an image or text
into another image as well as extracting the embedded image or text back.
The program stores the embedded image or text in the low bits of the RGB
values.</p>
<p>The program supports any 8 bit true color PNG images (RGB, RGBA, grayscale,
and grayscale+alpha). The output image is always 8 bit RGB. When embedding
one image into another, the width and height needs to be the same.</p>
<p>The program only updates the IDAT and IHDR chunks of the source image. Any
additional chunks are copied into the resulting image.</p>
<h3>Bonus Extractor:</h3>
<p>For some reason the chocolate image seems to have some special properties.
Apart from being quite big and a little bit noisy, it appears that when
embedded into another image and extracted, the bitmap data is also a valid
brain$#@$ program. It is of course possible to get the bitmap data from the
extracted image, and run it through any of the previous winning brain$#@$
interpreters, but I thought it would be easier to include an interpreter in
the program to avoid the hassle:</p>
<pre><code>./vik e ioccc.png chocolate.png &gt; encodedimg.png
./vik b encodedimg.png
</code></pre>
<p>It is of course also possible to embed a brain$#@$ program as a text file
(as explained above) and decode it, e.g.:</p>
<pre><code>./vik e ioccc.png .+[.+] &gt; encodedimg.png
./vik b encodedimg.png
</code></pre>
<h3>Obfuscation</h3>
<p>I really wanted to keep the program simple, so instead of adding multiple
macros or helper methods that can be confusing, I placed all functionality
in the main function. Main is called recursively and quite extensively, but
it gives the benefit that all invocations of the function has the same
parameters, argv and argc. This really helps readability, as a programmer
doesn’t need to remember several variable or function names. I also tried
to reduce the number of keywords, and the program only has four for-loops
followed by a single return statement. There is a little bit of use of the
question mark operator, but this is really there to keep the program as
simple as possible.</p>
<h3>Portability</h3>
<p>The program is portable to most platforms that have zlib available. The
only system dependency is that the program relies on writing binary data to
stdout.</p>
<p>By default, Microsoft compilers adds carriage returns to new lines, and to
compile the program on this platform, the following line can be added after
the variable declarations in the main declaration in order to run
correctly:</p>
<pre><code>_setmode(_fileno(stdout), 0x8000);
</code></pre>
<h3>Limitations</h3>
<p>The program doesn’t have many error checks so passing in invalid arguments
or images of mismatching sizes, or unsupported pixel formats will cause the
program to crash.</p>
<h3>Extendability</h3>
<p>Since a lot of care was taken to keep the code simple, it turned out to be
quite easy to extend functionality. I did include a small brain$#@$ after I
realized that the chocolate image had some interesting properties.</p>
<p>But there is more functionality I added that didn’t fit within the size
limits and could not remain included. For example, I added a method to
format source code based on a PNG image. So the format of the program is
actually done by the program itself.</p>
<p>And to be honest, the chocolate image did not have a brain$#@$ program
embedded to begin with. I added functionality to the program to embed a
brain$#@$ into a PNG image and used it to create the image provided with
the entry.</p>
<p>I also added a method to analyze PNG images, to print the size and format,
as well as the scan line filters.</p>
<p>All these features were quite easy to add, much thanks to the (actually
pretty good) design of the code.</p>
<hr />
<!--
(c) Copyright 1984-2015, [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-2015,
<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>
+150
View File
@@ -0,0 +1,150 @@
# Best use of cocoa - Bronze award
Daniel Vik
<daniel@vik.cc>
<http://danielvik.com/>
## Judges' comments:
### To build:
make vik
This entry requires [Zlib](http://www.zlib.net/).
### To run:
#### Embed text (from file or command line):
./vik e base.png filename > encodedimg.png
# or
./vik e base.png SomeRandomText > encodedimg.png
#### Extract the embedded text:
./vik d encodedimg.png
#### Embed a PNG into another
./vik e base.png source.png > encodedimg.png
#### Extract the embedded PNG:
./vik d encodedimg.png > restored.png
### Try:
./vik e ioccc.png chocolate.png > chocolate-in-ioccc.png
./vik e chocolate.png ioccc.png > ioccc-in-chocolate.png
./vik d chocolate-in-ioccc.png > restored-chocolate.png
./vik d ioccc-in-chocolate.png > restored-ioccc.png
### Selected Judges Remarks:
References to chocolate had no effect on judging this entry. We
guarantee it.
Can you discern hidden pieces of chocolate in chocolate-in-ioccc.png ?
## Author's comments:
Introduction
------------
This program is a steganography application for embedding an image or text
into another image as well as extracting the embedded image or text back.
The program stores the embedded image or text in the low bits of the RGB
values.
The program supports any 8 bit true color PNG images (RGB, RGBA, grayscale,
and grayscale+alpha). The output image is always 8 bit RGB. When embedding
one image into another, the width and height needs to be the same.
The program only updates the IDAT and IHDR chunks of the source image. Any
additional chunks are copied into the resulting image.
### Bonus Extractor:
For some reason the chocolate image seems to have some special properties.
Apart from being quite big and a little bit noisy, it appears that when
embedded into another image and extracted, the bitmap data is also a valid
brain$#@$ program. It is of course possible to get the bitmap data from the
extracted image, and run it through any of the previous winning brain$#@$
interpreters, but I thought it would be easier to include an interpreter in
the program to avoid the hassle:
./vik e ioccc.png chocolate.png > encodedimg.png
./vik b encodedimg.png
It is of course also possible to embed a brain$#@$ program as a text file
(as explained above) and decode it, e.g.:
./vik e ioccc.png .+[.+] > encodedimg.png
./vik b encodedimg.png
### Obfuscation
I really wanted to keep the program simple, so instead of adding multiple
macros or helper methods that can be confusing, I placed all functionality
in the main function. Main is called recursively and quite extensively, but
it gives the benefit that all invocations of the function has the same
parameters, argv and argc. This really helps readability, as a programmer
doesn’t need to remember several variable or function names. I also tried
to reduce the number of keywords, and the program only has four for-loops
followed by a single return statement. There is a little bit of use of the
question mark operator, but this is really there to keep the program as
simple as possible.
### Portability
The program is portable to most platforms that have zlib available. The
only system dependency is that the program relies on writing binary data to
stdout.
By default, Microsoft compilers adds carriage returns to new lines, and to
compile the program on this platform, the following line can be added after
the variable declarations in the main declaration in order to run
correctly:
_setmode(_fileno(stdout), 0x8000);
### Limitations
The program doesn’t have many error checks so passing in invalid arguments
or images of mismatching sizes, or unsupported pixel formats will cause the
program to crash.
### Extendability
Since a lot of care was taken to keep the code simple, it turned out to be
quite easy to extend functionality. I did include a small brain$#@$ after I
realized that the chocolate image had some interesting properties.
But there is more functionality I added that didn’t fit within the size
limits and could not remain included. For example, I added a method to
format source code based on a PNG image. So the format of the program is
actually done by the program itself.
And to be honest, the chocolate image did not have a brain$#@$ program
embedded to begin with. I added functionality to the program to embed a
brain$#@$ into a PNG image and used it to create the image provided with
the entry.
I also added a method to analyze PNG images, to print the size and format,
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.
--------------------------------------------------------------------------------
<!--
(c) Copyright 1984-2015, [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/
-->
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+82
View File
@@ -0,0 +1,82 @@
#include <stdio.h>
#include <string.h>
#include "zlib.h"
int
i,j,k,l
,m,n,Q,W,H,
B,Z,Y,X,O=1<<24
; char*A[999],x[
1<<24],z[1<<24],
s[1<<24],t[2<<24
],w[2<<24],*E;
uLong N; FILE
*f ; int main(
int c,char**v){
unsigned char**V
=(unsigned char
**)v; for(m=0;
c==-11&&m<H
; m++, (*v)
+=m%3==0&&
(B&4) ,V[4]
++) n=m%W,
l=n?l:*(*V
)++,*V[4]=
!(B&2)&&
n%3?V[4
][-1]:
(i=
n<3?0:
V[4][-3],j
=m/W?V[4][-W
]:0,Z=k=!(m/W)
||n<3?0:V[4][-3
-W],*(*V)+++(l?l
-1?l-2?l-3?(X=j-
Z,X=X>0?X:-X,Y=i-
Z,Y=Y>0?Y:-Y,Z=i+j
-Z-Z,Z=Z>0?Z:-Z,X>Y
||X>Z?Y >Z?k:j:i):
(i+j) /2:j:i:0));
for( E=t+O; *v-1[v]
&&c== -16; ++*v)n=**v,n
-62? n-60?n -91?n-93||!
m|| !*E?* v:(*v=A[--m+9
]): (A[9+ m++]=*v-1):--E
:++ E ,n-43?n-44?n-45?
n- 46 ?0:putchar(*E):--*E
:(* E= getchar()):++*E; for(;
7< -c &&11>-c&&*v!=5[v]; ++*v)
**V =c +8?c+9?*V[1]++<<6|56:**V|~3
&*V [1] ++:**V>>6; for(; m<n*2; m+=2)c
+18? c+19 ?0:(V[1][m/8]+=(*V[0] ++-56)>>m
%8) :(* V[1]++=V[0][m/8]<<m%8 ); return !
c?c: c>0 ?n=main(-7,(Q=**++v,N=0x49444154,*A
=s+4, main (-128 ,A),A[1]=*++v,A [4]=z,*A=x,A))
,c=A[ 6] -x- 12,Q-101?main(-19,(main(-10,(A[5]=
t+n, *A= t, A[1]=z,A)),*A=t,A [1]=w,A)):main(-9,(
main( -8 ,((n=main(-7,(A[1] =*++v,A[4]=t,*A=s+4,
A)))<0 ? main (-18,(n= -n,*A=s,A[1]=t,A)):0,A[
5]=t+n ,*A= t,A) ),*A=t, A[1]=z,A)),98-Q?E=memcmp(
w,s,4 )? n+= main(-22 ,(*A=z,A[1 ]=t,A[2]=t+n
,A)), N=n= main (-23,(*A=t, A[1]=z,A[2 ]=z+n,A)),
memmove (x+ c+n+12 ,x+c,12),memcpy(x+c+8,t, n),main(-128
,(*A= x+c +4,A)) ,N=crc32( 0,memcpy(x +c+4,s,4),n
+4), main (-128, (*A=x+c+ n+12,A)),n +=c+24,x:(n=
strlen (w +4),w+4),fwrite(E ,1,n,stdout): main(-16,(*A=w,
A[1]=w +H, A)) :-c>31?main(c+=32 ,(*--*v=N,N>>=8,v)):-++c<4?(-c)
[*V]+256*main(c,v ):c+23?c+22?c+21?c+6?c+5?c+4?0:(N=O,uncompress(*v=s+4,&N
,v[3],v[2]-v[3] ),main(c-7,v),H):(n-=l=main(-4,v)+12,5[*v]-68?(v[6]=(*v+=
l)):(memcpy(v[2],*v+8,l-12),v[2]+=l-12,memmove(*v,*v+l,n)),main(c-(n>8),v))
:(n= main(-24,v),main(-4,v)-0x89504e47?-H:main(c,(*v+=16,W=main(-4,v)*3,*v
+= 4,H=main(-4,v)*W,B=(*v)[5],(*v)[5]=2,N=crc32(0,*v- 8,17),*v+=
13 ,main(-128,v),v[3]=v[2]=w+O,*v-=21,v))):(* *v=0,memcpy
(++*v ,v[1],W),*v+=W,v[1]+=W, 1+main((v[1]
!=v[2]) *--c,v)):(N=O
,compress(*v,&N, v[1],v[2]-v[1]),N):(f=
fopen(v[1],"rb"))?fclose((n=fread(*v,1,O,f),f)),
n[*v]=0,n:(strcpy(*v,v[1]),0); }