From 99768d592a112adeac263e5f7f5721cb4ab0be5b Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 25 Mar 2023 03:56:28 -0700 Subject: [PATCH] 2018/ferguson fixes and minor updates Fix test.sh for shellcheck. Minor fixes to README.md including moving the author information (that is my information :-) ) to the first column of the file as not having it prevents links from being generated right. This is a problem for the other README.md files too and I'll be noting it on GitHub. Some humour with html ... Modified portability section to make it a bit simpler and suggest that I won't be updating the list. I only include the original systems tested for historical purposes. I won't be updating the list over time as that would be annoying to do and would just make the already very long document needlessly longer. It's already been almost 5 years since it was updated. Add a string to test-strings.txt. Warning: these are most likely not the final fixes or updates for my entries as Landon has pointed out :-) but there shouldn't be many more for now or hopefully for a long time. Unless I see something I won't feel the need to fix anything. Update 2018/burton2/README.md to have my middle name. --- 2018/burton2/README.md | 2 +- 2018/ferguson/README.md | 74 +++++++++++++++++----------------- 2018/ferguson/test-strings.txt | 1 + 2018/ferguson/test.sh | 8 ++-- 4 files changed, 42 insertions(+), 43 deletions(-) diff --git a/2018/burton2/README.md b/2018/burton2/README.md index 35382413a..06be21b8e 100644 --- a/2018/burton2/README.md +++ b/2018/burton2/README.md @@ -381,7 +381,7 @@ cc -ansi -Wall -trigraphs -Wno-trigraphs -Wno-parentheses -Wno-empty-body -Wno-c ### Coda -Cody Ferguson was relentless in his pursuit of bugs. +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) was relentless in his pursuit of bugs. Thanks to his reports, the version of `unob.sh` is stronger, `tac` groks digraphs, `tokenfix` corrects for missing digraphs in `prog.c`, and the program `manpage` was added to the corpus. diff --git a/2018/ferguson/README.md b/2018/ferguson/README.md index aa33c59e9..63cb2681e 100644 --- a/2018/ferguson/README.md +++ b/2018/ferguson/README.md @@ -1,8 +1,9 @@ # Best use of weasel words - Cody Boone Ferguson - - Twitter: @xexyl +Cody Boone Ferguson +[https://ioccc.xexyl.net](https://ioccc.xexyl.net) +[https://xexyl.net](https://xexyl.net) +Mastodon: [@xexyl@fosstodon.org](https://fosstodon.org/@xexyl) # To build: @@ -252,18 +253,18 @@ I was quite proud that when the next contest came the judges removed that question. Later 2018 and all of 2019 was difficult for me so it was like I won a second time for the same entry. -### On user errors +### On user monkey errors -If the generation reaches **`SIZE_MAX - 1`** I consider it a -user (or monkey) error; if the user insists on being so petulant enough as to try such -a ridiculous set of parameters in an attempt to make it be no more successful -than a monkey typing *then it shouldn't be any more successful than a monkey; if -it by chance reaches the target it's because a monkey could too!* Either way -unless the number reaches **`SIZE_MAX - 1`** the monkey Eric won't be blamed. It -should be noted that depending on the parameters (size of chromosome, number of -offspring, the string itself) the program could take quite a lot of system -resources; and whether the OS kills it, Eric the monkey falls asleep or the -typewriter is taken from him the result could very well be not found without +If the generation reaches **`SIZE_MAX - 1`** I consider it a monkey (or if you +insist: user) error; if the user insists on being so petulant enough as to try +such a ridiculous set of parameters in an attempt to make it be no more +successful than a monkey typing *then it shouldn't be any more successful than a +monkey; if it by chance reaches the target it's because a monkey could too!* +Either way unless the number reaches **`SIZE_MAX - 1`** the monkey Eric won't be +blamed. It should be noted that depending on the parameters (size of chromosome, +number of offspring, the string itself) the program could take quite a lot of +system resources; and whether the OS kills it, Eric the monkey falls asleep or +the typewriter is taken from him the result could very well be not found without blaming him. Of course the judges were talking about fish not monkeys. But since this program is inspired by the Weasel program *which was inspired by the [Infinite Monkey Theorem][]* I opted instead to target the monkey Eric even if @@ -907,13 +908,12 @@ result. Remember too that **`S`** cannot be less than **`38`**. Both **`S`** and Skip to [An aside on bugs](#bugs). -The entry works for both C99 and C11 (it *requires at least C99 even if you -translate digraphs*). The program doesn't require third-party libraries and -should work on any Unix based system. It works on both 64-bit and 32-bit (but -inevitably some data type sizes will be smaller and this I believe includes -**`SIZE_MAX`**). I don't think Windows gcc ports would have many issues (if any) -either but I have no way to test this. I have tested the following systems and -configurations: +This entry requires at least C99 even if you translate digraphs. The program +doesn't require third-party libraries and should work on any Unix based system. +It works on both 64-bit and 32-bit (but inevitably some data type sizes will be +smaller and this I believe includes **`SIZE_MAX`**). I don't think Windows gcc +ports would have many issues (if any) either but I have no way to test this. +Originally I tested it on the below systems. #### Fedora 26: @@ -993,7 +993,7 @@ Skip to [Final thoughts](#thoughts). I have included a RPM spec file for those with a Red Hat based Linux distribution; see [rpm.md][] for details (including why I implemented -this) if for some (strange?) reason you're interested. +this) if for some (strange or maybe even mad) reason you're interested. [rpm.md]: rpm.md @@ -1177,13 +1177,14 @@ like to thank my mother for being the best mum anyone could ask for, who's always been here for me and whom I also inherit the keen analytical mind from. I love you all! -I want to also thank Dave Burton for acknowledging me in his README.md file -for as he put it 'being relentless with pursuit of bugs'. To think that it was -circumstantial to my entry too makes it all the more unlikely but that doesn't -take away the significance of it; for I am a very symbolic person and being -acknowledged for this type of thing is great but to be acknowledged for it by -someone who has won more than once is even more special to me: thank you Dave! -It means a great deal to me and I am glad I could help! :) +I want to also thank [Dave Burton](/winners#Dave_Burton) for acknowledging me in +his [README.md]((../burton2/README.md) for his [2018/burton2](../burton2/prog.c) +entry for as he put it 'being relentless with pursuit of bugs'. To think that it +was circumstantial to my entry too makes it all the more unlikely but that +doesn't take away the significance of it; for I am a very symbolic person and +being acknowledged for this type of thing is great but to be acknowledged for it +by someone who has won more than once is even more special to me: thank you +Dave! It means a great deal to me and I am glad I could help! :) I would also like to say to the judges about their commentary as well as the category title: they're all very dear to me and that includes not just the @@ -1197,16 +1198,13 @@ wonderful contest requiring creativity, cleverness, uniqueness and inventiveness but to win beside all the other wonderful entries is truly special! -Shortly after the entry has been published I will have more information on the -winning entry at [https://ioccc.xexyl.net/2018/weasel][] including how to -contact me (besides what's already published on the IOCCC website). There also -is an [errata page][] so that in the case I find anything I would like to -correct in the documentation or other supplementary files I can note them there. +I have more information on the winning entry at +[https://ioccc.xexyl.net/2018/weasel][] including how to contact me (besides +what's already published on the IOCCC website). I have commentary on the other +winning entries as well. -If you wish to contact me please do so; although I have a Twitter account I don't -really use it so please send me an email instead. I do have Facebook as of a -little under two years but I'll worry about that at such a time (I presume in -fact 'if') it becomes relevant. +If you wish to contact me please do so. Please contact via mastodon. You can try +email but I'm more likely to respond to mastodon messages. [https://ioccc.xexyl.net/2018/weasel]: https://ioccc.xexyl.net/2018/weasel [errata page]: https://ioccc.xexyl.net/2018/weasel/errata diff --git a/2018/ferguson/test-strings.txt b/2018/ferguson/test-strings.txt index bf9686258..2839f0559 100644 --- a/2018/ferguson/test-strings.txt +++ b/2018/ferguson/test-strings.txt @@ -6,3 +6,4 @@ I AM THE WALRUS YOU ARE THE WALRUS YOU ARE THE WEASEL PAULINE HANSEN ACTS LIKE A WEASEL +IOCCC BEST USE OF WEASEL WORDS diff --git a/2018/ferguson/test.sh b/2018/ferguson/test.sh index 80e39c031..510672bf4 100755 --- a/2018/ferguson/test.sh +++ b/2018/ferguson/test.sh @@ -1,11 +1,11 @@ #!/bin/bash # Make sure the program has been compiled -make weasel 1> /dev/null|| exit 1 +make clobber all 1> /dev/null|| exit 1 -while read f; do - ./weasel $* "${f}" # full line because of quotes - # ./weasel $* $f would just be the final word +while read -r f; do + ./weasel "$@" "${f}" # full line because of quotes + # NOTE: ./weasel $* $f would just be the final word sleep 2 done < test-strings.txt || exit 1 echo "All done. Goodbye."