Make all 1985 entries compile under linux
Unfortunately some entries will either not compile under macOS or not run correctly. We used a patch from Yusuke Endoh for 1985/applin/applin.c. Thank you Yusuke! This is actually the entry that does not work right under macOS but it does under linux. Update main README.md with links. Update a number of other README.md files with typos and other fixes and improvements (including fixing invocations and adding a 'Try:' section to match later year README files). Update various Makefiles to add notes and to make some entries compile (in some cases, those that require -traditional-cpp, they will not compile under clang and we note this). Update archive/archive-1985.tar.bz2. Why? Because the purpose of the archive/ files are for the original files and some of the files in there were not original. See the files 1985/lycklama/lycklama.orig.c and 1985/shapiro/shapiro.orig.c which in the tarball do not have the .orig added to the name.
This commit is contained in:
1 parent
3101acc915
commit
e4dbd8e6e2
12 files changed
+79
-22
No files matched your search
+5
-5
@@ -6,11 +6,11 @@ on how to compile the winner and how to run the winning program.
|
|||||||
Look at the winning source and try to figure how it does what it does!
|
Look at the winning source and try to figure how it does what it does!
|
||||||
You may then wish to look at the Author's comments for even more details.
|
You may then wish to look at the Author's comments for even more details.
|
||||||
|
|
||||||
Hints against machine dependent code were added to the rules to avoid
|
Hints against machine dependent code were added to the [rules](rules.txt) to
|
||||||
another 1984 style winner. Rules and results were posted to net.lang.c
|
avoid another 1984 style winner ([1984/mullender](../1984/mullender)). Rules and
|
||||||
and net.unix-wizards. Larry Bassel was invited to help in the
|
results were posted to net.lang.c and net.unix-wizards. Larry Bassel was
|
||||||
judging. Awards were given to 5 classes of programs since we were
|
invited to help in the judging. Awards were given to 5 classes of programs
|
||||||
unable to select only the best 4.
|
since we were unable to select only the best 4.
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ all: ${DATA} ${TARGET}
|
|||||||
supernova deep_magic magic charon pluto
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
|
@echo "NOTE: this does not work properly in macOS."
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
|
|||||||
+13
-1
@@ -1,4 +1,4 @@
|
|||||||
# Best one liner
|
# Best one liner
|
||||||
|
|
||||||
Jack Applin [with help from Robert Heckendorn]
|
Jack Applin [with help from Robert Heckendorn]
|
||||||
|
|
||||||
@@ -6,11 +6,23 @@ Jack Applin [with help from Robert Heckendorn]
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
|
|
||||||
|
./applin
|
||||||
|
|
||||||
|
|
||||||
|
NOTE: Yusuke Endoh provided a patch to get this to not issue a bus error. Thank
|
||||||
|
you Yusuke! We note that this entry does not work under macOS. Try it out and
|
||||||
|
see for yourself what happens!
|
||||||
|
|
||||||
|
|
||||||
## Judges' comments:
|
## Judges' comments:
|
||||||
|
|
||||||
One liner programs are short but twisted. This "Hello, World" version
|
One liner programs are short but twisted. This "Hello, World" version
|
||||||
certainly takes its time saying hello.
|
certainly takes its time saying hello.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||||
granted provided this this copyright and notice are included in its entirety
|
granted provided this this copyright and notice are included in its entirety
|
||||||
|
|||||||
@@ -1 +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);}
|
main(v,c)char**c;{for(v[c++]=strdup("Hello, world!\n");(!!c)[*c]&&(v--||--c&&execlp(*c,*c,c[!!c]+!!c,!c));**c=!c)write(!!*c,*c,!!**c);}
|
||||||
@@ -7,6 +7,13 @@ Lennart Augustsson
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
|
|
||||||
|
./august
|
||||||
|
|
||||||
|
|
||||||
## Judges' comments:
|
## Judges' comments:
|
||||||
|
|
||||||
An interesting use of a recursive call to main. Compile and execute
|
An interesting use of a recursive call to main. Compile and execute
|
||||||
|
|||||||
+17
-6
@@ -8,16 +8,27 @@ Ed Lycklama
|
|||||||
|
|
||||||
NOTE: This entry uses non-standard args to main() that do not work with modern compilers.
|
NOTE: This entry uses non-standard args to main() that do not work with modern compilers.
|
||||||
|
|
||||||
## Judges' comments:
|
|
||||||
|
|
||||||
Run the program, redirecting a file into it, and notice how it redisplays it.
|
## Try:
|
||||||
For instance try:
|
|
||||||
|
|
||||||
./lycklama < lycklama.c
|
./lycklama < lycklama.c
|
||||||
|
|
||||||
The program itself looks like tty noise. In the past 'define' in `#define` could
|
# notice the difference between the above and this one:
|
||||||
even be defined but to get this to work on modern systems we had to change the
|
./lycklama < lycklama.orig.c
|
||||||
`#o` lines to `#define`.
|
|
||||||
|
./lycklama < README.md
|
||||||
|
|
||||||
|
./lycklama < Makefile
|
||||||
|
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
|
Run the program, redirecting a file into it, and notice how it redisplays it.
|
||||||
|
The program itself looks like tty noise.
|
||||||
|
|
||||||
|
In the past 'define' in `#define` could even be defined but to get this to work
|
||||||
|
on modern systems we had to change the `#o` lines to `#define`.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1985, Landon Curt Noll & 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 _____;}
|
||||||
+11
-6
@@ -6,18 +6,23 @@ Carl Shapiro
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
|
./shapiro
|
||||||
|
|
||||||
|
|
||||||
## Judges' comments:
|
## Judges' comments:
|
||||||
|
|
||||||
As submitted, this program was 3 lines (2 of defines and 1 of code).
|
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
|
To make news & mail happy we split the last line into 7. The file
|
||||||
back without the newlines to get the original version.
|
[shapiro.orig.c](shapiro.orig.c) is the original version.
|
||||||
|
|
||||||
|
|
||||||
This program was selected for the 1987 t-shirt collection.
|
This program was selected for the 1987 t-shirt collection.
|
||||||
|
|
||||||
We found this program is be simply a**maze**ing! Run this program without
|
We found this program is be simply a**maze**ing! Run this program without
|
||||||
arguments and notice the output. For instance:
|
arguments and notice the output.
|
||||||
|
|
||||||
./shapiro
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1985, Landon Curt Noll & Larry Bassel.
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#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);}
|
||||||
@@ -102,7 +102,7 @@ ARCH=
|
|||||||
|
|
||||||
# Defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE= -traditional-cpp
|
||||||
#CDEFINE= -DIOCCC
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
# Include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
@@ -192,7 +192,8 @@ all: ${DATA} ${TARGET}
|
|||||||
supernova deep_magic magic charon pluto
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
@echo "NOTE: This entry requires a non-standard K&R C compiler to compile."
|
@echo "NOTE: This entry will not compile when using clang because it does not support"
|
||||||
|
@echo " -traditional-cpp but it should compile with gcc."
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ 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
|
from Richard Stallman: If you think you understand what this code
|
||||||
does, then you don't, so read it again! Explain why:
|
does, then you don't, so read it again! Explain why:
|
||||||
|
|
||||||
sicherman < sicherman.c | sicherman | diff - sicherman.c
|
./sicherman < sicherman.c | ./sicherman | diff - ./sicherman.c
|
||||||
|
|
||||||
results in diff reporting a difference on some machines.
|
results in diff reporting a difference on some machines.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in new issue
Block a user