Add 1994/horton/try scripts and article cited
The try.sh and try.alt.sh scripts correspond to the original entry and the alt code (which is enhanced). The PDF files might need a bit more explaining. The author wrote an article in 'The USENIX Association Newsletter ;login: September / October 1992 Vol. 17, No. 5' (the exact title from the PDF) called 'Using GraphTab'. I found the full newsletter in the Internet Wayback Machine which is now added to the repo (okay: the newsletter as a PDF is added to the repo, not the Internet Wayback Machine :-) ). But the pages cited are 28-31 so I extracted (with macOS Preview app: File -> Print option) the specific pages so one need not look at the full newsletter if they do not wish to. It felt better to have the PDF rather than images as it's easier to deal with what the right size is: the size is there and one can zoom in or out as they see fit (whereas with images different resolutions make it easier or harder to see what is in them).
This commit is contained in:
1 parent
c15eacbad7
commit
5c9d422000
6 files changed
+191
-13
No files matched your search
+18
-12
@@ -17,13 +17,7 @@ make all
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./horton 3 2 1 0
|
||||
```
|
||||
|
||||
Also try:
|
||||
|
||||
```sh
|
||||
./gtface < gtface.data
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -46,14 +40,25 @@ make alt
|
||||
./horton.alt A B C D
|
||||
```
|
||||
|
||||
Where A, B, C and D are like with `horton`.
|
||||
Where A, B, C and D are numbers like with `horton`.
|
||||
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
Try to figure out how this program prints, for a given slope, the
|
||||
right character. And for extra credit, try to figure out which
|
||||
character is at the bottom on this hint file. :-)
|
||||
character is at the bottom of this hint file. :-)
|
||||
|
||||
You might be interested in the author's article that they cite towards the end
|
||||
of their remarks, included as PDF files for your convenience, the full
|
||||
newsletter and a PDF file of just the pages cited.
|
||||
|
||||
|
||||
## Author's remarks:
|
||||
@@ -62,6 +67,7 @@ Run it with any 4 numeric arguments, e.g. `./horton 3 2 1 0`. Play with the
|
||||
numbers to get a pleasing result, or use it for your high school algebra
|
||||
class.
|
||||
|
||||
|
||||
### SPOILER:
|
||||
|
||||
As should be obvious from 20 feet away, the program is a cubic plotter.
|
||||
@@ -79,10 +85,10 @@ make gtface
|
||||
./gtface < gtface.data
|
||||
```
|
||||
|
||||
For more information, see
|
||||
For more information, see my article
|
||||
|
||||
Using GraphTab; USENIX ;login:
|
||||
Sept/Oct 1992; Pages 28-31
|
||||
[Using GraphTab; USENIX ;login: Sept/Oct 1992](login_sept92.pdf), [pages
|
||||
28-31](login_sept92-pp28-31.pdf).
|
||||
|
||||
```
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Executable
+80
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.alt.sh - demonstrate IOCCC winner 1994/horton alt code
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt 3 2 1 0: "
|
||||
echo 1>&2
|
||||
./horton.alt 3 2 1 0
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt 0 1 2 3: "
|
||||
echo 1>&2
|
||||
./horton.alt 0 1 2 3
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt -1 -2 -4 -8: "
|
||||
echo 1>&2
|
||||
./horton.alt -1 -2 -4 -8
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt -8 -4 -2 -1: "
|
||||
echo 1>&2
|
||||
./horton.alt -8 -4 -2 -1
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt 42 -42 42 -42: "
|
||||
echo 1>&2
|
||||
./horton.alt 42 -42 42 -42
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt -42 42 -42 42: "
|
||||
echo 1>&2
|
||||
./horton.alt -42 42 -42 42
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt 100 -100 -200 200: "
|
||||
echo 1>&2
|
||||
./horton.alt 100 -100 -200 200
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt -100 100 200 -200: "
|
||||
echo 1>&2
|
||||
./horton.alt -100 100 200 -200
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt -4 4 -4 4: "
|
||||
echo 1>&2
|
||||
./horton.alt -4 4 -4 4
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton.alt 4 -4 4 -4: "
|
||||
echo 1>&2
|
||||
./horton.alt 4 -4 4 -4
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to show gtface.c (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
less -rEXF gtface.c
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to show gtface.data (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
less -rEXF gtface.data
|
||||
echo 1>&2
|
||||
read -r -n 1 -p "Press any key to run: ./gtface < gtface.data: "
|
||||
echo 1>&2
|
||||
./gtface < gtface.data
|
||||
echo 1>&2
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 1994/horton
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton 3 2 1 0: "
|
||||
echo 1>&2
|
||||
./horton 3 2 1 0
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton 0 1 2 3: "
|
||||
echo 1>&2
|
||||
./horton 0 1 2 3
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton -1 -2 -4 -8: "
|
||||
echo 1>&2
|
||||
./horton -1 -2 -4 -8
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton -8 -4 -2 -1: "
|
||||
echo 1>&2
|
||||
./horton -8 -4 -2 -1
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton 42 -42 42 -42: "
|
||||
echo 1>&2
|
||||
./horton 42 -42 42 -42
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton -42 42 -42 42: "
|
||||
echo 1>&2
|
||||
./horton -42 42 -42 42
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton 100 -100 -200 200: "
|
||||
echo 1>&2
|
||||
./horton 100 -100 -200 200
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton -100 100 200 -200: "
|
||||
echo 1>&2
|
||||
./horton -100 100 200 -200
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton -4 4 -4 4: "
|
||||
echo 1>&2
|
||||
./horton -4 4 -4 4
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./horton 4 -4 4 -4: "
|
||||
echo 1>&2
|
||||
./horton 4 -4 4 -4
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to show gtface.c (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
less -rEXF gtface.c
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to show gtface.data (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
less -rEXF gtface.data
|
||||
echo 1>&2
|
||||
read -r -n 1 -p "Press any key to run: ./gtface < gtface.data: "
|
||||
echo 1>&2
|
||||
./gtface < gtface.data
|
||||
echo 1>&2
|
||||
Reference in new issue
Block a user