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
@@ -0,0 +1,205 @@
|
||||
#!/usr/bin/env make
|
||||
#
|
||||
# 2014 makefile
|
||||
#
|
||||
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
|
||||
# is licensed under:
|
||||
#
|
||||
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
#
|
||||
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
|
||||
################
|
||||
# tool locations
|
||||
################
|
||||
#
|
||||
SHELL= /bin/bash
|
||||
CP= cp
|
||||
CPP= cpp
|
||||
GUNZIP= gunzip
|
||||
LD= ld
|
||||
MAKE= make
|
||||
RM= rm
|
||||
SED= sed
|
||||
TAR= tar
|
||||
TRUE= true
|
||||
|
||||
# Set X11_LIBDIR to the directory where the X11 library resides
|
||||
#
|
||||
X11_LIBDIR= /usr/X11R6/lib
|
||||
|
||||
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
||||
#
|
||||
X11_INCDIR= /usr/X11R6/include
|
||||
|
||||
# Compiler warnings
|
||||
#
|
||||
#CWARN=
|
||||
#CWARN= -Wall
|
||||
#CWARN= -Wall -pedantic
|
||||
CWARM= -Wall -Wextra -pedantic -Wshadow
|
||||
|
||||
# compiler standard
|
||||
#
|
||||
#CSTD=
|
||||
#CSTD= -ansi
|
||||
CSTD= -std=c99
|
||||
|
||||
# compiler bit architecture
|
||||
#
|
||||
# Some entries require 32-bitness:
|
||||
# ARCH= -m32
|
||||
#
|
||||
# Some entries require 64-bitess:
|
||||
# ARCH= -m64
|
||||
#
|
||||
# By default we assume nothing:
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# optimization
|
||||
#
|
||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||
# A few compilers have broken optimizers or this entry make break
|
||||
# under those buggy optimizers and thus you may not want anything.
|
||||
#
|
||||
#OPT=
|
||||
#OPT= -O
|
||||
#OPT= -O1
|
||||
OPT= -O2
|
||||
#OPT= -O3
|
||||
|
||||
# Libraries needed to build
|
||||
#
|
||||
LIBS=
|
||||
|
||||
# default flags for ANSI C compilation
|
||||
#
|
||||
CFLAGS= ${CWARN} ${CSTD} ${ARCH} ${OPT} \
|
||||
-Wno-empty-body -Wno-logical-op-parentheses -Wno-int-conversion
|
||||
|
||||
# ANSI compiler
|
||||
#
|
||||
# Set CC to the name of your ANSI compiler.
|
||||
#
|
||||
# Some entries seem to need gcc. If you have gcc, set
|
||||
# both CC and MAY_NEED_GCC to gcc.
|
||||
#
|
||||
# If you do not have gcc, set CC to the name of your ANSI compiler, and
|
||||
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
|
||||
# to disable such programs.
|
||||
#
|
||||
CC= cc
|
||||
#CC=clang
|
||||
MAY_NEED_GCC= gcc
|
||||
|
||||
|
||||
##############################
|
||||
# Special flags for this entry
|
||||
##############################
|
||||
#
|
||||
ENTRY= prog
|
||||
DATA=
|
||||
ALT_OBJ=
|
||||
ALT_ENTRY=
|
||||
|
||||
|
||||
#################
|
||||
# build the entry
|
||||
#################
|
||||
#
|
||||
all: ${ENTRY} ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
${ENTRY}: ${ENTRY}.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: ${ALT_ENTRY}
|
||||
@${TRUE}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
###############
|
||||
#
|
||||
everything: all alt
|
||||
|
||||
clean:
|
||||
${RM} -f ${ENTRY}.o ${ALT_OBJ}
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${ENTRY} ${ALT_ENTRY}
|
||||
|
||||
nuke: clobber
|
||||
${RM} -f morgan
|
||||
@${TRUE}
|
||||
|
||||
dist_clean: nuke
|
||||
@${TRUE}
|
||||
|
||||
install:
|
||||
@echo "Surely we are joking Dr. Science!"
|
||||
@${TRUE}
|
||||
|
||||
# backwards compatibility
|
||||
#
|
||||
build: all
|
||||
@${TRUE}
|
||||
|
||||
|
||||
##################
|
||||
# 133t hacker rulz
|
||||
##################
|
||||
#
|
||||
love:
|
||||
@echo 'not war?'
|
||||
@${TRUE}
|
||||
|
||||
haste:
|
||||
$(MAKE) waste
|
||||
@${TRUE}
|
||||
|
||||
waste:
|
||||
@echo 'haste'
|
||||
@${TRUE}
|
||||
|
||||
easter_egg:
|
||||
@echo you expected to sometimes mis-understand this $${RANDOM} magic
|
||||
@echo chongo '<was here>' "/\\oo/\\"
|
||||
@echo Readers shall not be disallowed from failong to be unable to not partly misunderstand this partocular final echo.
|
||||
|
||||
# Understand the history of the Homebrew Computer Club
|
||||
# as well as the West Coast Computer Faire and
|
||||
# you might be confused different. :-)
|
||||
#
|
||||
supernova: nuke
|
||||
@-if [ -r .code_anal ]; then \
|
||||
${RM} -f .code_anal_v4; \
|
||||
else \
|
||||
echo "We are not expected to understand that"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
deep_magic:
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --deep_magic 2ed3582ec5c094a093fea2a6bcb9f19439892873c9cc45ed1ceaafe08b7d52e1b2c7cd524be3b0b2 --FNV1a_hash 512-bit "${ENTRY}"; \
|
||||
else \
|
||||
echo "You are holding it wrong!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
magic: deep_magic
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --mode 391581 --level 216193 --FNV1a_hash 512-bit "${ENTRY}"; \
|
||||
else \
|
||||
echo "These aren't the primes you're looking for Pauline!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
@@ -0,0 +1,128 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="GENERATOR" content="mkd2html 2.1.5a DL=DISCOUNT">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="../hint.css">
|
||||
<title>Most likely to succeed</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Most likely to succeed</h1>
|
||||
|
||||
<p>Yves-Marie Morgan<br>
|
||||
<a href="mailto:yves-marie.morgan@parrot.com">yves-marie.morgan@parrot.com</a></p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>To build:</h3>
|
||||
|
||||
<pre><code>make
|
||||
</code></pre>
|
||||
|
||||
<h3>To run:</h3>
|
||||
|
||||
<pre><code>./prog [arg ..]
|
||||
</code></pre>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>make
|
||||
cp -f prog morgan
|
||||
./morgan clobber
|
||||
ls
|
||||
|
||||
./morgan all install
|
||||
ls
|
||||
|
||||
./prog love haste waste supernova
|
||||
ls
|
||||
|
||||
make
|
||||
./prog magic
|
||||
ls
|
||||
</code></pre>
|
||||
|
||||
<h3>Selected Judges Remarks:</h3>
|
||||
|
||||
<p>Think of this as a Maker Faire’s make. :-)</p>
|
||||
|
||||
<p>It works reasomably well. While not super ultra-featured, it does fair well with the Makefile we supplied.
|
||||
Not only that, it helped uncover a bug we had in our special Makefile rules.</p>
|
||||
|
||||
<h2>Author’s comments:</h2>
|
||||
|
||||
<h3>Remarks</h3>
|
||||
|
||||
<p>This program is a tiny <code>make</code> clone.</p>
|
||||
|
||||
<p>It is able to parse a subset of the <code>make</code> syntax and will execute rules for
|
||||
goals given in arguments if they need to (based on timestamp of dependencies
|
||||
of rule targets).</p>
|
||||
|
||||
<h2>Supported features</h2>
|
||||
|
||||
<ul>
|
||||
<li>Variable assignments (only recursive ones). Variable references with recursion.</li>
|
||||
<li>Environment variables are available.</li>
|
||||
<li>It is possible to specify variables in command line: <code>name=value</code>.</li>
|
||||
<li>Variables given in command line will have precedence over variables defined
|
||||
in makefile, which will have precedence over environment variables.</li>
|
||||
<li>If no goal given in command line, the first target defined will be used.</li>
|
||||
<li>Comments, escaped comments, escaped new lines.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>It should be able to build programs of previous years with the provided <code>Makefile</code>
|
||||
found in previous contest archives. Simply use this program instead of <code>make</code>.
|
||||
It will recursively use itself for submake (the <code>MAKE=</code> assignment inside
|
||||
<code>Makefile</code> will be ignored to continue using itself).</p>
|
||||
|
||||
<h2>Limitations / Known issues</h2>
|
||||
|
||||
<ul>
|
||||
<li>There is a lot of memory leak (not a single free).</li>
|
||||
<li>The opened file is not closed.</li>
|
||||
<li>The input file shall be named <code>Makefile</code>.</li>
|
||||
<li>No diagnostic message, but the exit status is non zero to indicates failure
|
||||
(failed command in a rule or missing target).</li>
|
||||
<li>Only <code>$<</code> and <code>$@</code> are supported for automatic variables in commands.</li>
|
||||
<li>No parallel execution (<code>-j</code> option).</li>
|
||||
<li>No <code>:=</code> <code>+=</code> <code>?=</code> syntax for variable assignment.</li>
|
||||
<li>No built-in function available.</li>
|
||||
<li>No pattern targets.</li>
|
||||
<li>No pattern substitution variables.</li>
|
||||
<li>No built-in rules.</li>
|
||||
<li>No built-in variables (except the one from environment).</li>
|
||||
<li>No conditional directives.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Compilation warnings</h3>
|
||||
|
||||
<p>with gcc 4.8.2 on Linux Ubuntu 14.04 64-bit :
|
||||
* prog.c:22:15: warning: return makes integer from pointer without a cast [enabled by default]
|
||||
* prog.c:23:72: warning: signed and unsigned type in conditional expression [-Wsign-compare]
|
||||
* prog.c:12:11: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<!--
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
|
||||
<TABLE><TR>
|
||||
<TD><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a></TD>
|
||||
<TD><P>© Copyright 1984-2015,
|
||||
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
|
||||
- All rights reserved<BR>
|
||||
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
|
||||
<TD> <!--<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
|
||||
</TR></TABLE>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,96 @@
|
||||
# Most likely to succeed
|
||||
|
||||
Yves-Marie Morgan
|
||||
<yves-marie.morgan@parrot.com>
|
||||
|
||||
|
||||
## Judges' comments:
|
||||
### To build:
|
||||
|
||||
make
|
||||
|
||||
### To run:
|
||||
|
||||
./prog [arg ..]
|
||||
|
||||
### Try:
|
||||
|
||||
make
|
||||
cp -f prog morgan
|
||||
./morgan clobber
|
||||
ls
|
||||
|
||||
./morgan all install
|
||||
ls
|
||||
|
||||
./prog love haste waste supernova
|
||||
ls
|
||||
|
||||
make
|
||||
./prog magic
|
||||
ls
|
||||
|
||||
### Selected Judges Remarks:
|
||||
|
||||
Think of this as a Maker Faire's make. :-)
|
||||
|
||||
It works reasomably well. While not super ultra-featured, it does fair well with the Makefile we supplied.
|
||||
Not only that, it helped uncover a bug we had in our special Makefile rules.
|
||||
|
||||
## Author's comments:
|
||||
### Remarks
|
||||
|
||||
This program is a tiny `make` clone.
|
||||
|
||||
It is able to parse a subset of the `make` syntax and will execute rules for
|
||||
goals given in arguments if they need to (based on timestamp of dependencies
|
||||
of rule targets).
|
||||
|
||||
## Supported features
|
||||
|
||||
* Variable assignments (only recursive ones). Variable references with recursion.
|
||||
* Environment variables are available.
|
||||
* It is possible to specify variables in command line: `name=value`.
|
||||
* Variables given in command line will have precedence over variables defined
|
||||
in makefile, which will have precedence over environment variables.
|
||||
* If no goal given in command line, the first target defined will be used.
|
||||
* Comments, escaped comments, escaped new lines.
|
||||
|
||||
It should be able to build programs of previous years with the provided `Makefile`
|
||||
found in previous contest archives. Simply use this program instead of `make`.
|
||||
It will recursively use itself for submake (the `MAKE=` assignment inside
|
||||
`Makefile` will be ignored to continue using itself).
|
||||
|
||||
## Limitations / Known issues
|
||||
|
||||
* There is a lot of memory leak (not a single free).
|
||||
* The opened file is not closed.
|
||||
* The input file shall be named `Makefile`.
|
||||
* No diagnostic message, but the exit status is non zero to indicates failure
|
||||
(failed command in a rule or missing target).
|
||||
* Only `$<` and `$@` are supported for automatic variables in commands.
|
||||
* No parallel execution (`-j` option).
|
||||
* No `:=` `+=` `?=` syntax for variable assignment.
|
||||
* No built-in function available.
|
||||
* No pattern targets.
|
||||
* No pattern substitution variables.
|
||||
* No built-in rules.
|
||||
* No built-in variables (except the one from environment).
|
||||
* No conditional directives.
|
||||
|
||||
### Compilation warnings
|
||||
|
||||
with gcc 4.8.2 on Linux Ubuntu 14.04 64-bit :
|
||||
* prog.c:22:15: warning: return makes integer from pointer without a cast [enabled by default]
|
||||
* prog.c:23:72: warning: signed and unsigned type in conditional expression [-Wsign-compare]
|
||||
* prog.c:12:11: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define A calloc(1, sizeof(m))
|
||||
#define D m.
|
||||
#define L ->
|
||||
#define P malloc(
|
||||
#define R &&
|
||||
#define S ++
|
||||
#define U for(
|
||||
#define V if(
|
||||
#define W L i
|
||||
#define X L a
|
||||
#define Y L b
|
||||
#define Z L c
|
||||
|
||||
typedef struct T*_; struct T{ int t,i; char*a; _*b,c,d,e,f; } m,x,y; struct stat z; int u; void * H;
|
||||
int K(int c){ return strchr(" \n\t",c); } void B(_ s,_ p) { s Y=realloc(s Y,S s W*sizeof(_)); s Y [s
|
||||
W-1]=p; } _ C(char*d,int l){ _ s=A; s X=d?d:P 1); s W=l<0?d?strlen(d):0:l; return s; } _ E(_ s){ _ r
|
||||
=A; int i=0; U; i<s W; ){ U; i<s W R K(s X[i]); )i S; int j=i; U; j<s W R !K(s X[j]); )j S; V j-i)B(
|
||||
r,C(s X+i,j-i)); i=S j; } return r; } int F(_ a,_ b){ return a W==b W R !memcmp(a X,b X,a W); } void
|
||||
I( _ s,char c ) { char*d=P 1); *d=c ; B(s,C(d,1) ); } void
|
||||
J ( char*d,int l ,int o,_ v){ _ n= C(d,l); _ w; U l= 0; l
|
||||
<D d W; ) { w= D d Y[l S ]; V F( w Z,n)){ V o>w W) return; goto O; } }
|
||||
B( D d,w= A ); w Z=n; O:w W =o ; w L d=v; } int M( _ b,int p,char*t,int
|
||||
g ){ _ f= A; f L e= A; f X=t; int h=g ,i=0,j=0,n=b
|
||||
W ; char c=0, d,*o =b X ; U; p<n; ){ t=j?"":f X ;
|
||||
int k=p; _ r=H ; U; p <n; ){ int l = 0; U; p<n R o[p]==92 ; ){ l S; p S; } c=o
|
||||
[p S ]; V c^10||! l% 2 ||!g){ d=c== 35 R !i R!g|| c== 10 R g^2; V d||strchr(t,c
|
||||
)) { r=C(o+k,p-k- d*l/ 2-1); V d R l%2) { r X[r W-1] =c^35 ?32:
|
||||
c; c =0; } break; } } c=0; } V!j)B (f L e,r?r:C(o+k, n-k) ); r
|
||||
=A; switch(c){ case 35:j S; case 0:break; case 10:goto O; case 36:switch(d=o[p S]){ case 36:I(f L e,
|
||||
d); break; default:I(r Z=A,d); goto o; case 40:case 123:r L f=f; r L e=A; r X=d^40?"}$":")$"; f=r; }
|
||||
break; default:V f L f){ r Z=f L e; f=f L f; o:r L t S; B(f L e,r); } else goto O; } i=f L f R g==1;
|
||||
g=i?0:h; } O: x.c=f L e; x.t=c; return p; } _ N(_ s){ _ o=C(H,0); U int i=0; i<s W; ){ _ p=s Y[i S];
|
||||
V p L t){ _ n=N(p Z); p=C(H,0); U int j=0; j<D d W; ){ _ w=D d Y[j S]; V F(w Z,n)){ M(w L d,0,"$",2)
|
||||
; p=N(x.c); break; } } } o X=realloc(o X,o W+=p W); memcpy(o X+o W-p W,p X,p W); } return o; } _ O(_
|
||||
t){ U int i=0; i<D e W; ){ _ s=D e Y[i S]; V F(s Z,t))return s; }_ s=A; s Z=t; s L d=A; s L t--; B(D
|
||||
e,s); return s; } void Q(_ s){ _ d=s Z; V!stat(memcpy(calloc(1,d W+1),d X,d W),&z))s L t=z.st_mtime;
|
||||
V!s W S){ u=!s L d W R s L t<0; int i=0,j,k=s L t<0; _ c=H,t; U; !u R i<s L d W; ){ _ a=s L d Y[i S]
|
||||
; U j=0; !u R j<a L d W; ){ Q(t=O(a L d Y[j S])); k|=t L t<0||t L t>s L t; } V a Z W){ c=a Z; V a L
|
||||
d W)J("<", 1, 0, *a L d Y); } } U j=0; !u R c R k R j<c W; ){ J("@",1,0,d); s=N(c Y[j S]); U; s W R
|
||||
strchr("@+-",*s X); )s X S; u=system(s X); } } } void G(_ b){ U; b W R K(*b X); ){ b X S; b W--; } }
|
||||
|
||||
int main(int i,char**a,char**e){ D d=A; D e=A; D c=A; char p[]="NBLF\1Nblfgjmf\1",*q=p; U; (*q++)--;
|
||||
); J(p,4,0,C(*a S,-1)); U i=0; i<3; i+=2){ U; *a; ){ q=*a; U; *q R*q^61; )q S; V*q)J(*a,q-*a,i+1,C(q
|
||||
+1,-1)); else V!i)B(D c,C(*a,-1)); a S; } a=e; } stat(p+5,&z); i=z.st_size; _ b=C(H,0),c,d; b W=read
|
||||
(open(p+5,0),b X=P i),i); U; u<i; ){ V b X[u]^9){ U; u<i R K(b X[u]); )u S; u=M(b,u,"=:$",0); y = x;
|
||||
switch(x.t){ case 58:u=M(b,u,"$",0); D f=c=A; c L d=E(N(x.c)); c Z=A; d=E(N(y.c)); U; d W--; )B(O(*d
|
||||
Y S) L d,c); break; case 61:u=M(b,u,"",0); G(c=N(x.c)); G(d=N(y.c)); U; d W--R K(d X[d W]); ); J(d X
|
||||
,S d W,2,c); } } else { u=M(b,S u,"$",1); I(x.c,0); B(D f Z,x.c); } } V!D c W R D e W)B(D c,D e Y[0]
|
||||
Z); U u=0; !u R D c W--; )Q(O(*D c Y S)); return u; }
|
||||
Reference in new issue
Block a user