Improve 2005/aidan try scripts

This commit is contained in:
Cody Boone Ferguson committed 2024-01-21 09:09:48 -08:00
1 parent 38ed2dcd45
commit 3fdcf5cb2c
3 files changed
+45 -41

No files matched your search

+15 -16
View File
@@ -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
+22 -18
View File
@@ -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
+8 -7
View File
@@ -3161,16 +3161,17 @@ just to make it a bit easier to compile.
## <a name="2005_aidan"></a>[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.