356 Commits
Author SHA1 Message Date
Cody Boone Ferguson 2558cbb5a8 Add 1995/schnitzi/try.sh 2024-01-18 11:01:41 -08:00
Cody Boone Ferguson 78fdf606f2 Improve 1995/garry try scripts
They now show the garry.data file and also show a bit more of what is
being done (in the script).

In the thanks file I removed the details as to why there are two
scripts, one for the main version and one for the alt, as that was only
there as at one point using environmental variables was the way it was
being done, but that is no longer important or useful to know.
2024-01-18 10:51:10 -08:00
Cody Boone Ferguson 0a4af08ac9 Add 1995/savastio/try.sh and update bugs.md
The try.sh script demonstrates both positive numbers and input that is
not a number at all (comparing two different strings).

The bugs.md has a new INABIAF - negative numbers will hang the program.
It is not clear if another version should be added to gracefully handle
this but that can be decided another time. It is not a documented
feature so it might be called a bug to fix.
2024-01-17 08:54:35 -08:00
Cody Boone Ferguson 3463d79557 Add 1995/heathbar/try.sh 2024-01-17 08:05:04 -08:00
Cody Boone Ferguson edbbfedacd Add 1994/ldb/try.sh 2024-01-16 09:09:19 -08:00
Cody Boone Ferguson 3e2287f5ec Add alt scripts to 1994/schnitzi
This required an update to the .gitignore file.
2024-01-16 08:47:33 -08:00
Cody Boone Ferguson a2cf06b80f Add 1994/tvr try scripts
There are four scripts:

    try.color.sh	# original entry colour mode
    try.bw.sh		# original entry black and white mode
    try.alt.color.sh	# alt code colour mode
    try.alt.bw.sh	# alt code black and white mode
2024-01-16 06:38:39 -08:00
Cody Boone Ferguson 329e9470be Make 1994/tvr alt code use fgets()
This means that one of the bug statuses was removed.
2024-01-16 06:15:14 -08:00
Cody Boone Ferguson a438eb468f Add 1994/imc/try.sh + inclusion of unistd.h
The inclusion of unistd.h is for getpid(2). While not strictly necessary
(at least not observed) this type of thing can be a problem and in some
other entries a missing or incorrect prototype caused the entry to fail
(sometimes only some systems namely macOS). This was just noticed by
chance and I did it on a whim.
2024-01-16 05:57:13 -08:00
Cody Boone Ferguson 5c9d422000 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).
2024-01-16 05:39:00 -08:00
Cody Boone Ferguson 9d84625f4f A couple typo fixes in thanks file 2024-01-15 11:17:33 -08:00
Cody Boone Ferguson a1138ff98b Add 1994/smr/try.sh
Why would a zero byte entry that prints itself need a try script? Try it
and find out.
2024-01-15 11:12:36 -08:00
Cody Boone Ferguson 2daa0822f6 Add 1994/weisberg/try.sh and primes.sh
The primes.sh script is like 1985/august/primes.sh but it only acts on
reversed output (if rev(1) is installed) of the weisberg because
weisberg actually prints out primes so there's no point doing it without
reversing it. One can specify the number of lines to reverse (not how
many primes to show) by passing an arg to the script. The try.sh script
uses the default (15) and also 25.
2024-01-15 11:04:29 -08:00
Cody Boone Ferguson 90423742bd Add try scripts to 1993/plummer
The two scripts allow one to specify the number and the arg
(corresponding to the argv[1] and argv[2] of the program). The alt
script has a way to redefine the SLEEP variable (in the Makefile) like

    SLEEP=500 ./try.alt.sh
2024-01-15 04:26:29 -08:00
Cody Boone Ferguson 9a283ae744 Add 1993/ant/try.txt and ants.txt
The ants.txt file is something that kids throughout the English speaking
world are tortured with, some having been forced to repeat it many,
many, many, too many times, but which fits well here: a grep program
called 'ant' should find lots of ants :-) (and it is a fun use .. or
maybe I just wish to subject others to the torture I was subjected to
decades ago? :-) )
2024-01-14 10:50:02 -08:00
Cody Boone Ferguson 58195f6192 Add 1993/dgibson/try.sh 2024-01-14 10:34:44 -08:00
Cody Boone Ferguson d347b24626 Add 1993/ejb/try.sh 2024-01-14 10:23:37 -08:00
Cody Boone Ferguson 5609ceaf59 Add 1993/vanb/try.sh 2024-01-14 10:15:40 -08:00
Cody Boone Ferguson 094a4da91a Add 1992/adrian/try.sh
This script shows the entry itself as well as some of the other tools
that the entry generates. The adwc / wc one uses a pipeline to show the
output (with leading spaces and filename removed along with squeezing
spaces) and also writes each to a text file to use diff on, to show how
they have the same output.

Not all the tools are in the script. The adbasename might have a bug
(in any case it doesn't appear to function exactly like basename(1) in
that it requires two args, not one) so it is not used and adgrep is not
used either. For the latter one the author's remarks might provide some
clues as to why I did not include it.
2024-01-14 09:46:54 -08:00
Cody Boone Ferguson 85a9066b02 Add try scripts to 1992/albert 2024-01-14 09:13:46 -08:00
Cody Boone Ferguson b0918543df Add 1992/ant/try.sh
If you like ants there are now 1992 of them here to try out (whatever
that means :-) ).

Some typos in the test Makefile were also fixed (just those that I saw
as the command was scrolling by - I didn't look at the whole file).
2024-01-14 09:03:58 -08:00
Cody Boone Ferguson 903ef5472a Typo (link) fix in thanks for 1992/buzzard.1 2024-01-14 08:49:54 -08:00
Cody Boone Ferguson cda49daa4e Fix 1992/buzzard.2 alt code, add try scripts
The bug fix is simply so it can compile. It assumed exit(3) returned a
value, not void. The fixes noted in the remarks (though I did not see
them at a quick glance) of the author are not in the alt version (that's
the purpose of it).

The try.sh and try.alt.sh scripts correspond to the entry and the alt
code.

Updated .gitignore.

Added 'first.alt' to Makefile for the try.alt.sh script.
2024-01-14 07:28:59 -08:00
Cody Boone Ferguson d91bced2b8 Fix funny problem in 1989/fubar
In some cases if one were to modify the C code (possibly the same with
the script) in certain ways the program would fail to work even after
changing the code back. Trying to figure out what to put in bugs.md and
on a hunch, changing the fubar.sh script (in particular the ex(1) part)
remedies the problem (or so it seems from the various tests I have
performed including some that caused a problem). In particular:

    --- i/1989/fubar/fubar.sh
    +++ w/1989/fubar/fubar.sh
    @@ -7,13 +7,12 @@ if [[ $# -ne 1 ]]; then
	 exit 1
     fi

     # run/compile it
     rm -f ouroboros.c x1 x
    -ex - <<EOF
    -r fubar.c
    +ex fubar.c <<EOF
     8,9j
     w ouroboros.c
     EOF
     chmod +x ouroboros.c

The C code was also changed to make it even more like the original code.
2024-01-14 05:28:07 -08:00
Cody Boone Ferguson 543b250815 Slightly improve 1992/buzzard.1/try.sh 2024-01-13 10:54:25 -08:00
Cody Boone Ferguson b639167e03 Added 1992/imc/try.sh 2024-01-13 10:48:32 -08:00
Cody Boone Ferguson f9d5a7b907 Minor formatting fix in 1992/kivinen/README.md 2024-01-13 10:35:43 -08:00
Cody Boone Ferguson 7031130843 Rename 1992/runme.sh lush.sh and improve it
The script now lets one specify which compiler to use so that one can
(in the case that their cc is clang, for instance like it is with macOS)
specify a path to a real gcc compiler.
2024-01-13 10:29:59 -08:00
Cody Boone Ferguson 9b1d4e7a83 Format fix thanks file - add missing ` 2024-01-13 09:58:19 -08:00
Cody Boone Ferguson e2e00d66f5 Minor update in thanks file for 1991/buzzard 2024-01-13 07:31:16 -08:00
Cody Boone Ferguson e0b6a7f357 Add 1991/brnstnd/try.sh and try.txt
The try.txt is a file for the rot13 SORTA file. All but one of the
sorta.* files is used. The only one that is not prints out a verr long
line of output and would flood the screen. The try section in the
README.md does suggest one try it just to be complete.
2024-01-13 07:27:37 -08:00
Cody Boone Ferguson 36c9def8ac Add 1990/westley/try.sh 2024-01-12 09:59:23 -08:00
Cody Boone Ferguson 2bdf97ec41 Add 1990/theorem/try.sh
This script shows not just theorem but the sorter and the Fibonacci
generator as well. For the sorter it reverses output of ls (redirected
to a file) and then shows how using sorter on it results in the same
output of ls (with no options specified). Of course if different ls
sorts output differently this could fail but I did not think of that
until after I wrote it.
2024-01-12 09:51:14 -08:00
Cody Boone Ferguson 3065fc20d8 Add 1990/scjones/try.sh
The script allows one to more easily see (and verify) what the entry
does. This involves a temporary file that is created (and removed at the
end of the script but which has also been added to .gitignore).
2024-01-12 09:19:07 -08:00
Cody Boone Ferguson 60ca3e63e2 Add 1990/dg/try.sh
It runs the program with a couple strings and then it feeds the source
code to the program (piped to less) as well (after showing the source
code with less).
2024-01-12 09:08:31 -08:00
Cody Boone Ferguson 04cf7822ae Add 1990/baruch/try.sh 2024-01-12 08:58:12 -08:00
Cody Boone Ferguson 3267c2e625 Add 1989/robison/try.sh
Also updated bugs.md with another case where the program might 'break
into tiny bits' but as a feature not a bug. Checking the source code
will give all you need to know about the 'problem' quite well.
2024-01-12 08:38:33 -08:00
Cody Boone Ferguson 4238aac1ac Clarify valid range of P in 1989/ovdluhe alt code 2024-01-12 08:25:07 -08:00
Cody Boone Ferguson b066c51da1 Improve alt build of 1989/ovdluhe
One can now do

    make clobber P=5 alt

instead of the more awkward

    make clobber CDEFINE="-DP=5" alt

The try.alt.sh script was added and allows one to do

    P=5 ./try.alt.sh

If P is not specified it uses the default of the alt code (which checks
if it's defined first via #ifdef..#endif). Otherwise it uses the new
value. Of course if one specifies not an int or too high value (or maybe
too low - didn't try that) the program will fail. That is the fault of
the user. The author does note a reasonable range to try.
2024-01-11 10:11:03 -08:00
Cody Boone Ferguson 231530d890 Add try.sh to 1989/fubar 2024-01-11 09:41:43 -08:00
Cody Boone Ferguson 92a6682216 Make 1989/fubar/fubar.sh use bash
Fixed for ShellCheck as well.

The if [ .. ] was changed to if [[ .. ]] and this was done in the C code
as well.
2024-01-11 09:10:10 -08:00
Cody Boone Ferguson 51790b6a94 Make 1989/fubar more like original
There's no need to have the 'cc' macro have 'int ' before main. Instead
have CSILENCE include '-Wno-implicit-int'.
2024-01-11 09:03:02 -08:00
Cody Boone Ferguson 60f570c46f Improve message in all rule in 1993/lmfjyh
It now clarifies that in the likely case it fails to compile the alt
version will be built as lmfjyh itself rather than suggesting one run
make alt (which basically did already). It does show how one can compile
the alt code manually still but it is not strictly necessary as this
entry is one of the rare cases where if the primary target fails the alt
target is built automatically.
2024-01-11 08:23:32 -08:00
Cody Boone Ferguson a8ccd99632 Rename 1994/westley/spoiler.sh try.sh
The script now first checks columns (tput cols) and if it's not 80 it
will ask the user if they still wish to continue. Checking the tab
length of 8 and wraparound is probably not worth the effort. Also
unfortunately output is not as nice as it used to be because compilers
show more context with errors. Still having columns at 80 does improve
the output a fair bit.
2024-01-11 06:24:11 -08:00
Cody Boone Ferguson b7eacf4849 Further fixes to 1998/fanf for clang
Some versions of clang need -Wno-int-conversion.
2024-01-11 06:07:01 -08:00
Cody Boone Ferguson e6fad17fc3 Reword alt code suggestion in 2013/birken
This also completes an item in the todo file and that has now been
removed.
2024-01-10 10:02:30 -08:00
Cody Boone Ferguson e4b7cbf3a1 Fix 2013/cable3 for clang in linux 2024-01-08 08:14:46 -08:00
Cody Boone Ferguson 72b2a42a89 Fix how 2001/anonymous alt code is built
The 64-bit code binaries have been renamed to .alt: anonymous.ten.alt
and anonymous.bed.alt. This is because it's theoretically possible that
they are not compiled as 64-bit binaries (though how this might be I
cannot think of at this time) and in any case they are alt builds
(though they use the same source).

In the case the -m32 fails (whether due to compiler[0] or no access to
32-bit binary compilation) make alt will be used with warnings that the
entry cannot work with them. The reason these are built as .alt and not
the original is to be clearer whereas in other cases (like
1985/sicherman) the point was just a backup plan in case a compiler
objects to it. Here they must be compiled as 32-bit ELF binaries (though
we cannot check if they are ELF - at least not easily and in an entirely
portable way - we can at least determine if they compiled as 32-bit) so
the alt builds are set to be .alt in filenames.

The try.sh script has been updated for this and in the case. However
this file needs to be looked at again and will be later. The purpose of
this commit was to resolve another issue that is in the todo file (this
is not yet done and might or might not be done later today).
2024-01-08 05:23:33 -08:00
Cody Boone Ferguson 59eb89e402 Fix how 1993/lmfjyh alt code is built
In the case that the original entry fails to compile (if you don't have
gcc < 2.3.3 this will happen) the alt code will automatically be built.
One can still manually compile the alt code, of course, but this way one
can at least use the entry. Note that in the case the alt code is
automatically compiled it is compiled to the lmfjyh just like what I did
with 1985/sicherman. This was discussed after I did the 1985/sicherman
(which will compile anyway after my fixes unless a compiler objects to
main() having only one arg).
2024-01-08 04:45:44 -08:00
Cody Boone Ferguson dd74026de6 Add 1988/dale/try.sh 2024-01-07 09:30:21 -08:00