Fixes in 1984 winning entries' README.md files
Formatting and possibly typos.
This commit is contained in:
1 parent
8efe343e63
commit
8d06e51e7e
4 files changed
+75
-50
No files matched your search
+13
-10
@@ -1,22 +1,25 @@
|
|||||||
# Dishonorable mention
|
# Dishonorable mention
|
||||||
|
|
||||||
Anonymous
|
Anonymous
|
||||||
|
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
./anonymous
|
```sh
|
||||||
|
./anonymous
|
||||||
|
```
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work
|
||||||
under macOS. The fix was to prototype `read()` prior to being defined and not
|
under macOS. The fix was to prototype `read()` prior to being defined and not
|
||||||
using `int, int, int` as the entry does. Instead the second arg is a `void *`.
|
using `int, int, int` as the entry does. Instead the second arg is a `void *`.
|
||||||
In the `read()` function which actually calls `write(2)` the `i` (which is the
|
In the `read()` function (which actually calls `write(2)`) the `i` (which is the
|
||||||
`void *` has to be cast to an `int`. This solves the problem. Thank you Cody for
|
`void *`) has to be cast to an `int`. This solves the problem. Thank you Cody for
|
||||||
your assistance!
|
your assistance!
|
||||||
|
|
||||||
|
|
||||||
@@ -47,7 +50,7 @@ Some years after this entry was published we asked the author if they still
|
|||||||
wished to remain anonymous and they said:
|
wished to remain anonymous and they said:
|
||||||
|
|
||||||
> Yes, I want to keep my anonymity. But you can tell them that I am well known
|
> Yes, I want to keep my anonymity. But you can tell them that I am well known
|
||||||
for my connection to the C language.'
|
for my connection to the C language.
|
||||||
|
|
||||||
### On the famous tattoo (see above):
|
### On the famous tattoo (see above):
|
||||||
|
|
||||||
@@ -63,10 +66,10 @@ Landon Curt Noll, the one who told the author about the tattoo, wrote back:
|
|||||||
### Regrets:
|
### Regrets:
|
||||||
|
|
||||||
Landon Curt Noll wrote that the author, if they had to do it over again, regrets not
|
Landon Curt Noll wrote that the author, if they had to do it over again, regrets not
|
||||||
making the program a one-liner and not moving the "int i" into an arg of main
|
making the program a one-liner and not moving the `int i` into an arg of main
|
||||||
(so that the line would have started with main). On the other hand the author
|
(so that the line would have started with main). On the other hand the author
|
||||||
likes the "two line look" and the way hell o was split. :-) And they like the
|
likes the "two line look" and the way `hell o` was split. :-) And they like the
|
||||||
fact that it ends in a smily face: ;}
|
fact that it ends in a smily face: `;}`
|
||||||
|
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|||||||
+11
-9
@@ -1,10 +1,12 @@
|
|||||||
# Second place award
|
# Second place award
|
||||||
|
|
||||||
Dave Decot
|
Dave Decot
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
Originally [Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a patch so that
|
Originally [Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a patch so that
|
||||||
this entry would compile with gcc - but not clang - or at least some versions.
|
this entry would compile with gcc - but not clang - or at least some versions.
|
||||||
@@ -23,11 +25,11 @@ does not. Clang also requires that the second and third arguments to main be a
|
|||||||
|
|
||||||
### Alternative code:
|
### Alternative code:
|
||||||
|
|
||||||
The alternative code, [decot.alt.c](decot.alt.c), is the fix that Cody made to
|
The alternative code, [decot.alt.c](decot.alt.c), is the original code that
|
||||||
the version that does require `-traditional-cpp` and still runs afoul with
|
requires `-traditional-cpp` and will also run afoul with clang's requirement for
|
||||||
clang's requirement for the second and third arguments to main() being a `char
|
the second and third arguments to main() being a `char **` (the fixed version's
|
||||||
**` (the fixed version's main() only has one arg, an int). It is a minor fix to
|
main() only has one arg, an int). It is a minor fix to Yusuke's fix. Thank you
|
||||||
Yusuke's fix. Thank you Yusuke and Cody!
|
Yusuke and Cody!
|
||||||
|
|
||||||
To try this version:
|
To try this version:
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ This program prints out a string of garbage.
|
|||||||
|
|
||||||
The judges also offer this one comment: understand remarks!
|
The judges also offer this one comment: understand remarks!
|
||||||
|
|
||||||
### Historical comments:
|
### Historical remarks:
|
||||||
|
|
||||||
Some new (in 1984) compilers disliked line 15 of the original source, so we changed it
|
Some new (in 1984) compilers disliked line 15 of the original source, so we changed it
|
||||||
from:
|
from:
|
||||||
@@ -65,7 +67,7 @@ To see what we mean look at the source file in the
|
|||||||
|
|
||||||
## 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:
|
||||||
|
|
||||||
|
|||||||
+21
-11
@@ -1,14 +1,18 @@
|
|||||||
# Third place
|
# Third place
|
||||||
|
|
||||||
Mike Laman
|
Mike Laman
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
./laman <positive number>
|
```sh
|
||||||
|
./laman <positive number>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### INABIAF - it's not a bug it's a feature :-)
|
### INABIAF - it's not a bug it's a feature :-)
|
||||||
@@ -22,9 +26,11 @@ arg.
|
|||||||
The program accepts ONE POSITIVE argument. Seeing is believing, so try things
|
The program accepts ONE POSITIVE argument. Seeing is believing, so try things
|
||||||
like:
|
like:
|
||||||
|
|
||||||
./laman 4
|
```sh
|
||||||
./laman 9
|
./laman 4
|
||||||
./laman 16
|
./laman 9
|
||||||
|
./laman 16
|
||||||
|
```
|
||||||
|
|
||||||
This code should run you in circles.
|
This code should run you in circles.
|
||||||
|
|
||||||
@@ -33,19 +39,23 @@ This code should run you in circles.
|
|||||||
Some new compilers dislike lines 6 and 10 of the source, so we changed
|
Some new compilers dislike lines 6 and 10 of the source, so we changed
|
||||||
them from:
|
them from:
|
||||||
|
|
||||||
;++f)a[ b<<5|c] =d++,b+ =e;for( f=0;f<O
|
```c
|
||||||
<<5|c]^ =a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
;++f)a[ b<<5|c] =d++,b+ =e;for( f=0;f<O
|
||||||
|
<<5|c]^ =a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||||
|
```
|
||||||
|
|
||||||
to:
|
to:
|
||||||
|
|
||||||
;++f)a[ b<<5|c] =d++,b+= e;for( f=0;f<O
|
```c
|
||||||
<<5|c]^= a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
;++f)a[ b<<5|c] =d++,b+= e;for( f=0;f<O
|
||||||
|
<<5|c]^= a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||||
|
```
|
||||||
|
|
||||||
I hope you have a C beautifier!
|
I hope you have a C beautifier!
|
||||||
|
|
||||||
## 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:
|
||||||
|
|
||||||
|
|||||||
+30
-20
@@ -1,58 +1,68 @@
|
|||||||
# The Grand Prize
|
# The Grand Prize
|
||||||
|
|
||||||
Sjoerd Mullender
|
Sjoerd Mullender
|
||||||
|
|
||||||
Robbert van Renesse
|
Robbert van Renesse
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
./mullender
|
```sh
|
||||||
|
./mullender
|
||||||
|
```
|
||||||
|
|
||||||
> NOTE: If your machine is not a Vax-11 or pdp-11, this program will
|
> NOTE: If your machine is not a Vax-11 or pdp-11, this program will
|
||||||
> not execute correctly. In later years, machine dependent
|
> not execute correctly. In later years, machine dependent
|
||||||
> code was discouraged.
|
> code was discouraged.
|
||||||
|
|
||||||
## Alternative code:
|
### Alternative code:
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added the alternative
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added the alternative
|
||||||
code which lets you run this on other systems. He notes though that this was
|
code which lets you run this on other systems. He notes though that this was
|
||||||
only a slight fix and enhancement to the change in the [faq](/faq.md). Thank you
|
only a slight fix and enhancement to the change in the [faq](/faq.md). Thank you
|
||||||
Cody for your assistance!
|
Cody for your assistance!
|
||||||
|
|
||||||
### To build:
|
#### To build:
|
||||||
|
|
||||||
|
|
||||||
make alt
|
```sh
|
||||||
|
make alt
|
||||||
|
```
|
||||||
|
|
||||||
### To run:
|
#### To run:
|
||||||
|
|
||||||
./mullender.alt [microseconds]
|
```sh
|
||||||
|
./mullender.alt [microseconds]
|
||||||
|
```
|
||||||
|
|
||||||
The default microseconds is 10000. This ability is so you can experiment with
|
The default microseconds is 10000. This feature is so you can experiment with
|
||||||
different speeds in between writes. It can be useful if your CPU is too slow or
|
different speeds in between writes. It can be useful if your CPU is too slow or
|
||||||
too fast.
|
too fast.
|
||||||
|
|
||||||
BTW: is there such a thing as too fast a CPU ? :-) actually yes for certain code
|
BTW: is there such a thing as too fast a CPU ? :-) Actually yes for certain code
|
||||||
which is probably not as uncommon as you think :-) ).
|
which is probably not as uncommon as you think :-).
|
||||||
|
|
||||||
Note that it is an int and it uses `atoi()` which does NOT check for
|
Note that it is an int and it uses `atoi()` which does NOT check for
|
||||||
overflow! In fact it's argc itself.
|
overflow! In fact it's argc itself.
|
||||||
|
|
||||||
|
|
||||||
## Try:
|
#### Try:
|
||||||
|
|
||||||
|
|
||||||
./mullender.alt
|
```sh
|
||||||
|
./mullender.alt
|
||||||
|
|
||||||
./mullender.alt 5000
|
./mullender.alt 5000
|
||||||
|
|
||||||
./mullender.alt 500
|
./mullender.alt 500
|
||||||
|
|
||||||
./mullender.alt 20000
|
./mullender.alt 20000
|
||||||
|
```
|
||||||
|
|
||||||
What happens if you hit enter after it writes a line of output?
|
What happens if you hit enter after it writes a line of output?
|
||||||
|
|
||||||
@@ -84,7 +94,7 @@ BTW: this remains my (Landon Curt Noll's) all time favorite entries!
|
|||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
These comments, found at
|
These remarks, found at
|
||||||
[https://lainsystems.com/posts/exploring-mullender-dot-c/](https://lainsystems.com/posts/exploring-mullender-dot-c/),
|
[https://lainsystems.com/posts/exploring-mullender-dot-c/](https://lainsystems.com/posts/exploring-mullender-dot-c/),
|
||||||
were provided by Sjoerd Mullender years later. We thank the author of the
|
were provided by Sjoerd Mullender years later. We thank the author of the
|
||||||
article for the quote!
|
article for the quote!
|
||||||
@@ -125,9 +135,9 @@ The rest is history.
|
|||||||
Since this was the first contest, we hadn't seen any old entries, nor had any of
|
Since this was the first contest, we hadn't seen any old entries, nor had any of
|
||||||
the other contestants. Of course we knew about #define and tricks you could do
|
the other contestants. Of course we knew about #define and tricks you could do
|
||||||
with that, but we didn't need that for this program. In fact, we made it as
|
with that, but we didn't need that for this program. In fact, we made it as
|
||||||
“standard” as possible. At the time there was this program called “cb” for C
|
“standard” as possible. At the time there was this program called `cb` for C
|
||||||
beautifier which would re-indent your program to make the layout look better. Our
|
beautifier which would re-indent your program to make the layout look better. Our
|
||||||
program is idempotent under cb.
|
program is idempotent under `cb`.
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user