This was done as:
sgit -e 's/\(# Alternate code\)$/\1:/g' '*README.md'
The heading levels and other things to do with alternate code that are
being discussed have not been addressed here. That will come later. This
is, as noted, just adding the missing ':' where it was missing.
The command does NOT touch it when it is not prefixed with '# ' because
there are cases where normal lines end with 'Alternate code' (these will
be turned into links later on).
For some reason when I tried it I had a problem with LEVEL being a
certain amount but it must have been something else in the system at the
time. Naturally modern systems are much more capable so it can accept a
much higher level before it gets slower.
Even the judges' statement of 15 causing a slow/bad time is not a
problem so I reworded it to remind readers that this was back in 1995
and is no longer the case.
Added alt test script to use alt code (though in this case it has no
real use other than to be complete). It makes sure to compile the alt
code before trying to use it, exiting if it fails.
The original test script now also makes sure to compile the program
before use, exiting if it fails.
I also fixed the thanks file with this: I didn't fix the main entry;
that already compiled. I had fixed the alt code which did not compile
(partly because I agreed with the judges that it looked like a rat
dumping core).
Why an alt test script instead of just adding an environmental variable
like I did with others? Because it felt like it'd be easier to type. It
might be that I end up doing this with the scripts I added a way to
specify the program, when I come across it, if it seems worth it (which
for some it might very well be worth it).
This is because it doesn't really say how to fix a bug (how could it
when the bugs can be all sorts of different things) but rather a
more general how to help with bugs and other things. It's not just bugs
but other issues with entries or even the website. Thus how-to-help.md
is a better name.
That is to say I removed the 'int' from the variables and added to the
Makefile -Wno-implicit-int instead. The newline added by the judges is
still there, however.
What this means is I changed the heading level from 2 to 3 of the STATUS
lines (under the entries) so that it shows that the status is for the
respective entries.
This was thought of when I was working on moving the bugs/(mis)features
of the entries of 1980s to bugs.md (as in making the README.md files
refer to the bugs.md but not include the details, just the status) and
noticed that it just didn't look quite right. Hopefully this improves it
just a bit.
Rather than have the specific entries noted at the top (for Yusuke and
me) link to the README.md file of the entries, it seems better to me to
link to the entry in the file as that explains what was done which is
what is being honoured/appreciated.
I also added another section or two (both short). One has a joke in it.
Some of the entries had improvements in text of what had to be done to
fix them to work / what was wrong.
All fields in both manifest.numbers and missing_manifest.numbers
have been filled in. However the data entered needs to be reviewed.
Previous efforts made on a spreadsheet line by line basis.
What needs to happen next is to review at an entry by entry level.
Then a review at the overall manifest level (via full_manifest.numbers)
for overall consistency.
The 2015/burton/src.doc.rot13 was un-rot13ed to become
2015/burton/src.doc.txt.
Updated 2018/poikola and 2019/poikola .gitignore and make clobber
to address when the tex file is rendered.
We now have 6 diff rules:
diff_orig_prog
diff_prog_orig
diff_alt_prog
diff_prog_alt
diff_orig_alt
diff_alt_orig
The FAQ for these diffs needs to be updated
as we have 6 types of diffs now.
Having to click on the links in each README.md file will have to be done
to verify the links work but it appears to be in the form of:
/bugs.md#YYYYauthor-readmemd
It was actually declared it was a bug (the entry no longer did the
invalid input check that it once did) and I fixed it so it no longer
needs to be documented at all.
To make sure that this looks okay before doing it for the rest of the
entries I am doing this test commit to make sure the link works okay and
the format looks okay. If any problems are found (which I expect) they
will be corrected and once things look okay the rest of the files will
be done as well.
Unfortunately later versions of clang have an additional defect where
not only are the args of main() required to be specific types but there
can only be 0, 2 or 3 args. This program did not use the second arg so I
removed it originally but this will obviously not work for all systems
so I have brought the second arg back.
The unfortunate problem here is that the author used the letter Z for
the second arg and that's exactly what I have been using for the macro
for usleep() in alt code (Z for sleep of course). So here in order to
make it so that the entry looks as close to the original as possible I
have kept it as Z (changing the type to 'char **') and instead renamed
the Z macro to just S. S was selected as it can also stand for sleep but
also it's kind of (not quite but kind of) a backwards Z. Whether the
other entries should also be changed to be '-DS=...' is something to
consider for consistency but that can be decided another time. It
probably doesn't matter except that it does bother me as I don't like
inconsistent consistencies any more than I like consistent
inconsistencies or inconsistent consistencies.
Now it's just a single line difference: main() itself that calls O5()
(which used to be main() via -DO5=main).
This was accomplished by using the -include stdio.h in the Makefile and
then removing (at the top of the file) the int O3. Instead main() (which
used to be O5() as noted and which had three args) has it as a char **.
Now since O3 was at file scope before it was 0 so rather than casting O3
in main() to an int the call to O5() just uses 0 in that place. The
moving the arg to main() is done simply because O5() (which again was
main()) also has 3 args.
Some versions of clang object to four args to main() but they allow 0,
2 or 3 so that's fine.
I was on the fence of whether it's a feature or bug that the program
deciphers 'fier' as '4' instead of proper 'vier' but to help with
preventing confusion to those who know German I ended up changing it.
This was thought okay but after more thought and also playing with it a
bit I have made that fix the alt version instead. It so happens that
(and I wondered about this at the time but did not have examples then)
by changing it to 'vier' it caused other number words to be wrong. Thus
the version that I'll call vier (even though it's zwei or if
alternatively if zero based eins :-) ) is now the alt version.
Added en.sh and de.sh scripts to count from 0 through 13 (reason below),
showing the word and number and then the result. One can choose whether
to use the alt version or not by passing in KANG=... to the script like:
KANG=kang.alt ./de.sh
would run the vier version of kang (kang.alt).
As for why 13 it's to demonstrate two of the German umlauts, ö and ü (in
German you can add an 'e' or 'E' if you don't have the umlaut so it does
both to demonstrate how the program deals with it).
Makefile updated so one can run make alt.
.gitignore updated.
Now the program is how it was and how it should be and yet at the same
time one play with the vier versus fier.
The judges noted that some new compilers dislike ... but that was a
very long time ago now so I added in parentheses 'in 1984' to be
explicit about it.
Update formatting of the alt code (heading levels) and added subsections
for how to build and run (rather than having it all together).
Updated the historical remarks as well. It's important in this case to
refer to decot.orig.c and not decot.alt.c because the orig code is the
one that was submitted whereas the alt code is the modification the
judges made.
Format changes in the README.md.
Update the test.sh and test-strings.txt files: modify the goodbye
message in the script (for fun) and add some fun strings for it to
search out.
I had never put my name in the README.md file so this was not in the
thanks file either. This has been corrected.
Format fixed the README.md file.
Plus add -Wno-implicit-int to the CSILENCE in the Makefile.
Although one could get away with saying 'aboard' to mean 'getting on a
ship' ('I climbed aboard the ...') it's probably better to say 'board'
as the verbal form especially in the way it was and is worded (now 'You
board ...'). I believe I already did this change in 1990/dds/LANDER.BAS.