Update 1987 winning entries' README.md files
Format and typo fixes.
This commit is contained in:
1 parent
951f3cc2e2
commit
95f384ec3f
7 files changed
+138
-87
No files matched your search
+13
-8
@@ -1,6 +1,6 @@
|
|||||||
# Best Abuse of the Rules
|
# Best Abuse of the Rules
|
||||||
|
|
||||||
Mark Biggar
|
Mark Biggar
|
||||||
UNiSYS - System Development Group, Santa Monica
|
UNiSYS - System Development Group, Santa Monica
|
||||||
2525 Colorado AV MD 91-01
|
2525 Colorado AV MD 91-01
|
||||||
Santa Monica, CA
|
Santa Monica, CA
|
||||||
@@ -8,27 +8,32 @@ Santa Monica, CA
|
|||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
some_command | ./biggar | od -c
|
```sh
|
||||||
|
some_command | ./biggar | od -c
|
||||||
|
```
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
cat biggar.c | ./biggar | od -c
|
```sh
|
||||||
|
cat biggar.c | ./biggar | od -c
|
||||||
|
```
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
By changing the compile line you can make this program do anything you
|
By changing the compile line you can make this program do anything you
|
||||||
want. This is a very efficient way to transfer source, though it
|
want. This is a very efficient way to transfer source, though it
|
||||||
increases the size of Makefiles.
|
increases the size of Makefiles.
|
||||||
|
|
||||||
With only slight variations, this program can be set to many uses.
|
With only slight variations, this program can be set to many uses.
|
||||||
Consider how easy it would be to release `Un*x` source in this form;
|
Consider how easy it would be to release `Un*x` source in this form;
|
||||||
so what if the make files grow a little! :-)
|
so what if the Makefiles grow a little! :-)
|
||||||
|
|
||||||
One vendor's lint got hung in an infinite loop over this entry!
|
One vendor's lint got hung in an infinite loop over this entry!
|
||||||
|
|
||||||
@@ -47,7 +52,7 @@ an infinite loop by this entry.
|
|||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
No comments were provided by the author.
|
No remarks were provided by the author.
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
+19
-14
@@ -5,8 +5,9 @@ Pixar
|
|||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
On System V systems, we had to compile with `-Dindex=strchr`.
|
On System V systems, we had to compile with `-Dindex=strchr`.
|
||||||
To compile on a 16 bit machine, change 300000 to 30000.
|
To compile on a 16 bit machine, change 300000 to 30000.
|
||||||
@@ -15,35 +16,39 @@ To compile on a 16 bit machine, change 300000 to 30000.
|
|||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
./heckbert 40 < heckbert.c > ph.c; make ph
|
```sh
|
||||||
./ph 21 < heckbert.c > bar.c; make bar
|
./heckbert 40 < heckbert.c > ph.c; make ph
|
||||||
# or more generally fold some other file at a positive column:
|
./ph 21 < heckbert.c > bar.c; make bar
|
||||||
./ph col < file
|
# or more generally fold some other file at a positive column:
|
||||||
|
./ph col < file
|
||||||
|
```
|
||||||
|
|
||||||
Ask yourself what happens to `foo.md` if you try:
|
Ask yourself what happens to `foo.md` if you try:
|
||||||
|
|
||||||
./ph 40 < README.md > foo.md
|
```sh
|
||||||
|
./ph 40 < README.md > foo.md
|
||||||
|
```
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
Folding at the wrong length may be equivalent to a "Spindle or Mutilate" operation. For example:
|
Folding at the wrong length may be equivalent to a "Spindle or Mutilate" operation. For example:
|
||||||
|
|
||||||
./heckbert 40 < heckbert.c > ph.c ; make ph ; ./ph 20 < heckbert.c > bar.c ; make bar
|
```sh
|
||||||
|
./heckbert 40 < heckbert.c > ph.c ; make ph ; ./ph 20 < heckbert.c > bar.c ; make bar
|
||||||
|
```
|
||||||
|
|
||||||
Try not to
|
Try not to
|
||||||
[Fold, Spindle or Mutilate](https://repository.library.brown.edu/studio/item/bdr:788264/PDF/)
|
[Fold, Spindle or Mutilate](https://repository.library.brown.edu/studio/item/bdr:788264/PDF/)
|
||||||
files. :-)
|
files. :-)
|
||||||
|
|
||||||
|
|
||||||
## Author's remarks:
|
|
||||||
|
|
||||||
No comments were provided by the author.
|
|
||||||
|
|
||||||
The judges used this program to fold up very long lines which the
|
The judges used this program to fold up very long lines which the
|
||||||
BSD fold(1) was unable to process. This program has been added
|
BSD fold(1) was unable to process. This program has been added
|
||||||
to the contest tool chest.
|
to the contest tool chest.
|
||||||
|
|
||||||
|
## Author's remarks:
|
||||||
|
|
||||||
|
No remarks were provided by the author.
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
|
This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
|
||||||
|
|||||||
+17
-9
@@ -9,26 +9,34 @@ USA
|
|||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
## To run
|
## To run:
|
||||||
|
|
||||||
./hines file.c
|
```sh
|
||||||
|
./hines file.c
|
||||||
|
```
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
./hines hines.c
|
```sh
|
||||||
|
./hines hines.c
|
||||||
|
```
|
||||||
|
|
||||||
### Alternate code
|
### Alternate code:
|
||||||
|
|
||||||
An alternate version of this entry is in `hines.alt.c`. With older compilers you
|
An alternate version of this entry is in [hines.alt.c](hines.alt.c). With older compilers you
|
||||||
can try the alt version:
|
can try the alt version:
|
||||||
|
|
||||||
make alt
|
```sh
|
||||||
|
make alt
|
||||||
|
```
|
||||||
|
|
||||||
Use `hines.alt` as you would `hines` above.
|
Use `hines.alt` as you would `hines` above.
|
||||||
|
|
||||||
## Judges' remarks
|
## Judges' remarks:
|
||||||
|
|
||||||
This program was designed to maximize the bother function for
|
This program was designed to maximize the bother function for
|
||||||
structured programmers. This program takes goto statements to their
|
structured programmers. This program takes goto statements to their
|
||||||
@@ -41,7 +49,7 @@ See the Communications of the ACM, March 1987, Page 195-196.
|
|||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
No comments were provided by the author.
|
No remarks were provided by the author.
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
+18
-9
@@ -1,15 +1,17 @@
|
|||||||
# Best One Liner
|
# Best One Liner
|
||||||
|
|
||||||
David Korn
|
David Korn
|
||||||
AT&T Bell Labs
|
AT&T Bell Labs
|
||||||
MH 3C-526B, AT&T Bell Labs
|
MH 3C-526B, AT&T Bell Labs
|
||||||
Murray Hill, NJ
|
Murray Hill, NJ
|
||||||
07974
|
07974
|
||||||
USA
|
USA
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
@@ -29,7 +31,9 @@ Several points are important to understand in this program:
|
|||||||
2) What is the value of the symbol "have"? (hint: the value is
|
2) What is the value of the symbol "have"? (hint: the value is
|
||||||
NOT 4 characters, or 'h', or a string) Consider the fact that:
|
NOT 4 characters, or 'h', or a string) Consider the fact that:
|
||||||
|
|
||||||
char *x;
|
|
||||||
|
char *x;
|
||||||
|
|
||||||
|
|
||||||
defines a pointer to a character (i.e. an address), and that
|
defines a pointer to a character (i.e. an address), and that
|
||||||
the '=' assigns things is compatible types. Since:
|
the '=' assigns things is compatible types. Since:
|
||||||
@@ -42,13 +46,18 @@ Several points are important to understand in this program:
|
|||||||
|
|
||||||
x[3] *(x+3) *(3+x)
|
x[3] *(x+3) *(3+x)
|
||||||
|
|
||||||
since addition is communitive. What can be said about the value:
|
since addition is commutative. What can be said about the value:
|
||||||
|
|
||||||
3[x]
|
3[x]
|
||||||
|
|
||||||
David Korn's /bin/ksh provides us with a greatly improved version of
|
David Korn's `/bin/ksh` provides us with a greatly improved version of
|
||||||
the /bin/sh. The source for v7's /bin/sh greatly inspired this contest.
|
the /bin/sh. The source for v7's /bin/sh greatly inspired this contest.
|
||||||
|
|
||||||
|
## Author's remarks:
|
||||||
|
|
||||||
|
No remarks were provided by the author.
|
||||||
|
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
|
This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
|
||||||
|
|||||||
+21
-16
@@ -2,21 +2,24 @@
|
|||||||
|
|
||||||
Roemer B. Lievaart
|
Roemer B. Lievaart
|
||||||
VU Informatica
|
VU Informatica
|
||||||
Churchilllaan 173-IV
|
Churchilllaan 173-IV
|
||||||
Amsterdam, The Netherlands
|
Amsterdam, The Netherlands
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
NOTE: The original entry may be built with "make alt" if you have an old enough
|
NOTE: The original entry may be built with "make alt" if you have an old enough
|
||||||
compiler.
|
compiler.
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
./lievaart
|
```sh
|
||||||
# enter a level and start playing as described below
|
./lievaart
|
||||||
|
# enter a level and start playing as described below
|
||||||
|
```
|
||||||
|
|
||||||
NOTE: if you enter invalid input the program will enter an infinite loop
|
NOTE: if you enter invalid input the program will enter an infinite loop
|
||||||
displaying a string like `"You:"` repeatedly.
|
displaying a string like `"You:"` repeatedly.
|
||||||
@@ -25,8 +28,10 @@ displaying a string like `"You:"` repeatedly.
|
|||||||
|
|
||||||
To see what it would have looked like without the size restrictions:
|
To see what it would have looked like without the size restrictions:
|
||||||
|
|
||||||
./lievaart2
|
```sh
|
||||||
# enter a level and start playing as described below
|
./lievaart2
|
||||||
|
# enter a level and start playing as described below
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
@@ -34,19 +39,19 @@ To see what it would have looked like without the size restrictions:
|
|||||||
We believe that you too will be amazed at just how much power Mr. Lievaart
|
We believe that you too will be amazed at just how much power Mr. Lievaart
|
||||||
packed into 1024 bytes!
|
packed into 1024 bytes!
|
||||||
|
|
||||||
This Plays the game of reversi (Othello)! Compile and run. It then
|
This Plays the game of Reversi (Othello)! Compile and run. It then
|
||||||
asks for a playing level. Enter 0-10 (easy-hard). It then asks for
|
asks for a playing level. Enter 0-10 (easy-hard). It then asks for
|
||||||
your move. A move is a number within 11-88, or a 99 to pass. Illegal
|
your move. A move is a number within 11-88, or a 99 to pass. Illegal
|
||||||
moves (except for an illegal pass) are rejected. Then the computer
|
moves (except for an illegal pass) are rejected. Then the computer
|
||||||
does its move (or a 0 to pass), until the board is full.
|
does its move (or a 0 to pass), until the board is full.
|
||||||
|
|
||||||
It plays rather well, for such a small program! Lievaart had to leave out the
|
It plays rather well, for such a small program! Lievaart had to leave out the
|
||||||
board printing routine, so you'll have to take a real game board to
|
board printing routine, so you'll have to take a real game board to play it (or
|
||||||
play it. ... Also due to space-limitations (the rules for 1987 had a
|
see below). ... Also due to space-limitations (the rules for 1987 had a limit
|
||||||
limit of 1024 byes), Lievaart took out the passing-handler, which
|
of 1024 byes), Lievaart took out the passing-handler, which makes its
|
||||||
makes its ending-game rather poor. But further it knows all the
|
ending-game rather poor. But further it knows all the rules, uses alpha-beta
|
||||||
rules, uses alpha-beta pruning, and it plays f.i. on mobility(!).
|
pruning, and it plays f.i. on mobility(!). Most important: it can play a pretty
|
||||||
Most important: it can play a pretty good game of Reversi!
|
good game of Reversi!
|
||||||
|
|
||||||
The Author was kind enough to supply the fully functional version of the
|
The Author was kind enough to supply the fully functional version of the
|
||||||
program. The file lievaart2.c contains what the program would have
|
program. The file lievaart2.c contains what the program would have
|
||||||
@@ -56,7 +61,7 @@ logic and displays the board after each move!
|
|||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
No comments were provided by the author.
|
No remarks were provided by the author.
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
+24
-15
@@ -23,35 +23,44 @@ make all
|
|||||||
```
|
```
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this safer by
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this safer by
|
||||||
using `fgets()` instead of `gets()`. This prevents a potentially alarming
|
using `fgets()` instead of `gets()`. This prevents an annoying and potentially
|
||||||
warning at linking or runtime.
|
alarming warning at compiling, linking or runtime.
|
||||||
|
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
./wall | bc | ./wall
|
```sh
|
||||||
|
./wall | bc | ./wall
|
||||||
|
```
|
||||||
|
|
||||||
and input the following:
|
and input the following:
|
||||||
|
|
||||||
x*x
|
```
|
||||||
c^2
|
x*x
|
||||||
m*m
|
c^2
|
||||||
|
m*m
|
||||||
|
|
||||||
# can you figure out what this does?
|
# can you figure out what this does?
|
||||||
500
|
500
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
### Also try:
|
### Also try:
|
||||||
|
|
||||||
./wall | bc
|
```sh
|
||||||
|
./wall | bc
|
||||||
|
|
||||||
./wall | cat
|
./wall | cat
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
and enter some input like:
|
and enter some input like:
|
||||||
|
|
||||||
x*x
|
```
|
||||||
2^x
|
x*x
|
||||||
quit # for the cat version
|
2^x
|
||||||
|
quit # for the cat version
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
@@ -64,12 +73,12 @@ be directly called. Even so, these pointers to functions are being
|
|||||||
used as an argument to signal. Can you determine why this is being
|
used as an argument to signal. Can you determine why this is being
|
||||||
done and how it is being exploited?
|
done and how it is being exploited?
|
||||||
|
|
||||||
Some compilers complained about this file, so we changed: '=++I' to '= ++I'.
|
Some compilers complained about this file, so we changed: `=++I` to `= ++I`.
|
||||||
|
|
||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
No comments were provided by the author.
|
No remarks were provided by the author.
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
+26
-16
@@ -1,34 +1,40 @@
|
|||||||
# Best Layout
|
# Best Layout
|
||||||
|
|
||||||
Brian Westley (aka Merlyn Leroy on usenet)
|
Brian Westley (aka Merlyn Leroy on usenet)
|
||||||
Starfire Consulting
|
Starfire Consulting
|
||||||
1121 Hamline Ave. N. #17
|
1121 Hamline Ave. N. #17
|
||||||
St. Paul, MN
|
St. Paul, MN
|
||||||
55108
|
55108
|
||||||
USA
|
USA
|
||||||
|
<http://www.westley.org>
|
||||||
http://www.westley.org
|
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
|
||||||
systems. The problem was 'assignment to cast is illegal, lvalue casts are not
|
systems. The problem was 'assignment to cast is illegal, lvalue casts are not
|
||||||
supported'. For the original file see below. Thank you Cody for your assistance!
|
supported'. For the original file see below. Thank you Cody for your assistance!
|
||||||
|
|
||||||
|
|
||||||
## Alternate code:
|
## To run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./westley
|
||||||
|
```
|
||||||
|
|
||||||
|
### Alternate code:
|
||||||
|
|
||||||
If you have an older compiler you can try compiling the original source code
|
If you have an older compiler you can try compiling the original source code
|
||||||
which is true symmetry:
|
which is true symmetry:
|
||||||
|
|
||||||
make alt
|
```sh
|
||||||
|
make alt
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `westley.alt` as you would `westley` above.
|
||||||
## To run:
|
|
||||||
|
|
||||||
./westley
|
|
||||||
|
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
@@ -40,7 +46,11 @@ top of the program.
|
|||||||
Line by line symmetry performed better than any C beautifier. Think
|
Line by line symmetry performed better than any C beautifier. Think
|
||||||
of if it as a C ink blot. :-)
|
of if it as a C ink blot. :-)
|
||||||
|
|
||||||
NOTE: This entry requires a non-standard K&R C compiler to compile.
|
|
||||||
|
## Author's remarks:
|
||||||
|
|
||||||
|
No remarks were provided by the author.
|
||||||
|
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user