diff --git a/2005/aidan/try.alt.sh b/2005/aidan/try.alt.sh index 2fd1e79d0..8867fe4a8 100755 --- a/2005/aidan/try.alt.sh +++ b/2005/aidan/try.alt.sh @@ -21,27 +21,26 @@ echo "When looking at the output, notice how some of the output is different" 1> echo "from the aidan.c." 1>&2 echo 1>&2 -read -r -n 1 -p "Press any key to continue: " -echo "$ ./$AIDAN < blank.sudoku" 1>&2 -./"$AIDAN" < blank.sudoku +read -r -n 1 -p "Press any key to run: ./$AIDAN < blank.sudoku (space = next page, q = quit): " +echo 1>&2 +./"$AIDAN" < blank.sudoku | less -rEXF echo 1>&2 -read -r -n 1 -p "Press any key to continue: " - - -echo "$ echo IOCCC | ./$AIDAN" 1>&2 -echo IOCCC | ./"$AIDAN" +read -r -n 1 -p "Press any key to run: echo IOCCC | ./$AIDAN (space = next page, q = quit): " +echo IOCCC | ./"$AIDAN" | less -rEXF echo "What just happened?" 1>&2 echo 1>&2 -echo "$ echo IOCCC | ./$AIDAN 42" 1>&2 -read -r -n 1 -p "Press any key to continue (q = exit pager space = go down a page): " -echo IOCCC | ./"$AIDAN" 42 1>&2 +read -r -n 1 -p "Press any key to run: echo IOCCC | ./$AIDAN 42 (space = next page, q = quit): " +echo IOCCC | ./"$AIDAN" 42 1>&2 | less -rEXF +echo 1>&2 echo "Seeing that, was the 'echo IOCCC' relevant?" 1>&2 echo 1>&2 - -echo "$ ./$AIDAN < insane1.sudoku" 1>&2 -read -r -n 1 -p "Press any key to continue: " -./"$AIDAN" < insane1.sudoku -echo "Did you notice how much slower this is than aidan? If not try try.sh!" 1>&2 +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./$AIDAN < insane1.sudoku (space = next page, q = quit): " +echo 1>&2 +./"$AIDAN" < insane1.sudoku +echo 1>&2 +echo "Did you notice how much slower this is than aidan.c? If not try try.sh!" 1>&2 echo 1>&2 diff --git a/2005/aidan/try.sh b/2005/aidan/try.sh index 6c930e728..098a96e19 100755 --- a/2005/aidan/try.sh +++ b/2005/aidan/try.sh @@ -18,37 +18,41 @@ clear AIDAN="aidan" echo "$ ./$AIDAN < blank.sudoku" 1>&2 -./"$AIDAN" < blank.sudoku +read -r -n 1 -p "Press any key to run: ./$AIDAN < blank.sudoku (space = next page, q = quit): " +echo 1>&2 +./"$AIDAN" < blank.sudoku | less -rEXF echo 1>&2 -echo "$ ./$AIDAN U < blank.sudoku" 1>&2 -read -r -n 1 -p "Press any key to continue: " -./"$AIDAN" U < blank.sudoku +read -r -n 1 -p "Press any key to run: ./$AIDAN U < blank.sudoku (space = next page, q = quit): " +echo 1>&2 +./"$AIDAN" U < blank.sudoku | less -rEXF +echo 1>&2 echo "What was the difference between the previous command?" 1>&2 echo "More specifically, what did it do?" 1>&2 echo 1>&2 -read -r -n 1 -p "Press any key to continue: " -echo "$ echo IOCCC | ./$AIDAN" 1>&2 -echo IOCCC | ./"$AIDAN" +read -r -n 1 -p "Press any key to run: echo IOCCC | ./$AIDAN (space = next page, q = quit): " +echo 1>&2 +echo IOCCC | ./"$AIDAN" | less -rEXF +echo 1>&2 echo "What just happened?" 1>&2 echo 1>&2 - echo 1>&2 -echo "$ echo IOCCC | ./$AIDAN 42 | less -r" 1>&2 -read -r -n 1 -p "Press any key to continue (q = exit pager space = go down a page): " -echo IOCCC | ./"$AIDAN" 42 | less -r + +read -r -n 1 -p "Press any key to run: echo IOCCC | ./$AIDAN 42 (space = next page, q = quit): " +echo 1>&2 +echo IOCCC | ./"$AIDAN" 42 | less -rEXF +echo 1>&2 echo "Seeing that, was the 'echo IOCCC' relevant?" 1>&2 echo 1>&2 -echo "$ ./$AIDAN < insane1.sudoku" 1>&2 -read -r -n 1 -p "Press any key to continue: " -./"$AIDAN" < insane1.sudoku +read -r -n 1 -p "Press any key to run: ./$AIDAN < insane1.sudoku (space = next page, q = quit): " +./"$AIDAN" < insane1.sudoku | less -rEXF read -r -n 1 -p "Do you with to run the test suite (y/n)? " -if [[ "$REPLY" = "y" ]]; then +if [[ "$REPLY" = "y" || "$REPLY" = "Y" ]]; then echo 1>&2 - echo "$ make test" 1>&2 - read -r -n 1 -p "Press any key to continue: " - make test + read -r -n 1 -p "Press any key to run: make test (space = next page, q = quit): " + echo 1>&2 + make test | less -rEXF fi diff --git a/thanks-for-help.md b/thanks-for-help.md index bbcfeba61..b3ef61296 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -3161,16 +3161,17 @@ just to make it a bit easier to compile. ## [2005/aidan](/2005/aidan/aidan.c) ([README.md](/2005/aidan/README.md])) [Cody](#cody) fixed the test script, described by the author in their remarks, to refer -to the proper compiled program (it's hardcoded). This had never been done and it -broke the script. +to the proper compiled program (it's hardcoded). This had never been done and so +the script did not even work (at least modernly?). He also added the [alt code](/2005/aidan/README.md#alternate-code) based on the -author's remarks which is a different approach than the one used and which 'is -slower (particularly in worst-case or nearly so scenarios), inelegant, and not a -good starting place for sudoku generation.' +author's remarks which is a different approach than the one used and which +(according to the author) 'is slower (particularly in worst-case or nearly so +scenarios), inelegant, and not a good starting place for sudoku generation.' -The [try.sh](/2005/aidan/try.sh) and [try.alt.sh](/2005/aidan/try.alt.sh) -correspond to the entry and alt code respectively. +Cody added the [try.sh](/2005/aidan/try.sh) and +[try.alt.sh](/2005/aidan/try.alt.sh) scripts that correspond to the entry and +alt code respectively. Cody added the `make test` and `make test-n0` rules for easier use of the test suite.