From 8d06e51e7eb3751c238fa2515ca91f6fc2b5618e Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 14 Apr 2023 06:14:15 -0700 Subject: [PATCH] Fixes in 1984 winning entries' README.md files Formatting and possibly typos. --- 1984/anonymous/README.md | 23 ++++++++++-------- 1984/decot/README.md | 20 ++++++++-------- 1984/laman/README.md | 32 ++++++++++++++++--------- 1984/mullender/README.md | 50 ++++++++++++++++++++++++---------------- 4 files changed, 75 insertions(+), 50 deletions(-) diff --git a/1984/anonymous/README.md b/1984/anonymous/README.md index 5ac31d03a..22ccd5ad9 100644 --- a/1984/anonymous/README.md +++ b/1984/anonymous/README.md @@ -1,22 +1,25 @@ # Dishonorable mention - Anonymous +Anonymous ## To build: - make all +```sh +make all +``` ## To run: - ./anonymous - +```sh +./anonymous +``` [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 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 -`void *` has to be cast to an `int`. This solves the problem. Thank you Cody for +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 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: > 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): @@ -63,10 +66,10 @@ Landon Curt Noll, the one who told the author about the tattoo, wrote back: ### Regrets: 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 -likes the "two line look" and the way hell o was split. :-) And they like the -fact that it ends in a smily face: ;} +likes the "two line look" and the way `hell o` was split. :-) And they like the +fact that it ends in a smily face: `;}` ## Copyright and CC BY-SA 4.0 License: diff --git a/1984/decot/README.md b/1984/decot/README.md index 7e5bf7302..d57e29362 100644 --- a/1984/decot/README.md +++ b/1984/decot/README.md @@ -1,10 +1,12 @@ # Second place award -Dave Decot +Dave Decot ## To build: - make all +```sh +make all +``` 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. @@ -23,11 +25,11 @@ does not. Clang also requires that the second and third arguments to main be a ### Alternative code: -The alternative code, [decot.alt.c](decot.alt.c), is the fix that Cody made to -the version that does require `-traditional-cpp` and still runs afoul with -clang's requirement for the second and third arguments to main() being a `char -**` (the fixed version's main() only has one arg, an int). It is a minor fix to -Yusuke's fix. Thank you Yusuke and Cody! +The alternative code, [decot.alt.c](decot.alt.c), is the original code that +requires `-traditional-cpp` and will also run afoul with clang's requirement for +the second and third arguments to main() being a `char **` (the fixed version's +main() only has one arg, an int). It is a minor fix to Yusuke's fix. Thank you +Yusuke and Cody! 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! -### Historical comments: +### Historical remarks: Some new (in 1984) compilers disliked line 15 of the original source, so we changed it from: @@ -65,7 +67,7 @@ To see what we mean look at the source file in the ## 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: diff --git a/1984/laman/README.md b/1984/laman/README.md index 263d4d3c1..62ba979a8 100644 --- a/1984/laman/README.md +++ b/1984/laman/README.md @@ -1,14 +1,18 @@ # Third place -Mike Laman +Mike Laman ## To build: - make all +```sh +make all +``` ## To run: - ./laman +```sh +./laman +``` ### 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 like: - ./laman 4 - ./laman 9 - ./laman 16 +```sh +./laman 4 +./laman 9 +./laman 16 +``` 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 them from: - ;++f)a[ b<<5|c] =d++,b+ =e;for( f=0;f NOTE: If your machine is not a Vax-11 or pdp-11, this program will > not execute correctly. In later years, machine dependent > code was discouraged. -## Alternative code: +### Alternative code: [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 only a slight fix and enhancement to the change in the [faq](/faq.md). Thank you 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 too fast. -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 :-) ). +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 :-). Note that it is an int and it uses `atoi()` which does NOT check for 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? @@ -84,7 +94,7 @@ BTW: this remains my (Landon Curt Noll's) all time favorite entries! ## 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/), were provided by Sjoerd Mullender years later. We thank the author of the 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 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 -“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 -program is idempotent under cb. +program is idempotent under `cb`. ## Copyright and CC BY-SA 4.0 License: