Move 1988-2004 entries into subdirs

We we move 1988-2004 entries from all of a year's winning entries
in a single directory to each winner being in their own sub-directory
under the given year directory.
This commit is contained in:
Landon Curt Noll committed 2022-09-18 23:37:49 -07:00
1 parent 1e82e8aa3e
commit d2a42f42e8
478 files changed

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
#include <stdio.h>
#define maxc (prs >> 16)
#define maxr (prs & 0xff00) >> 8
#define find (col > 1)
#define endb || (prs & 16) && X(0) || chpa || (eols, 0)
#define lnst doln ? 0 : (init, 0) || (prs & 128) && X(0)
#define L endb) || 0 || (find ? 0 : (rrr++, rrc = 0)) || (lnst
#define X(p) (dfc++ && ((prs & 48) != 32 || rrc < maxc) && ++ccl && \
(find ? (bat = bit, bit = but, but = p, ccl == col && \
(ret = bat + bit + but) + 1) : (las = las * 2 + \
(((main(ccl + 1, cro - 1) + main(ccl + 1, cro) + \
main(ccl + 1, cro + 1) - p) | p) == 3), occ |= las & 1, \
printf(" %c", "_O"[las & 1]), ccl == 2 && (sta |= (las & 3) << 6),\
0)))
#define _ || (find || rrc++, 0) || X(0)
#define O || (find || rrc++, 0) || X(1)
#define chpa (find && col > ccl && ((ret = bit + but) + 1))
#define eols (!find && (cro == 1 ? (sta |= occ << 3) : cro == 2 && \
(sta |= occ << 2), sta |= (las & 3) << 4))
#define init (find ? (ret = bit = but = 0) : (ocp = occ, las = occ = 0, \
printf("\nL")), dfc = (prs & 192) != 64, ccl = 0)
#define doln !(dfl++ && (((prs & 3) != 2) || rrr < maxr) && \
(++cro == row || !find))
#define recu (col =- col, (ccl = find ? rcf : rcl), cro = rro, 0 _ || \
(rrc >= maxc ? 0 : (find ? rcf = ccl : (rcl = ccl), \
main(-col, row))))
#define addl (lnst || (rro = cro, find ? rcf = ccl : (rrc = 0, rcl = ccl), \
0) || main(-col, row) || (ccl = rcl + 1, 0) endb)
#define outp (find || printf("\n\nGEN %d STAT %ld\nEND\n", ++gen, \
(long)ccl << 16 | cro << 8 | (sta | occ | ocp << 1) ^ 0x66))
#define GEN endb) || (prs & 1) && addl || (outp, 0)), ret)); } int gen =
#define STAT ;long prs =
#define END ;
#define LIFE int bat, bit, but, las, gen, ret, rcl, rcf, rro, rrc, rrr, \
occ, ocp, sta, dfc; long prs; main(int col, int row) { \
int dfl = ((prs & 12) != 4), ccl = 0, cro = 0; return \
col == 1 && printf("LIFE\n"), (col < 0 ? recu : \
(((ret = 0) || (prs & 8) && addl || 0 && (0
#include "life.d"
+10
View File
@@ -0,0 +1,10 @@
LIFE
L _ _ _ _ _
L _ _ _ O _
L _ O _ O _
L _ _ O O _
L _ _ _ _ _
GEN 0
END
+9
View File
@@ -0,0 +1,9 @@
LIFE
L _ _ _ _ _
L _ O O O _
L _ _ O _ _
L _ _ _ _ _
GEN 0
END
+10
View File
@@ -0,0 +1,10 @@
LIFE
L _ _ _ _ _
L _ _ O O _
L _ O O _ _
L _ _ O _ _
L _ _ _ _ _
GEN 0
END
+15
View File
@@ -0,0 +1,15 @@
/* 0064 Can you build a puffer train? */
LIFE
L _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ O _ _ _ _ _ _ _ _ O _ _ _ _ O _ _ _
L _ O _ _ _ _ _ O _ _ O _ _ _ _ O _ _ _ _
L _ O _ _ _ _ _ _ O O O _ _ _ _ O _ _ _ _
L _ O _ _ O _ _ _ _ _ _ _ _ _ _ O _ _ O _
L _ O O O _ _ _ _ _ _ _ _ _ _ _ O O O _ _
L _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
GEN 0
END
+43
View File
@@ -0,0 +1,43 @@
/* Howdy, Landon: */
/* Here is one of the best Life patterns found in many years. It is called */
/* a "spacefiller", for reasons which will become obvious when you run it. */
/* This was found by Hartmut Holzwart a couple of weeks ago. Enjoy! */
/* BCNU, -dbell- */
LIFE
L _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _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 _ _ _ _ _ O _ _ _ _ _ _ _ _ _ _
L _ _ O _ _ _ O O O _ _ O _ _ O O O _ _ _ _ _ _ O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ O O O _
L _ O _ _ _ O _ _ _ _ _ O O _ O O _ _ _ O O O O O O O O O _ _ _ _ _ _ _ _ _ _ _ _ _ _ O O _
L _ O _ _ _ _ _ O _ _ _ O _ _ _ O _ _ O _ _ _ _ _ _ _ _ _ O _ _ _ _ _ _ _ _ _ _ _ _ O O O _
L _ O _ _ O _ _ O _ _ _ _ _ O O O _ O O O O O O O O O O O O _ _ _ _ _ O _ _ _ _ _ _ _ _ _ _
L _ _ O _ O _ _ O O _ O _ _ O O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ O O _ _ O _ O O _ _ O _ O _ _
L _ _ _ _ _ _ _ _ _ _ O _ _ _ _ _ O O O O O O O O O O O O _ O O O _ _ _ _ _ O _ _ O _ _ O _
L _ O O O _ _ _ _ _ _ _ _ _ _ _ _ O _ _ _ _ _ _ _ _ _ O _ _ O _ _ _ O _ _ _ O _ _ _ _ _ O _
L _ O O _ _ _ _ _ _ _ _ _ _ _ _ _ _ O O O O O O O O O _ _ _ O O _ O O _ _ _ _ _ O _ _ _ O _
L _ O O O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ O _ _ _ _ _ _ O O O _ _ O _ _ O O O _ _ _ O _ _
L _ _ _ _ _ _ _ _ _ _ O _ _ _ _ _ _ _ O O O _ O O O _ _ _ O _ _ _ _ O O _ _ _ _ _ O O _ _ _
L _ _ O _ O _ _ O O _ O _ _ _ _ _ _ _ _ O _ _ _ O _ _ _ _ _ _ _ _ _ _ O O O O O _ _ _ _ _ _
L _ O _ _ O _ _ O _ _ _ _ _ _ _ _ _ _ O _ O _ O _ O _ _ _ _ _ _ _ O _ _ _ _ O _ _ _ _ _ _ _
L _ O _ _ _ _ _ O _ _ _ _ _ _ _ _ _ _ O _ O _ O _ O _ _ _ _ _ _ _ O _ _ O O _ _ _ _ _ _ _ _
L _ O _ _ _ O _ _ _ _ _ _ _ _ _ _ _ O _ _ _ _ _ _ _ O _ _ _ _ _ _ _ _ _ O _ _ _ _ _ _ _ _ _
L _ _ O _ _ _ O O O _ _ _ _ _ _ _ _ O _ _ _ _ _ _ _ O _ _ _ _ _ _ _ O O _ _ _ _ _ _ _ _ _ _
L _ _ _ O O _ _ _ _ _ _ _ _ _ _ _ _ O _ _ O _ O _ _ O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ _ _ _ _ O O O O O _ O _ _ _ _ O O O _ _ _ O O O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ _ _ _ _ _ O _ _ _ _ O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ _ _ _ _ _ _ O O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ _ _ _ _ _ _ _ O _ _ O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ _ _ _ _ _ _ _ _ O _ O _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
L _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
GEN 0
END
+66
View File
@@ -0,0 +1,66 @@
Best Abuse of the C Preprocessor:
David Gibson
University of Cape Town
1 Sweet Valley Road
Bergvliet
7945
South Africa
Judges' comments:
To use:
sh ./dgibson.sh [datafile]
where:
datafile initial pattern (default: dgibson.data1)
We have provided the shell script 'dgibson.sh' to make it easier
to run this entry. Run this shell script several times to
see what happens.
There are a number of data files available:
dgibson.data1
dgibson.data2
dgibson.data3
dgibson.data4
dgibson.data5
For dgibson.data5 you will need a large screen, lots of virtual
memory and lots of time!
Good luck trying to use a debugger on this entry! Life is not
always pretty.
Selected notes from the author:
This program plays the Game of Life.
Life is a cellular automaton invented by J. H. Conway, in which each of
a rectangular grid of cells can be alive or dead, and cells with more
than 3 or less than 2 (out of 8) live neighbours die, and empty cells
with exactly 3 neighbours give birth.
Some notes: the "STAT n" information does not have to be present in the
initial configuration; the initial configuration should not have live
cells around the edges; the grid should be a perfect rectangle.
Further features: the current generation number is preserved, and the
grid automatically resizes itself as the object gets too big or too
small.
When writing this program, my goal was to make each cell in the life
grid expand to the code which calculates the fate of that cell. In
addition, the resulting program is a single expression, which makes it
necessary to recurse on main in two "directions" simultaneously.
Copyright (c) 1993, 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.
+53
View File
@@ -0,0 +1,53 @@
#!/bin/sh
#
# dgibson.sh - run the dgibson entry
#
# usage:
# dgibson.sh [data_file]
# parse args
#
if [ $# -eq 0 ]; then
DATA="./dgibson.data1"
else
DATA="$1"
fi
if [ ! -f "$DATA" ]; then
echo "$0: no data found in $DATA" 1>&2
exit 1
fi
# for the initial data.name if needed
#
if [ ! -f "data.name" ]; then
rm -f data.name
echo "$DATA" > data.name
fi
if [ ! -f life.d ]; then
# force a new life setup
echo "/" > data.name
fi
rm -f data.name2
echo "$DATA" > data.name2
# note if we are running a new form
#
if cmp -s data.name data.name2; then
:
else
rm -f life.d
cp "$DATA" life.d
rm -f data.name
echo "$DATA" > data.name
cat life.d
fi
# build a new copy of the program
#
rm -f dgibson
make dgibson
# form the next generation
#
chmod +w life.d
dgibson | tee life.d