The helper program ascii.c converts args passed to it to char values (if
isascii() returns non-zero) which with try.sh allows one to reconstruct
the code with the backtrace rather than having to memorise ascii(7) (and
even if they did it would be hard to put it together). One should of
course use xargs(1) and try.sh does.
The try.sh script checks that gdb is installed first, telling the user
to install it if they don't have it. The README.md file notes that for
macOS It's not a simple matter of just installing gdb - there are
additional steps.
The Makefile now uses the script fullscreen.sh which should also be
slightly more portable in that it doesn't rely on both stty(1) and
sed(1). Instead it relies on tput(1). Like the Makefile did for stty(1),
the script checks for tput(1). But rather than suggesting that the user
manually update the Makefile (without instructions) it now gives a
command that one can use to do the equivalent. This is assuming that the
environmental variables LINES and COLUMNS exist. Unfortunately these
variables are not available to scripts so it can't be done
automatically. This script also (if tput(1) cannot be found) shows a
more general way of how to change the size of the editor (the README.md
also does this). One can do something like
make clobber LINES=20 COLUMNS=20 all
to get a 20 x 20 editor.
The fullscreen.sh script was added to simplify the above procedure.
The README.md file was format/typo checked.
I updated the bugs.md as well: I noticed another condition where the
program can become locked, forcing one to have to kill it. At the same
time I improved the way to find sockets that are left by the program
(the way before had the problem that other dot files with all cap
letters could be found) and also an improved way to delete them (which
there is no Makefile rule to do). Now bugs.md discusses both the locking
and the sockets being left in the directory.
The spoiler.c was also renamed to vanschnitz.alt.c and the Makefile was
updated so that running make alt will compile it. The Makefile also now
has -Wno-implicit-int.
The README.md file only had 'Alternate code' and no subsections for how
to build or use the alt code. This is because I had already gone through
this year before we changed the way to present alt code.
The try.sh script checks that the terminal size is large enough for two
files, the prog.c (last check) and sample_input.txt (provided by the
author). If it's too small for either it exits as it can't work. The
added ioccc.txt is very short in column and rows so that should not be a
problem (except in very extreme cases?).
The sample_input.txt file had trailing newlines removed because it
showed differences in output otherwise (and shouldn't).
The bugs.md was updated - add INABIAF for this entry.
Format/typo check README.md file.
The save state option is based on the author's remarks that one can
change the W macro to MAP_SHARED. This is defined in the Makefile so a
variable called 'SAVE' was added which if not 1 will result in
MAP_PRIVATE. This way one can run
make clobber SAVE=1 all
and it'll save state, assuming that (if you add a file) you run 'sync'
before exiting. If you don't run sync(1) it's likely the file won't
exist or it'll be corrupt (like a.out from mullender.c). README.md file
updated for this update. Note that the setting the W macro to ${MAP} is
only done for the make targets that had it set to MAP_PRIVATE. This is
because I guess that if it's already set to MAP_SHARED in the Makefile
there is a good reason for this. This is noted in the Makefile.
The bug I discovered happens whether or not state is saved (this had to
be verified before I did the above change that I added when I was
working on this entry some days back but never committed it for this
reason). If you run ./prog and then exit (ctrl-e) if you then run ./prog
again it'll show a strange message as if the image was corrupt. You have
to hit enter at this point (that's important) and then hit ctrl-e again.
When you run it a third time it'll be okay. I did not look at this in
detail but it probably should be fixed.
The Makefile also tries to make the note about preserving images to be
the state of the file (downloaded) at the time the entry won and how any
updates are unofficial stand out more.
In this entry it could have been interpreted as the author provided the
try.sh script too rather than just the alternate code (which they did
provide but I put in the alt source code file).
The question for FAQ 5.6 was improved to be more compact
while addressing both broken and wrong web links.
Removed any direct reference to drugs in an effort to
avoid problems from those who are humor impaired,
as well as "bots" to might flag the site as connected to drugs.
Moved the reference to the tool used by Cory to find
broken links to the thanks page.
Updated Makefile so one can easily change the 'Z' macro by doing:
make clobber MEMORY=... all
This is not usually useful but there are occasions where it is. As the
README.md points out this value must be a power of two!
The try.sh script runs the program on a number of the mc files, first
showing the input keys as a reminder (it also reminds one to keep in
mind the focus of windows).
The bugs.md is updated to note that it uses gets(3).
Format/typo check README.md file.
I changed the number of years ago that microorganisms appeared on Earth
as the number was off: there are those wondrous hydrothermal vents that
spewed mineral rich waters. Fun fact on the history of the Earth: did
you know that as of 2013 the number of years since the dinosaurs were
wiped out is not 65m years but actually 66m? That means that if you were
born before 2013 and you didn't die right before the revision that
you're in a rare group of people who have had a major historical update
as far as the dinosaurs go. But don't let it get to your head too much!
It also means you're ancient, possibly even a dinosaur, and you're
headed their way. :-) That's the price we must pay for being in that
group.
The try.sh script looks for sha512sum and shasum. If either of these are
found it will use the one found (in the order of sha512sum first and
shasum -a 512 second) and prog. If neither can be found it uses just
prog. If one of them can be found, however, it shows how the output is
the same.
The prog.c was restored from prog.orig.c. Like 2019/diels-grabsch1 the
purpose is no longer valid and even more problematic is the fact that
the checksum value obviously would not be correct otherwise. Makefile
updated instead.
The README.md file has been format/typo checked.
.gitignore updated - added files that try.sh script uses (though it does
delete them after use).
Add Shakespeare.txt from 2019/mills. This was used in the try commands
(now try.sh) by doing cd ../mills ; make ; cd ../diels-grabsch1 but this
is problematic because it requires that one has the same directory
structure. Even more than that there's talk about having a tarball with
each entry by itself so the text file has to be in this entry's
directory too.
The prog.c was reverted back to the original source code and the
Makefile updated to have a -Wno- option. Originally the idea was to make
the author's remarks true that even -Weverything of clang shows no
warnings (which certainly did at the time) be true. I had the thought
that it would be nice to keep CSILENCE empty. But this was bordering on
going too far and more recent versions of clang have yet another dubious
warning and it seems that that warning one cannot even prevent (but
doing so here would obviously not be okay) so if that is silenced it
would mean that CSILENCE is no longer empty anyway. This way is better
anyway as the code is now the same. Of course the statement by the
author that a certain paragraph in README.md is the same shape and size
as prog.c is no longer true but that can't be helped.
Format/typo check README.md file.
I'm almost positive that my earlier fixes to the scripts for the other
languages was all that is needed and the reason they don't work is due
to the dictionary and the fact that in some languages it is hard if not
impossible to form perfect pangrams especially with the entire alphabet.
This appears to be the case with German. A point of interest that I put
in the German scripts is:
# Are the umlauts ä, ö, ü and Eszett (ß) letters in the German alphabet? There
# is more than one opinion on the subject but a lot of words do have an umlaut
# (or Umlaut in German). In some (probably all) systems this script outputs
# nothing probably because it's very hard to form a perfect pangram in German,
# if it's not impossible. Nevertheless, we do include the other characters
# whether or not they are in your view considered part of the alphabet for the
# reason that so many words have them.
I put it 'if it's not impossible' because this also depends on what
letters are provided. These scripts give the entry every letter,
however, including those with diacritics so in the case of German it's
not going to work. It is possible to make it work if you remove some
letters or you give a word that has all the letters (but that kind of
defeats the purpose). As for the other languages I don't know if it's
possible or not (and I'm not fluent in German either - I just know
some). A search suggested it's possible in some other languages but the
author noted it's not in Spanish at least according to their estimates.
Nevertheless I believe that the fixes I made are all that's needed so
this entry now has INABIAF in the bugs.md file.
Fixed the Makefile so the alt version would actually build. Added
scripts to use the alt version instead.
Format/typo check README.md file.
Added try.sh and try.alt.sh.
Downloaded and converted the PS file linked to by the author to PDF and
added to repo.
The try.sh runs prog and wc side by side but in a way that is formatted
(including alignment) so it's easier to see what line is from which
program and it also runs make test.
The script cow was renamed cow.sh to help browsers with whether or not
to display or download.
The script check was renamed check.sh to help browsers with whether or
not to display or download.
The script check.sh was fixed in case the 'x' (passed in to the script
as an environmental variable) is not executable (it resets it back to
./prog) and also made to satisfy ShellCheck.
The script cow.sh was fixed for ShellCheck moo (or was it too? :-) ).
The crash.unl is what the judges put in their remarks (and at the end of
the file they say more). It was added so one can see what is meant.
Updated bugs.md for this - INABIAF.
The try.sh script is as usual.
The README.md file has been format/typo checked.
Using 2018/mills (an amazing entry) with trial and error I was able to
determine the approximate speed that the :-) moved across the screen and
now the alt code moves at almost exactly (I believe, at least) that
speed.
The mullender.alt2.c was deleted; instead that became mullender.alt.c.
This is because (I believe but have not confirmed) that the original did
not exit after it timed out and there's no need to have two alt versions
when they're so similar. One is good enough and the obvious choice is
the one that can keep going on.
.gitignore updated.
Out of an abundance of caution with clang defects / the ANSI C Committee
I have added a second arg to main() in case they decide to enforce the
rule that main() has 0, 2, 3 args.
This is a big commit but it should complete this entry and 2018 unless I
have missed something.
The make test rule was fixed. A script was not +x.
Renamed freqcount -> freqcount.sh (for browser/display).
Renamed mkkeywords -> mkkeywords.sh (for browser/display).
Renamed runtest -> runtest.sh (for browser/display).
Renamed spotcheck -> spotcheck.sh (for browser/display).
Renamed spotdiff -> spotdiff.sh (for browser/display).
Made tac.man proper man format and renamed tac.1.
Added tokcount.sh - a script that the author included in the remarks but
not in a script.
The renaming of files should be okay including the manifest (it is
believed this is true anyway).
Add try.sh script.
The READ_ME.txt was deleted as it had been renamed to author-README.txt
but the former was never deleted. This file was typo/format checked.
Format/typo check README.md file.
The try.sh script shows each input file first so that one can see how it
turns out as a GIF file. The input files include those not suggested by
the judges including the source code itself (the author suggested it has
a message too).
The README.md file has been format/typo checked.
The run.sh script was fixed to work. It did not work because it had a
command that does not even exist ('tempfile') and even after that was
resolved there was another problem to be resolved.
The Makefile rule make python runs the python.sh script but it sets a
trap so one can exit that script but not exit everything (see below).
The python3.sh script is what python.sh is but for the make rule python3
and it works in the same way. The try.sh script runs all of these
scripts as well as the commands suggested by the judges.
The README.md file has been format/typo checked. For the link (twice
referenced) that has flashing lights (and quite a few at that) I put a
warning in parentheses for those who are (like me) sensitive to it (more
important for some people with epilepsy, depending on how sensitive they
are, maybe, but I hate flashing text and lights and so do many other
people).
The try.sh script will ask if the user wants to see the spoilers before
showing them. The rest of it is shown regardless (first).
Format/typo check README.md file.
The new variables in the Makefile, with defaults, are:
FIRE= XK_BackSpace:XK_Tab
FORWARD= XK_Up:XK_w
BACKWARD= XK_Down:XK_s
LEFT= XK_Left:XK_a
RIGHT= XK_Right:XK_d
WIDTH= 512
HEIGHT= 288
An example of how to set some is in the README.md file.
This commit means I can remove an item from the things-todo.md file
which I have now done. Next I can return to 2018.
Now one can use variables SLEEP, TIMER, GRAVITY, PRESSURE and VISCOSITY,
rather than single letter variables. This is like other commits where
instead of having to redefine CDEFINE one can do something like
make clobber SLEEP=50 GRAVITY=I TIMER=15 alt
Notice that some can be set to I rather than a number. See the author's
remarks for details.
The try.alt.sh script was updated for this improvement.
The alt code should work for Windows, based on the author's remarks.
Format and typo check README.md file.
I believe this completes this entry's review.
The try.sh script does not use less for longer output because for some
reason less options -r/-R do not seem to work with the output (I haven't
looked into it in detail of how it works).
The missing PDF file was a paper I believe by the actual author but was
a dead link. Retrieved from the Internet Wayback Machine.
Format/typo check README.md file.
I believe this completes this entry's review.
The try.sh and try.alt.sh scripts are respectively for the entry and the
alt code. There is a joke in them that is based on what the judges
originally suggested one try.
The weasel.man page was deleted. Instead weasel.1 has had the FILES
section removed (which caused some confusion in another way with
another winner of that year). The spec file will have to be tested again
another time.
I did NOT format / typo check the README.md file. Too much to do for now
and since it's mine I can do it any other time. I'd like to get through
the rest of the entries.
Thus this should complete (for now?) 2018/ferguson.
The Makefile now has variables so that one can do something like
make X1=-1 Y2=-1 clobber alt
or whatever, with the variables X1, X2, Y1 and Y2 set to what the author
originally had it as.
The alt code still has #ifndef..#endif so that one can (if they want to
be silly) compile it without make(1).
The author stated EOF must be -1 but this is, as the author even noted,
not guaranteed by the standard (it just has to be a value < 0).
But rather than add C pre-processor directives to force EOF to be -1
(preferred over changing EOF to -1 in the code) the Makefile does (after
${CFLAGS}) -UEOF -DEOF=-1 so as to not have to modify the code any.
A few fixes in the README.md file.
This should complete this entry, leaving just (I think) 2015/endoh1.
The program is supposed to echo stdin to stdout if the program name
starts with 'e'. This was only possible if one do something like:
PATH=$PATH:.
echo '5*5+17' | eprog
because otherwise the first char would be '.' not 'e'.
This was done by using basename(3) and -include libgen.h (in the
Makefile so as to not modify the code more than is necessary).
The Makefile now copies 'prog' to 'eprog' and 'prog' to 'calc'. It also
copies 'prog.alt' to 'eprog.alt' and 'ecalc.alt' as this is what the
program is documented as.
Format fix the calc.1 man page and remove calc.man. This is so that the
formatting is correct and also so as to not have to maintain more than
one copy of the same text (which was almost certainly already out of
sync as I did not update calc.man when I added calc.1 exactly for the
reason that I deleted calc.man).
The try.sh script has been updated and so has the try.this.txt file that
try.sh uses.
This should complete the review of 2015/burton if I'm not very much
mistaken.
The bugs.md file has also been updated with a INABIAF section. One in
particular might be up to discussion and is easily fixed but it's not
clear yet if it should change so it's not done (for now?).
The issue above notwithstanding this entry should be complete.
Renamed road.to.obscurity road.to.obscurity.md and make it markdown
format.
Add try.sh and try.this.txt which the script uses.
Format check README.md file, road.to.obscurity.md, spoilers.md.
The man pages have not been typo checked yet. The try.sh script might be
improved and there is another issue that is pending that prevents
completion of this entry (or potentially does) but it is mostly
complete.
There was a line that was duplicated and more importantly than that some
entries that had been added yesterday before the merge conflicts were
resolved.
I believe this should complete the merge conflicts resolution and I
believe I got the '/' in front of the paths in all the right places. The
anchors (as in html <a ..>) should be in place as well.
The file large is from dd(1) of /dev/zero to be large enough to cause
the program to run out of memory (but not too large for the repo, see
'wc -c' on it) as suggested by the judges' remarks.
A new make rule (or alias for mullender and back_to) called 'future' was
added for the theme. The try.sh script uses make future ('back_to' just
doesn't look that good in my eyes even when I added it).
The try.sh tries to stay in character with the award theme a bit too
though that will only be noticeable if you pay attention. I found the
films very boring (though maybe years later I would find it more
enjoyable) so I'm sure that something more fun could have been
added if I knew them more but I do not. Well I tried anyway.