Update 1987 winning entries' README.md files

Format and typo fixes.
This commit is contained in:
Cody Boone Ferguson committed 2023-04-14 06:18:56 -07:00
1 parent 951f3cc2e2
commit 95f384ec3f
7 files changed
+138 -87

No files matched your search

+13 -8
View File
@@ -1,6 +1,6 @@
# Best Abuse of the Rules
Mark Biggar
Mark Biggar
UNiSYS - System Development Group, Santa Monica
2525 Colorado AV MD 91-01
Santa Monica, CA
@@ -8,27 +8,32 @@ Santa Monica, CA
## To build:
make all
```sh
make all
```
## To run:
some_command | ./biggar | od -c
```sh
some_command | ./biggar | od -c
```
## Try:
cat biggar.c | ./biggar | od -c
```sh
cat biggar.c | ./biggar | od -c
```
## Judges' remarks:
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.
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;
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!
@@ -47,7 +52,7 @@ an infinite loop by this entry.
## 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:
+19 -14
View File
@@ -5,8 +5,9 @@ Pixar
## To build:
make all
```sh
make all
```
On System V systems, we had to compile with `-Dindex=strchr`.
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:
./heckbert 40 < heckbert.c > ph.c; make ph
./ph 21 < heckbert.c > bar.c; make bar
# or more generally fold some other file at a positive column:
./ph col < file
```sh
./heckbert 40 < heckbert.c > ph.c; make ph
./ph 21 < heckbert.c > bar.c; make bar
# or more generally fold some other file at a positive column:
./ph col < file
```
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:
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
[Fold, Spindle or Mutilate](https://repository.library.brown.edu/studio/item/bdr:788264/PDF/)
files. :-)
## Author's remarks:
No comments were provided by the author.
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
to the contest tool chest.
## Author's remarks:
No remarks were provided by the author.
## Copyright and CC BY-SA 4.0 License:
This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
+17 -9
View File
@@ -9,26 +9,34 @@ USA
## To build:
make all
```sh
make all
```
## To run
## To run:
./hines file.c
```sh
./hines file.c
```
## 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:
make alt
```sh
make alt
```
Use `hines.alt` as you would `hines` above.
## Judges' remarks
## Judges' remarks:
This program was designed to maximize the bother function for
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:
No comments were provided by the author.
No remarks were provided by the author.
## Copyright and CC BY-SA 4.0 License:
+18 -9
View File
@@ -1,15 +1,17 @@
# Best One Liner
David Korn
David Korn
AT&T Bell Labs
MH 3C-526B, AT&T Bell Labs
Murray Hill, NJ
07974
USA
MH 3C-526B, AT&T Bell Labs
Murray Hill, NJ
07974
USA
## To build:
make all
```sh
make all
```
## 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
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
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)
since addition is communitive. What can be said about the value:
since addition is commutative. What can be said about the value:
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.
## Author's remarks:
No remarks were provided by the author.
## Copyright and CC BY-SA 4.0 License:
This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
+21 -16
View File
@@ -2,21 +2,24 @@
Roemer B. Lievaart
VU Informatica
Churchilllaan 173-IV
Amsterdam, The Netherlands
Churchilllaan 173-IV
Amsterdam, The Netherlands
## To build:
make all
```sh
make all
```
NOTE: The original entry may be built with "make alt" if you have an old enough
compiler.
## To run:
./lievaart
# enter a level and start playing as described below
```sh
./lievaart
# enter a level and start playing as described below
```
NOTE: if you enter invalid input the program will enter an infinite loop
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:
./lievaart2
# enter a level and start playing as described below
```sh
./lievaart2
# enter a level and start playing as described below
```
## 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
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
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
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
board printing routine, so you'll have to take a real game board to
play it. ... Also due to space-limitations (the rules for 1987 had a
limit of 1024 byes), Lievaart took out the passing-handler, which
makes its ending-game rather poor. But further it knows all the
rules, uses alpha-beta pruning, and it plays f.i. on mobility(!).
Most important: it can play a pretty good game of Reversi!
board printing routine, so you'll have to take a real game board to play it (or
see below). ... Also due to space-limitations (the rules for 1987 had a limit
of 1024 byes), Lievaart took out the passing-handler, which makes its
ending-game rather poor. But further it knows all the rules, uses alpha-beta
pruning, and it plays f.i. on mobility(!). Most important: it can play a pretty
good game of Reversi!
The Author was kind enough to supply the fully functional version of the
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:
No comments were provided by the author.
No remarks were provided by the author.
## Copyright and CC BY-SA 4.0 License:
+24 -15
View File
@@ -23,35 +23,44 @@ make all
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this safer by
using `fgets()` instead of `gets()`. This prevents a potentially alarming
warning at linking or runtime.
using `fgets()` instead of `gets()`. This prevents an annoying and potentially
alarming warning at compiling, linking or runtime.
## Try:
./wall | bc | ./wall
```sh
./wall | bc | ./wall
```
and input the following:
x*x
c^2
m*m
```
x*x
c^2
m*m
# can you figure out what this does?
500
# can you figure out what this does?
500
```
### Also try:
./wall | bc
```sh
./wall | bc
./wall | cat
./wall | cat
```
and enter some input like:
x*x
2^x
quit # for the cat version
```
x*x
2^x
quit # for the cat version
```
## 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
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:
No comments were provided by the author.
No remarks were provided by the author.
## Copyright and CC BY-SA 4.0 License:
+26 -16
View File
@@ -1,34 +1,40 @@
# Best Layout
Brian Westley (aka Merlyn Leroy on usenet)
Starfire Consulting
1121 Hamline Ave. N. #17
St. Paul, MN
55108
USA
http://www.westley.org
Brian Westley (aka Merlyn Leroy on usenet)
Starfire Consulting
1121 Hamline Ave. N. #17
St. Paul, MN
55108
USA
<http://www.westley.org>
## To build:
make all
```sh
make all
```
[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
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
which is true symmetry:
make alt
```sh
make alt
```
## To run:
./westley
Use `westley.alt` as you would `westley` above.
## Judges' remarks:
@@ -40,7 +46,11 @@ top of the program.
Line by line symmetry performed better than any C beautifier. Think
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: