diff --git a/1988/spinellis/.winner.json b/1988/spinellis/.winner.json index 85cf7cd7b..e3773db63 100644 --- a/1988/spinellis/.winner.json +++ b/1988/spinellis/.winner.json @@ -49,22 +49,6 @@ "display_via_github" : true, "winners_text" : "original source" }, - { - "file_path" : "try.alt.sh", - "inventory_order" : 100, - "OK_to_edit" : true, - "display_as" : "shellscript", - "display_via_github" : true, - "winners_text" : "how to run alternative code" - }, - { - "file_path" : "try.sh", - "inventory_order" : 100, - "OK_to_edit" : true, - "display_as" : "shellscript", - "display_via_github" : true, - "winners_text" : "how to run" - }, { "file_path" : "input.txt", "inventory_order" : 150, diff --git a/1988/spinellis/index.html b/1988/spinellis/index.html index 816477a84..9235958a4 100644 --- a/1988/spinellis/index.html +++ b/1988/spinellis/index.html @@ -178,12 +178,6 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/sp href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/spinellis.orig.c">spinellis.orig.c - original source
  • try.alt.sh -- how to run alternative code
  • -
  • try.sh -- how to run
  • -
  • input.txt - example input
  • &2 +# redirect stdout to 'out' (but show it to output via tee(1)) so that we can run +# the test suite of giljade. +./"$GILJADE" | tee out echo 1>&2 - -# redirect stdout to 'out' so that we can run the test suite of giljade -./"$GILJADE" > out +echo 1>&2 +# warn user that this will take a while +echo "This may take a while: please be patient:" 1>&2 # here we want to show only the lines matching the regexp '^Line' but write # everything to out.count for checking (after running it all) for errors and how # many versions were found. @@ -41,16 +43,17 @@ if [[ "$COUNT" != 180 ]]; then # if we failed to get exactly 180 versions there is a problem echo "FAIL: Expected 180 versions, got $COUNT" 1>&2 EXIT_CODE=1 -elif [[ "$(grep -c '[^-]error' out.count)" -ne 0 ]]; then - # we have to check for '[^-]error' because the CFLAGS contain '-Wno-error' - # which would be a false positive. - echo "FAIL: Error compiling one or more versions!" 1>&2 - echo "Try the following command to find out what problems occurred:" 1>&2 - echo 1>&2 - echo " grep -C10 -E '[^-]error' out.count" 1>&2 - echo 1>&2 - echo "and feel free to report or fix it and make a GitHub pull request." 1>&2 - EXIT_CODE=2 + if [[ "$(grep -c '[^-]error' out.count)" != 0 ]]; then + # we have to check for '[^-]error' because the CFLAGS contain '-Wno-error' + # which would be a false positive. + echo "FAIL: Error compiling one or more versions!" 1>&2 + echo "Try the following command to find out what problems occurred:" 1>&2 + echo 1>&2 + echo " grep -C 10 -E '[^-]error' out.count | less" 1>&2 + echo 1>&2 + echo "and feel free to report or fix it and then make a GitHub pull request." 1>&2 + EXIT_CODE=2 + fi else # all good: every version could be compiled echo "Found and successfully compiled all 180 versions!" 1>&2 @@ -58,10 +61,21 @@ else EXIT_CODE=0 fi -# delete temporary files but only if no failure - +# delete temporary files but only if no failure and the user doesn't want to +# look at them if [[ "$EXIT_CODE" = 0 ]]; then - rm -f out out.count + read -r -p "Do you wish to keep the 'out' and 'out.count' files (Y/N)? " + echo 1>&2 + if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + rm -vf out out.count + else + echo "Leaving 'out' and 'out.count' for you to look at. Remove them manually" 1>&2 + echo "when you wish to or run 'make clobber' to remove them automatically." 1>&2 + fi +else + echo "Leaving 'out' and 'out.count' for you to look at. Remove them manually" 1>&2 + echo "when you wish to or run 'make clobber' to remove them automatically." 1>&2 + echo 1>&2 fi # exit :-) diff --git a/2013/endoh3/.winner.json b/2013/endoh3/.winner.json index 94a4ee48d..d720607b3 100644 --- a/2013/endoh3/.winner.json +++ b/2013/endoh3/.winner.json @@ -65,6 +65,14 @@ "display_via_github" : true, "winners_text" : "sample input" }, + { + "file_path" : "try.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run" + }, { "file_path" : "twinkle.abc", "inventory_order" : 100, diff --git a/2013/endoh3/index.html b/2013/endoh3/index.html index c67a59648..6e26447b9 100644 --- a/2013/endoh3/index.html +++ b/2013/endoh3/index.html @@ -125,16 +125,27 @@ Location: JP

    endoh3 in bugs.md.

    To use:

    ./endoh3
    +

    This program plays sound. See FAQ 3.10 - +How do I compile and use an IOCCC winner that requires sound? if you +do not know how to set your system up for this or if you want to verify +that everything is oky.

    Try:

    -

    Trying this out will depend on how your system can play sounds. The -author’s remarks include some options for different operating -systems.

    -

    The simplest way is to create a .wav file and have your system play -that.

    -
    echo 'CDEFGABc' | ./endoh3 | ruby wavify.rb > cde.wav
    -

    Observe how you will need ruby installed.

    -

    There are also some other musical samples, twinkle.abc and -menuet.abc.

    +
    ./try.sh
    +
    +./try.sh ABC
    +
    +./try.sh test.abc yankee.abc
    +
    +./try.sh *.abc
    +

    The script will check for SoX first and next padsp from +PulseAudio and finally if neither are found if you have +ruby(1) installed it’ll use the included ruby script to +convert it to a WAV file for you to play.

    +

    If no args are passed to the script it will play twinkle.abc and the string ABC. +Otherwise while there’s a remaining arg if it’s a file it will run the +program on the file. If it’s not a file it’ll run it as a string.

    +

    The *.abc files are provided as music samples.

    Judges’ remarks:

    This program can toot out a tune that is small enough to posted to most social media platforms that have small message length limits.

    @@ -315,6 +326,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/menue href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/test.abc">test.abc - sample input
  • try.sh +- how to run
  • +
  • twinkle.abc - sample input
  • JP

    To build:

    make
    +

    If you wish to change the size (see the Author’s remarks below) you can do so with +the SIZE variable. For instance you can do:

    +
    make clobber SIZE=50,50 all
    +

    but you can also do this directly with the endoh4.sh script as described below.

    +

    Bugs and (Mis)features:

    +

    The current status of this entry is:

    +
    STATUS: INABIAF - please **DO NOT** fix
    +

    For more detailed information see 2013 +endoh4 in bugs.md.

    To use:

    -
    ./endoh4 < file
    -./run.sh file
    +
    ./endoh4 < file
    +./endoh4.sh file

    The second form is preferable as it will temporarily make the cursor -invisible as recommended by the author. If no file is specified in -run.sh command line it will feed to the program ./endoh4.sh command line it will feed to the program endoh4.c.

    Try:

    -
    ./run.sh cube.txt
    +
    ./endoh4.sh cube.txt

    Hit ctrl-c to end the program.

    The author recommends the use of xterm.

    For an example, if you are a football/soccer fan, try:

    -
    ./run.sh solids/archimedian-solid/a11-truncated-icosahedron.txt
    +
    ./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt
    +

    You can provide more than one file:

    +
    ./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt cube.txt
    +

    Hit ctrl-c/intr to go to the next file.

    +

    If you wish to change the size to 50,50 without passing +any arg:

    +
    SIZE=50,50 ./endoh4.sh
    +

    Not specifying a file feeds endoh4.c to the +program.

    Judges’ remarks:

    This program is formatted as the net for a tetrahedron (hint: try -feeding the program it’s own source code like ./run.sh). +feeding the program it’s own source code like ./endoh4.sh). When it runs there is an animation for the computation to work out the convex hull.

    Author’s remarks:

    @@ -164,23 +183,26 @@ triangulated)
  • (Note that this program does not use math.h.)

    Portability

    I think it conforms with both C89 and C99. I confirmed that it worked -on gcc, clang, and tcc. It should not be warned with +on gcc, clang, and tcc. It should not trigger warnings with -pedantic and -Wextra.

    Tips

    You may want to use tput to hide the terminal cursor.

    -
    tput civis
    -./endoh4 < cube.txt
    -tput cnorm
    +
    tput civis
    +./endoh4 < cube.txt
    +tput cnorm

    or

    -
    ./run.sh cube.txt
    +
    ./endoh4.sh cube.txt

    Bonuses

    You can change the screen size. Let the aspect ratio be about 3:1.

    -
    cc -DS=120,40 -o endoh4 endoh4.c
    +
    cc -DS=120,40 -o endoh4 endoh4.c

    The shape of this code is the geometric net of a regular tetrahedron. So, try:

    -
    ./endoh4 < endoh4.c # or ./run.sh
    +
    ./endoh4 < endoh4.c # or ./endoh4.sh

    The solids/ directory includes various solid data:

    diff --git a/2014/vik/.winner.json b/2014/vik/.winner.json index 22dd83383..87b5460f3 100644 --- a/2014/vik/.winner.json +++ b/2014/vik/.winner.json @@ -49,6 +49,14 @@ "display_via_github" : true, "winners_text" : "original source" }, + { + "file_path" : "try.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run" + }, { "file_path" : "2014_vik.tar.bz2", "inventory_order" : 300, diff --git a/2014/vik/index.html b/2014/vik/index.html index ce191a733..4ba9152b5 100644 --- a/2014/vik/index.html +++ b/2014/vik/index.html @@ -127,11 +127,11 @@ href="#alternate-code">Alternate code section below.

    For more detailed information see 2014 vik in bugs.md.

    To use:

    -
    ./prog > foo.c
    +
    echo foo | ./prog > audio_file.raw
    +
    +echo foo | ./prog | mplayer -demuxer rawaudio -

    Try:

    -
    echo 'Want to hear me beep?' | ./prog > audio_file.raw
    -
    -echo 'No. I want chocolate!' | ./prog | mplayer -demuxer rawaudio -
    +
    ./try.sh

    Alternate code:

    The alternate code, prog.alt.c, is based on the author’s instructions on how to get it to work with Windows.

    @@ -212,6 +212,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/prog.alt
  • prog.orig.c - original source
  • +
  • try.sh +- how to run
  • 2014_vik.tar.bz2 - download winning source
  • diff --git a/2015/burton/Makefile b/2015/burton/Makefile index fd1a7d517..c5d99259a 100644 --- a/2015/burton/Makefile +++ b/2015/burton/Makefile @@ -220,7 +220,7 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} - ${RM} -rf *.dSYM + ${RM} -rf *.dSYM calc ecalc @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ diff --git a/2018/anderson/.winner.json b/2018/anderson/.winner.json index 1af87cacb..955b732cc 100644 --- a/2018/anderson/.winner.json +++ b/2018/anderson/.winner.json @@ -49,6 +49,14 @@ "display_via_github" : true, "winners_text" : "original source" }, + { + "file_path" : "try.alt.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run alternate code" + }, { "file_path" : "try.sh", "inventory_order" : 100, diff --git a/2018/anderson/index.html b/2018/anderson/index.html index 28393ffcb..2c808bb65 100644 --- a/2018/anderson/index.html +++ b/2018/anderson/index.html @@ -135,13 +135,15 @@ like.

    make alt

    Alternate use:

    Use prog.alt as you would prog above.

    +

    Alternate try:

    +
    ./try.alt.sh

    Judges’ remarks:

    With this entry, you won’t need to turn your monitor upside down!

    Author’s remarks:

    Compiling the program:

    -
    cc -Wall -Wextra -Wpedantic -O3 -std=c11 prog.c -o prog
    +
    cc -Wall -Wextra -Wpedantic -O3 -std=c11 prog.c -o prog

    Also works with a standard of C99, but C90/C89 will not compile due to for loop initial declarations, along with additional warnings about variable length arrays and lack of a return @@ -203,6 +205,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/pro href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/prog.orig.c">prog.orig.c - original source

  • try.alt.sh +- how to run alternate code
  • +
  • try.sh - how to run
  • 2018_anderson.tar.bz2 - download diff --git a/2018/bellard/.winner.json b/2018/bellard/.winner.json index 3beb4d7c7..881461de0 100644 --- a/2018/bellard/.winner.json +++ b/2018/bellard/.winner.json @@ -57,6 +57,14 @@ "display_via_github" : false, "winners_text" : "sample image data" }, + { + "file_path" : "try.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run" + }, { "file_path" : "2018_bellard.tar.bz2", "inventory_order" : 300, diff --git a/2018/bellard/index.html b/2018/bellard/index.html index aa10e79f5..6152c2d62 100644 --- a/2018/bellard/index.html +++ b/2018/bellard/index.html @@ -124,17 +124,19 @@ href="#alternate-code">Alternate code below.

    To use:

    ./prog > lena.ppm

    Try:

    -
    eog lena.ppm # On Linux
    -open -a Preview lena.ppm # On macOS
    -
    -pngtopam < Lenna.png | pnmscale 0.25 | cjpeg -arithmetic -dct float -quality 14 > small.jpg
    -

    NOTE: pngtopam(1) (or pngtopnm(1) for older -versions) and pnmscale come from the netpbm project and -cjpeg(1) comes from libjpeg-turbo. If you -don’t have these tools already see FAQ 3.15 - -How do I compile and install netpbm for entries that require it? and -FAQ 3.16 - How do I compile and install -libjpeg-turbo for entries that require it?.

    +

    First open Lenna.png in your graphics viewer +of choice. Next, after running the above command +(./prog > lena.ppm), open lena.ppm in your +graphics viewer of choice. After that try:

    +
    ./try.sh
    +

    NOTE: the script uses the tools pngtopam(1) (or +pngtopnm(1) for older versions) and pnmscale +come from the netpbm project and cjpeg(1) comes from +libjpeg-turbo. If you don’t have these tools already see FAQ 3.15 - How do I compile and install netpbm for +entries that require it? and FAQ 3.16 - +How do I compile and install libjpeg-turbo for entries that require +it?.

    NOTE: Lenna.png is from https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png.

    @@ -222,6 +224,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard/prog href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard/prog.orig.c">prog.orig.c - original source
  • Lenna.png - sample image data
  • +
  • try.sh +- how to run
  • 2018_bellard.tar.bz2 - download winning source
  • diff --git a/2018/ciura/.winner.json b/2018/ciura/.winner.json index b0bce6552..0fbd63aeb 100644 --- a/2018/ciura/.winner.json +++ b/2018/ciura/.winner.json @@ -57,6 +57,14 @@ "display_via_github" : false, "winners_text" : "How to squeeze a lexicon paper" }, + { + "file_path" : "try.alt.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run alternate code" + }, { "file_path" : "try.sh", "inventory_order" : 100, diff --git a/2018/ciura/index.html b/2018/ciura/index.html index 2fb975d2c..640e8338c 100644 --- a/2018/ciura/index.html +++ b/2018/ciura/index.html @@ -124,8 +124,7 @@ href="#remarks">remarks section) below for more details.

    To use:

    ./prog < text

    Try:

    -
    ./prog < Makefile
    -./prog < README.md
    +
    ./try.sh

    Alternate code:

    An alternate version of this entry, prog.alt.c, is provided. As mentioned in the @@ -135,6 +134,10 @@ useful bug fix.

    make alt

    Alternate use:

    Use prog.alt as you would prog above.

    +

    Alternate try:

    +
    ./try.alt.sh
    +

    Do you spot the fix by running both try.sh and +try.alt.sh?

    Judges’ remarks:

    This text was processed by prog. You may get confused. We’re not really sure: prog.c wasn’t commented. Who @@ -398,6 +401,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ciura/prog.o

  • lexicon.pdf - How to squeeze a lexicon paper
  • try.alt.sh +- how to run alternate code
  • +
  • try.sh - how to run
  • 2018_ciura.tar.bz2 - download diff --git a/2018/ferguson/.winner.json b/2018/ferguson/.winner.json index 695d2bd7b..dfc344876 100644 --- a/2018/ferguson/.winner.json +++ b/2018/ferguson/.winner.json @@ -57,6 +57,38 @@ "display_via_github" : true, "winners_text" : "information about various files" }, + { + "file_path" : "id.alt.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run" + }, + { + "file_path" : "id.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run" + }, + { + "file_path" : "monkey-words.alt.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shell script", + "display_via_github" : true, + "winners_text" : "how to run" + }, + { + "file_path" : "monkey-words.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run" + }, { "file_path" : "rpm.html", "inventory_order" : 100, diff --git a/2018/ferguson/index.html b/2018/ferguson/index.html index 6b6b1768c..4b6ecb9b5 100644 --- a/2018/ferguson/index.html +++ b/2018/ferguson/index.html @@ -125,7 +125,22 @@ below.

    To use:

    ./weasel

    Try:

    -
    ./try.sh
    +
    ./try.sh
    +
    +# For those who believe in '"intelligent" design' or want to see how easy it is
    +# to prove evolution is a proven fact:
    +./id.sh
    +
    +# For those who want to see if Eric the monkey can type the word 'words' before
    +# falling asleep or giving up:
    +./monkey-words.sh
    +

    NOTE: the try.sh script will run the other two +scripts but if the first one, id.sh is terminated +early in the try script, the second one, monkey-words.sh will not be run.

    +

    You can reconfigure certain values. These are described by the author +in more detail in the S, M and N Constants +section. The script above will make use of some of these.

    Alternate code:

    This version has a simpler keyboard (fewer characters). The author wrote more about this under the keyboards @@ -137,7 +152,27 @@ section.

    Use weasel.alt as you would weasel above.

    Alternate try:

    -
    ./try.alt.sh
    +
    ./try.alt.sh
    +
    +# For those who believe in '"intelligent" design' or want to see how easy it is
    +# to prove evolution is a proven fact:
    +./id.alt.sh
    +
    +# For those who want to see if Eric the monkey can type the word 'words' before
    +# falling asleep or giving up:
    +./monkey-words.alt.sh
    +

    NOTE: the try.alt.sh script will run the +other two scripts but if the first one, id.alt.sh is terminated early in the try script, +the second one, monkey-words.alt.sh +will not be run.

    +

    You can reconfigure certain values. These are described by the author +in more detail in the S, M and N Constants +section. The script above will make use of some of these.

    +
    ./try.alt.sh
    +

    You can reconfigure certain values. These are described by the author +in more detail in the S, M and N Constants +section. The script above will make use of some of these.

    Judges’ remarks:

    Looking back over the strata of past IOCCC entries, this program marks a new mutation on our understanding of sequencing of code. In @@ -153,7 +188,7 @@ which us Homo sapiens hang from the phylogenetic tree of life.

    code era, while using more Cenozoic minded code migration, read rpm.md.

    If you find yourself in an evolutionary dead end, try:

    -
    man ./weasel.1
    +
    man ./weasel.1

    Author’s remarks:

    1. Preface
    2. @@ -182,7 +217,7 @@ people don’t like to read long texts. To resolve this I think the best way is referencing the judges’ remarks: if you want a quick rundown of the entry try what they suggest and view the man page (it explains all the options and describes the program briefly):

      -
      man ./weasel.man
      +
      man ./weasel.man

      If that isn’t sufficient I would recommend reading this section (and possibly the next) where I attempt to give a brief explanation of the sections to make reading it easier and @@ -215,10 +250,11 @@ after.

      techniques that might not be used.

      How to build: Here I describe briefly the constants that can be redefined -S and N: the maximum size of the chromosome -(target string; the maximum length is S - 1 but it must be ->= the default 38) and the number of offspring, respectively. I also -give example compiler invocations, S, M and N: the maximum size of +the chromosome (target string; the maximum length is S - 1 +but it must be >= the default 38), the number of maximum attempts +before giving up and the number of offspring, respectively. I also give +example compiler invocations, portability notes, an more portability notes and a note on rpm.md.

      On the subject of S and N: As the judges’ @@ -458,18 +494,18 @@ means you’ll need to quote the string if it has more than one word (that is it contains spaces) or anything else interpreted specially by your shell e.g. parentheses. For instance if you just want to find METHINKS you could do one of:

      -
      ./weasel METHINKS
      -./weasel "METHINKS"
      -./weasel 'METHINKS'
      -

      If you wanted YOU ARE A MONKEY:

      ./weasel "YOU ARE A MONKEY"
      -./weasel 'YOU ARE A MONKEY'
      -

      If you do one of:

      +class="sourceCode sh">./weasel METHINKS +./weasel "METHINKS" +./weasel 'METHINKS' +

      If you wanted YOU ARE A MONKEY:

      ./weasel "METHINKS IT IS A" "MONKEY"
      -./weasel METHINKS IT IS A MONKEY
      +class="sourceCode sh">./weasel "YOU ARE A MONKEY" +./weasel 'YOU ARE A MONKEY' +

      If you do one of:

      +
      ./weasel "METHINKS IT IS A" "MONKEY"
      +./weasel METHINKS IT IS A MONKEY


      It will search for MONKEY in both cases; in other words it’s the last one. If the string is too long given the value of @@ -479,14 +515,14 @@ truncated.

      If you actually do want to search for a string starting with a - you must disable further parsing of options by using the - option itself; for example if you were to do any of:

      -
      ./weasel -q- -- -test
      -./weasel -q- -test
      -./weasel -q -- -test
      +
      ./weasel -q- -- -test
      +./weasel -q- -test
      +./weasel -q -- -test

      The target string will be: -TEST. This means though that here:

      -
      ./weasel -q -- -test -r5
      +
      ./weasel -q -- -test -r5

      The string to be searched would actually be -r5 and the mutation rate will remain the default because after the - option is seen it will no longer parse additional options: only target @@ -497,8 +533,8 @@ three above are equivalent i.e. the following two are equivalent:

      -q --


      As for the caveat I referenced what does the following do?

      -
      ./weasel -qr 5
      +
      ./weasel -qr 5

      In fact it will set quiet output and set the target string to be ‘5’. So the mutation rate will be out of range, thus enabling that Easter egg, but it will likely come to an answer fairly quickly because it’s @@ -507,21 +543,21 @@ option; if the program is currently parsing argv[N], for example, and it encounters a -- then depending on where the other options are in the command line it might still parse the options. Thus you have:

      -
      $ ./weasel -qr-r5
      -quiet output
      -mutation rate out of range
      -target 'METHINKS IT IS LIKE A WEASEL'
      -mutation rate 5
      -Generation  440 Offspring 20: METHINKS IT IS LIKE A WEASEL
      +
      $ ./weasel -qr-r5
      +quiet output
      +mutation rate out of range
      +target 'METHINKS IT IS LIKE A WEASEL'
      +mutation rate 5
      +Generation  440 Offspring 20: METHINKS IT IS LIKE A WEASEL

      Similarly this would set quiet output, then an invalid mutation rate and then a mutation rate of 5:

      -
      ./weasel --qrr5
      -

      If you were instead to do one of (for example):

      ./weasel -q -- -r
      -./weasel -q -q- -r
      +class="sourceCode sh">./weasel --qrr5 +

      If you were instead to do one of (for example):

      +
      ./weasel -q -- -r
      +./weasel -q -q- -r

      Then it would set quiet output then see the -- (the - option itself) and then the target string would literally be set to -r because it no longer cares @@ -555,16 +591,16 @@ If yes how do we know if monkey mode was specially requested? There are at least two ways to go about it: I took the monkey safe (‘fool safe’) method; *if you explicitly request monkey mode you cannot disable it in the same invocation of weasel!

      -
      $ ./weasel -qr101r5r101r1r test
      -quiet output
      -mutation rate out of range
      -mutation rate out of range
      -mutation rate out of range
      -target 'test'
      -mutation rate 0
      -monkey at typewriter
      -Generation 16844        Offspring 22: TEST
      +
      $ ./weasel -qr101r5r101r1r test
      +quiet output
      +mutation rate out of range
      +mutation rate out of range
      +mutation rate out of range
      +target 'test'
      +mutation rate 0
      +monkey at typewriter
      +Generation 16844        Offspring 22: TEST

      So in this case I joined the options in the following order:

      1. -q

        @@ -601,27 +637,27 @@ for TEST).

      2. Given that it was a short string it did find the answer relatively quickly, even in monkey mode.

        Another example:

        -
        $ ./weasel -q -r101 test -r5
        -quiet output
        -mutation rate out of range
        -target 'test'
        -mutation rate 5
        -Generation  109 Offspring 13: TEST
        +
        $ ./weasel -q -r101 test -r5
        +quiet output
        +mutation rate out of range
        +target 'test'
        +mutation rate 5
        +Generation  109 Offspring 13: TEST

        In this case I also enabled quiet mode but I didn’t join the options; the -r101 reports that it’s out of range and sets monkey mode. I then specify the target string and then set a valid mutation rate. This disabled monkey mode which means that it’ll use the genetic algorithm.

        One more example of monkey mode:

        -
        $ ./weasel -q -mr101 test -r5
        -quiet output
        -mutation rate out of range
        -target 'test'
        -mutation rate 5
        -monkey at typewriter
        -Generation 465298       Offspring 10: TEST
        +
        $ ./weasel -q -mr101 test -r5
        +quiet output
        +mutation rate out of range
        +target 'test'
        +mutation rate 5
        +monkey at typewriter
        +Generation 465298       Offspring 10: TEST

        Here I also requested quiet output and then explicitly requested that Eric the monkey types. After this I set the mutation rate to be 101 which would have set monkey mode (in this case only @@ -715,13 +751,13 @@ read from the file and pass each string to the program itself. I’ve included a script test.sh and a file of sample input test-strings.txt that you can play with.

        Try:

        -
        make test
        +
        make test

        This will essentially make sure the program is compiled and then do:

        -
        chmod +x test.sh
        -./test.sh
        +
        chmod +x test.sh
        +./test.sh

        The script will first try compiling the program (if necessary) and if it fails for any reason it will exit; else it will read each line in the file test-strings.txt (if the file doesn’t exist or can’t @@ -732,8 +768,8 @@ until all the strings have been read and processed).

        You can pass additional options directly to the script but remember that it stops when there are no more strings in the file - so if you try:

        -
        ./test.sh -q test
        +
        ./test.sh -q test

        The final string test won’t be searched for; it will however run the program in all invocations with quiet output enabled. The following are some notes about how the shell and the program @@ -762,12 +798,12 @@ keyboard the program prints an error message and then exits (returning 1). But since the keyboard doesn’t have '\n' if you were to type a ' and send a '\n' before the closing ' you might see something like:

        -
        $ ./weasel '!!
        -> '
        -
        -'
        -' not in keyboard " !"#$<%:>&'()*+,-./0123456789;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~"
        +
        $ ./weasel '!!
        +> '
        +
        +'
        +' not in keyboard " !"#$<%:>&'()*+,-./0123456789;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~"

        I showed that ' is in the keyboard already; however the user sent a \n (hence the secondary prompt > on line two) before literally typing the closing @@ -793,9 +829,9 @@ read.

        (like S) as well as some C keywords.

      3. The way main() is declared is:

      -
      /* Special C main() handler (encapsulation): */
      -#define r(main) main
      -r(k main(k a, E **V)) {
      +
      /* Special C main() handler (encapsulation): */
      +#define r(main) main
      +r(k main(k a, E **V)) {
      It appears to be recursively defined but is it? And is it truly

      encapsulation? And is it executing code of any kind? It mightn’t seem like it isn’t encapsulation and also isn’t executing code but assuming @@ -852,18 +888,22 @@ wrong. Yes some of it might look like a blob but this is clearly false; or misleading it should be made clear in the comments! :)

      5. How to build

      -

      S and N +

      S, M and N Constants

      Skip to Compilation.

      -

      These two #defined constants can be redefined at -compilation to modify the behaviour of the program in a number of ways -(see the Compilation +

      There are three #defined constants that can be redefined +at compilation to modify the behaviour of the program in a number of +ways (see the Compilation subsection for example invocations). Both are capped to be no greater -than SIZE_MAX - 1. This is handled by the C -preprocessor.

      -

      S

      -

      This determines the maximum size of the target string but it -must be at least 38; this is because +than SIZE_MAX - 1 or whatever M (which can’t +be lower than 100) is set to (maximum attempts before giving up). This +is handled by the C preprocessor.

      +
        +
      • S
      • +
      +

      The macro S (or MAX_SIZE in the Makefile) +is the maximum size of the target string but it must be at least +38 (which is protected against in the code); this is because 38 >= 29 and because strlen("METHINKS IT IS LIKE A WEASEL") == 28 (which is the default target string - it would hardly be an implementation of the @@ -874,33 +914,58 @@ works and specifically an Easter egg I referenced there (it’s not the only Easter egg but it’s the only Easter egg I won’t spoil; yes this ironically and amusingly means I’ve left a rotten egg somewhere!).

      -

      N

      -

      This is the number of offspring per generation. Anything less than 4 -will be set to 3 (that’s not a typo!) and this is part of an Easter -egg.

      -

      Be aware that depending on the size of S and -N (individually and together) the program will use varying -amounts of memory and the larger the values the more memory it’ll -require.

      +

      The Makefile simplifies how to reconfigure this value with the +variable MAX_SIZE:

      +
      make clobber MAX_SIZE=55 all
      +

      The next macro that can be reconfigured, M (or +MAX_ATTEMPTS in the Makefile), is the maximum attempts +before giving up. This was added as another feature in 2024 but it was +not made an alt version because there already is an alt version. This +macro allows for seeing what happens when reaching the maximum number +attempts without waiting for a very long time.

      +

      The Makefile simplifies how to reconfigure this value with the +variable MAX_ATTEMPTS:

      +
      make clobber MAX_ATTEMPTS=100 all
      +

      The final macro, N (or OFFSPRING in the +Makefile), is the number of offspring per generation.

      +

      Anything less than 4 will be set to 3 (that’s not a typo!) and this +is part of an Easter egg.

      +

      Be aware that depending on the size of S +(MAX_SIZE) and N (OFFSPRING) both +individually and together the program will use varying amounts of memory +and the larger the values the more memory it’ll require.

      +

      The Makefile simplifies how to reconfigure this value with the +variable OFFSPRING:

      +
      make clobber OFFSPRING=55 all

      Compilation

      Skip to Portability.

      The following options must always be passed to the compiler:

      -
      -DQ='typedef' -D'g(o)'='goto o;' -D'w(x)'="x:" -D'H(main)'='r(main)'
      +
      -DQ='typedef' -D'g(o)'='goto o;' -D'w(x)'="x:" -D'H(main)'='r(main)'
      +

      which running make will always do.

      If you want to increase the number of offspring to 50 -and the size of the chromosome to 75 you would pass to the -compiler:

      -
      -DQ='typedef' -D'g(o)'='goto o;' -D'w(x)'="x:" -D'H(main)'='r(main)' -DN=50 -DS=75
      +(N) and the size of the chromosome to 75 +(S) you would do:

      +
      make clobber OFFSPRING=50 MAX_SIZE=75 everything

      If you wanted to change N to 3:

      -
      -DQ='typedef' -D'g(o)'='goto o;' -D'w(x)'="x:" -D'H(main)'='r(main)' -DN=3
      +
      make clobber OFFSPRING=3 everything

      Remember that it cannot be less than 3; more correctly if it’s less than 4 it’s redefined to 3 so you could have -passed in -DN=2 and have the same result. Remember too that -S cannot be less than 38. Both S -and N are capped at SIZE_MAX - 1.

      +passed in -DN=2 (or MAX_SIZE=2) and have the +same result. Remember too that S (MAX_SIZE) +cannot be less than 38. Both S and +N are capped at SIZE_MAX - 1 or whatever +M (MAX_ATTEMPTS) is set to.

      +

      If you wanted to change the maximum number attempts to 100 you could +do:

      +
      make clobber MAX_ATTEMPTS=100 everything

      Portability

      Skip to An aside on bugs.

      This entry requires at least C99 even if you translate digraphs. The @@ -911,48 +976,48 @@ some data type sizes will be smaller and this I believe includes issues (if any) either but I have no way to test this. Originally I tested it on the below systems.

      Fedora 26:

      -
      $ clang --version|head -n1
      -clang version 4.0.1 (tags/RELEASE_401/final)
      -$ gcc --version|head -n1
      -gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
      -$ /lib64/libc-2.25.so |head -n1|cut -d',' -f1-1
      -GNU C Library (GNU libc) stable release version 2.25
      -$ lscpu |grep Endian
      -Byte Order:          Little Endian
      +
      $ clang --version|head -n1
      +clang version 4.0.1 (tags/RELEASE_401/final)
      +$ gcc --version|head -n1
      +gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
      +$ /lib64/libc-2.25.so |head -n1|cut -d',' -f1-1
      +GNU C Library (GNU libc) stable release version 2.25
      +$ lscpu |grep Endian
      +Byte Order:          Little Endian

      CentOS Linux release 7.4.1708 (Core)

      -
      $ clang --version|head -n1
      -clang version 3.4.2 (tags/RELEASE_34/dot2-final)
      -$ gcc --version|head -n1
      -gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
      -$ /lib64/libc-2.17.so |head -n1 |cut -d, -f1-1
      -GNU C Library (GNU libc) stable release version 2.17
      -$ lscpu |grep Endian
      -Byte Order:            Little Endian
      +
      $ clang --version|head -n1
      +clang version 3.4.2 (tags/RELEASE_34/dot2-final)
      +$ gcc --version|head -n1
      +gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
      +$ /lib64/libc-2.17.so |head -n1 |cut -d, -f1-1
      +GNU C Library (GNU libc) stable release version 2.17
      +$ lscpu |grep Endian
      +Byte Order:            Little Endian

      Fedora 27:

      -
      $ clang --version|head -n1
      -clang version 5.0.1 (tags/RELEASE_501/final)
      -$ gcc --version|head -n1
      -gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
      -$ /lib64/libc-2.26.so |head -n1|cut -d, -f1-1
      -GNU C Library (GNU libc) stable release version 2.26
      -$ lscpu |grep Endian
      -Byte Order:          Little Endian
      +
      $ clang --version|head -n1
      +clang version 5.0.1 (tags/RELEASE_501/final)
      +$ gcc --version|head -n1
      +gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
      +$ /lib64/libc-2.26.so |head -n1|cut -d, -f1-1
      +GNU C Library (GNU libc) stable release version 2.26
      +$ lscpu |grep Endian
      +Byte Order:          Little Endian

      macOS:

      System Version: macOS 10.13.4 (17E199) Kernel Version: Darwin 17.5.0

      -
      $ gcc -v
      -Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
      -Apple LLVM version 9.1.0 (clang-902.0.39.1)
      -Target: x86_64-apple-darwin17.5.0
      -Thread model: posix
      -InstalledDir: /Library/Developer/CommandLineTools/usr/bin
      -$ uname -srmv
      -Darwin 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
      +
      $ gcc -v
      +Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
      +Apple LLVM version 9.1.0 (clang-902.0.39.1)
      +Target: x86_64-apple-darwin17.5.0
      +Thread model: posix
      +InstalledDir: /Library/Developer/CommandLineTools/usr/bin
      +$ uname -srmv
      +Darwin 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64

      An aside

      Skip to Installing.

      Any undocumented bugs are the result of insolent monkeys tampering @@ -1082,8 +1147,8 @@ we quickly added additional cryptic features and evolved into B, BCPL, and finally C. We stopped when we got a clean compile on the following syntax:

      -
      for(;P("\n"),R=;P("|"))for(e=C;e=P("_"+(*u++/
      -8)%2))P("|"+(*u/4)%2);
      +
      for(;P("\n"),R=;P("|"))for(e=C;e=P("_"+(*u++/
      +8)%2))P("|"+(*u/4)%2);

      “To think that modern programmers would try to use a language that allowed such a statement was beyond our comprehension! We actually @@ -1129,8 +1194,8 @@ since he was part of its creation I don’t think it’s a bad thing; on the contrary it makes all of us C programmers even more talented! :) I do wonder if he tested that bit of C code though:

      -
      for(;P("\n"),R=;P("|"))for(e=C;e=P("_"+(*u++/
      -8)%2))P("|"+(*u/4)%2);
      +
      for(;P("\n"),R=;P("|"))for(e=C;e=P("_"+(*u++/
      +8)%2))P("|"+(*u/4)%2);


      How is R=; valid? Since I don’t have the context maybe there is something I’m missing but either way it’s a funny piece. It @@ -1232,6 +1297,18 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/pro

    3. FILES - information about various files
    4. +
    5. id.alt.sh +- how to run
    6. +
    7. id.sh +- how to run
    8. +
    9. monkey-words.alt.sh +- how to run
    10. +
    11. monkey-words.sh +- how to run
    12. rpm.html - about forming the rpm
    13. test.sh diff --git a/2019/ciura/.winner.json b/2019/ciura/.winner.json index 9e4a79d4b..5556a8a52 100644 --- a/2019/ciura/.winner.json +++ b/2019/ciura/.winner.json @@ -137,6 +137,14 @@ "display_via_github" : true, "winners_text" : "run with English data" }, + { + "file_path" : "fr.alt.sh", + "inventory_order" : 150, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run alternative code in French" + }, { "file_path" : "fr.sh", "inventory_order" : 150, diff --git a/2019/ciura/index.html b/2019/ciura/index.html index 73ebf2076..1fdbc3fba 100644 --- a/2019/ciura/index.html +++ b/2019/ciura/index.html @@ -322,6 +322,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/de.sh" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/en.sh">en.sh - run with English data
    14. fr.alt.sh +- how to run alternative code in French
    15. +
    16. fr.sh - run with French data
    17. AU

      To use:

      ./prog infile.wav outfile.wav

      Try:

      -
      play MonodyVocals.wav
      -./prog MonodyVocals.wav
      -play out.wav
      -

      NOTE: play comes from SoX, the Swiss Army Knife of sound -processing programs. If you don’t have this installed, see FAQ 3.10: How do I compile and use an IOCCC -winner that requires sound.

      +
      ./try.sh
      +

      NOTE: play, which try.sh uses, +comes from SoX, the Swiss Army Knife of sound processing programs. If +you don’t have this installed, see FAQ 3.10: +How do I compile and use an IOCCC winner that requires sound.

      Judges’ remarks:

      Do you need to pretend enjoying a more spacious living environment than you actually are in, or the great outdoors with mountains and @@ -371,6 +369,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/giles/prog.o - original source

    18. BlockDiagram.png - reverb algorithm block-diagram of internal structure
    19. +
    20. try.sh +- how to run
    21. MonodyVocals.wav - Monody by TheFatRat featuring Laura Brehm
    22. 2019_giles.tar.bz2 - download diff --git a/2020/endoh3/.winner.json b/2020/endoh3/.winner.json index 8475a7928..bd82a5098 100644 --- a/2020/endoh3/.winner.json +++ b/2020/endoh3/.winner.json @@ -49,6 +49,14 @@ "display_via_github" : true, "winners_text" : "original source" }, + { + "file_path" : "run_clock.alt.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run alternate code" + }, { "file_path" : "run_clock.sh", "inventory_order" : 100, diff --git a/2020/endoh3/index.html b/2020/endoh3/index.html index 23fdede2a..213d54e32 100644 --- a/2020/endoh3/index.html +++ b/2020/endoh3/index.html @@ -133,6 +133,9 @@ Unicode letters.

      make alt

      Alternate use:

      Use prog.alt as you would prog above.

      +

      Alternate try:

      +
      ./run_clock.alt
      +# And watch closely for 15-20 seconds

      Judges’ remarks:

      You may be tempted to use a mirror. Resist the temptation! Try figuring out how the clock hands are drawn. Can you change the program @@ -142,7 +145,7 @@ second hand?

      your perception of time might depend on what time it is.

      Author’s remarks:

      Prepare a mirror!

      -
      make clock
      +
      make clock

      Note: You need to recompile it each run.

      @@ -172,6 +175,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/prog. href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/prog.orig.c">prog.orig.c - original source
    23. run_clock.alt.sh +- how to run alternate code
    24. +
    25. run_clock.sh - how to run
    26. 2020_endoh3.tar.bz2 - download diff --git a/2020/ferguson1/.winner.json b/2020/ferguson1/.winner.json index 6a24ab8ad..00efa90e8 100644 --- a/2020/ferguson1/.winner.json +++ b/2020/ferguson1/.winner.json @@ -97,14 +97,6 @@ "display_via_github" : true, "winners_text" : "script to reset - preset colors" }, - { - "file_path" : "ioccc-and-chocolate.pdf", - "inventory_order" : 150, - "OK_to_edit" : true, - "display_as" : "pdf", - "display_via_github" : false, - "winners_text" : "IOCCC publications" - }, { "file_path" : "prog.2.c", "inventory_order" : 150, diff --git a/2020/ferguson1/index.html b/2020/ferguson1/index.html index 6d58c2e67..168928a3c 100644 --- a/2020/ferguson1/index.html +++ b/2020/ferguson1/index.html @@ -752,8 +752,6 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/pl
    27. snake-colours.sh - script to reset - preset colors
    28. -
    29. ioccc-and-chocolate.pdf - -IOCCC publications
    30. prog.2.c - source with more digraphs
    31. diff --git a/2020/ferguson2/.winner.json b/2020/ferguson2/.winner.json index 5d8098cbc..da5de8083 100644 --- a/2020/ferguson2/.winner.json +++ b/2020/ferguson2/.winner.json @@ -105,14 +105,6 @@ "display_via_github" : true, "winners_text" : "Enigma simulator man page" }, - { - "file_path" : "ioccc-and-chocolate.pdf", - "inventory_order" : 150, - "OK_to_edit" : true, - "display_as" : "pdf", - "display_via_github" : false, - "winners_text" : "IOCCC publications" - }, { "file_path" : "key.txt", "inventory_order" : 150, diff --git a/2020/ferguson2/index.html b/2020/ferguson2/index.html index 882606634..5401afe4a 100644 --- a/2020/ferguson2/index.html +++ b/2020/ferguson2/index.html @@ -988,8 +988,6 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/tr
    32. enigma.1 - Enigma simulator man page
    33. -
    34. ioccc-and-chocolate.pdf - -IOCCC publications
    35. key.txt - key to decipher or encipher IOCCC
    36. diff --git a/2020/otterness/.winner.json b/2020/otterness/.winner.json index 2951322cf..856bd4dba 100644 --- a/2020/otterness/.winner.json +++ b/2020/otterness/.winner.json @@ -41,6 +41,14 @@ "display_via_github" : true, "winners_text" : "original source" }, + { + "file_path" : "try.sh", + "inventory_order" : 100, + "OK_to_edit" : true, + "display_as" : "shellscript", + "display_via_github" : true, + "winners_text" : "how to run" + }, { "file_path" : "cvikl.mid", "inventory_order" : 150, diff --git a/2020/otterness/index.html b/2020/otterness/index.html index c082f7ad4..07ebd4e7f 100644 --- a/2020/otterness/index.html +++ b/2020/otterness/index.html @@ -127,11 +127,9 @@ href="/bugs.md#2020-otterness">2020 otterness in bugs.md.

      To use:

      ./prog

      Try:

      -
      ./prog < cvikl.mid > output.mid
      -# Play output.mid with your favorite player
      -
      -./prog < entertainer.mid > output2.mid
      -# Play output2.mid with your favorite player
      +
      ./try.sh
      +

      Now play output.mid and output2.mid in an +audio player that can play MIDI files.

      Judges’ remarks:

      In an entry that boasts not using literals, one would expect to see straightforward ways to produce small integers like @@ -264,6 +262,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/otterness/Ma

    37. prog.orig.c - original source
    38. +
    39. try.sh +- how to run
    40. cvikl.mid - sample input sound
    41. entertainer.mid - sample input sound
    42. diff --git a/tmp/manifest.csv b/tmp/manifest.csv index 122034573..520a76e03 100644 --- a/tmp/manifest.csv +++ b/tmp/manifest.csv @@ -327,8 +327,6 @@ 1988,spinellis,Makefile,30,true,makefile,true,winner Makefile 1988,spinellis,spinellis.alt.c,40,true,c,true,alternative source 1988,spinellis,spinellis.orig.c,50,true,c,true,original source -1988,spinellis,try.alt.sh,100,true,shellscript,true,how to run alternative code -1988,spinellis,try.sh,100,true,shellscript,true,how to run 1988,spinellis,input2.txt,150,true,text,true,example input 1988,spinellis,input.txt,150,true,text,true,example input 1988,spinellis,1988_spinellis.tar.bz2,300,false,tbz2,false,download winning source @@ -3019,6 +3017,7 @@ 2013,endoh3,flea-waltz.abc,100,true,text,true,sample input 2013,endoh3,menuet.abc,100,true,text,true,sample input 2013,endoh3,test.abc,100,true,text,true,sample input +2013,endoh3,try.sh,100,true,shellscript,true,how to run 2013,endoh3,twinkle.abc,100,true,text,true,sample input 2013,endoh3,wavify.rb,100,true,ruby,true,post process output to form a WAV sound file 2013,endoh3,yankee.abc,100,true,text,true,sample input @@ -3032,7 +3031,7 @@ 2013,endoh4,Makefile,30,true,makefile,true,winner Makefile 2013,endoh4,endoh4.orig.c,50,false,c,true,original source 2013,endoh4,cube.txt,100,true,text,true,3D object coordinates -2013,endoh4,try.sh,100,true,shellscript,true,how to run +2013,endoh4,endoh4.sh,100,true,shellscript,true,how to run 2013,endoh4,solids/antiprism/a04-square-antiprism.txt,200,true,text,true,3D object coordinates 2013,endoh4,solids/antiprism/a05-pentagonal-antiprism.txt,200,true,text,true,3D object coordinates 2013,endoh4,solids/antiprism/a06-hexagonal-antiprism.txt,200,true,text,true,3D object coordinates @@ -3192,6 +3191,7 @@ 2013,hou,doc/example.html,100,false,html,false,detailed information about entry 2013,hou,old_default.scene,100,true,text,true,sample input 2013,hou,otherroom.scene,100,true,text,true,sample input +2013,hou,try.sh,100,true,shellscript,true,how to run 2013,hou,luna.jpg,150,true,image,false,sample image data 2013,hou,old_default.jpg,150,true,image,false,sample image data 2013,hou,otherroom.jpg,150,true,image,false,sample image data @@ -3229,6 +3229,7 @@ 2013,morgan1,morgan1.c,20,true,c,true,winning source 2013,morgan1,Makefile,30,true,makefile,true,winner Makefile 2013,morgan1,morgan1.orig.c,50,false,c,true,original source +2013,morgan1,try.sh,100,true,shelllscript,true,how to run 2013,morgan1,2013_morgan1.tar.bz2,300,false,tbz2,false,download winning source 2013,morgan1,README.md,4294967295,true,markdown,true,markdown source for index.html 2013,morgan1,.gitignore,4294967295,true,gitignore,true,list of files that should not be committed under git @@ -3381,6 +3382,7 @@ 2014,vik,Makefile,30,true,makefile,true,winner Makefile 2014,vik,prog.alt.c,40,true,c,true,alternative source 2014,vik,prog.orig.c,50,false,c,true,original source +2014,vik,try.sh,100,true,shellscript,true,how to run 2014,vik,2014_vik.tar.bz2,300,false,tbz2,false,download winning source 2014,vik,README.md,4294967295,true,markdown,true,markdown source for index.html 2014,vik,.gitignore,4294967295,true,gitignore,true,list of files that should not be committed under git @@ -3601,6 +3603,7 @@ 2018,anderson,Makefile,30,true,makefile,true,winner Makefile 2018,anderson,prog.alt.c,40,true,c,true,alternative source 2018,anderson,prog.orig.c,50,false,c,true,original source +2018,anderson,try.alt.sh,100,true,shellscript,true,how to run alternate code 2018,anderson,try.sh,100,true,shellscript,true,how to run 2018,anderson,2018_anderson.tar.bz2,300,false,tbz2,false,download winning source 2018,anderson,README.md,4294967295,true,markdown,true,markdown source for index.html @@ -3613,6 +3616,7 @@ 2018,bellard,prog.alt.c,40,true,c,true,alternative source 2018,bellard,prog.orig.c,50,false,c,true,original source 2018,bellard,Lenna.png,100,true,image,false,sample image data +2018,bellard,try.sh,100,true,shellscript,true,how to run 2018,bellard,2018_bellard.tar.bz2,300,false,tbz2,false,download winning source 2018,bellard,README.md,4294967295,true,markdown,true,markdown source for index.html 2018,bellard,fruits.bin,4294967295,true,binary,false,binary support file @@ -3700,6 +3704,7 @@ 2018,ciura,prog.alt.c,40,true,c,true,alternative source 2018,ciura,prog.orig.c,50,false,c,true,original source 2018,ciura,lexicon.pdf,100,true,pdf,false,How to squeeze a lexicon paper +2018,ciura,try.alt.sh,100,true,shellscript,true,how to run alternate code 2018,ciura,try.sh,100,true,shellscript,true,how to run 2018,ciura,2018_ciura.tar.bz2,300,false,tbz2,false,download winning source 2018,ciura,README.md,4294967295,true,markdown,true,markdown source for index.html @@ -3738,6 +3743,10 @@ 2018,ferguson,prog.alt.c,40,true,c,true,alternative source 2018,ferguson,prog.orig.c,50,false,c,true,original source 2018,ferguson,FILES,100,true,text,true,information about various files +2018,ferguson,id.alt.sh,100,true,shellscript,true,how to run +2018,ferguson,id.sh,100,true,shellscript,true,how to run +2018,ferguson,monkey-words.alt.sh,100,true,shell script,true,how to run +2018,ferguson,monkey-words.sh,100,true,shellscript,true,how to run 2018,ferguson,rpm.html,100,false,html,false,about forming the rpm 2018,ferguson,test.sh,100,true,shellscript,true,run the test suite 2018,ferguson,try.alt.sh,100,true,shellscript,true,how to run alternative code @@ -3873,6 +3882,7 @@ 2019,ciura,wrapprog.py,100,true,python,true,merge pangrams before passing them to prog 2019,ciura,de.sh,150,true,shellscript,true,run with German data 2019,ciura,en.sh,150,true,shellscript,true,run with English data +2019,ciura,fr.alt.sh,150,true,shellscript,true,how to run alternative code in French 2019,ciura,fr.sh,150,true,shellscript,true,run with French data 2019,ciura,it.sh,150,true,shellscript,true,run with Italian data 2019,ciura,pl.sh,150,true,shellscript,true,run with Polish data @@ -3956,6 +3966,7 @@ 2019,giles,Makefile,30,true,makefile,true,winner Makefile 2019,giles,prog.orig.c,50,false,c,true,original source 2019,giles,BlockDiagram.png,100,true,image,false,reverb algorithm block-diagram of internal structure +2019,giles,try.sh,100,true,shellscript,true,how to run 2019,giles,MonodyVocals.wav,150,true,wav,false,Monody by TheFatRat featuring Laura Brehm 2019,giles,2019_giles.tar.bz2,300,false,tbz2,false,download winning source 2019,giles,README.md,4294967295,true,markdown,true,markdown source for index.html @@ -4101,6 +4112,7 @@ 2020,endoh3,Makefile,30,true,makefile,true,winner Makefile 2020,endoh3,prog.alt.c,40,true,c,true,alternative source 2020,endoh3,prog.orig.c,50,false,c,true,original source +2020,endoh3,run_clock.alt.sh,100,true,shellscript,true,how to run alternate code 2020,endoh3,run_clock.sh,100,true,shellscript,true,how to run 2020,endoh3,2020_endoh3.tar.bz2,300,false,tbz2,false,download winning source 2020,endoh3,README.md,4294967295,true,markdown,true,markdown source for index.html @@ -4118,7 +4130,6 @@ 2020,ferguson1,crazy.log.html,100,false,html,false,about some screen dumps 2020,ferguson1,play.sh,100,true,shellscript,true,how to run 2020,ferguson1,snake-colours.sh,100,true,shellscript,true,script to reset - preset colors -2020,ferguson1,ioccc-and-chocolate.pdf,150,true,pdf,false,IOCCC publications 2020,ferguson1,prog.2.c,150,true,c,true,source with more digraphs 2020,ferguson1,prog.3.c,150,true,c,true,source with a more artistic layout 2020,ferguson1,prog.3-j.c,150,true,c,true,source with artistic layout and shorter j macro @@ -4154,7 +4165,6 @@ 2020,ferguson2,try.sh,100,true,shellscript,true,how to run 2020,ferguson2,try.this.txt,100,true,text,true,sample input 2020,ferguson2,enigma.1,150,true,man,true,Enigma simulator man page -2020,ferguson2,ioccc-and-chocolate.pdf,150,true,pdf,false,IOCCC publications 2020,ferguson2,key.txt,150,true,text,true,key to decipher or encipher IOCCC 2020,ferguson2,obfuscation.key,150,true,text,true,key to decipher or encipher obfuscation.txt 2020,ferguson2,recode.1,150,true,man,true,configuration tool man page @@ -4238,6 +4248,7 @@ 2020,otterness,prog.c,20,true,c,true,winning source 2020,otterness,Makefile,30,true,makefile,true,winner Makefile 2020,otterness,prog.orig.c,50,false,c,true,original source +2020,otterness,try.sh,100,true,shellscript,true,how to run 2020,otterness,cvikl.mid,150,true,midi,false,sample input sound 2020,otterness,entertainer.mid,159,true,midi,false,sample input sound 2020,otterness,2020_otterness.tar.bz2,300,false,tbz2,false,download winning source diff --git a/tmp/manifest.numbers b/tmp/manifest.numbers index 81fea8f83..2f8308cf7 100644 Binary files a/tmp/manifest.numbers and b/tmp/manifest.numbers differ diff --git a/tmp/path_list.found.txt b/tmp/path_list.found.txt index a8dfb3d36..3f18627a5 100644 --- a/tmp/path_list.found.txt +++ b/tmp/path_list.found.txt @@ -299,8 +299,6 @@ 1988/spinellis/spinellis.alt.c 1988/spinellis/spinellis.c 1988/spinellis/spinellis.orig.c -1988/spinellis/try.alt.sh -1988/spinellis/try.sh 1988/westley/.gitignore 1988/westley/.path 1988/westley/.winner.json @@ -2764,6 +2762,7 @@ 2013/endoh3/index.html 2013/endoh3/menuet.abc 2013/endoh3/test.abc +2013/endoh3/try.sh 2013/endoh3/twinkle.abc 2013/endoh3/wavify.rb 2013/endoh3/yankee.abc @@ -2775,6 +2774,7 @@ 2013/endoh4/cube.txt 2013/endoh4/endoh4.c 2013/endoh4/endoh4.orig.c +2013/endoh4/endoh4.sh 2013/endoh4/index.html 2013/endoh4/solids/antiprism/a04-square-antiprism.txt 2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt @@ -2923,7 +2923,6 @@ 2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt 2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt 2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt -2013/endoh4/try.sh 2013/hou/.gitignore 2013/hou/.path 2013/hou/.winner.json @@ -2941,6 +2940,7 @@ 2013/hou/old_default.scene 2013/hou/otherroom.jpg 2013/hou/otherroom.scene +2013/hou/try.sh 2013/mills/.gitignore 2013/mills/.path 2013/mills/.winner.json @@ -2968,6 +2968,7 @@ 2013/morgan1/index.html 2013/morgan1/morgan1.c 2013/morgan1/morgan1.orig.c +2013/morgan1/try.sh 2013/morgan2/.gitignore 2013/morgan2/.path 2013/morgan2/.winner.json @@ -3106,6 +3107,7 @@ 2014/vik/prog.alt.c 2014/vik/prog.c 2014/vik/prog.orig.c +2014/vik/try.sh 2014/wiedijk/.gitignore 2014/wiedijk/.path 2014/wiedijk/.winner.json @@ -3307,6 +3309,7 @@ 2018/anderson/prog.alt.c 2018/anderson/prog.c 2018/anderson/prog.orig.c +2018/anderson/try.alt.sh 2018/anderson/try.sh 2018/bellard/.gitignore 2018/bellard/.path @@ -3320,6 +3323,7 @@ 2018/bellard/prog.alt.c 2018/bellard/prog.c 2018/bellard/prog.orig.c +2018/bellard/try.sh 2018/bellard/vintage_cars.bin 2018/burton1/.gitignore 2018/burton1/.path @@ -3401,6 +3405,7 @@ 2018/ciura/prog.alt.c 2018/ciura/prog.c 2018/ciura/prog.orig.c +2018/ciura/try.alt.sh 2018/ciura/try.sh 2018/endoh1/.gitignore 2018/endoh1/.path @@ -3433,7 +3438,11 @@ 2018/ferguson/Makefile 2018/ferguson/README.md 2018/ferguson/hint.css +2018/ferguson/id.alt.sh +2018/ferguson/id.sh 2018/ferguson/index.html +2018/ferguson/monkey-words.alt.sh +2018/ferguson/monkey-words.sh 2018/ferguson/prog.alt.c 2018/ferguson/prog.c 2018/ferguson/prog.orig.c @@ -3551,6 +3560,7 @@ 2019/ciura/en.alt.sh 2019/ciura/en.sh 2019/ciura/fasc5c.pdf +2019/ciura/fr.alt.sh 2019/ciura/fr.sh 2019/ciura/getwords.sh 2019/ciura/index.html @@ -3639,6 +3649,7 @@ 2019/giles/index.html 2019/giles/prog.c 2019/giles/prog.orig.c +2019/giles/try.sh 2019/karns/.gitignore 2019/karns/.path 2019/karns/.winner.json @@ -3773,6 +3784,7 @@ 2020/endoh3/prog.alt.c 2020/endoh3/prog.c 2020/endoh3/prog.orig.c +2020/endoh3/run_clock.alt.sh 2020/endoh3/run_clock.sh 2020/ferguson1/.gitignore 2020/ferguson1/.path @@ -3789,7 +3801,6 @@ 2020/ferguson1/gameplay.md 2020/ferguson1/halfwidth_vs_fullwidth.png 2020/ferguson1/index.html -2020/ferguson1/ioccc-and-chocolate.pdf 2020/ferguson1/ioccc-cake.jpg 2020/ferguson1/play.sh 2020/ferguson1/prog.2.c @@ -3814,7 +3825,6 @@ 2020/ferguson2/enigma.1 2020/ferguson2/index.html 2020/ferguson2/input.txt -2020/ferguson2/ioccc-and-chocolate.pdf 2020/ferguson2/ioccc-cake.jpg 2020/ferguson2/key.txt 2020/ferguson2/obfuscation.key @@ -3900,6 +3910,7 @@ 2020/otterness/index.html 2020/otterness/prog.c 2020/otterness/prog.orig.c +2020/otterness/try.sh 2020/tsoj/.gitignore 2020/tsoj/.path 2020/tsoj/.winner.json diff --git a/tmp/path_list.manifest.txt b/tmp/path_list.manifest.txt index e10921265..624132cbb 100644 --- a/tmp/path_list.manifest.txt +++ b/tmp/path_list.manifest.txt @@ -333,8 +333,6 @@ 1988/spinellis/spinellis.alt.c 1988/spinellis/spinellis.c 1988/spinellis/spinellis.orig.c -1988/spinellis/try.alt.sh -1988/spinellis/try.sh 1988/westley/.gitignore 1988/westley/.path 1988/westley/.winner.json @@ -3023,6 +3021,7 @@ 2013/endoh3/index.html 2013/endoh3/menuet.abc 2013/endoh3/test.abc +2013/endoh3/try.sh 2013/endoh3/twinkle.abc 2013/endoh3/wavify.rb 2013/endoh3/yankee.abc @@ -3035,6 +3034,7 @@ 2013/endoh4/cube.txt 2013/endoh4/endoh4.c 2013/endoh4/endoh4.orig.c +2013/endoh4/endoh4.sh 2013/endoh4/index.html 2013/endoh4/solids/antiprism/a04-square-antiprism.txt 2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt @@ -3183,7 +3183,6 @@ 2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt 2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt 2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt -2013/endoh4/try.sh 2013/hou/.gitignore 2013/hou/.path 2013/hou/.winner.json @@ -3203,6 +3202,7 @@ 2013/hou/old_default.scene 2013/hou/otherroom.jpg 2013/hou/otherroom.scene +2013/hou/try.sh 2013/mills/.gitignore 2013/mills/.path 2013/mills/.winner.json @@ -3233,6 +3233,7 @@ 2013/morgan1/index.html 2013/morgan1/morgan1.c 2013/morgan1/morgan1.orig.c +2013/morgan1/try.sh 2013/morgan2/.gitignore 2013/morgan2/.path 2013/morgan2/.winner.json @@ -3385,6 +3386,7 @@ 2014/vik/prog.alt.c 2014/vik/prog.c 2014/vik/prog.orig.c +2014/vik/try.sh 2014/wiedijk/.gitignore 2014/wiedijk/.path 2014/wiedijk/.winner.json @@ -3605,6 +3607,7 @@ 2018/anderson/prog.alt.c 2018/anderson/prog.c 2018/anderson/prog.orig.c +2018/anderson/try.alt.sh 2018/anderson/try.sh 2018/bellard/.gitignore 2018/bellard/.path @@ -3619,6 +3622,7 @@ 2018/bellard/prog.alt.c 2018/bellard/prog.c 2018/bellard/prog.orig.c +2018/bellard/try.sh 2018/bellard/vintage_cars.bin 2018/burton1/.gitignore 2018/burton1/.path @@ -3704,6 +3708,7 @@ 2018/ciura/prog.alt.c 2018/ciura/prog.c 2018/ciura/prog.orig.c +2018/ciura/try.alt.sh 2018/ciura/try.sh 2018/endoh1/.gitignore 2018/endoh1/.path @@ -3739,7 +3744,11 @@ 2018/ferguson/Makefile 2018/ferguson/README.md 2018/ferguson/hint.css +2018/ferguson/id.alt.sh +2018/ferguson/id.sh 2018/ferguson/index.html +2018/ferguson/monkey-words.alt.sh +2018/ferguson/monkey-words.sh 2018/ferguson/prog.alt.c 2018/ferguson/prog.c 2018/ferguson/prog.orig.c @@ -3867,6 +3876,7 @@ 2019/ciura/en.alt.sh 2019/ciura/en.sh 2019/ciura/fasc5c.pdf +2019/ciura/fr.alt.sh 2019/ciura/fr.sh 2019/ciura/getwords.sh 2019/ciura/index.html @@ -3961,6 +3971,7 @@ 2019/giles/index.html 2019/giles/prog.c 2019/giles/prog.orig.c +2019/giles/try.sh 2019/karns/.gitignore 2019/karns/.path 2019/karns/.winner.json @@ -4105,6 +4116,7 @@ 2020/endoh3/prog.alt.c 2020/endoh3/prog.c 2020/endoh3/prog.orig.c +2020/endoh3/run_clock.alt.sh 2020/endoh3/run_clock.sh 2020/ferguson1/.gitignore 2020/ferguson1/.path @@ -4126,7 +4138,6 @@ 2020/ferguson1/gameplay.md 2020/ferguson1/halfwidth_vs_fullwidth.png 2020/ferguson1/index.html -2020/ferguson1/ioccc-and-chocolate.pdf 2020/ferguson1/ioccc-cake.jpg 2020/ferguson1/play.sh 2020/ferguson1/prog.2.c @@ -4152,7 +4163,6 @@ 2020/ferguson2/enigma.1 2020/ferguson2/index.html 2020/ferguson2/input.txt -2020/ferguson2/ioccc-and-chocolate.pdf 2020/ferguson2/ioccc-cake.jpg 2020/ferguson2/key.txt 2020/ferguson2/obfuscation.key @@ -4244,6 +4254,7 @@ 2020/otterness/index.html 2020/otterness/prog.c 2020/otterness/prog.orig.c +2020/otterness/try.sh 2020/tsoj/.gitignore 2020/tsoj/.path 2020/tsoj/.winner.json diff --git a/tmp/path_list.required.txt b/tmp/path_list.required.txt index f4f8a107a..460450a78 100644 --- a/tmp/path_list.required.txt +++ b/tmp/path_list.required.txt @@ -233,8 +233,6 @@ 1988/spinellis/spinellis.alt.c 1988/spinellis/spinellis.c 1988/spinellis/spinellis.orig.c -1988/spinellis/try.alt.sh -1988/spinellis/try.sh 1988/westley/.gitignore 1988/westley/.winner.json 1988/westley/Makefile @@ -2274,6 +2272,7 @@ 2013/endoh3/flea-waltz.abc 2013/endoh3/menuet.abc 2013/endoh3/test.abc +2013/endoh3/try.sh 2013/endoh3/twinkle.abc 2013/endoh3/wavify.rb 2013/endoh3/yankee.abc @@ -2284,6 +2283,7 @@ 2013/endoh4/cube.txt 2013/endoh4/endoh4.c 2013/endoh4/endoh4.orig.c +2013/endoh4/endoh4.sh 2013/endoh4/solids/antiprism/a04-square-antiprism.txt 2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt 2013/endoh4/solids/antiprism/a06-hexagonal-antiprism.txt @@ -2431,7 +2431,6 @@ 2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt 2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt 2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt -2013/endoh4/try.sh 2013/hou/.gitignore 2013/hou/.winner.json 2013/hou/Makefile @@ -2447,6 +2446,7 @@ 2013/hou/old_default.scene 2013/hou/otherroom.jpg 2013/hou/otherroom.scene +2013/hou/try.sh 2013/mills/.gitignore 2013/mills/.winner.json 2013/mills/Makefile @@ -2468,6 +2468,7 @@ 2013/morgan1/README.md 2013/morgan1/morgan1.c 2013/morgan1/morgan1.orig.c +2013/morgan1/try.sh 2013/morgan2/.gitignore 2013/morgan2/.winner.json 2013/morgan2/Makefile @@ -2582,6 +2583,7 @@ 2014/vik/prog.alt.c 2014/vik/prog.c 2014/vik/prog.orig.c +2014/vik/try.sh 2014/wiedijk/.gitignore 2014/wiedijk/.winner.json 2014/wiedijk/Makefile @@ -2749,6 +2751,7 @@ 2018/anderson/prog.alt.c 2018/anderson/prog.c 2018/anderson/prog.orig.c +2018/anderson/try.alt.sh 2018/anderson/try.sh 2018/bellard/.gitignore 2018/bellard/.winner.json @@ -2760,6 +2763,7 @@ 2018/bellard/prog.alt.c 2018/bellard/prog.c 2018/bellard/prog.orig.c +2018/bellard/try.sh 2018/bellard/vintage_cars.bin 2018/burton1/.gitignore 2018/burton1/.winner.json @@ -2835,6 +2839,7 @@ 2018/ciura/prog.alt.c 2018/ciura/prog.c 2018/ciura/prog.orig.c +2018/ciura/try.alt.sh 2018/ciura/try.sh 2018/endoh1/.gitignore 2018/endoh1/.winner.json @@ -2862,6 +2867,10 @@ 2018/ferguson/Makefile 2018/ferguson/README.md 2018/ferguson/hint.css +2018/ferguson/id.alt.sh +2018/ferguson/id.sh +2018/ferguson/monkey-words.alt.sh +2018/ferguson/monkey-words.sh 2018/ferguson/prog.alt.c 2018/ferguson/prog.c 2018/ferguson/prog.orig.c @@ -2962,6 +2971,7 @@ 2019/ciura/en.alt.sh 2019/ciura/en.sh 2019/ciura/fasc5c.pdf +2019/ciura/fr.alt.sh 2019/ciura/fr.sh 2019/ciura/getwords.sh 2019/ciura/it.alt.sh @@ -3037,6 +3047,7 @@ 2019/giles/README.md 2019/giles/prog.c 2019/giles/prog.orig.c +2019/giles/try.sh 2019/karns/.gitignore 2019/karns/.winner.json 2019/karns/Makefile @@ -3151,6 +3162,7 @@ 2020/endoh3/prog.alt.c 2020/endoh3/prog.c 2020/endoh3/prog.orig.c +2020/endoh3/run_clock.alt.sh 2020/endoh3/run_clock.sh 2020/ferguson1/.gitignore 2020/ferguson1/.winner.json @@ -3165,7 +3177,6 @@ 2020/ferguson1/crazy.log.md 2020/ferguson1/gameplay.md 2020/ferguson1/halfwidth_vs_fullwidth.png -2020/ferguson1/ioccc-and-chocolate.pdf 2020/ferguson1/ioccc-cake.jpg 2020/ferguson1/play.sh 2020/ferguson1/prog.2.c @@ -3188,7 +3199,6 @@ 2020/ferguson2/chocolate-cake.md 2020/ferguson2/enigma.1 2020/ferguson2/input.txt -2020/ferguson2/ioccc-and-chocolate.pdf 2020/ferguson2/ioccc-cake.jpg 2020/ferguson2/key.txt 2020/ferguson2/obfuscation.key @@ -3262,6 +3272,7 @@ 2020/otterness/entertainer.mid 2020/otterness/prog.c 2020/otterness/prog.orig.c +2020/otterness/try.sh 2020/tsoj/.gitignore 2020/tsoj/.winner.json 2020/tsoj/Makefile diff --git a/tmp/update-manifest.sh b/tmp/update-manifest.sh new file mode 100755 index 000000000..face10c26 --- /dev/null +++ b/tmp/update-manifest.sh @@ -0,0 +1,354 @@ +#!/usr/bin/env bash +# +# update-manifest.sh - interactive script to update the IOCCC manifest step by +# step post manifest.csv export +# + +export UPDATE_MANIFEST_VERSION="0.0.1-1 2024-28-01" # format: major.minor.patch-release YYYY-DD-MM +NAME="$(basename "$0")"; export NAME + +export V_FLAG=0 +export A_FLAG= +# default -v 3 for other tools +export CAP_D_FLAG=3 +export TOPDIR=".." +GIT="$(type -P git)" +export GIT + +# usage +# +export USAGE="usage: $0 [-h] [-v level] [-D] [-g git] [-a] + + -h print help message and exit + -v level set verbosity level (def level: $V_FLAG) + -D level set verbosity level (via -v level) in tool: (def level: $CAP_D_FLAG) + + -t topdir path to top of the local GitHub repo tree (def: $TOPDIR) + + -a automatically run git add an git commit commands (when prompted) + + +Exit codes: + 0 all OK + 2 -h and help string printed or -V and version string printed + 3 command line error + 4 user told us there is a problem + 5 a tool exited non-zero + +$NAME version: $UPDATE_MANIFEST_VERSION" + +# parse command line +# +while getopts :hv:D:t:g:a flag; do + case "$flag" in + h) echo "$USAGE" + exit 2 + ;; + v) V_FLAG="$OPTARG" + ;; + D) CAP_D_FLAG="$OPTARG" + ;; + t) TOPDIR="$OPTARG" + ;; + g) GIT="$OPTARG" + ;; + a) A_FLAG="-a" + ;; + \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 + echo 1>&2 + echo "$USAGE" 1>&2 + exit 3 + ;; + :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 + echo 1>&2 + echo "$USAGE" 1>&2 + exit 3 + ;; + *) echo "$0: ERROR: unexpected value from getopts: $flag" 1>&2 + echo 1>&2 + echo "$USAGE" 1>&2 + exit 3 + ;; + esac +done + +# print running info if verbose +# +if [[ $V_FLAG -ge 3 ]]; then + echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2 + echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 +fi + +# first determine if git is executable +if [[ -z "$GIT" || ! -f "$GIT" || ! -x "$GIT" ]]; then + echo "$0: ERROR: git not an executable file: $GIT" 1>&2 + exit 3 +fi + +# check that topdir is a directory and a git repo +# + +# first verify $TOPDIR is not empty and that it's a directory +if [[ -z "$TOPDIR" ]]; then + echo "$0: ERROR: topdir is empty: $TOPDIR" 1>&2 + exit 3 +fi +if [[ ! -d "$TOPDIR" ]]; then + echo "$0: ERROR: topdir not a directory: $TOPDIR" 1>&2 + exit 3 +fi + +# now cd to directory +# +if ! cd "$TOPDIR"; then + echo "$0: could not cd to topdir: $TOPDIR" 1>&2 + exit 3 +fi + +# I have found problems using git rev-parse to verify that we're in a git repo +# so use git status instead. Plus we need the user to see git status anyway. +"$GIT" status 1>&2 +status="$?" +if [[ "$status" -ne 0 ]]; then + echo "$USAGE" 1>&2 + echo 1>&2 + echo "$(basename "$0"): ERROR: ${PWD} is not a git repository" 1>&2 + exit 3 +fi + +read -r -p "Do you have a clean state from git status (Y/N)? " +if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "$0: exiting 4 due to user telling us there's a problem." 1>&2 + exit 4 +fi + +# now cd to the tmp directory +# +if ! cd tmp; then + echo "$0: could not cd to tmp subdirectory of topdir: $TOPDIR" + exit 3 +fi + +# now check that manifest.csv is a regular readable file +# +if [[ ! -f manifest.csv || ! -r manifest.csv ]]; then + echo "$0: manifest.csv does not exist or not a regular readable file" 1>&2 + exit 3 +fi + +# now ask user if they sorted the manifest.numbers AND exported it to the CSV +# file +echo "We will now try and update the manifest files. Are you sure that you updated" 1>&2 +read -r -p "AND sorted the manifest.numbers spreadsheet AND exported to manifest.csv (Y/N)? " +if [[ "$REPLY" != "y" && "$REPLY" != "Y" ]]; then + echo "$0: exiting 4 due to user not updating manifest files before running this tool" 1>&2 + exit 4 +fi + +# run ./fix_csv.sh first +# +if [[ "$V_FLAG" -gt 0 ]]; then + echo "$0: debug[1]: about to run: ./fix_csv.sh -v $CAP_D_FLAG" 1>&2 +fi +if ! ./fix_csv.sh -v "$CAP_D_FLAG" ; then + echo "$0: fix_csv.sh failed, try updating manifest.csv and try again." 1>&2 + exit 5 +fi + +# run ./gen_path_list.found.sh +# +if [[ "$V_FLAG" -gt 0 ]]; then + echo "$0: debug[1]: about to run: ./gen_path_list.found.sh -v $CAP_D_FLAG" 1>&2 +fi +if ! ./gen_path_list.found.sh -v "$CAP_D_FLAG" ; then + echo "$0: gen_path_list.found.sh failed, try updating manifest.csv and try again." 1>&2 + exit 5 +fi + +# now run git diff path_list.found.txt +# +read -r -n 1 -p "Press any key to run: $GIT diff path_list.found.txt: " +echo 1>&2 +"$GIT" diff path_list.found.txt + +read -r -p "Does everything look okay (Y/N)? " +if [[ "$REPLY" != "y" && "$REPLY" != "Y" ]]; then + echo "$0: exiting 4 due to user telling us there's a problem." 1>&2 + exit 4 +fi + +# run ./check_path_list.sh +# +echo "$0: now will run: ./check_path_list.sh -v $CAP_D_FLAG" 1>&2 +if ! ./check_path_list.sh -v "$CAP_D_FLAG"; then + echo "$0: ./check_path_list.sh failed, try updating manifest.csv and try again." 1>&2 + exit 5 +fi + +echo "$0: now will run: $GIT archive HEAD manifest.numbers | tar -tvf - manifest.numbers" 1>&2 +"$GIT" archive HEAD manifest.numbers | tar -tvf - manifest.numbers +read -r -p "Does everything look okay (Y/N)? " +if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "$0: exiting 4 due to user telling us there's a problem." 1>&2 + exit 4 +fi + +if [[ -n "$A_FLAG" ]]; then + echo "Do you wish to automatically run the commands:" 1>&2 + echo " $GIT add -u" 1>&2 + echo " $GIT status" 1>&2 + echo " $GIT commit -m'update manifest as per recent file changes'" 1>&2 + + read -r -p "Enter your choice (Y/N): " + if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "Now you should run the following commands in another terminal," 1>&2 + echo "making sure you're on the appropriate branch:" + echo 1>&2 + echo " git add -u" 1>&2 + echo " git status" 1>&2 + echo " git commit -m'update manifest as per recent file changes'" 1>&2 + echo 1>&2 + read -r -n 1 -p "Press any key when this is done: " + echo 1>&2 + else + "$GIT" add -u + "$GIT" status + "$GIT" commit -m'update manifest as per recent file changes' + fi +else + # user did not use -a, don't prompt: make them run commands in another + # terminal first. + echo "Now you should run the following commands in another terminal," 1>&2 + echo "making sure you're on the appropriate branch:" + echo 1>&2 + echo " git add -u" 1>&2 + echo " git status" 1>&2 + echo " git commit -m'update manifest as per recent file changes'" 1>&2 + echo 1>&2 + read -r -n 1 -p "Press any key when this is done: " + echo 1>&2 +fi + +echo 1>&2 +echo "now will run ./run_all.sh -v $CAP_D_FLAG ./gen_winner_json.sh" 1>&2 +echo "NOTE: this step will take a while." 1>&2 +if ! ./run_all.sh -v "$CAP_D_FLAG" ./gen_winner_json.sh; then + echo "$0: problem with ./run_all.sh, fix manifest and try again." 1>&2 + exit 5 +fi + +read -r -n 1 -p "Press any key to run: $GIT diff: " +echo 1>&2 +"$GIT" diff +read -r -p "Does everything look okay (Y/N)? " +if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "$0: exiting 4 due to user telling us there's a problem." 1>&2 + exit 4 +fi + +if [[ -n "$A_FLAG" ]]; then + echo "Do you wish to automatically run the commands:" 1>&2 + echo " $GIT add -u" 1>&2 + echo " $GIT status" 1>&2 + echo " $GIT commit -m'update .winner.json files per recent manifest changes'" 1>&2 + + read -r -p "Enter your choice (Y/N): " + if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "Now you should run the following commands in another terminal," 1>&2 + echo "making sure you're on the appropriate branch:" + echo 1>&2 + echo " $GIT add -u" 1>&2 + echo " $GIT status" 1>&2 + echo " $GIT commit -m'update .winner.json files per recent manifest changes'" 1>&2 + echo 1>&2 + read -r -n 1 -p "Press any key when this is done: " + echo 1>&2 + else + "$GIT" add -u + "$GIT" status + "$GIT" commit -m'update .winner.json files per recent manifest changes' + fi +else + echo "Now you should run the following commands in another terminal," 1>&2 + echo "making sure you're on the appropriate branch:" + echo 1>&2 + echo " $GIT add -u" 1>&2 + echo " $GIT status" 1>&2 + echo " $GIT commit -m'update .winner.json files per recent manifest changes'" 1>&2 + echo 1>&2 + read -r -n 1 -p "Press any key when this is done: " + echo 1>&2 +fi + +# now cd to top level directory +cd .. + +read -r -n 1 -p "Press any key to continue: " +echo 1>&2 + +echo "Will now update index.html files." 1>&2 +read -r -p "Do you wish to use quick-readme2index.sh (Y/N)? " +if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "$0: now will run: bin/all-run.sh -v $CAP_D_FLAG bin/readme2index.sh -v $CAP_D_FLAG" 1>&2 + if ! bin/all-run.sh -v "$CAP_D_FLAG" bin/readme2index.sh -v "$CAP_D_FLAG"; then + echo "$0: problem running bin/all-run bin/readme2index.sh, fix and try again." 1>&2 + exit 5 + fi +else + echo "$0: now will run: bin/all-run.sh -v $CAP_D_FLAG bin/quick-readme2index.sh -v $CAP_D_FLAG" + echo "NOTE: this will take a while." 1>&2 + if ! bin/all-run.sh -v "$CAP_D_FLAG" bin/quick-readme2index.sh -v "$CAP_D_FLAG"; then + echo "$0: problem running bin/all-run bin bin/quick-readme2index.sh, fix and try again." 1>&2 + exit 5 + fi +fi + + +read -r -n 1 -p "Press any key to run: $GIT diff: " +echo 1>&2 +"$GIT" diff + +read -r -p "Does everything look okay (Y/N)? " +if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "$0: exiting 4 due to user telling us there's a problem." 1>&2 + exit 4 +fi + +if [[ -n "$A_FLAG" ]]; then + echo "Do you wish to automatically run the commands:" 1>&2 + echo " git add -u" 1>&2 + echo " git status" 1>&2 + echo " git commit -m'update index.html and .winner.json per recent manifest changes'" 1>&2 + read -r -p "Enter your choice (Y/N): " + if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "Now you should run the following commands in another terminal," 1>&2 + echo "making sure you're on the appropriate branch:" + echo 1>&2 + echo " git add -u" 1>&2 + echo " git status" 1>&2 + echo " git commit -m'update index.html and .winner.json per recent manifest changes'" 1>&2 + echo 1>&2 + read -r -n 1 -p "Press any key when this is done: " + echo 1>&2 + else + "$GIT" add -u + "$GIT" status + "$GIT" commit -m'update index.html and .winner.json per recent manifest changes' + fi +else + echo "Now you should run the following commands in another terminal," 1>&2 + echo "making sure you're on the appropriate branch:" + echo 1>&2 + echo " git add -u" 1>&2 + echo " git status" 1>&2 + echo " git commit -m'update index.html and .winner.json per recent manifest changes'" 1>&2 + echo 1>&2 + read -r -n 1 -p "Press any key when this is done: " + echo 1>&2 +fi + +echo 1>&2 +echo 1>&2 + +echo "All done. Make sure to push the commits and open a GitHub pull request." 1>&2 +exit 0