Add preview of 1984-2019

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

One will find HTML commented out with:

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

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

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

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

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

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

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
# 2006 makefile
#
# Copyright (C) 2006-2009, Landon Curt Noll, Simon Cooper, Peter Seebach
# and Leonid A. Broukhis. All Rights Reserved. Permission for personal,
# educational or non-profit use is granted provided this copyright and
# notice are included in its entirety and remains unaltered. All other
# uses must receive prior permission from the contest judges.
# data files for this entry
#
DATA=
build: ${ENTRY}
clean:
-${RM} ${ENTRY}
clobber: clean
alt:
data:
${ENTRY}: ${ENTRY}.c ${DATA}
${CC} ${CFLAGS} ${ENTRY}.c -o ${ENTRY}
+26
View File
@@ -0,0 +1,26 @@
#define q [v+a]
#define c b[1]
#define O 1 q
#define o 0 q
#define r(v,a\
)v<0&&( v*=-1, a*=-1);
#define p(v,m, s,w)*c==*#v?2 q\
<m?(c++ ,d=1,3 q=0,5 q=m,main\
(a+3,b) ,o=o*s q,O=O* w q):0:
static d,v[99 ];main (int a,
char**b ){d=7; if(*c?! (p(+,3
,4 q+O* 3,4)p( -,(o?3
:(O=1,6 )),4 q -O*3,4)
p(*,4,3 ,4)p(/ ,5,4,3)
p((),d, 0+3,0+ 04)*c==
')'?2 q <02?(c ++,0):0
:(o=012 *o+*c- '0',c++
,O=1)): 2 q?3- 2:printf(
"%d/%d" "\n",o ,O))return
1;d=a,r (o,d)r (O,d)3 q
=o<O?(4 q=o,O) :(4 q=O,
o);r(d, o)a+=3;O?
1:(O=1,2
q=1);while
(2 q=o%1 q)a++;v[d]/=O;d[
v+1]/=O;return main(d,b);}
+57
View File
@@ -0,0 +1,57 @@
# Most Irrational
Steinar Hamre
Norway
## Judges' Comments:
### To build:
make hamre
### To run:
./hamre '-1+4/3*(2+1/(3/2*(7/2-7/3+1/6)))/2'
An irrationally coded source presents rational things!
A rational person might want to attempt the irrational task
of supporting a new operator by way of an existing macro
in the source. And can you determine which macro this is
and understand the purpose of its arguments?
## Selected Author's Comments:
This is a calculator for rational numbers. Believe it or not, that is
a useful tool to have around, and I haven't found a useful version,
much less an obfuscated one.
It is rather feature complete as rational calculators go. The
supported operators are: +, - (binary and unary), *, / and (). Run it
by supplying an expression as the first argument, and the normalized
result will be written to stdout.
./hamre '-1+4/3*(2+1/(3/2*(7/2-7/3+1/6)))/2'
2/3
If you do not supply an argument, the calculator will crash. Other
arguments are ignored. Supplying more arguments may further limit the
number of nested operators supported.
Remember that 1/0 is not a rational number. You will not get any
answer if you divide by zero.
By default, only 31 nested levels of operators are supported.
The code is well documented, even with an example. In fact this
documentation accounts for 100% of the source. Personally I find
preprocessing or reindenting the program counterproductive when it
comes to understanding the source. The preprocessed source becomes
rather verbose.
IOCCC entries are often loaded with all kinds of hard-coded numbers. I
have restricted myself to mostly use sensible numbers (<= 7) as
smaller numbers are much easier to remember. Also the macros really
help hiding most of the uses of these numbers away. All macros and
variables are easy-to-remember single character abbreviations, from
some language, meaningful to the purpose(s) of the macro, I hope.