diff --git a/1996/august/README.md b/1996/august/README.md index 47f445022..a6e942036 100644 --- a/1996/august/README.md +++ b/1996/august/README.md @@ -41,7 +41,7 @@ The above should print a `!` followed by a newline. ## Judges' remarks: This entry can feed on itself. If you C pre-process the source, -you compile the interpreter: +you can compile the interpreter: ```sh make august.oc diff --git a/1996/august/try.sh b/1996/august/try.sh index ca8898933..88da98b73 100755 --- a/1996/august/try.sh +++ b/1996/august/try.sh @@ -15,26 +15,71 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -set -x +read -r -n 1 -p "Press any key to run: cat august.c test.oc | ./august > test.oo: " +echo 1>&2 cat august.c test.oc | ./august > test.oo +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./august < test.oo: " +echo 1>&2 ./august < test.oo +echo 1>&2 + +read -r -n 1 -p "Press any key to run: cat august.c fac.oc | ./august > fac.oo: " +echo 1>&2 cat august.c fac.oc | ./august > fac.oo +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./august < fac.oo: " +echo 1>&2 ./august < fac.oo +echo 1>&2 +read -r -n 1 -p "Press any key to run: cat august.c fac.oc | ./august | ./august: " +echo 1>&2 cat august.c fac.oc | ./august | ./august +echo 1>&2 +read -r -n 1 -p "Press any key to run: cat august.c parse.oc | ./august > parse.oo: " +echo 1>&2 cat august.c parse.oc | ./august > parse.oo -cat parse.oo fac.oc | ./august | ./august +echo 1>&2 -rm august.oc -make august.oc +read -r -n 1 -p "Press any key to run: cat parse.oo fac.oc | ./august | ./august: " +echo 1>&2 +cat parse.oo fac.oc | ./august | ./august +echo 1>&2 + +read -r -n 1 -p "Press any key to run: rm august.oc; make august.oc: " +echo 1>&2 +rm august.oc; make august.oc +echo 1>&2 # this next step is vital for some compilers! Not having it will make the # compiler create code that enters an infinite loop. This is known to happen in # macOS as one example. +read -r -n 1 -p "Press any key to run: sed -i'' '/^#/d' august.oc: " +echo 1>&2 sed -i'' '/^#/d' august.oc +echo 1>&2 +read -r -n 1 -p "Press any key to run: cat august.c august.oc | ./august > august.oo: " +echo 1>&2 cat august.c august.oc | ./august > august.oo +echo 1>&2 + +read -r -n 1 -p "Press any key to run: cat august.oo test.oo | ./august: " +echo 1>&2 cat august.oo test.oo | ./august +echo 1>&2 + +read -r -n 1 -p "Press any key to run: cat august.oo august.oo fac.oo | ./august: " +echo 1>&2 cat august.oo august.oo fac.oo | ./august +echo 1>&2 + +read -r -n 1 -p "Press any key to run: cat august.oo august.oo august.oo fac.oo | ./august: " +echo 1>&2 +echo "This step may take more time: " 1>&2 cat august.oo august.oo august.oo fac.oo | ./august +echo 1>&2 diff --git a/thanks-for-help.md b/thanks-for-help.md index 6e00d929e..93295c5f4 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -2099,8 +2099,8 @@ Cody also added the [try.sh](/1995/vanschnitz/try.sh) script. also fixed an infinite loop in the try commands. The problem with the infinite loop is that the file `august.oc` had to have lines starting with `#` removed and it was not being done. After this is done with say `sed(/1)` (like `sed -i'' -'/^#/d' august.oc` which has been added to both the remarks and the try.sh -script as described below) the code can proceed. This problem existed in macOS. +'/^#/d' august.oc` which has been added to both the remarks and the `try.sh` +script noted below) the code can proceed. This problem existed in macOS. Cody also added the [try.sh](/1996/august/try.sh) script that runs all the commands given in the try section to simplify it as there are quite a lot of