Improve 2005/aidan try scripts
This commit is contained in:
1 parent
38ed2dcd45
commit
3fdcf5cb2c
3 files changed
+45
-41
No files matched your search
+15
-16
@@ -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 "from the aidan.c." 1>&2
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
read -r -n 1 -p "Press any key to run: ./$AIDAN < blank.sudoku (space = next page, q = quit): "
|
||||||
echo "$ ./$AIDAN < blank.sudoku" 1>&2
|
echo 1>&2
|
||||||
./"$AIDAN" < blank.sudoku
|
./"$AIDAN" < blank.sudoku | less -rEXF
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
read -r -n 1 -p "Press any key to run: echo IOCCC | ./$AIDAN (space = next page, q = quit): "
|
||||||
|
echo IOCCC | ./"$AIDAN" | less -rEXF
|
||||||
|
|
||||||
echo "$ echo IOCCC | ./$AIDAN" 1>&2
|
|
||||||
echo IOCCC | ./"$AIDAN"
|
|
||||||
echo "What just happened?" 1>&2
|
echo "What just happened?" 1>&2
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|
||||||
echo "$ 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): "
|
||||||
read -r -n 1 -p "Press any key to continue (q = exit pager space = go down a page): "
|
echo IOCCC | ./"$AIDAN" 42 1>&2 | less -rEXF
|
||||||
echo IOCCC | ./"$AIDAN" 42 1>&2
|
echo 1>&2
|
||||||
echo "Seeing that, was the 'echo IOCCC' relevant?" 1>&2
|
echo "Seeing that, was the 'echo IOCCC' relevant?" 1>&2
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
echo 1>&2
|
||||||
echo "$ ./$AIDAN < insane1.sudoku" 1>&2
|
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
read -r -n 1 -p "Press any key to run: ./$AIDAN < insane1.sudoku (space = next page, q = quit): "
|
||||||
./"$AIDAN" < insane1.sudoku
|
echo 1>&2
|
||||||
echo "Did you notice how much slower this is than aidan? If not try try.sh!" 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
|
echo 1>&2
|
||||||
+22
-18
@@ -18,37 +18,41 @@ clear
|
|||||||
AIDAN="aidan"
|
AIDAN="aidan"
|
||||||
|
|
||||||
echo "$ ./$AIDAN < blank.sudoku" 1>&2
|
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 1>&2
|
||||||
|
|
||||||
echo "$ ./$AIDAN U < blank.sudoku" 1>&2
|
read -r -n 1 -p "Press any key to run: ./$AIDAN U < blank.sudoku (space = next page, q = quit): "
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
echo 1>&2
|
||||||
./"$AIDAN" U < blank.sudoku
|
./"$AIDAN" U < blank.sudoku | less -rEXF
|
||||||
|
echo 1>&2
|
||||||
echo "What was the difference between the previous command?" 1>&2
|
echo "What was the difference between the previous command?" 1>&2
|
||||||
echo "More specifically, what did it do?" 1>&2
|
echo "More specifically, what did it do?" 1>&2
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
read -r -n 1 -p "Press any key to run: echo IOCCC | ./$AIDAN (space = next page, q = quit): "
|
||||||
echo "$ echo IOCCC | ./$AIDAN" 1>&2
|
echo 1>&2
|
||||||
echo IOCCC | ./"$AIDAN"
|
echo IOCCC | ./"$AIDAN" | less -rEXF
|
||||||
|
echo 1>&2
|
||||||
echo "What just happened?" 1>&2
|
echo "What just happened?" 1>&2
|
||||||
echo 1>&2
|
echo 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): "
|
read -r -n 1 -p "Press any key to run: echo IOCCC | ./$AIDAN 42 (space = next page, q = quit): "
|
||||||
echo IOCCC | ./"$AIDAN" 42 | less -r
|
echo 1>&2
|
||||||
|
echo IOCCC | ./"$AIDAN" 42 | less -rEXF
|
||||||
|
echo 1>&2
|
||||||
echo "Seeing that, was the 'echo IOCCC' relevant?" 1>&2
|
echo "Seeing that, was the 'echo IOCCC' relevant?" 1>&2
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|
||||||
echo "$ ./$AIDAN < insane1.sudoku" 1>&2
|
read -r -n 1 -p "Press any key to run: ./$AIDAN < insane1.sudoku (space = next page, q = quit): "
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
./"$AIDAN" < insane1.sudoku | less -rEXF
|
||||||
./"$AIDAN" < insane1.sudoku
|
|
||||||
|
|
||||||
read -r -n 1 -p "Do you with to run the test suite (y/n)? "
|
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 1>&2
|
||||||
echo "$ make test" 1>&2
|
read -r -n 1 -p "Press any key to run: make test (space = next page, q = quit): "
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
echo 1>&2
|
||||||
make test
|
make test | less -rEXF
|
||||||
fi
|
fi
|
||||||
+8
-7
@@ -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]))
|
## <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
|
[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
|
to the proper compiled program (it's hardcoded). This had never been done and so
|
||||||
broke the script.
|
the script did not even work (at least modernly?).
|
||||||
|
|
||||||
He also added the [alt code](/2005/aidan/README.md#alternate-code) based on the
|
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
|
author's remarks which is a different approach than the one used and which
|
||||||
slower (particularly in worst-case or nearly so scenarios), inelegant, and not a
|
(according to the author) 'is slower (particularly in worst-case or nearly so
|
||||||
good starting place for sudoku generation.'
|
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)
|
Cody added the [try.sh](/2005/aidan/try.sh) and
|
||||||
correspond to the entry and alt code respectively.
|
[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
|
Cody added the `make test` and `make test-n0` rules for easier use of the test
|
||||||
suite.
|
suite.
|
||||||
|
|||||||
Reference in new issue
Block a user