diff --git a/2020/burton/try.sh b/2020/burton/try.sh index 6941e7b40..0ed1b3f2b 100755 --- a/2020/burton/try.sh +++ b/2020/burton/try.sh @@ -70,6 +70,7 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./prog 128 128 128 128: " echo 1>&2 ./prog 128 128 128 128 +echo 1>&2 echo "Why did that print strange output?" echo 1>&2 diff --git a/2020/endoh2/try.sh b/2020/endoh2/try.sh index 792637626..5cc9e5008 100755 --- a/2020/endoh2/try.sh +++ b/2020/endoh2/try.sh @@ -24,7 +24,6 @@ read -r -n 1 -p "Press any key to show hello.txt: " echo 1>&2 cat hello.txt echo 1>&2 - read -r -n 1 -p "Press any key to run: ./prog hello.txt: " echo 1>&2 ./prog hello.txt @@ -34,7 +33,6 @@ read -r -n 1 -p "Press any key to show yoda.txt: " echo 1>&2 cat yoda.txt echo 1>&2 - read -r -n 1 -p "Press any key to run: ./prog yoda.txt: " echo 1>&2 ./prog yoda.txt diff --git a/2020/giles/try.sh b/2020/giles/try.sh index 1c5e15ddb..0c7bdabd4 100755 --- a/2020/giles/try.sh +++ b/2020/giles/try.sh @@ -23,27 +23,29 @@ if [[ -z "$PLAY" ]]; then if [[ -z "$PLAY" ]]; then echo "Note: cannot find play(1) or aplay(1). Will not play sounds for you. Try installing" 1>&2 - echo "SoX. See FAQ 3.10: How do I compile and use an IOCCC winner that requires sound?" 1>&2 + echo "SoX. You will have to play the WAV output manually, sorry." 1>&2 echo 1>&2 - echo "You will have to play the WAV output manually, sorry." 1>&2 + echo "Tip: see https://github.com/ioccc-src/temp-test-ioccc/blob/master/faq.md#sox." 1>&2 echo 1>&2 fi fi -read -r -n 1 -p "Press any key to convert pi.wav to its digits: " +read -r -n 1 -p "Press any key to convert pi.wav to its digits (./prog < pi.wav): " echo 1>&2 -echo "$ ./prog < pi.wav" 1>&2 ./prog < pi.wav if [[ -n "$PLAY" ]]; then read -r -n 1 -p "Press any key to play pi.wav with $PLAY: " echo 1>&2 - echo "$ $PLAY pi.wav" 1>&2 "$PLAY" pi.wav +else + echo "Please play pi.wav in an audio player that can play WAV files." 1>&2 + echo 1>&2 + echo "Tip: see https://github.com/ioccc-src/temp-test-ioccc/blob/master/faq.md#sox." 1>&2 + echo 1>&2 fi -read -r -n 1 -p "Press any key convert 867-5309: " +read -r -n 1 -p "Press any key convert 867-5309 (./prog 867-5309 > jenny.wav): " echo 1>&2 -echo "$ ./prog 867-5309 > jenny.wav" 1>&2 ./prog 867-5309 > jenny.wav if [[ -n "$PLAY" ]]; then read -r -n 1 -p "Press any key to play jenny.wav with $PLAY: " @@ -51,18 +53,20 @@ if [[ -n "$PLAY" ]]; then echo "$ $PLAY jenny.wav" 1>&2 "$PLAY" jenny.wav echo 1>&2 - read -r -n 1 -p "Press any key to play 10666-28 ('IOCCC-28'): " + read -r -n 1 -p "Press any key to play 10666-28 ('IOCCC-28') (./prog 10666-28 | $PLAY -): " echo 1>&2 - echo "$ ./prog 10666-28 | $PLAY -" ./prog 10666-28 | "$PLAY" - else echo 1>&2 - echo "Now try playing jenny.wav with an audio player that can play WAV files." + echo "Please play jenny.wav with an audio player that can play WAV files." + echo 1>&2 + echo "Tip: see https://github.com/ioccc-src/temp-test-ioccc/blob/master/faq.md#sox." 1>&2 echo 1>&2 read -r -n 1 -p "Press any key to convert 10666-28 ('IOCCC-28'): " echo 1>&2 echo "$ ./prog 10666-28 > ioccc28.wav" ./prog 10666-28 > ioccc28.wav echo 1>&2 - echo "Now try playing ioccc28.wav with an audio player that can play WAV files." + echo "Please play ioccc28.wav with an audio player that can play WAV files." 1>&2 + echo 1>&2 fi diff --git a/2020/yang/Makefile b/2020/yang/Makefile index 95d95d9e0..312d1b030 100644 --- a/2020/yang/Makefile +++ b/2020/yang/Makefile @@ -208,7 +208,7 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} - ${RM} -rf *.dSYM + ${RM} -rf *.dSYM decoded code.c encoded.c @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ diff --git a/2020/yang/try.sh b/2020/yang/try.sh index 92f16c1f2..225d26c37 100755 --- a/2020/yang/try.sh +++ b/2020/yang/try.sh @@ -15,6 +15,9 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear +# remove code we generate and compile +rm -f decoded code.c encoded.c + # we will use hexdump later if it's installed HEXDUMP="$(type -P hexdump)" @@ -31,57 +34,62 @@ echo 1>&2 read -r -n 1 -p "Press any key to show code.c (space = next page, q = quit): " echo 1>&2 -less -rEXF code.c +less -rEXFK code.c echo 1>&2 # compile without a PIN -echo "Trying to compile without a PIN:" +read -r -n 1 -p "Press any key to compile without a PIN ($CC code.c -o decode): " echo 1>&2 -echo "$ cc code.c -o decode" 1>&2 -cc code.c -o decode +"$CC" code.c -o decode echo 1>&2 echo "As you can see, you must compile with -DPIN=" 1>&2 +# if hexdump is installed we will use hexdump on the wrong code compiled if [[ -n "$HEXDUMP" ]]; then - # compile with the wrong pin if hexdump is installed echo 1>&2 - echo "Compiling with wrong PIN: cc -DPIN=555 code.c -o wrongcoded" 1>&2 - cc -DPIN=555 code.c -o wrongcoded # wait for it ... - read -r -n 1 -p "Press any key to run wrongcoded: " + echo "Press any key to compile with wrong PIN 555 ($CC -DPIN=555 code.c -o wrongcoded): " 1>&2 + "$CC" -DPIN=555 code.c -o wrongcoded # wait for it ... + read -r -n 1 -p "Press any key to run ./wrongcoded | $HEXDUMP -C: " echo 1>&2 ./wrongcoded | "$HEXDUMP" -C +else + echo 1>&2 + echo "Press any key to compile with wrong PIN 555 ($CC -DPIN=555 code.c -o wrongcoded): " 1>&2 + "$CC" -DPIN=555 code.c -o wrongcoded # wait for it ... + read -r -n 1 -p "Press any key to run ./wrongcoded: " + echo 1>&2 + ./wrongcoded fi -read -r -n 1 -p "Press any key to compile with a good PIN: " echo 1>&2 # compile with a PIN -echo "$ cc -DPIN=23209 code.c -o decoded" 1>&2 -cc -DPIN=23209 code.c -o decoded +read -r -n 1 -p "Press any key to compile with good PIN 23209 ($CC -DPIN=23209 code.c -o decoded): " +echo 1>&2 +"$CC" -DPIN=23209 code.c -o decoded read -r -n 1 -p "Press any key to run: ./decoded: " echo 1>&2 ./decoded -read -r -n 1 -p "Press any key to continue: " echo 1>&2 -echo "$ echo \"Hello, world!\" | ./prog 56789 > encoded.c" 1>&2 +read -r -n 1 -p "Press any key to run: echo \"Hello, world!\" | ./prog 56789 > encoded.c: " +echo 1>&2 echo "Hello, world!" | ./prog 56789 > encoded.c echo 1>&2 read -r -n 1 -p "Press any key to show encoded.c (space = next page, q = quit): " echo 1>&2 -less -rEXF encoded.c +less -rEXFK encoded.c echo 1>&2 -read -r -n 1 -p "Press any key to compile with PIN 56789: " +read -r -n 1 -p "Press any key to compile with good PIN 56789 ($CC -DPIN=56789 encoded.c -o decoded): " echo 1>&2 -echo "$ cc -DPIN=56789 encoded.c -o decoded" 1>&2 -cc -DPIN=56789 encoded.c -o decoded +"$CC" -DPIN=56789 encoded.c -o decoded echo 1>&2 -read -r -n 1 -p "Press any key to run decoded: " +read -r -n 1 -p "Press any key to run ./decoded: " echo 1>&2 -echo "$ ./decoded" 1>&2 ./decoded +echo 1>&2 rm -f decoded code.c encoded.c diff --git a/tmp/things-todo.md b/tmp/things-todo.md index 9cbf0bc2c..2f69f8fff 100644 --- a/tmp/things-todo.md +++ b/tmp/things-todo.md @@ -1,5 +1,5 @@ # A todo list of known things to check and/or do -*Last updated: Wed 31 Jan 2024 12:22:09 UTC* +*Last updated: Thu 01 Feb 2024 16:10:23 UTC* This document is for [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) as he (that is I :-) ) wanted a way to keep track of things in a way that did not @@ -36,13 +36,10 @@ embedded into the README.md files themselves. An entry that the video file is downloaded already is 2006/sykes1. There are others that I need to look at once the rest of the entries are done, assuming that it's possible. -- Verify that all entries that should have (or could be benefited by) a try -script do in fact have one. Also verify (mostly in earlier years) consistency in -the way it is displayed and interactivity. The later years are probably done -better. As of *Wed 31 Jan 2024 12:22:09 UTC* almost all of this is done: just -some of 2018 and then all of 2019 and 2020 have to be checked. It is very likely -that before the day is over 2018 will be done and possibly part of 2019 will be -done but this is currently unknown. The shellcheck updates is another issue -entirely. +- Verify that all entries that have a try or try.alt script actually refer to it +in the README.md try and alternate try sections. - Test and fix as and if necessary 2018/ferguson/weasel.spec. + +- Update formatting in 2020/ferguson[12]/chocolate-cake.md specifically with +bold versus bold and italic in important points.