diff --git a/1985/README.md b/1985/README.md index 237056b75..ab3c136d2 100644 --- a/1985/README.md +++ b/1985/README.md @@ -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! 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 -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. +Hints against machine dependent code were added to the [rules](rules.txt) to +avoid another 1984 style winner ([1984/mullender](../1984/mullender)). 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. =-= diff --git a/1985/applin/Makefile b/1985/applin/Makefile index 8188eb83d..c4566c956 100644 --- a/1985/applin/Makefile +++ b/1985/applin/Makefile @@ -192,6 +192,7 @@ all: ${DATA} ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c + @echo "NOTE: this does not work properly in macOS." ${CC} ${CFLAGS} $< -o $@ ${LIBS} # alternative executable diff --git a/1985/applin/README.md b/1985/applin/README.md index 2caa53403..1d03d457b 100644 --- a/1985/applin/README.md +++ b/1985/applin/README.md @@ -1,4 +1,4 @@ -# Best one liner +# Best one liner Jack Applin [with help from Robert Heckendorn] @@ -6,11 +6,23 @@ Jack Applin [with help from Robert Heckendorn] 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: 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 diff --git a/1985/applin/applin.c b/1985/applin/applin.c index 3a376f1ab..fcd844bb5 100644 --- a/1985/applin/applin.c +++ b/1985/applin/applin.c @@ -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);} diff --git a/1985/august/README.md b/1985/august/README.md index dcb903bf7..f88e6bded 100644 --- a/1985/august/README.md +++ b/1985/august/README.md @@ -7,6 +7,13 @@ Lennart Augustsson make all + +## Try: + + + ./august + + ## Judges' comments: An interesting use of a recursive call to main. Compile and execute diff --git a/1985/lycklama/README.md b/1985/lycklama/README.md index 8c016d501..79668074f 100644 --- a/1985/lycklama/README.md +++ b/1985/lycklama/README.md @@ -8,16 +8,27 @@ Ed Lycklama 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. -For instance try: +## Try: + ./lycklama < lycklama.c -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`. + # notice the difference between the above and this one: + ./lycklama < lycklama.orig.c + + ./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. diff --git a/1985/lycklama/lycklama.orig.c b/1985/lycklama/lycklama.orig.c new file mode 100644 index 000000000..d7a3776fd --- /dev/null +++ b/1985/lycklama/lycklama.orig.c @@ -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_<=b;){c=M[g=i];i=e;for(s=f=0; s<4;s++)if((k=m[s]+g)>=0&&k=16!=M[k]>=16))a[f++ ]=s;if(f){f=M[e=m[s=a[rand()/(1+2147483647/f)]]+g];j=jb++?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);} diff --git a/1985/sicherman/Makefile b/1985/sicherman/Makefile index f97550017..2f8ca79e0 100644 --- a/1985/sicherman/Makefile +++ b/1985/sicherman/Makefile @@ -102,7 +102,7 @@ ARCH= # Defines that are needed to compile # -CDEFINE= +CDEFINE= -traditional-cpp #CDEFINE= -DIOCCC # Include files that are needed to compile @@ -192,7 +192,8 @@ all: ${DATA} ${TARGET} supernova deep_magic magic charon pluto ${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} # alternative executable diff --git a/1985/sicherman/README.md b/1985/sicherman/README.md index 345ab5380..bfcc2a137 100644 --- a/1985/sicherman/README.md +++ b/1985/sicherman/README.md @@ -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 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. diff --git a/archive/archive-1985.tar.bz2 b/archive/archive-1985.tar.bz2 index 6c181285e..f620b301b 100644 Binary files a/archive/archive-1985.tar.bz2 and b/archive/archive-1985.tar.bz2 differ