Merge pull request #2142 from xexyl/try-to-do

Remove completed try related task in todo file
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2024-02-02 15:46:25 -08:00
commit c08995ad7b
20 files changed
+140 -164

No files matched your search

-31
View File
@@ -1,31 +0,0 @@
#!/usr/bin/env bash
#
# try.alt.sh - demonstrate IOCCC winner 1988/spinellis 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
# clear screen after compilation so that only the entry is shown
clear
echo "$ cat input.txt" 1>&2
cat input.txt
echo "$ cc -Wno-error spinellis.alt.c -o spinellis.alt && ./spinellis.alt < input.txt"
cc -Wno-error spinellis.alt.c -o spinellis.alt && ./spinellis.alt < input.txt
echo "$ ./spinellis.alt" 1>&2
./spinellis.alt
echo 1>&2
echo "$ cat input2.txt" 1>&2
cat input2.txt
echo "$ cc -Wno-error spinellis.c -o spinellis.alt && ./spinellis" 1>&2
cc -Wno-error spinellis.alt.c -o spinellis.alt && ./spinellis.alt < input2.txt
echo "$ ./spinellis.alt" 1>&2
./spinellis.alt
-27
View File
@@ -1,27 +0,0 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 1988/spinellis
#
# 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
# clear screen after compilation so that only the entry is shown
clear
echo "$ cat input.txt" 1>&2
cat input.txt
echo "$ cc spinellis.c -o spinellis < input.txt && ./spinellis" 1>&2
cc spinellis.c -o spinellis < input.txt && ./spinellis
echo 1>&2
echo "$ cat input2.txt" 1>&2
cat input2.txt
echo "$ cc spinellis.c -o spinellis < input2.txt && ./spinellis" 1>&2
cc spinellis.c -o spinellis < input2.txt && ./spinellis
+1 -4
View File
@@ -31,12 +31,9 @@ echo 7 | ./baruch
## Try:
```sh
echo 2 | ./baruch
echo 3 | ./baruch
./try.sh
```
Why is there no output?
## Alternate code:
+16 -3
View File
@@ -28,8 +28,13 @@ For more detailed information see [1992 gson in bugs.md](/bugs.md#1992-gson).
## Try:
Determine where your system dictionary is located. You may find
it located in one of the following places:
```sh
./try.sh
```
This script will determine (or try and determine) where your system dictionary
is located and assuming that it can find one it'll use that. It checks the
following locations though the last one is more ironic:
```
/usr/share/dict/words
@@ -38,7 +43,7 @@ it located in one of the following places:
/dev/null # <-- for machines with nothing to say
```
Then using the proper dictionary:
Then using the proper dictionary file it does:
```sh
./ag free software foundation < /usr/share/dict/words
@@ -50,6 +55,14 @@ Then using the proper dictionary:
./ag paul e tsongas < /usr/share/dict/words
```
where `/usr/share/dict/words` is the dictionary file.
Then it uses the [mkdict.sh](mkdict.sh) script to create a dictionary file out
of the files [README.md](README.md), [try.sh](try.sh) (itself) and
[Makefile](Makefile) and it repeats the same commands as above. In the case no
dictionary file can be found in the first step it only runs the commands once
with the created dictionary file.
## Judges' remarks:
+13 -13
View File
@@ -23,10 +23,7 @@ If lost:
```sh
./whereami lat long
# or, if you don't have curses installed:
./westley lat long
./whereami.sh lat long
```
Where `lat` and `long` correspond to your latitude and longitude.
@@ -40,12 +37,7 @@ should just use the `westley` and `westley.alt` programs directly.
## Try:
```sh
./whereami 47 -122 # NOTE: - means west of meridian
./whereami 47 122
# or if you don't have curses installed:
./westley 47 -122
./westley 47 122
./try.sh
```
@@ -64,15 +56,23 @@ make alt
### Alternate use:
```sh
./whereami.alt lat long
./whereami.alt.sh lat long
# or if you don't have curses installed:
./westley.alt lat long
```
NOTE: this alternative version also needs a terminal with at least 80 columns.
### Alternate try:
The [try.sh](try.sh) script uses both the original entry and the alternate code
so one can try the same script for both:
```sh
./try.sh
```
## Judges' remarks:
To find the approximate place where this entry was judged, type:
+1 -1
View File
@@ -35,7 +35,7 @@ For more detailed information see [2000 dlowe in bugs.md](/bugs.md#2000-dlowe).
## Try:
```sh
echo "13 14 15 16 17 + - * / p" | ./dlowe
./try.sh
```
+1 -1
View File
@@ -18,7 +18,7 @@ will not work with it enabled.
## Try:
```sh
./try
./try.sh
```
What happens if you feed the program source to the program? Can you figure out
+3 -8
View File
@@ -29,15 +29,8 @@ For more detailed information see [2005 giljade in bugs.md](/bugs.md#2005-giljad
## Try:
```sh
./giljade > out
./try.sh
```
Open an xterm with 78 lines.
```sh
vi out
```
Press `^F` (control F) repeatedly.
### Self-test feature to try:
@@ -47,6 +40,8 @@ Press `^F` (control F) repeatedly.
./giljade out
```
NOTE: [try.sh](try.sh) will ask you if you wish to do this.
## Judges' remarks:
+7 -7
View File
@@ -23,19 +23,19 @@ echo 1>&2
./giljade > out
echo 1>&2
echo "For this next step, make sure to keep pressing space (or hold it down) (q = quit)." 1>&2
read -r -n 1 -p "Press any key to run: less -rEXF out: "
less -rEXF out
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
less -rEXFK out
echo 1>&2
echo "We've left the file 'out' for you in case you wish to open it in vi(m). If" 1>&2
echo "you do we recommend you try holding ctrl-f down in a similar way to how you held" 1>&2
echo "down space above. Of course you can open it in another editor if you wish." 1>&2
echo 1>&2
read -r -p "Do you wish to run the test suite (y/n) ? "
read -r -p "Do you wish to run the test suite (Y/N)? "
if [[ "$REPLY" == "y" || "$REPLY" = "Y" ]]; then
echo "$ make test" 1>&2
read -r -n 1 -p "Press any key to run: make test: "
echo 1>&2
make test
fi
+1 -1
View File
@@ -15,7 +15,7 @@ make
## Try:
```sh
(echo "20 : ,-->+.>+.<<[>[>>+>+<<<-]>[>>+>+<<<-]>"; echo "[<+>-]>[<<<+>>>-]>[-]<<<<.<-]") | ./timwi
./try.sh
```
+2 -3
View File
@@ -18,15 +18,14 @@ For more detailed information see [2011 richards in bugs.md](/bugs.md#2011-richa
## To use:
```sh
./try.sh
echo expression | ./richards
```
## Try:
```sh
echo '10 9 8 7 6 5 4 3 2 1*p*p*p*p*p*p*p*p*p' | ./richards
echo '64 256 128 p/p*p' | ./richards
./try.sh
```
+1 -5
View File
@@ -26,11 +26,7 @@ For more detailed information see [2012 blakely in bugs.md](/bugs.md#2012-blakel
## Try:
```sh
./blakely "xx*yy*+" 64 > paraboloid.gif
./blakely 9 32 > empty.gif
time ./blakely 0 250 > flat.gif
./try.sh
```
+1 -5
View File
@@ -15,11 +15,7 @@ make
## Try:
```sh
echo Hello | ./prog
echo Hello | ./prog > hello.c
make hello
./hello
./try.sh
```
+7
View File
@@ -41,6 +41,13 @@ make alt
Use `prog.alt` as you would `prog` above.
### Alternate try:
```sh
./try.alt.sh
```
## Judges' remarks:
With this entry, you won't need to turn your monitor [upside
+11 -2
View File
@@ -19,8 +19,7 @@ below for more details.
## Try:
```sh
./prog < Makefile
./prog < README.md
./try.sh
```
@@ -43,6 +42,16 @@ make alt
Use `prog.alt` as you would `prog` above.
### Alternate try:
```sh
./try.alt.sh
```
Do you spot the fix by running both [try.sh](try.sh) and
[try.alt.sh](try.alt.sh)?
## Judges' remarks:
This text was processed by `prog`. You may get confused. We're not really sure:
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
#
# try.alt.sh - demonstrate IOCCC winner 2018/ciura 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" alt >/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: ./prog.alt < Makefile: "
echo 1>&2
./prog.alt < Makefile
echo 1>&2
read -r -n 1 -p "Press any key to run: ./prog.alt < README.md: "
echo 1>&2
./prog.alt < README.md
exit 0
+42 -45
View File
@@ -4,17 +4,7 @@ snake \- Feature\-rich curses implementation of the classic 'Snake' game with ma
.SH SYNOPSIS
\fBWAIT\fP=\fIN\fP \fBWALLS\fP=\fI[01]\fP \fBEVADE\fP=\fIN\fP \fBSIZE\fP=\fIN\fP \fBMAXSIZE\fP=\fIN\fP \fBGROW\fP=\fIN\fP \fBSHEDS\fP=\fIN\fP \fBSHED\fP=\fIN\fP \fBCANNIBAL\fP=\fI[01]\fP ./snake
.br
# start pressing some arrow keys
.br
where
.I N
is a number and
.I [01]
is either
.I 1
or
.I 0
(or more correctly zero and non-zero).
# Start pressing some arrow keys to play
.SH DESCRIPTION
\fBsnake\fP has two cheat modes (passable walls/self[cannibalism]), a drawing/practising mode, \fIcan play by itself\fP (\fBand win!\fP), is coloured (included \fIsnake-colours.sh\fP and \fIplay.sh\fP scripts compile in player\-selected colours) and there are many other play modes (many more can be devised with the imagination and the environmental variables; see \fBENVIRONMENT\fP and the file \fIgameplay.md\fP for many examples) and options.
You can pause and there's even a built\-in test unit for some features!
@@ -22,31 +12,31 @@ You can pause and there's even a built\-in test unit for some features!
Besides the environmental variables (described below) that create for a lot of gameplay modes, here are some additional features:
.PP
.RS
\fB\-\fP A drawing mode (\fBWAIT < 0\fP makes \fBtimeout()\fP block).
\fB\(bu\fP A drawing mode (\fBWAIT < 0\fP makes \fBtimeout(3)\fP block).
.RE
.PP
.RS
\fB\-\fP Computer plays the game (\fBWAIT=0\fP)
\fB\(bu\fP Computer plays the game (\fBWAIT=0\fP)
\fB(EPILEPSY/STIMULATION OVERLOAD TRIGGER WARNING\fP included in the relevant section of the \fIgameplay.md\fP; this goes for low \fBEVADE\fP values too).
.RE
.PP
.RS
\fB\-\fP Grow\-Shrink (Positive and Negative Winning) mode (see \fIgameplay.md\fP for more details).
\fB\(bu\fP Grow\-Shrink (Positive and Negative Winning) mode (see \fIgameplay.md\fP for more details).
.RE
.PP
.RS
\fB\-\fP Different colours and characters for the bug, snake head, snake and walls:
\fB\(bu\fP Different colours and characters for the bug, snake head, snake and walls:
.RS
\fB\-\fP Bug is \fB*\fP (white).
\fB\(bu\fP Bug is \fB*\fP (white).
.RE
.RS
\fB\-\fP Head is an arrow facing the direction the snake is facing (\fB<\fP, \fB^\fP, \fB>\fP, \fBv\fP) (red).
\fB\(bu\fP Head is an arrow facing the direction the snake is facing (\fB<\fP, \fB^\fP, \fB>\fP, \fBv\fP) (red).
.RE
.RS
\fB\-\fP Body is \fBo\fP (green).
\fB\(bu\fP Body is \fBo\fP (green).
.RE
.RS
\fB\-\fP Walls are \fB#\fP (cyan).
\fB\(bu\fP Walls are \fB#\fP (cyan).
.RE
.RE
.SH OPTIONS
@@ -56,26 +46,26 @@ The options are specified via the environmental variables.
The following environmental variables modify the behaviour of the game:
.TP
.B WAIT
positive or negative integer that changes how long to wait for a key press prior to moving again.
Positive or negative integer that changes how long to wait for a key press prior to moving again.
< 0 blocks which allows for complete control over movement at your own pace.
Default 231; you can move faster by holding down or rapidly pressing an arrow key.
.TQ
.B WALLS
whether the walls are passable or impassable.
Whether the walls are passable or impassable.
Default 1, passable; 0 means impassable and you will die if you hit a wall.
.TQ
.B EVADE
how many movements the Snake makes before the bug (well insect) will move to another location in the field.
How many movements the Snake makes before the bug (well insect) will move to another location in the field.
Default 300; 0 disables.
.TQ
.B SIZE
initial size of the Snake.
Initial size of the Snake.
Default 5.
Note that it grows by one per move so at the default 5 it will not initially be 5 characters long!
< 0 is an immediate win.
.TQ
.B MAXSIZE
the maximum size the Snake can become before the game is won.
The maximum size the Snake can become before the game is won.
< 0 is the maximum size based on terminal dimensions; any other size will be capped based on the terminal dimensions to prevent problems.
Note that when
.B SIZE + GROW >= MAXSIZE
@@ -84,26 +74,24 @@ you win
you grow to the full size!
.TQ
.B GROW
size to grow every time you eat a bug.
Size to grow every time you eat a bug.
Default 5; can be negative.
"Negativity" creates for fun gameplay modes with enough creativity.
See \fIgameplay.md\fP/\fIgameplay.html\fP for some examples.
See \fB\<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/gameplay.md\>\fP for some examples.
\fIplay.sh\fP allows you to reconfigure the colours and play different pre\-configured gameplay modes.
.TQ
.B SHED
every
Every
.B SHED
movements you will grow (> 0), shrink (< 0) or stay the same length (0) by the
.B SHEDS
(below) value.
Default 0.
Again with creativity you can create some fun gameplay modes.
NOTE: the concept of shedding in this game is a misnomer.
\fB\- Exception\fP: if the bug is eaten the counter isn't incremented.
This is how snakes grow in the wild so is a misnomer here because snakes don't grow in the manner that the original Snake game was designed.
.TQ
.B SHEDS
every
Every
.B SHED
movements will impact what this value means: grow (> 0), shrink (< 0) or not at all (0).
Default 0.
@@ -121,12 +109,14 @@ or
See
.I play.sh
and
.I gameplay.html
.I \<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/gameplay.md\>
for examples.
\fB\- Exception\fP: if the bug is eaten the counter isn't incremented.
NOTE: the concept of shedding in this game is a misnomer.
\fB\-\fP How many moves (\fBSHED\fP, \fIdefault 0, disabled\fP) before 'stretching' (grow) (\fBSHEDS\fP, \fIdefault 5\fP; can be negative).
This is how snakes grow in the wild so is a misnomer here because snakes don't grow in the manner that the original Snake game was designed.
.sp
.RS
.RS
\fBException\fP: if the bug is eaten the counter isn't incremented.
.RE
.RE
.PP
The following two modify the terminal dimensions (this is not part of the game but the terminal/curses itself).
Elsewhere I document these more and their potential pitfalls.
@@ -223,19 +213,23 @@ Other versions I submitted. \fIprog.2.c\fP is the second version; \fIprog.3.c\fP
It also clears the screen before playing to try and maintain terminal sanity should you pass the LINES environmental variable to the program.
.RE
.RE
.SH NOTES
The concept of shedding in this game is a misnomer.
This is how snakes grow in the wild so it is a misnomer here because snakes don't grow in the manner that the original Snake game was designed.
.SH BUGS
\fB\-\fP the screen keeps showing bugs!
.br
\fB\-\fP there's no boss screen.
.br
\fB\-\fP it was written by a human being.
.br
\fB\-\fP technically walls, snakeskin and the snake itself would \fBnot\fP be an obstacle in real life.
.PP
The screen keeps showing bugs (that aren't bugs :-) )!
.PP
There's no boss screen.
.PP
It was written by a human being.
.PP
Technically walls, snakeskin and the snake itself would \fBnot\fP be an obstacle in real life.
The shed snakeskin is not an obstacle but walls can be and so can the snake itself.
Also snakes grow by moulting (technical term for shedding) so when the snake leaves its snakeskin behind it really ought to grow but instead it shrinks; this means negative shedding ought to have the snake grow and positive shedding have the snake - what?
It's a misnomer: it took fewer bytes and the negative shedding is a positive consequence of unsigned arithmetic.
.PP
On a more serious note see the \fBbugs.md\fP file.
On a more serious note see \fB\<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/bugs.md\>\fP.
.SH EXAMPLES
.PP
Test your terminal capabilities and get other various data (based on dimensions of terminal, growth size, size and max size as specified i.e. you can pass in the variables \fBLINES\fP, \fBCOLUMNS\fP, \fBMAXSIZE\fP, \fBGROW\fP and \fBSIZE\fp):
@@ -283,9 +277,12 @@ Run script that prompts for the colours to be used, compiles and then runs the g
.PP
That will compile the game to be the colours you select and then enable cannibalism, set the starting size to 15, max size to 45 and walls are made impassable.
.PP
For more gameplay information and modes check \fIgameplay.md\fP; and for an interactive script that prompts for some of those modes see the \fIplay.sh\fP script.
For many more gameplay information, modes and features check:
.br
\fB\<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/gameplay.md\>\fP
and for an interactive script that prompts for some of those modes see the \fIplay.sh\fP script.
.SH AUTHOR
Written by Cody Boone Ferguson for IOCCC 2020 (the 27th IOCCC).
.SH SEE ALSO
.PP
\fB\<https://ioccc.xexyl.net/2020/snake\>\fP The 27th IOCCC 'Don't tread on me' award.
\fB\<https://ioccc.xexyl.net/2020/snake\>\fP The 27th IOCCC 'Don't tread on me award' winning entry.
+1 -1
View File
@@ -2872,7 +2872,7 @@ case.
### Testing fixes
It might be helpful to use the [try.alt.sh](/2011/richards/try.alt.sh) script to
test that it does not crash.
test that it does not crash and functions properly.
### Resources
+4 -3
View File
@@ -2045,7 +2045,7 @@ problem was a missing `int` for the `f` variable. He felt it was even more
important that it works because the layout does indeed look to him like a rat is
dropping core :-), something that the judges suggested.
Cody also renamed `garry.test.sh` to [try.sh](/1995/garrytry.sh) and improved it
Cody also renamed `garry.test.sh` to [try.sh](/1995/garry/try.sh) and improved it
to to make sure the program is compiled before trying to use it as well as
adding a few enhancements. For the alt version he also added the
[try.alt.sh](/1995/garry/try.alt.sh) script to use the alt version, though the
@@ -2918,7 +2918,7 @@ Cody also added the [try.sh](/2001/schweikh/try.sh) script.
## <a name="2001_westley"></a>[2001/westley](/2001/westley/westley.c) ([README.md](/2001/westley/README.md]))
[Cody](#cody) added the script [try.sh](try.sh) to automate a heap of commands
[Cody](#cody) added the script [try.sh](2001/westley/try.sh) to automate a heap of commands
that we, the IOCCC judges, suggested, as well as some additional ones that he
thought would be fun. He also provided the sort and punch card versions,
described in the README.md, based on the author's remarks.
@@ -4417,7 +4417,8 @@ Finally Cody added the [try.sh](/2018/burton2/try.sh) script.
## <a name="2018_ciura"></a>[2018/ciura](/2018/ciura/prog.c) ([README.md](/2018/ciura/README.md))
[Cody](#cody) added the [try.sh](/2018/ciura/try.sh) script and the PDF file,
[Cody](#cody) added the [try.sh](/2018/ciura/try.sh) and
[try.alt.sh](/2018/ciura/try.alt.sh) scripts and the PDF file,
[lexicon.pdf](/2018/ciura/lexicon.pdf), that was a dead link, restored from the
Internet Wayback Machine.
+1 -4
View File
@@ -1,5 +1,5 @@
# A todo list of known things to check and/or do
*Last updated: Thu 01 Feb 2024 16:10:23 UTC*
*Last updated: Fri 02 Feb 2024 16:39:08 UTC*
This document is for [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) as
he (that is I :-) ) wanted a way to keep track of things in a way that did not
@@ -36,9 +36,6 @@ embedded into the README.md files themselves. An entry that the video file is
downloaded already is 2006/sykes1. There are others that I need to look at once
the rest of the entries are done, assuming that it's possible.
- Verify that all entries that have a try or try.alt script actually refer to it
in the README.md try and alternate try sections.
- Test and fix as and if necessary 2018/ferguson/weasel.spec.
- Update formatting in 2020/ferguson[12]/chocolate-cake.md specifically with