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:
1 parent
28efc67f5d
commit
c0663537cb
1683 files changed
+220064
No files matched your search
Binary file not shown.
@@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/env make
|
||||||
|
#
|
||||||
|
# Orwellian 1984 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
|
||||||
|
|
||||||
|
# ANSI compiler
|
||||||
|
#
|
||||||
|
# Set CC to the name of your ANSI compiler.
|
||||||
|
#
|
||||||
|
CC= cc
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# IOCCC winners
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
WINNERS= anonymous laman decot mullender
|
||||||
|
|
||||||
|
###################
|
||||||
|
# build all entries
|
||||||
|
###################
|
||||||
|
#
|
||||||
|
all:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# utility rules
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
clean:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
clobber:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
install:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
In 1984, the first contest was held. The name of the contest was simply
|
||||||
|
``Obfuscated C Code Contest''.
|
||||||
|
|
||||||
|
Restrictions against machine dependent code were not in the rules in 1984.
|
||||||
|
The source file size restriction was only 512 bytes. Rules and results
|
||||||
|
were posted to net.lang.c and net.unix-wizards.
|
||||||
|
|
||||||
|
Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1984 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= anonymous
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
anonymous: anonymous.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\
|
||||||
|
o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<h1>Dishonorable mention</h1>
|
||||||
|
|
||||||
|
<p>Anonymous</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>The author was too embarrassed that he/she could write such trash, so I
|
||||||
|
promised to protect their identity. I will say that the author of this
|
||||||
|
program has a well known connection with the C programming language.</p>
|
||||||
|
|
||||||
|
<p>This program is a unique variation on the age old “Hello, world”
|
||||||
|
program. What reads like a read may be written like a write!</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Dishonorable mention
|
||||||
|
|
||||||
|
Anonymous
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
The author was too embarrassed that he/she could write such trash, so I
|
||||||
|
promised to protect their identity. I will say that the author of this
|
||||||
|
program has a well known connection with the C programming language.
|
||||||
|
|
||||||
|
This program is a unique variation on the age old "Hello, world"
|
||||||
|
program. What reads like a read may be written like a write!
|
||||||
|
|
||||||
|
Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1984 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= decot
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
decot: decot.c
|
||||||
|
cc $? -o $@ -lm
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#define x =
|
||||||
|
#define double(a,b) int
|
||||||
|
#define char k['a']
|
||||||
|
#define union static struct
|
||||||
|
|
||||||
|
extern int floor;
|
||||||
|
double (x1, y1) b,
|
||||||
|
char x {sizeof(
|
||||||
|
double(%s,%D)(*)())
|
||||||
|
,};
|
||||||
|
struct tag{int x0,*xO;}
|
||||||
|
|
||||||
|
*main(i, dup, signal) {
|
||||||
|
{
|
||||||
|
for(signal=0;*k *x * __FILE__ *i;) do {
|
||||||
|
(printf(&*"'\",x); /*\n\\", (*((double(tag,u)(*)())&floor))(i)));
|
||||||
|
goto _0;
|
||||||
|
|
||||||
|
_O: while (!(char <<x - dup)) { /*/*\*/
|
||||||
|
union tag u x{4};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while(b x 3, i); {
|
||||||
|
char x b,i;
|
||||||
|
_0:if(b&&k+
|
||||||
|
sin(signal) / * ((main) (b)-> xO));/*}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
*/}}}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<h1>Second place award</h1>
|
||||||
|
|
||||||
|
<p>Dave Decot</p>
|
||||||
|
|
||||||
|
<h2>Compile with:</h2>
|
||||||
|
|
||||||
|
<pre><code>cc decot.c -o decot -lm
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Some new compilers disliked line 15 of the source, so we changed it from:</p>
|
||||||
|
|
||||||
|
<pre><code>for(signal=0;*k * x * __FILE__ *i;) do {
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>to:</p>
|
||||||
|
|
||||||
|
<pre><code>for(signal=0;*k *x * __FILE__ *i;) do {
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>This program prints out a string of garbage.</p>
|
||||||
|
|
||||||
|
<p>The judges also offer this one comment: understand comments!</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# Second place award
|
||||||
|
|
||||||
|
Dave Decot
|
||||||
|
|
||||||
|
## Compile with:
|
||||||
|
|
||||||
|
cc decot.c -o decot -lm
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Some new compilers disliked line 15 of the source, so we changed it from:
|
||||||
|
|
||||||
|
for(signal=0;*k * x * __FILE__ *i;) do {
|
||||||
|
|
||||||
|
to:
|
||||||
|
|
||||||
|
for(signal=0;*k *x * __FILE__ *i;) do {
|
||||||
|
|
||||||
|
This program prints out a string of garbage.
|
||||||
|
|
||||||
|
The judges also offer this one comment: understand comments!
|
||||||
|
|
||||||
|
Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1984 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= laman
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
laman: laman.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<h1>Third place</h1>
|
||||||
|
|
||||||
|
<p>Mike Laman</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Some new compilers dislike lines 6 and 10 of the source, so we changed
|
||||||
|
them from:</p>
|
||||||
|
|
||||||
|
<pre><code>;++f)a[ b<<5|c] =d++,b+ =e;for( f=0;f<O
|
||||||
|
<<5|c]^ =a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>to:</p>
|
||||||
|
|
||||||
|
<pre><code>;++f)a[ b<<5|c] =d++,b+= e;for( f=0;f<O
|
||||||
|
<<5|c]^= a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>I hope you have the C beautifier! The program accepts ONE positive
|
||||||
|
argument. Seeing is believing, so try things like:</p>
|
||||||
|
|
||||||
|
<pre><code>laman 4
|
||||||
|
laman 9
|
||||||
|
laman 16
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>This code should run you in circles.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# Third place
|
||||||
|
|
||||||
|
Mike Laman
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Some new compilers dislike lines 6 and 10 of the source, so we changed
|
||||||
|
them from:
|
||||||
|
|
||||||
|
;++f)a[ b<<5|c] =d++,b+ =e;for( f=0;f<O
|
||||||
|
<<5|c]^ =a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||||
|
|
||||||
|
to:
|
||||||
|
|
||||||
|
;++f)a[ b<<5|c] =d++,b+= e;for( f=0;f<O
|
||||||
|
<<5|c]^= a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||||
|
|
||||||
|
I hope you have the C beautifier! The program accepts ONE positive
|
||||||
|
argument. Seeing is believing, so try things like:
|
||||||
|
|
||||||
|
laman 4
|
||||||
|
laman 9
|
||||||
|
laman 16
|
||||||
|
|
||||||
|
This code should run you in circles.
|
||||||
|
|
||||||
|
Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
a[900]; b;c;d=1 ;e=1;f; g;h;O; main(k,
|
||||||
|
l)char* *l;{g= atoi(* ++l); for(k=
|
||||||
|
0;k*k< g;b=k ++>>1) ;for(h= 0;h*h<=
|
||||||
|
g;++h); --h;c=( (h+=g>h *(h+1)) -1)>>1;
|
||||||
|
while(d <=g){ ++O;for (f=0;f< O&&d<=g
|
||||||
|
;++f)a[ b<<5|c] =d++,b+= e;for( f=0;f<O
|
||||||
|
&&d<=g; ++f)a[b <<5|c]= d++,c+= e;e= -e
|
||||||
|
;}for(c =0;c<h; ++c){ for(b=0 ;b<k;++
|
||||||
|
b){if(b <k/2)a[ b<<5|c] ^=a[(k -(b+1))
|
||||||
|
<<5|c]^= a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||||
|
;printf( a[b<<5|c ]?"%-4d" :" " ,a[b<<5
|
||||||
|
|c]);} putchar( '\n');}} /*Mike Laman*/
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1984 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= mullender
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
mullender: mullender.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<h1>The Grand Prize</h1>
|
||||||
|
|
||||||
|
<p>Sjoerd Mullender</p>
|
||||||
|
|
||||||
|
<p>Robbert van Renesse</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Without question, this C program is the most obfuscated C program that
|
||||||
|
has ever been received! Like all great contest entries, they result
|
||||||
|
in a change of rules for the following year. To prevent a flood of
|
||||||
|
similar programs, we requested that programs be non machine specific.</p>
|
||||||
|
|
||||||
|
<p>This program was selected for the 1987 t-shirt collection.</p>
|
||||||
|
|
||||||
|
<blockquote><p>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.</p></blockquote>
|
||||||
|
|
||||||
|
<p>The C startup routine (via crt0.o) transfers control to a location
|
||||||
|
named main. In this case, main just happens to be in the data area.
|
||||||
|
The array of shorts, which has been further obfuscated by use of
|
||||||
|
different data types, just happens to form a meaningful set of PDP-11
|
||||||
|
and Vax instructions. The first word is a PDP-11 branch instruction
|
||||||
|
that branches to the rest of the PDP code. On the Vax main is called with
|
||||||
|
the calls instruction which uses the first word of the subroutine as a
|
||||||
|
mask of registers to be saved. So on the Vax the first word can be anything.
|
||||||
|
The real Vax code starts with the second word. This small program
|
||||||
|
makes direct calls to the write() Unix system call to produce a
|
||||||
|
message on the screen. Can you guess what is printed? We knew you
|
||||||
|
couldn’t! :-)</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# The Grand Prize
|
||||||
|
|
||||||
|
Sjoerd Mullender
|
||||||
|
|
||||||
|
Robbert van Renesse
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Without question, this C program is the most obfuscated C program that
|
||||||
|
has ever been received! Like all great contest entries, they result
|
||||||
|
in a change of rules for the following year. To prevent a flood of
|
||||||
|
similar programs, we requested that programs be non machine specific.
|
||||||
|
|
||||||
|
This program was selected for the 1987 t-shirt collection.
|
||||||
|
|
||||||
|
> 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.
|
||||||
|
|
||||||
|
The C startup routine (via crt0.o) transfers control to a location
|
||||||
|
named main. In this case, main just happens to be in the data area.
|
||||||
|
The array of shorts, which has been further obfuscated by use of
|
||||||
|
different data types, just happens to form a meaningful set of PDP-11
|
||||||
|
and Vax instructions. The first word is a PDP-11 branch instruction
|
||||||
|
that branches to the rest of the PDP code. On the Vax main is called with
|
||||||
|
the calls instruction which uses the first word of the subroutine as a
|
||||||
|
mask of registers to be saved. So on the Vax the first word can be anything.
|
||||||
|
The real Vax code starts with the second word. This small program
|
||||||
|
makes direct calls to the write() Unix system call to produce a
|
||||||
|
message on the screen. Can you guess what is printed? We knew you
|
||||||
|
couldn't! :-)
|
||||||
|
|
||||||
|
Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
short main[] = {
|
||||||
|
277, 04735, -4129, 25, 0, 477, 1019, 0xbef, 0, 12800,
|
||||||
|
-113, 21119, 0x52d7, -1006, -7151, 0, 0x4bc, 020004,
|
||||||
|
14880, 10541, 2056, 04010, 4548, 3044, -6716, 0x9,
|
||||||
|
4407, 6, 5568, 1, -30460, 0, 0x9, 5570, 512, -30419,
|
||||||
|
0x7e82, 0760, 6, 0, 4, 02400, 15, 0, 4, 1280, 4, 0,
|
||||||
|
4, 0, 0, 0, 0x8, 0, 4, 0, ',', 0, 12, 0, 4, 0, '#',
|
||||||
|
0, 020, 0, 4, 0, 30, 0, 026, 0, 0x6176, 120, 25712,
|
||||||
|
'p', 072163, 'r', 29303, 29801, 'e'
|
||||||
|
};
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
Copyright (c) 1984, Landon Curt Noll.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
I'm sure you have all seen gross, or down right structurally obscene C
|
||||||
|
source code before. Some people who deal with various parts of the
|
||||||
|
UN*X source wonder if some folks try rather hard to produce such
|
||||||
|
down right smelly code.
|
||||||
|
|
||||||
|
Now you have the chance to compete with the worst C hackers around
|
||||||
|
by sending in your own obfuscated C program. Just follow the contest
|
||||||
|
rules below:
|
||||||
|
1) the source file must be no more than 512 bytes long
|
||||||
|
|
||||||
|
2) mail your source to: hplabs!nsc!chongo
|
||||||
|
no later than April 11, 1984. entries posted to
|
||||||
|
the net will NOT be accepted. please give your
|
||||||
|
letter the subject of: obfuscated C code contest.
|
||||||
|
|
||||||
|
3) winning entries will be posted to net.lang.c after
|
||||||
|
April 12, 1894. (thats the prize folks)
|
||||||
|
|
||||||
|
4) indicate your net address in the text of your
|
||||||
|
entry, this will be used to give credit unless
|
||||||
|
you indicate that you want to remain anonymous.
|
||||||
|
|
||||||
|
5) entries must be of original work. (dont send anything
|
||||||
|
that might upset Big Brother Bell) all entries are
|
||||||
|
public domain. (who would want to own them anyway?!)
|
||||||
|
|
||||||
|
Entries will be judged for: violations of structured programming, non-clarity,
|
||||||
|
and use of "by the K&R book" C. (use of local mods to C are not encouraged)
|
||||||
|
extra credit if they can be compiled using the 4.2BSD C compiler on our VAX 780,
|
||||||
|
but dont let the lack of a 780 or 4.2 discourage you!
|
||||||
|
|
||||||
|
chongo <flames about the contest will be kindly #ifdef'ed out> /\CC/\
|
||||||
|
|
||||||
|
UN*X is a trademark of Usenet Hackers Anonymous
|
||||||
|
|
||||||
|
WARNING: The rules and mailing address for the contest change from year
|
||||||
|
to year. Be sure that you consult the current set of rules
|
||||||
|
before submitting entries.
|
||||||
Binary file not shown.
@@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/env make
|
||||||
|
#
|
||||||
|
# 1985 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
|
||||||
|
|
||||||
|
# ANSI compiler
|
||||||
|
#
|
||||||
|
# Set CC to the name of your ANSI compiler.
|
||||||
|
#
|
||||||
|
CC= cc
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# IOCCC winners
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
WINNERS= applin august lycklama shapiro sicherman
|
||||||
|
|
||||||
|
###################
|
||||||
|
# build all entries
|
||||||
|
###################
|
||||||
|
#
|
||||||
|
all:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# utility rules
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
clean:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
clobber:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
install:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
185 marked the second year of the Obfuscated C Code Contest.
|
||||||
|
|
||||||
|
Hints against machine dependent code were added to the rules to avoid
|
||||||
|
another 1984 style winner. Rules and results were posted to net.lang.c
|
||||||
|
and net.unix-wizards. Larry Bassel was invited to help in the
|
||||||
|
judging. Awards were given to 5 classes of programs since we were
|
||||||
|
unable to select only the best 4.
|
||||||
|
|
||||||
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1985 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= applin
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
applin: applin.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
main(v,c)char**c;{for(v[c++]="Hello, world!\n)";(!!c)[*c]&&(v--||--c&&execlp(*c,*c,c[!!c]+!!c,!c));**c=!c)write(!!*c,*c,!!**c);}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<h1>Best one liner</h1>
|
||||||
|
|
||||||
|
<p>Jack Applin [with help from Robert Heckendorn]</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>One liner programs are short but twisted. This “Hello, World” version
|
||||||
|
certainly takes its time saying hello.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Best one liner
|
||||||
|
|
||||||
|
Jack Applin [with help from Robert Heckendorn]
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
One liner programs are short but twisted. This "Hello, World" version
|
||||||
|
certainly takes its time saying hello.
|
||||||
|
|
||||||
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1985 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= august
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
august: august.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#define p struct c
|
||||||
|
#define q struct b
|
||||||
|
#define h a->a
|
||||||
|
#define i a->b
|
||||||
|
#define e i->c
|
||||||
|
#define o a=(*b->a)(b->b,b->c)
|
||||||
|
#define s return a;}q*
|
||||||
|
#define n (d,b)p*b;{q*a;p*c;
|
||||||
|
#define z(t)(t*)malloc(sizeof(t))
|
||||||
|
q{int a;p{q*(*a)();int b;p*c;}*b;};q*u n a=z(q);h=d;i=z(p);i->a=u;i->b=d+1;s
|
||||||
|
v n c=b;do o,b=i;while(!(h%d));i=c;i->a=v;i->b=d;e=b;s
|
||||||
|
w n o;c=i;i=b;i->a=w;e=z(p);e->a=v;e->b=h;e->c=c;s
|
||||||
|
t n for(;;)o,main(-h),b=i;}main(b){p*a;if(b>0)a=z(p),h=w,a->c=z(p),a->c->a=u,
|
||||||
|
a->c->b=2,t(0,a);putchar(b?main(b/2),-b%2+'0':10);}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<h1>The most obscure program</h1>
|
||||||
|
|
||||||
|
<p>Lennart Augustsson
|
||||||
|
<chalmers!augustss></p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>An interesting use of a recursive call to main. Compile and execute
|
||||||
|
without args. What is the initial value of b, and does it alter the
|
||||||
|
action of the program?</p>
|
||||||
|
|
||||||
|
<p>If you let it, the program will continue to print a numerical sequence
|
||||||
|
(can you guess in what base it is printed?) until you run out of
|
||||||
|
memory or until they sell your computer, which ever comes first.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# The most obscure program
|
||||||
|
|
||||||
|
Lennart Augustsson
|
||||||
|
<chalmers!augustss>
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
An interesting use of a recursive call to main. Compile and execute
|
||||||
|
without args. What is the initial value of b, and does it alter the
|
||||||
|
action of the program?
|
||||||
|
|
||||||
|
If you let it, the program will continue to print a numerical sequence
|
||||||
|
(can you guess in what base it is printed?) until you run out of
|
||||||
|
memory or until they sell your computer, which ever comes first.
|
||||||
|
|
||||||
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1985 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= lycklama
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
lycklama: lycklama.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<h1>The strangest appearing program</h1>
|
||||||
|
|
||||||
|
<p>Ed Lycklama</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Run the program without any arguments. Type in some very long lines
|
||||||
|
and notice how it redisplays it.</p>
|
||||||
|
|
||||||
|
<p>The program itself looks like tty noise. Notice that even ‘define’ in #define can be defined.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# The strangest appearing program
|
||||||
|
|
||||||
|
Ed Lycklama
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Run the program without any arguments. Type in some very long lines
|
||||||
|
and notice how it redisplays it.
|
||||||
|
|
||||||
|
The program itself looks like tty noise. Notice that even 'define' in #define can be defined.
|
||||||
|
|
||||||
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#define o define
|
||||||
|
#o ___o write
|
||||||
|
#o ooo (unsigned)
|
||||||
|
#o o_o_ 1
|
||||||
|
#o _o_ char
|
||||||
|
#o _oo goto
|
||||||
|
#o _oo_ read
|
||||||
|
#o o_o for
|
||||||
|
#o o_ main
|
||||||
|
#o o__ if
|
||||||
|
#o oo_ 0
|
||||||
|
#o _o(_,__,___)(void)___o(_,__,ooo(___))
|
||||||
|
#o __o (o_o_<<((o_o_<<(o_o_<<o_o_))+(o_o_<<o_o_)))+(o_o_<<(o_o_<<(o_o_<<o_o_)))
|
||||||
|
o_(){_o_ _=oo_,__,___,____[__o];_oo ______;_____:___=__o-o_o_; _______:
|
||||||
|
_o(o_o_,____,__=(_-o_o_<___?_-o_o_:___));o_o(;__;_o(o_o_,"\b",o_o_),__--);
|
||||||
|
_o(o_o_," ",o_o_);o__(--___)_oo _______;_o(o_o_,"\n",o_o_);______:o__(_=_oo_(
|
||||||
|
oo_,____,__o))_oo _____;}
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
WARNING: The rules and mailing address for the contest change from year
|
||||||
|
to year. Be sure that you consult the current set of rules
|
||||||
|
before submitting entries.
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
It is time once again for the net wide Obfuscated C code contest!
|
||||||
|
|
||||||
|
GOAL: To write the most Obscure working C program under the rules below:
|
||||||
|
|
||||||
|
RULES: 1) The source must be 512 bytes or less.
|
||||||
|
2) Mail your entries to: ...!ihnp4!nsc!chongo
|
||||||
|
Postings to the net will NOT be used!
|
||||||
|
3) Include at the top of the letter:
|
||||||
|
a) Your name, and path from a major network node.
|
||||||
|
If you want your entry to be anonymous, indicate this as well.
|
||||||
|
b) A brief statement of what the program should do.
|
||||||
|
c) The machine/opsys on which it runs.
|
||||||
|
4) Enclose your source between the following lines:
|
||||||
|
---start of program---
|
||||||
|
<place obfuscated source here>
|
||||||
|
---end of program---
|
||||||
|
5) The C program must be written in common C.
|
||||||
|
That is, K&R plus common extensions (say 4.2 or Sys V C)
|
||||||
|
6) The program must be of original work.
|
||||||
|
7) The program must be a complete program. (i.e., not just a fragment)
|
||||||
|
8) Entries must be received by me on or before June 8, 1985.
|
||||||
|
|
||||||
|
POINTS: Each entry will be judged for its non-clarity. I will attempt to
|
||||||
|
run each of them on a Vax 780/4.2BSD system. Don't let the lack
|
||||||
|
of such a system stop you! Try to avoid operating system/machine
|
||||||
|
specific code if you do not have such a system. Extra points will
|
||||||
|
be given for program that:
|
||||||
|
|
||||||
|
a) Able to pass lint without complaint
|
||||||
|
b) Actually does something interesting (not just exit)
|
||||||
|
c) are portable (i.e., no special calls of local features)
|
||||||
|
(long variable names will be allowed as needed)
|
||||||
|
|
||||||
|
The names of the winners will be posted to net.lang.c. The winning
|
||||||
|
sources will be posted to net.sources.
|
||||||
|
|
||||||
|
If you have any questions on the rules/points above, just ask via mail!
|
||||||
|
|
||||||
|
chongo <main(){int i;i+=i+++++i;exit(i);}> /\??/\
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1985 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= shapiro
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
shaprio: shaprio.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<h1>Grand prize for most well-rounded in confusion</h1>
|
||||||
|
|
||||||
|
<p>Carl Shapiro</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>As submitted, this program was 3 lines (2 of defines and 1 of code).
|
||||||
|
To make news & mail happy we split the last line into 7. Join them
|
||||||
|
back without the newlines to get the original version.</p>
|
||||||
|
|
||||||
|
<p>This program was selected for the 1987 t-shirt collection.</p>
|
||||||
|
|
||||||
|
<p>We found this program is be simply a<strong>maze</strong>ing! Run this program without
|
||||||
|
arguments and notice the output.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Grand prize for most well-rounded in confusion
|
||||||
|
|
||||||
|
Carl Shapiro
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
As submitted, this program was 3 lines (2 of defines and 1 of code).
|
||||||
|
To make news & mail happy we split the last line into 7. Join them
|
||||||
|
back without the newlines to get the original version.
|
||||||
|
|
||||||
|
This program was selected for the 1987 t-shirt collection.
|
||||||
|
|
||||||
|
We found this program is be simply a**maze**ing! Run this program without
|
||||||
|
arguments and notice the output.
|
||||||
|
|
||||||
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#define P(X)j=write(1,X,1)
|
||||||
|
#define C 39
|
||||||
|
int M[5000]={2},*u=M,N[5000],R=22,a[4],l[]={0,-1,C-1,-1},m[]={1,-C,-1,C},*b=N,
|
||||||
|
*d=N,c,e,f,g,i,j,k,s;main(){for(M[i=C*R-1]=24;f|d>=b;){c=M[g=i];i=e;for(s=f=0;
|
||||||
|
s<4;s++)if((k=m[s]+g)>=0&&k<C*R&&l[s]!=k%C&&(!M[k]||!j&&c>=16!=M[k]>=16))a[f++
|
||||||
|
]=s;if(f){f=M[e=m[s=a[rand()/(1+2147483647/f)]]+g];j=j<f?f:j;f+=c&-16*!j;M[g]=
|
||||||
|
c|1<<s;M[*d++=e]=f|1<<(s+2)%4;}else e=d>b++?b[-1]:e;}P(" ");for(s=C;--s;P("_")
|
||||||
|
)P(" ");for(;P("\n"),R--;P("|"))for(e=C;e--;P("_ "+(*u++/8)%2))P("| "+(*u/4)%2
|
||||||
|
);}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1985 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= sicherman
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
scherman: sicherman.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<h1>The worst abuse of the C preprocessor</h1>
|
||||||
|
|
||||||
|
<p>Col. G. L. Sicherman</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>This program abuses the C preprocessor so much that some /lib/cpp’s fail to
|
||||||
|
strip out all of the comments on the first pass! If you were able to
|
||||||
|
understand Decot’s entry in 1984, you will have a head start on this
|
||||||
|
one.</p>
|
||||||
|
|
||||||
|
<p>Be sure to run this program through lint! If your lint works
|
||||||
|
correctly, it should warn you that the argument ‘Manual’ isn’t used.
|
||||||
|
Like the program says, what’s that mean?</p>
|
||||||
|
|
||||||
|
<p>Run the program without arguments and enter the letters ‘a’ thru ’m'
|
||||||
|
on a line. Now enter the letters ‘n’ thru ‘z’. But to borrow a quote
|
||||||
|
from Richard Stallman: If you think you understand what this code
|
||||||
|
does, then you don’t, so read it again! Explain why:</p>
|
||||||
|
|
||||||
|
<pre><code>sicherman < sicherman.c | sicherman | diff - sicherman.c
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>results in diff reporting a difference on some machines.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# The worst abuse of the C preprocessor
|
||||||
|
|
||||||
|
Col. G. L. Sicherman
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
This program abuses the C preprocessor so much that some /lib/cpp's fail to
|
||||||
|
strip out all of the comments on the first pass! If you were able to
|
||||||
|
understand Decot's entry in 1984, you will have a head start on this
|
||||||
|
one.
|
||||||
|
|
||||||
|
Be sure to run this program through lint! If your lint works
|
||||||
|
correctly, it should warn you that the argument 'Manual' isn't used.
|
||||||
|
Like the program says, what's that mean?
|
||||||
|
|
||||||
|
Run the program without arguments and enter the letters 'a' thru 'm'
|
||||||
|
on a line. Now enter the letters 'n' thru 'z'. But to borrow a quote
|
||||||
|
from Richard Stallman: If you think you understand what this code
|
||||||
|
does, then you don't, so read it again! Explain why:
|
||||||
|
|
||||||
|
sicherman < sicherman.c | sicherman | diff - sicherman.c
|
||||||
|
|
||||||
|
results in diff reporting a difference on some machines.
|
||||||
|
|
||||||
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#define C_C_(_)~' '&_
|
||||||
|
#define _C_C(_)('\b'b'\b'>=C_C>'\t'b'\n')
|
||||||
|
#define C_C _|_
|
||||||
|
#define b *
|
||||||
|
#define C /b/
|
||||||
|
#define V _C_C(
|
||||||
|
main(C,V)
|
||||||
|
char **V;
|
||||||
|
/* C program. (If you don't
|
||||||
|
* understand it look it
|
||||||
|
*/ up.) (In the C Manual)
|
||||||
|
{
|
||||||
|
char _,__;
|
||||||
|
while (read(0,&__,1) & write((_=(_=C_C_(__),C)),
|
||||||
|
_C_,1)) _=C-V+subr(&V);
|
||||||
|
}
|
||||||
|
subr(C)
|
||||||
|
char *C;
|
||||||
|
{
|
||||||
|
C="Lint says "argument Manual isn't used." What's that
|
||||||
|
mean?"; while (write((read(C_C('"'-'/*"'/*"*/))?__:__-_+
|
||||||
|
'\b'b'\b'|((_-52)%('\b'b'\b'+C_C_('\t'b'\n'))+1),1),&_,1));
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/env make
|
||||||
|
#
|
||||||
|
# 1986 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
|
||||||
|
|
||||||
|
# ANSI compiler
|
||||||
|
#
|
||||||
|
# Set CC to the name of your ANSI compiler.
|
||||||
|
#
|
||||||
|
CC= cc
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# IOCCC winners
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
WINNERS= marshall hague applin bright stein holloway august pawka wall
|
||||||
|
|
||||||
|
###################
|
||||||
|
# build all entries
|
||||||
|
###################
|
||||||
|
#
|
||||||
|
all:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# utility rules
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
clean:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
clobber:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
install:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
The 1986 contest was named: "The Third International Obfuscated C Code Contest"
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
The rules for 1986 suggested categories due to the success of the 1985
|
||||||
|
judging method. The maximum size was increased from 512 to 1024 bytes.
|
||||||
|
Larry Bassel joined as the second official judge.
|
||||||
|
|
||||||
|
A poll was taken for the worst code for BSD and System V program.
|
||||||
|
The Bourne Shell (/bin/sh) won for both systems. The BSD finger
|
||||||
|
program took third place.
|
||||||
|
|
||||||
|
Rules and results were posted to net.lang.c and net.unix-wizards.
|
||||||
|
Micro/Systems Journal published started regular publishing of the winners.
|
||||||
|
The practice of making first announcement of the winners at the Summer
|
||||||
|
Usenix BOF started this year. A notice was posted to net.announce.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= applin
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
applin: applin.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
cat =13 /*/ >/dev/null 2>&1; echo "Hello, world!"; exit
|
||||||
|
*
|
||||||
|
* This program works under cc, f77, and /bin/sh.
|
||||||
|
*
|
||||||
|
*/; main() {
|
||||||
|
write(
|
||||||
|
cat-~-cat
|
||||||
|
/*,'(
|
||||||
|
*/
|
||||||
|
,"Hello, world!"
|
||||||
|
,
|
||||||
|
cat); putchar(~-~-~-cat); } /*
|
||||||
|
,)')
|
||||||
|
end
|
||||||
|
*/
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<h1>Most adaptable program</h1>
|
||||||
|
|
||||||
|
<p>Jack Applin<br>
|
||||||
|
Hewlett-Packard<br>
|
||||||
|
Ft. Collins<br>
|
||||||
|
Colorado<br>
|
||||||
|
USA</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Compile and/or execute as directed by the documentation.</p>
|
||||||
|
|
||||||
|
<p>The judges were so amused by this little program that we created an
|
||||||
|
award just for it. This program is portable to the C and Fortran 77
|
||||||
|
compilers as well as executable by the bourne shell!</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Most adaptable program
|
||||||
|
|
||||||
|
Jack Applin
|
||||||
|
Hewlett-Packard
|
||||||
|
Ft. Collins
|
||||||
|
Colorado
|
||||||
|
USA
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Compile and/or execute as directed by the documentation.
|
||||||
|
|
||||||
|
The judges were so amused by this little program that we created an
|
||||||
|
award just for it. This program is portable to the C and Fortran 77
|
||||||
|
compilers as well as executable by the bourne shell!
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= august
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
august: august.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
typedef struct n{int a:3,
|
||||||
|
b:29;struct n*c;}t;t*
|
||||||
|
f();r(){}m(u)t*u;{t*w,*z;
|
||||||
|
z=u->c,q(z),u->b=z->b*10,
|
||||||
|
w=u->c=f(),w->a=1,w->c=z->
|
||||||
|
c;}t*k;g(u)t*u;{t*z,*v,*p,
|
||||||
|
*x;z=u->c,q(z),u->b=z->b,v
|
||||||
|
=z->c,z->a=2,x=z->c=f(),x
|
||||||
|
->a=3,x->b=2,p=x->c=f(),p
|
||||||
|
->c=f(),p->c->a=1,p->c->c=
|
||||||
|
v;}int i;h(u)t*u;{t*z,*v,*
|
||||||
|
w;int c,e;z=u->c,v=z->c,q(
|
||||||
|
v),c=u->b,e=v->b,u->b=z->b
|
||||||
|
,z->a=3,z->b=c+1,e+9>=c&&(
|
||||||
|
q(z),e=z->b,u->b+=e/c,w=f(
|
||||||
|
),w->b=e%c,w->c=z->c,u->c=
|
||||||
|
w);}int(*y[4])()={r,m,g,h};
|
||||||
|
char *sbrk();main(){t*e,*p,*o;
|
||||||
|
o=f(),o->c=o,o->b=1,e=f(),
|
||||||
|
e->a=2,p=e->c=f(),p->b=2,
|
||||||
|
p->c=o,q(e),e=e->c,(void)write
|
||||||
|
(1,"2.",2);for(;;e=e->c){q(e),
|
||||||
|
e->b=write(1,&e->b["0123456789"],
|
||||||
|
1);}}t*f(){return i||(i=1000,
|
||||||
|
k=(t*)sbrk(i*sizeof(t))),k+--i;
|
||||||
|
}q(p)t*p;{(*y[p->a])(p);}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<h1>Best complex task done in a complex way</h1>
|
||||||
|
|
||||||
|
<p>Lennart Augustsson<br>
|
||||||
|
Dept. of Comp. Sci.<br>
|
||||||
|
Chalmers University of Technology,<br>
|
||||||
|
412 96 Gothenburg<br>
|
||||||
|
Sweden</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>This program computes a specific mathematical value. Simply compile
|
||||||
|
and give it an infinite amount of stack space and cpu time. Otherwise
|
||||||
|
just be satisfied with the approximation displayed just before the core
|
||||||
|
dump.</p>
|
||||||
|
|
||||||
|
<p>This program will pass lint on your system assuming your lint is brave
|
||||||
|
enough to try and parse it correctly.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Best complex task done in a complex way
|
||||||
|
|
||||||
|
Lennart Augustsson
|
||||||
|
Dept. of Comp. Sci.
|
||||||
|
Chalmers University of Technology,
|
||||||
|
412 96 Gothenburg
|
||||||
|
Sweden
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
This program computes a specific mathematical value. Simply compile
|
||||||
|
and give it an infinite amount of stack space and cpu time. Otherwise
|
||||||
|
just be satisfied with the approximation displayed just before the core
|
||||||
|
dump.
|
||||||
|
|
||||||
|
This program will pass lint on your system assuming your lint is brave
|
||||||
|
enough to try and parse it correctly.
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= bright
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
bright: bright.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#define O1O printf
|
||||||
|
#define OlO putchar
|
||||||
|
#define O10 exit
|
||||||
|
#define Ol0 strlen
|
||||||
|
#define QLQ fopen
|
||||||
|
#define OlQ fgetc
|
||||||
|
#define O1Q abs
|
||||||
|
#define QO0 for
|
||||||
|
typedef char lOL;
|
||||||
|
|
||||||
|
lOL*QI[] = {"Use:\012\011dump file\012","Unable to open file '\x25s'\012",
|
||||||
|
"\012"," ",""};
|
||||||
|
|
||||||
|
main(I,Il)
|
||||||
|
lOL*Il[];
|
||||||
|
{ FILE *L;
|
||||||
|
unsigned lO;
|
||||||
|
int Q,OL[' '^'0'],llO = EOF,
|
||||||
|
|
||||||
|
O=1,l=0,lll=O+O+O+l,OQ=056;
|
||||||
|
lOL*llL="%2x ";
|
||||||
|
(I != 1<<1&&(O1O(QI[0]),O10(1011-1010))),
|
||||||
|
((L = QLQ(Il[O],"r"))==0&&(O1O(QI[O],Il[O]),O10(O)));
|
||||||
|
lO = I-(O<<l<<O);
|
||||||
|
while (L-l,1)
|
||||||
|
{ QO0(Q = 0L;((Q &~(0x10-O))== l);
|
||||||
|
OL[Q++] = OlQ(L));
|
||||||
|
if (OL[0]==llO) break;
|
||||||
|
O1O("\0454x: ",lO);
|
||||||
|
if (I == (1<<1))
|
||||||
|
{ QO0(Q=Ol0(QI[O<<O<<1]);Q<Ol0(QI[0]);
|
||||||
|
Q++)O1O((OL[Q]!=llO)?llL:QI[lll],OL[Q]);/*"
|
||||||
|
O10(QI[1O])*/
|
||||||
|
O1O(QI[lll]);{}
|
||||||
|
}
|
||||||
|
QO0 (Q=0L;Q<1<<1<<1<<1<<1;Q+=Q<0100)
|
||||||
|
{ (OL[Q]!=llO)? /* 0010 10lOQ 000LQL */
|
||||||
|
((D(OL[Q])==0&&(*(OL+O1Q(Q-l))=OQ)),
|
||||||
|
OlO(OL[Q])):
|
||||||
|
OlO(1<<(1<<1<<1)<<1);
|
||||||
|
}
|
||||||
|
O1O(QI[01^10^9]);
|
||||||
|
lO+=Q+0+l;}
|
||||||
|
}
|
||||||
|
D(l) { return l>=' '&&l<='\~';
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<h1>Most useful obfuscation</h1>
|
||||||
|
|
||||||
|
<p>Walter Bright</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Compile this program and give filenames as arguments. For example try:</p>
|
||||||
|
|
||||||
|
<pre><code>bright bright.c
|
||||||
|
bright bright
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Mr. Bright exploits the c pre-processor, similar variables and
|
||||||
|
excessive shifting to obfuscate an otherwise useful binary display
|
||||||
|
program. This gives you a small example of what it is like to
|
||||||
|
maintain the Bourne shell! :-}</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Most useful obfuscation
|
||||||
|
|
||||||
|
Walter Bright
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Compile this program and give filenames as arguments. For example try:
|
||||||
|
|
||||||
|
bright bright.c
|
||||||
|
bright bright
|
||||||
|
|
||||||
|
Mr. Bright exploits the c pre-processor, similar variables and
|
||||||
|
excessive shifting to obfuscate an otherwise useful binary display
|
||||||
|
program. This gives you a small example of what it is like to
|
||||||
|
maintain the Bourne shell! :-}
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= hague
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
hague: hague.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#define DIT (
|
||||||
|
#define DAH )
|
||||||
|
#define __DAH ++
|
||||||
|
#define DITDAH *
|
||||||
|
#define DAHDIT for
|
||||||
|
#define DIT_DAH malloc
|
||||||
|
#define DAH_DIT gets
|
||||||
|
#define _DAHDIT char
|
||||||
|
_DAHDIT _DAH_[]="ETIANMSURWDKGOHVFaLaPJBXCYZQb54a3d2f16g7c8a90l?e'b.s;i,d:"
|
||||||
|
;main DIT DAH{_DAHDIT
|
||||||
|
DITDAH _DIT,DITDAH DAH_,DITDAH DIT_,
|
||||||
|
DITDAH _DIT_,DITDAH DIT_DAH DIT
|
||||||
|
DAH,DITDAH DAH_DIT DIT DAH;DAHDIT
|
||||||
|
DIT _DIT=DIT_DAH DIT 81 DAH,DIT_=_DIT
|
||||||
|
__DAH;_DIT==DAH_DIT DIT _DIT DAH;__DIT
|
||||||
|
DIT'\n'DAH DAH DAHDIT DIT DAH_=_DIT;DITDAH
|
||||||
|
DAH_;__DIT DIT DITDAH
|
||||||
|
_DIT_?_DAH DIT DITDAH DIT_ DAH:'?'DAH,__DIT
|
||||||
|
DIT' 'DAH,DAH_ __DAH DAH DAHDIT DIT
|
||||||
|
DITDAH DIT_=2,_DIT_=_DAH_; DITDAH _DIT_&&DIT
|
||||||
|
DITDAH _DIT_!=DIT DITDAH DAH_>='a'? DITDAH
|
||||||
|
DAH_&223:DITDAH DAH_ DAH DAH; DIT
|
||||||
|
DITDAH DIT_ DAH __DAH,_DIT_ __DAH DAH
|
||||||
|
DITDAH DIT_+= DIT DITDAH _DIT_>='a'? DITDAH _DIT_-'a':0
|
||||||
|
DAH;}_DAH DIT DIT_ DAH{ __DIT DIT
|
||||||
|
DIT_>3?_DAH DIT DIT_>>1 DAH:'\0'DAH;return
|
||||||
|
DIT_&1?'-':'.';}__DIT DIT DIT_ DAH _DAHDIT
|
||||||
|
DIT_;{DIT void DAH write DIT 1,&DIT_,1 DAH;}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<h1>Worst abuse of the C preprocessor</h1>
|
||||||
|
|
||||||
|
<p>Jim Hague<br>
|
||||||
|
University of Kent at Canterbury<br>
|
||||||
|
Canterbury, Kent<br>
|
||||||
|
UK</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Compile this program and feed ascii text into standard input. This
|
||||||
|
program is known to pass lint on some systems and abort lint on
|
||||||
|
others.</p>
|
||||||
|
|
||||||
|
<p>This program was selected for the 1987 t-shirt collection.</p>
|
||||||
|
|
||||||
|
<p>Think morse code when you ponder this program. Note how use of
|
||||||
|
similar variables can be obfuscating! The author notes that this
|
||||||
|
program implements the international morse standard. Now for extra
|
||||||
|
credit, what morse message does the program spell out?</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Worst abuse of the C preprocessor
|
||||||
|
|
||||||
|
Jim Hague
|
||||||
|
University of Kent at Canterbury
|
||||||
|
Canterbury, Kent
|
||||||
|
UK
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Compile this program and feed ascii text into standard input. This
|
||||||
|
program is known to pass lint on some systems and abort lint on
|
||||||
|
others.
|
||||||
|
|
||||||
|
This program was selected for the 1987 t-shirt collection.
|
||||||
|
|
||||||
|
Think morse code when you ponder this program. Note how use of
|
||||||
|
similar variables can be obfuscating! The author notes that this
|
||||||
|
program implements the international morse standard. Now for extra
|
||||||
|
credit, what morse message does the program spell out?
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= holloway
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
holloway: holloway.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<h1>Best simple task performed in a complex way</h1>
|
||||||
|
|
||||||
|
<p>Bruce Holloway<br>
|
||||||
|
Digital Research, Inc.<br>
|
||||||
|
Monterey, CA<br>
|
||||||
|
USA</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>Believe it or not, this is the old standard “Hello, world” program
|
||||||
|
performed in a very complex way. The judges and the author defy you
|
||||||
|
do determine how it does it. It is a good thing that K&R didn’t use
|
||||||
|
this version as the first C program!</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Best simple task performed in a complex way
|
||||||
|
|
||||||
|
Bruce Holloway
|
||||||
|
Digital Research, Inc.
|
||||||
|
Monterey, CA
|
||||||
|
USA
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Believe it or not, this is the old standard "Hello, world" program
|
||||||
|
performed in a very complex way. The judges and the author defy you
|
||||||
|
do determine how it does it. It is a good thing that K&R didn't use
|
||||||
|
this version as the first C program!
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#include "stdio.h"
|
||||||
|
#define e 3
|
||||||
|
#define g (e/e)
|
||||||
|
#define h ((g+e)/2)
|
||||||
|
#define f (e-g-h)
|
||||||
|
#define j (e*e-g)
|
||||||
|
#define k (j-h)
|
||||||
|
#define l(x) tab2[x]/h
|
||||||
|
#define m(n,a) ((n&(a))==(a))
|
||||||
|
|
||||||
|
long tab1[]={ 989L,5L,26L,0L,88319L,123L,0L,9367L };
|
||||||
|
int tab2[]={ 4,6,10,14,22,26,34,38,46,58,62,74,82,86 };
|
||||||
|
|
||||||
|
main(m1,s) char *s; {
|
||||||
|
int a,b,c,d,o[k],n=(int)s;
|
||||||
|
if(m1==1){ char b[2*j+f-g]; main(l(h+e)+h+e,b); printf(b); }
|
||||||
|
else switch(m1-=h){
|
||||||
|
case f:
|
||||||
|
a=(b=(c=(d=g)<<g)<<g)<<g;
|
||||||
|
return(m(n,a|c)|m(n,b)|m(n,a|d)|m(n,c|d));
|
||||||
|
case h:
|
||||||
|
for(a=f;a<j;++a)if(tab1[a]&&!(tab1[a]%((long)l(n))))return(a);
|
||||||
|
case g:
|
||||||
|
if(n<h)return(g);
|
||||||
|
if(n<j){n-=g;c='D';o[f]=h;o[g]=f;}
|
||||||
|
else{c='\r'-'\b';n-=j-g;o[f]=o[g]=g;}
|
||||||
|
if((b=n)>=e)for(b=g<<g;b<n;++b)o[b]=o[b-h]+o[b-g]+c;
|
||||||
|
return(o[b-g]%n+k-h);
|
||||||
|
default:
|
||||||
|
if(m1-=e) main(m1-g+e+h,s+g); else *(s+g)=f;
|
||||||
|
for(*s=a=f;a<e;) *s=(*s<<e)|main(h+a++,(char *)m1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= marshall
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
marshall: marshall.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<h1>Best layout</h1>
|
||||||
|
|
||||||
|
<p>Eric Marshall<br>
|
||||||
|
System Development Corporation, a Burroughs Company<br>
|
||||||
|
P.O. Box 517<br>
|
||||||
|
Paoli, PA.<br>
|
||||||
|
19301</p>
|
||||||
|
|
||||||
|
<h1>Judges' comments:</h1>
|
||||||
|
|
||||||
|
<p>This program prints the name of the picture. The layout is somewhat
|
||||||
|
pretty through it is not the usual sort of output one would expect
|
||||||
|
from printing a program!</p>
|
||||||
|
|
||||||
|
<p>This program was selected for the 1987 t-shirt collection.</p>
|
||||||
|
|
||||||
|
<p>This program is known to give some C compilers a problems.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Best layout
|
||||||
|
|
||||||
|
Eric Marshall
|
||||||
|
System Development Corporation, a Burroughs Company
|
||||||
|
P.O. Box 517
|
||||||
|
Paoli, PA.
|
||||||
|
19301
|
||||||
|
|
||||||
|
# Judges' comments:
|
||||||
|
|
||||||
|
This program prints the name of the picture. The layout is somewhat
|
||||||
|
pretty through it is not the usual sort of output one would expect
|
||||||
|
from printing a program!
|
||||||
|
|
||||||
|
This program was selected for the 1987 t-shirt collection.
|
||||||
|
|
||||||
|
This program is known to give some C compilers a problems.
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
extern int
|
||||||
|
errno
|
||||||
|
;char
|
||||||
|
grrr
|
||||||
|
;main( r,
|
||||||
|
argv, argc ) int argc ,
|
||||||
|
r ; char *argv[];{int P( );
|
||||||
|
#define x int i, j,cc[4];printf(" choo choo\n" ) ;
|
||||||
|
x ;if (P( ! i ) | cc[ ! j ]
|
||||||
|
& P(j )>2 ? j : i ){* argv[i++ +!-i]
|
||||||
|
; for (i= 0;; i++ );
|
||||||
|
_exit(argv[argc- 2 / cc[1*argc]|-1<<4 ] ) ;printf("%d",P(""));}}
|
||||||
|
P ( a ) char a ; { a ; while( a > " B "
|
||||||
|
/* - by E ricM arsh all- */); }
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= pawka
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
pawka: pawka.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<h1>Most illegible code</h1>
|
||||||
|
|
||||||
|
<p>Michael H. Pawka<br>
|
||||||
|
Naval Ocean Systems Center<br>
|
||||||
|
San Diego, Ca<br>
|
||||||
|
92152</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>The judges found this entry to be one of hardest to read without the
|
||||||
|
aid of <code>/lib/cpp</code> and a good editor. When run, the program asks if it
|
||||||
|
is obfuscated, of all things!</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Most illegible code
|
||||||
|
|
||||||
|
Michael H. Pawka
|
||||||
|
Naval Ocean Systems Center
|
||||||
|
San Diego, Ca
|
||||||
|
92152
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
The judges found this entry to be one of hardest to read without the
|
||||||
|
aid of `/lib/cpp` and a good editor. When run, the program asks if it
|
||||||
|
is obfuscated, of all things!
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include "stdio.h"
|
||||||
|
#define xyxx char
|
||||||
|
#define xyyxx putchar
|
||||||
|
#define xyyyxx while
|
||||||
|
#define xxyyyx int
|
||||||
|
#define xxxyyx main
|
||||||
|
#define xyxyxy if
|
||||||
|
#define xyyxyy '\n'
|
||||||
|
xyxx *xyx [] = {
|
||||||
|
"]I^x[I]k\\I^o[IZ~\\IZ~[I^|[I^l[I^j[I^}[I^n[I]m\\I]h",
|
||||||
|
"]IZx\\IZx[IZk\\IZk[IZo_IZ~\\IZ~[IZ|_IZl_IZj\\IZj]IZ}]IZn_IZm\\IZm_IZh",
|
||||||
|
"]IZx\\IZx[I^k[I\\o]IZ~\\IZ~\\I]|[IZl_I^j]IZ}]I^n[IZm\\IZm_IZh",
|
||||||
|
"]IZx\\IZx[IZk\\IZk[IZo_IZ~\\IZ~_IZ|[IZl_IZj\\IZj]IZ}]IZn_IZm\\IZm]IZh",
|
||||||
|
"]I^x[I]k\\IZo_I^~[I^|[I^l[IZj\\IZj]IZ}]I^n[I]m^IZh",'\0'};/*xyyxyxyxxxyxxxyy*/
|
||||||
|
xyxx *xyyx; xxyyyx xyyyx,xyyyyx,xyyyyyx=0x59,xyyyyyyx=0x29,/*yxxyxyyyxxyyyxyy*/
|
||||||
|
xxyx=0x68;xxxyyx(){xyyyyx=0;xyyyxx(xyx[xyyyyx]){xyyx=xyx[xyyyyx++];/*xyyyxxyx*/
|
||||||
|
xyyyxx(*xyyx){xyyyx= *xyyx++-xyyyyyx;xyyyxx(xyyyx--)xyyxx(*xyyx-xyyyyyyx);/*x*/
|
||||||
|
xyxyxy(*xyyx==xxyx)xyyxx(xyyxyy);*xyyx++;}}}/*xyxyxyyyyxxyxxxyyyxyyyxyxxyyy*/
|
||||||
+109
@@ -0,0 +1,109 @@
|
|||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
WARNING: The rules and mailing address for the contest change from year
|
||||||
|
to year. Be sure that you consult the current set of rules
|
||||||
|
before submitting entries.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Subject: Third International Obfuscated C Code Contest Rules
|
||||||
|
Newsgroups: net.lang.c
|
||||||
|
Keywords: rules,1986,obfuscate,contest
|
||||||
|
|
||||||
|
GOAL: To write the most Obscure working C program following the rules below:
|
||||||
|
|
||||||
|
RULES: 1) The source must be 1024 bytes or less. NO exceptions!
|
||||||
|
|
||||||
|
2) Include in your letter:
|
||||||
|
a) Name (or anonymous), Company/School, City, State and Country.
|
||||||
|
b) Your path from a major network site, if applicable.
|
||||||
|
c) A brief statement of what the program should do.
|
||||||
|
d) The Machine(s)/Operating system(s) on which it runs.
|
||||||
|
e) Enclose your source between the following lines:
|
||||||
|
---start of program---
|
||||||
|
<place obfuscated source of 1024 bytes or less here>
|
||||||
|
---end of program---
|
||||||
|
|
||||||
|
3) The entry should be written in common C. (K&R + common extensions)
|
||||||
|
|
||||||
|
4) The program must be of original work. All programs must be
|
||||||
|
in the public domain. All copyrighted programs will be rejected.
|
||||||
|
|
||||||
|
5) Entries must be received between 31-Mar-86 and 30-May-86 0:00 GMT.
|
||||||
|
Email your entries to:
|
||||||
|
|
||||||
|
decwrl!nsc!obfuscate
|
||||||
|
|
||||||
|
Entries sent by UUCP Email will be confirmed starting 1-May-86.
|
||||||
|
People are encouraged to submit entries via Email, however one may
|
||||||
|
mail entries the following address:
|
||||||
|
|
||||||
|
International Obfuscated C Code Contest
|
||||||
|
National Semiconductor
|
||||||
|
Attn: Landon Noll Mail Stop: 7c266
|
||||||
|
1135 Kern Ave.
|
||||||
|
Sunnyvale, CA 94086
|
||||||
|
U.S.A.
|
||||||
|
|
||||||
|
AWARDS: Winners of each category and the best of Show will be posted to
|
||||||
|
net.announce as well as being published in the May 86 issue of the
|
||||||
|
"Micro/Systems Journal". Winners also get to receive international
|
||||||
|
fame/flame for their efforts!
|
||||||
|
|
||||||
|
JUDGING: Awards will be given to the best entry in a number of categories.
|
||||||
|
The actual category list will vary depending on the types of entries
|
||||||
|
we receive. At the moment, we are considering using the following:
|
||||||
|
|
||||||
|
* The most obscure algorithm
|
||||||
|
* The worst abuse of the C preprocessor
|
||||||
|
* The strangest source layout
|
||||||
|
* The best small one line program
|
||||||
|
* The most useful program
|
||||||
|
* <anything else we need to give recognition to a good entry>
|
||||||
|
|
||||||
|
Judging will be done by myself, Larry Bassel and other local people
|
||||||
|
who are willing to help out.
|
||||||
|
|
||||||
|
We will attempt to run each of them on a Vax 785/4.2BSD system.
|
||||||
|
Don't let the lack of such a system stop you! Try to avoid operating
|
||||||
|
system/machine specific code if you do not have such a system.
|
||||||
|
Extra points will be given for programs which:
|
||||||
|
|
||||||
|
a) pass lint without complaint
|
||||||
|
b) do something quasi-interesting
|
||||||
|
c) are portable
|
||||||
|
|
||||||
|
A larger program size was selected to allow for a wider range of
|
||||||
|
program ideas. However if you don't need 1024 bytes don't use them.
|
||||||
|
Given two programs with similar techniques and similar levels of
|
||||||
|
obfuscation, we will tend to favor the more concise entry.
|
||||||
|
|
||||||
|
POLL: We want to know what you think is the most poorly coded utility
|
||||||
|
released with 4.xBSD and/or Sys V. The top results plus the
|
||||||
|
best flames will be posted along with the contest results.
|
||||||
|
To vote, please follow the guidelines below:
|
||||||
|
|
||||||
|
1) Include at the top of the letter:
|
||||||
|
a) Name (or anonymous), Company/School, City, State and Country.
|
||||||
|
b) Your path from a major network site, if applicable.
|
||||||
|
c) the name of the poorly coded utility
|
||||||
|
d) the name of the operating system on which it is found
|
||||||
|
e) the line: <<<FLAME ON>>>
|
||||||
|
f) up to 1024 bytes of flames
|
||||||
|
g) the line: <<<FLAME OFF>>>
|
||||||
|
|
||||||
|
2) Confine your vote to the standard set of commands. I.e., don't
|
||||||
|
flame about local commands or user contributed software.
|
||||||
|
|
||||||
|
3) Submit your votes via Email to:
|
||||||
|
|
||||||
|
for 4.xBSD: decwrl!nsc!bsd_util
|
||||||
|
for Sys V: decwrl!nsc!sysV_util
|
||||||
|
|
||||||
|
or, you may send your votes by letter to the same address used by
|
||||||
|
the contest. Please place your votes on different sheets of paper.
|
||||||
|
|
||||||
|
chongo <C> /\cc/\
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= stein
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
stein: stein.c
|
||||||
|
-rm -f a.out
|
||||||
|
cc $? -o $@
|
||||||
|
-ln $@ a.out
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<h1>Best one liner</h1>
|
||||||
|
|
||||||
|
<p>Jan Stein</p>
|
||||||
|
|
||||||
|
<p>Judges' comments:</p>
|
||||||
|
|
||||||
|
<blockquote><p>NOTE: to avoid problems with news and mail, the single line was split
|
||||||
|
into 3 lines. Join all lines into a single line to recreate
|
||||||
|
the original file.</p></blockquote>
|
||||||
|
|
||||||
|
<p>Compile and link to a filename called ‘a.out’. Try the program with the
|
||||||
|
following argument:</p>
|
||||||
|
|
||||||
|
<pre><code>a.out ^N^N
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>(^N is ASCII control-N). One some machines, ^M<sup>L</sup> is needed to get it to
|
||||||
|
output cleanly. Your system may require another set of characters.
|
||||||
|
In time, you will figure out what it does. :-)</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Best one liner
|
||||||
|
|
||||||
|
Jan Stein
|
||||||
|
|
||||||
|
Judges' comments:
|
||||||
|
|
||||||
|
> NOTE: to avoid problems with news and mail, the single line was split
|
||||||
|
> into 3 lines. Join all lines into a single line to recreate
|
||||||
|
> the original file.
|
||||||
|
|
||||||
|
Compile and link to a filename called 'a.out'. Try the program with the
|
||||||
|
following argument:
|
||||||
|
|
||||||
|
a.out ^N^N
|
||||||
|
|
||||||
|
(^N is ASCII control-N). One some machines, ^M^L is needed to get it to
|
||||||
|
output cleanly. Your system may require another set of characters.
|
||||||
|
In time, you will figure out what it does. :-)
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
typedef char*z;O;o;_=33303285;main(b,Z)z Z;{b=(b>=0||(main(b+1,Z+1),*Z=O%(o=(_%
|
||||||
|
25))+'0',O/=o,_/=25))&&(b<1||(O=time(&b)%0250600,main(~5,*(z*)Z),write(1,*(z*)Z
|
||||||
|
,9)));}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1986 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= wall
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
wall: wall.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS} a.out
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<h1>The grand prize in most well-rounded in confusion</h1>
|
||||||
|
|
||||||
|
<p>Larry Wall<br>
|
||||||
|
System Development Corporation<br>
|
||||||
|
Santa Monica<br>
|
||||||
|
California<br>
|
||||||
|
US of A</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<p>The original version did not have a ‘;’ character in the first line.
|
||||||
|
This caused a number of System V C pre-preprocessors to gripe about a
|
||||||
|
syntax error.</p>
|
||||||
|
|
||||||
|
<p>This program is a masterpiece of obfuscation and humor. Larry Wall
|
||||||
|
(the hacker who gave us rn and patch) asks you to compile and consider
|
||||||
|
the warning message generated by the C compiler. Then execute the
|
||||||
|
program and type charters into its standard input. You will see why
|
||||||
|
the compiler documents the program.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# The grand prize in most well-rounded in confusion
|
||||||
|
|
||||||
|
Larry Wall
|
||||||
|
System Development Corporation
|
||||||
|
Santa Monica
|
||||||
|
California
|
||||||
|
US of A
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
The original version did not have a ';' character in the first line.
|
||||||
|
This caused a number of System V C pre-preprocessors to gripe about a
|
||||||
|
syntax error.
|
||||||
|
|
||||||
|
This program is a masterpiece of obfuscation and humor. Larry Wall
|
||||||
|
(the hacker who gave us rn and patch) asks you to compile and consider
|
||||||
|
the warning message generated by the C compiler. Then execute the
|
||||||
|
program and type charters into its standard input. You will see why
|
||||||
|
the compiler documents the program.
|
||||||
|
|
||||||
|
Copyright (c) 1986, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
#define _c(C)_ (C)&('|'+3):c_()(C)>>('\n'-3) __; /**/
|
||||||
|
#define C char*
|
||||||
|
#define keyboard ",,B3-u;.(&*5., /(b*(1\036!a%\031m,,,,,\r\n"
|
||||||
|
#define main(o,oo)oo(o){
|
||||||
|
#define _ ;case
|
||||||
|
C
|
||||||
|
#define c_(cc)c cc=
|
||||||
|
#define C_(sand)_O(sand)witch
|
||||||
|
o=keyboard;
|
||||||
|
#define __ ;break;
|
||||||
|
C
|
||||||
|
ccc(
|
||||||
|
cc)
|
||||||
|
C
|
||||||
|
cc;
|
||||||
|
{
|
||||||
|
C
|
||||||
|
cccc=
|
||||||
|
cc;int
|
||||||
|
#ifndef lint
|
||||||
|
#define keyboard "dijs QH.soav Vdtnsaoh DmfpaksoQz;kkt oa, -dijs"
|
||||||
|
#endif
|
||||||
|
c;
|
||||||
|
main(;c_(=(*cc);*cc++)c,for);
|
||||||
|
#define _O(s)s
|
||||||
|
main(0xb+(c>>5),C_(s))
|
||||||
|
_'\v'
|
||||||
|
:__ _'\f':
|
||||||
|
main(c,C_(s));
|
||||||
|
_c(8098)_c(6055)_c(14779)_c(10682)
|
||||||
|
#define O_(O)_O(O)stem(ccc(
|
||||||
|
_c(15276)_c(11196)_c(15150)
|
||||||
|
#define _C ;return
|
||||||
|
_c(11070)_c(15663)_c(11583)
|
||||||
|
}
|
||||||
|
__
|
||||||
|
default
|
||||||
|
:c_(+)o[c&__LINE__-007];
|
||||||
|
main(c_(-)'-'-1,C_(s))_
|
||||||
|
0214
|
||||||
|
:_
|
||||||
|
0216
|
||||||
|
:c_(+)025 _
|
||||||
|
0207
|
||||||
|
:c_(-)4 _
|
||||||
|
0233
|
||||||
|
:c_(+)' '-1;
|
||||||
|
}}c_(&)'z'+5;
|
||||||
|
}_C cccc;
|
||||||
|
}main(,cc)
|
||||||
|
C
|
||||||
|
#define O write(1,
|
||||||
|
c="O";
|
||||||
|
O_(sy) keyboard));
|
||||||
|
main(;;,for);
|
||||||
|
read(0,
|
||||||
|
c,1);*
|
||||||
|
c_(&)'~'+1
|
||||||
|
;O ccc(
|
||||||
|
c),
|
||||||
|
'\0');
|
||||||
|
main(*c,
|
||||||
|
C_(s));_
|
||||||
|
4
|
||||||
|
:O_(sy)";kkt -oa, dijszdijs QQ"))_C
|
||||||
|
_
|
||||||
|
13
|
||||||
|
:O o+' ',
|
||||||
|
3
|
||||||
|
)
|
||||||
|
#undef main
|
||||||
|
__ _ 127:O"\b \b",3)__
|
||||||
|
default
|
||||||
|
:O
|
||||||
|
c,1)
|
||||||
|
__}}}main(){
|
||||||
|
cc();
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,77 @@
|
|||||||
|
#!/usr/bin/env make
|
||||||
|
#
|
||||||
|
# 1987 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
|
||||||
|
|
||||||
|
# for System V style systems
|
||||||
|
OPSYS= -Dindex=strchr
|
||||||
|
# for BSD style systems
|
||||||
|
#OPSYS=
|
||||||
|
|
||||||
|
# ANSI compiler
|
||||||
|
#
|
||||||
|
# Set CC to the name of your ANSI compiler.
|
||||||
|
#
|
||||||
|
CC= cc
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# IOCCC winners
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
WINNERS= heckbert wall westley hines korn biggar lievaart
|
||||||
|
|
||||||
|
###################
|
||||||
|
# build all entries
|
||||||
|
###################
|
||||||
|
#
|
||||||
|
all:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) OPSYS=${OPSYS} $@)"; \
|
||||||
|
(cd $$i && $(MAKE) "OPSYS=${OPSYS}" $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
# utility rules
|
||||||
|
###############
|
||||||
|
#
|
||||||
|
clean:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
clobber:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
|
|
||||||
|
install:
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
done
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
1987 marked the "The Fourth International Obfuscated C Code Contest"
|
||||||
|
|
||||||
|
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
The rules for 1987 suggested even more categories than in 1986. Hints
|
||||||
|
for what to do and not to do were also given in the rules. For
|
||||||
|
example, a simple excessive abuse of /lib/cpp was discouraged unless
|
||||||
|
the abuse was unusual. The mailboxes for the contest were moved from
|
||||||
|
nsc to amdahl. The practice of posting a preliminary set of rules for
|
||||||
|
the next year was started this year.
|
||||||
|
|
||||||
|
Rules and results were posted to comp.lang.c, comp.unix.wizards with
|
||||||
|
an announcement in news.announce.important. Micro/Systems Journal
|
||||||
|
published the 1987 winners. Mark Horton included a version of the 1987
|
||||||
|
winners in an appendix of his C book. The first announcement of
|
||||||
|
winners at the Summer 87 Usenix was helped by a small fly that
|
||||||
|
danced all over the foils.
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1987 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= biggar
|
||||||
|
|
||||||
|
# for System V style systems
|
||||||
|
OPSYS= -Dindex=strchr
|
||||||
|
# for BSD style systems
|
||||||
|
#OPSYS=
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
biggar: biggar.c
|
||||||
|
cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" \
|
||||||
|
-DP="main(){X}" -DR="read(0,&c,1)" -DT="c!=015" \
|
||||||
|
-DW="while(C)I" -DX="char c;W" $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
P;
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<h1>Best Abuse of the Rules</h1>
|
||||||
|
|
||||||
|
<p>Mark Biggar<br>
|
||||||
|
UNiSYS - System Development Group, Santa Monica<br>
|
||||||
|
2525 Colorado AV MD 91-01<br>
|
||||||
|
Santa Monica, CA<br>
|
||||||
|
90406</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<h3>To build:</h3>
|
||||||
|
|
||||||
|
<pre><code>cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" -DP="main(){X}"\
|
||||||
|
-DR="read(0,&c,1)" -DT="c!=015" -DW="while(C)I" -DX="char c;W" markb.c
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Passes BSD and UTS lint. At least one version of lint is thrown into
|
||||||
|
an infinite loop by this entry.</p>
|
||||||
|
|
||||||
|
<h3>Try:</h3>
|
||||||
|
|
||||||
|
<pre><code>... | markb | od -c (remember to compile as indicated above)
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>By changing the compile line you can make this program do anything you
|
||||||
|
want. This is a very efficient way to transfer source, though it
|
||||||
|
increases the size of Makefiles.</p>
|
||||||
|
|
||||||
|
<p>With only slight variations, this program can be set to many uses.
|
||||||
|
Consider how easy it would be to release Un*x source in this form;
|
||||||
|
so what if the make files grow a little! :-)</p>
|
||||||
|
|
||||||
|
<p>One vendor’s lint got hung in an infinite loop over this entry!</p>
|
||||||
|
|
||||||
|
<blockquote><p>FYI: We will let Mark get away with this truly sick entry this time, but
|
||||||
|
for the future on we have placed a limit on the size of a compile line.</p></blockquote>
|
||||||
|
|
||||||
|
<p>Also see our comment in Larry Wall’s entry regarding Mark’s contribution.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# Best Abuse of the Rules
|
||||||
|
|
||||||
|
Mark Biggar
|
||||||
|
UNiSYS - System Development Group, Santa Monica
|
||||||
|
2525 Colorado AV MD 91-01
|
||||||
|
Santa Monica, CA
|
||||||
|
90406
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
### To build:
|
||||||
|
|
||||||
|
cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" -DP="main(){X}"\
|
||||||
|
-DR="read(0,&c,1)" -DT="c!=015" -DW="while(C)I" -DX="char c;W" markb.c
|
||||||
|
|
||||||
|
Passes BSD and UTS lint. At least one version of lint is thrown into
|
||||||
|
an infinite loop by this entry.
|
||||||
|
|
||||||
|
### Try:
|
||||||
|
|
||||||
|
... | markb | od -c (remember to compile as indicated above)
|
||||||
|
|
||||||
|
|
||||||
|
By changing the compile line you can make this program do anything you
|
||||||
|
want. This is a very efficient way to transfer source, though it
|
||||||
|
increases the size of Makefiles.
|
||||||
|
|
||||||
|
With only slight variations, this program can be set to many uses.
|
||||||
|
Consider how easy it would be to release Un*x source in this form;
|
||||||
|
so what if the make files grow a little! :-)
|
||||||
|
|
||||||
|
One vendor's lint got hung in an infinite loop over this entry!
|
||||||
|
|
||||||
|
> FYI: We will let Mark get away with this truly sick entry this time, but
|
||||||
|
> for the future on we have placed a limit on the size of a compile line.
|
||||||
|
|
||||||
|
Also see our comment in Larry Wall's entry regarding Mark's contribution.
|
||||||
|
|
||||||
|
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1987 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= heckbert
|
||||||
|
|
||||||
|
# for System V style systems
|
||||||
|
OPSYS= -Dindex=strchr
|
||||||
|
# for BSD style systems
|
||||||
|
#OPSYS=
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
heckbert: heckbert.c
|
||||||
|
cc ${OPSYS} $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include <ctype.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#define _ define
|
||||||
|
#_ A putchar
|
||||||
|
#_ B return
|
||||||
|
#_ C index
|
||||||
|
char*r,c[300001],*d=">=<=!===||&&->++-->><<",*i,*l,*j,*m,*k,*n,*h,*y;e,u=1,v,w,
|
||||||
|
f=1,p,s,x;main(a,b)char**b;{p=a>1?atoi(b[1]):79;r=c+read(0,j=l=i=c,300000);v=g(
|
||||||
|
j,&m);for(k=m;v!=2;j=k,m=n,v=w,k=m){w=g(k,&n);if(v==1&&m-j==1&&*j==35)e&&A(10),
|
||||||
|
e=f=0;if(!f&&v==3&&(char*)C(j,10)<m)A(10),e=0,f=1;else if(v>2&&(u||w)&&(f||u)&&
|
||||||
|
(l-i>1||*i!=61||n-k>1||!C("-*&",*k)))continue;else if(v==3)if(f&&e+1+n-k>p&&e)A
|
||||||
|
(10),e=0;else A(32),e++;else{if(f&&e+m-j>p&&e)A(10),e=0;e+=m-j;k=j;while(k<m)A(
|
||||||
|
*k++);}i=j;l=m;u=v;}e&&A(10);}g(j,m)char*j,**m;{if(j>=r)B*m=j,2;s=isdigit(*j)||
|
||||||
|
*j==46&&isdigit(j[1]);for(h=j;h<r;h++)if(!isalnum(*h)&&*h!=95&&(!s||*h!=46)&&(!
|
||||||
|
s||h[-1]!=101&&h[-1]!=69||!C("+-",*h)))break;if(h>j)B*m=h,0;x=1;for(h=j;h<r&&C(
|
||||||
|
" \t\n",*h);h++);if(h>j)h--,x=3;if(*j==34||*j==39)for(h=j+1;h<r&&*h!=*j;h++)if(
|
||||||
|
*h==92)h++;for(y=d;*y&&strncmp(y,j,2);y+=2);if(*y)h=j+1;if(!strncmp("/*",j,2)){
|
||||||
|
h=j+2;while(*++h!=42||*++h!=47);x=4;}*m=h+1;B x;}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<h1>Best Obfuscator of Programs</h1>
|
||||||
|
|
||||||
|
<p>Paul Heckbert<br>
|
||||||
|
Pixar</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<h3>Try:</h3>
|
||||||
|
|
||||||
|
<pre><code>ph 40 < ph.c > foo.c; cc foo.c -o ph
|
||||||
|
ph 20 < a_C_prog.c > bar.c; cc bar.c
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The judges used this program to fold up very long lines which the
|
||||||
|
BSD fold(1) was unable to process. This program has been added
|
||||||
|
to the contest tool chest.</p>
|
||||||
|
|
||||||
|
<p>On System V systems, compile with: <code>-Dindex=strchr</code>
|
||||||
|
To compile on a 16 bit machine, change 300000’s to 30000.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Best Obfuscator of Programs
|
||||||
|
|
||||||
|
Paul Heckbert
|
||||||
|
Pixar
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
|
||||||
|
### Try:
|
||||||
|
ph 40 < ph.c > foo.c; cc foo.c -o ph
|
||||||
|
ph 20 < a_C_prog.c > bar.c; cc bar.c
|
||||||
|
|
||||||
|
The judges used this program to fold up very long lines which the
|
||||||
|
BSD fold(1) was unable to process. This program has been added
|
||||||
|
to the contest tool chest.
|
||||||
|
|
||||||
|
On System V systems, compile with: `-Dindex=strchr`
|
||||||
|
To compile on a 16 bit machine, change 300000's to 30000.
|
||||||
|
|
||||||
|
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1987 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= hines
|
||||||
|
|
||||||
|
# for System V style systems
|
||||||
|
OPSYS= -Dindex=strchr
|
||||||
|
# for BSD style systems
|
||||||
|
#OPSYS=
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
hines: hines.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
main(togo,toog)
|
||||||
|
int togo;
|
||||||
|
char *toog[];
|
||||||
|
{char *ogto, tgoo[80];FILE *ogot; int oogt=0, ootg, otog=79,
|
||||||
|
ottg=1;if ( togo== ottg) goto gogo; goto goog; ggot:
|
||||||
|
if ( fgets( tgoo, otog, ogot)) goto gtgo; goto gott;
|
||||||
|
gtot: exit(); ogtg: ++oogt; goto ogoo; togg: if ( ootg > 0)
|
||||||
|
goto oggt; goto ggot; ogog: if ( !ogot) goto gogo;
|
||||||
|
goto ggto; gtto: printf( "%d goto \'s\n", oogt); goto
|
||||||
|
gtot; oggt: if ( !memcmp( ogto, "goto", 4)) goto otgg;
|
||||||
|
goto gooo; gogo: exit( ottg); tggo: ootg= strlen(tgoo);
|
||||||
|
goto tgog; oogo: --ootg; goto togg; gooo: ++ogto; goto
|
||||||
|
oogo; gott: fclose( ogot); goto gtto; otgg: ogto= ogto +3;
|
||||||
|
goto ogtg; tgog: ootg-=4;goto togg; gtgo: ogto= tgoo;
|
||||||
|
goto tggo; ogoo: ootg-=3;goto gooo; goog: ogot= fopen(
|
||||||
|
toog[ ottg], "r"); goto ogog; ggto: ogto= tgoo; goto
|
||||||
|
ggot;}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<h1>Worst Style</h1>
|
||||||
|
|
||||||
|
<p>Spencer Hines<br>
|
||||||
|
OnLine Computer Systems<br>
|
||||||
|
4200 Farragut Street<br>
|
||||||
|
Hyattsville, MD<br>
|
||||||
|
20781<br>
|
||||||
|
USA</p>
|
||||||
|
|
||||||
|
<h2>Judges' comments:</h2>
|
||||||
|
|
||||||
|
<h3>Try:</h3>
|
||||||
|
|
||||||
|
<pre><code>hines hines.c
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>This program was designed to maximize the bother function for
|
||||||
|
structured programmers. This program takes goto statements to their
|
||||||
|
logical conclusion. The layout and choice of names are classic.</p>
|
||||||
|
|
||||||
|
<p>We consider this to be a beautiful counter-example for Frank Rubin’s
|
||||||
|
letter to ACM form titled: <em>“GOTO Considered Harmful” Considered Harmful</em>.
|
||||||
|
See the Communications of the ACM, March 1987, Page 195-196.</p>
|
||||||
|
|
||||||
|
<p>Copyright © 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.</p>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Worst Style
|
||||||
|
|
||||||
|
Spencer Hines
|
||||||
|
OnLine Computer Systems
|
||||||
|
4200 Farragut Street
|
||||||
|
Hyattsville, MD
|
||||||
|
20781
|
||||||
|
USA
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
### Try:
|
||||||
|
|
||||||
|
hines hines.c
|
||||||
|
|
||||||
|
This program was designed to maximize the bother function for
|
||||||
|
structured programmers. This program takes goto statements to their
|
||||||
|
logical conclusion. The layout and choice of names are classic.
|
||||||
|
|
||||||
|
We consider this to be a beautiful counter-example for Frank Rubin's
|
||||||
|
letter to ACM form titled: *"GOTO Considered Harmful" Considered Harmful*.
|
||||||
|
See the Communications of the ACM, March 1987, Page 195-196.
|
||||||
|
|
||||||
|
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
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
|
||||||
|
from both Landon Curt Noll and Larry Bassel.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# %W% %G% %U%
|
||||||
|
#
|
||||||
|
# 1987 makefile
|
||||||
|
#
|
||||||
|
# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
|
||||||
|
# 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
|
||||||
|
# from Landon Curt Noll and Larry Bassel.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL= /bin/sh
|
||||||
|
WINNERS= korn
|
||||||
|
|
||||||
|
# for System V style systems
|
||||||
|
OPSYS= -Dindex=strchr
|
||||||
|
# for BSD style systems
|
||||||
|
#OPSYS=
|
||||||
|
|
||||||
|
all: ${WINNERS}
|
||||||
|
|
||||||
|
korn: korn.c
|
||||||
|
cc $? -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f core
|
||||||
|
clobber: clean
|
||||||
|
rm -f ${WINNERS}
|
||||||
|
install: all
|
||||||
|
@echo are you kidding'??'
|
||||||
Loaded 100 of 1683 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user