Due to GitHub not serving nor rendering HTML files whose filename
starts with "." (dot), we renamed `.inventory.html` to `inventory.html`.
Renamed: `tmp/gen_dot_winner.sh` -> `tmp/gen_winner_json.sh`
Fixed URL generation for GitHub links in `inventory.html`.
The manifest was updated accordingly.
The `tmp/README.md` file was updated accordingly.
Fixed an incorrect author win for "1989_jar.2" in `author_wins.numbers`
and `author_wins.csv`.
Changed winner_JSON_format_version to "0.5 2023-11-04".
Added `gen_dot_winner.sh` tool to generate .winner.json and .inventory.html
for a winner. This tool uses [pandoc](https://pandoc.org) to convert
markdown to HTML.
Used this command to generate `.winner.json` and `.inventory.html` for
all winners:
```sh
./run_all.sh -v 1 -D 1 ./gen_dot_winner.sh
```
Updated `tmp/README.md` to reflect the above.
Retired "fake.gen_inventory.sh" to `tmp/OLD_manifest/fake.gen_inventory.sh`.
Added `-D level` flag to `run_all.sh` to specify the `-v level` for
the tool that is being run.
As requested on GitHub: a tool that will be written, readme2index, will,
as explained:
'... will take the converted HTML from the README.md markdown and
inject it into an HTML template. Things such title, award one and
author information will be injected into the HTML page ahead of the
HTML that was converted from the README.md markdown. Without going
into details of HOW at this time, the result will be a coherent HTML
index.html page with the winner title / award, winning author
information, and important file links come from other sources and
NOT from the README.md file.
The text from the 1st award line, thru the authorship information,
and up to but not including the "## To build:" line in the README.md
file will just get in the way. Moreover authors might be tempted to
try and maintain that top of README.md text instead of working with
the author/_author_handle_.json and winner .winner.json files.
This was done with my[0] sgit(1) (https://github.com/xexyl/sgit) tool like:
sgit -o -n -e '/^## To build:/,$p' '[12][0-9][0-9][0-9]/*/README.md'
[0] Is that shameless self-promotion? I don't know but I don't care: it
is generally a very useful tool and has been used in other repos too.
Besides, I've done it many times before and it's a great example that I
will be adding to the README.md file of the tool, one I hadn't thought
of doing.
Fixed cases where there was a bad trailing backslash.
Improved a few cases where a code block was needed
to highlight some text.
Changed a few cases where a code block needed to
declared as, say, a sh code block.
Fixed a few cases where the winner information was not properly formatted.
Plus a few nits and clarifying text was added.
We introduce a bit of fun, while specifying that something
is "supposed to happen".
NOTE: There is no need to change the INABIAF STATUS. The use
there is perfectly fine.
The `.id` files are no longer needed and so they were removed.
The `winner_id` (the contents of the `.id` files) are simply
a concatenation of "year" and "_" and "dir".
Adjusted `.inventory.html`, `tmp/README.md`,
`tmp/fake.gen_inventory.sh`, and the manifest according
to the above.
The new tool, tmp/fake.gen_inventory.sh, now adds
a fake .inventory.html file to each winner entry.
Once the winner2nventory tool is written, the .inventory.html
will contain links to all winner files listed in the inventory.
For now, the tmp/fake.gen_inventory.sh tool just creates
a placeholder file.
The entries referenced in `bugs.md` now have, below the
"To build:" section, a "Bugs and (Mis)features section text"
that matches the `bugs.md` status.
Several entries had their "STATUS" changed from:
"STATUS: INABIAF - please **DO NOT** fix" to:
"STATUS: known bug - please help us fix":
This was done because, while some of the bugs were minor,
inviting someone to try and fix the issue does nil harm.
In a few cases a more difficult bug was also changed to
the "please help us fix".
While we do NOT want to waste time fixing such entries NOW,
letting others become involved and to try to fix the entry
is a good thing as to encourages people to study the entry
and try to fix the entry. We don't need to accept a fix
that is offered, and of the fix transforms the source in
a less than desirable way, such a fix (if accepted) could
be become a alt source code.
Change level 3 (###) to level 2 (##):
sgit -e 's/^### \(Alternate code\)/## \1/g' '*README.md'
which is the same as:
sgit -e 's/^### Alternate code/## Alternate code/g' '*README.md'
This is per discussion in GitHub.
As in:
sgit -e 's/# To run/# To use/g' '*README.md'
This makes consistent the message for how to use the program. 'How to
use' was chosen because one can run a program just by doing './foo' but
that doesn't imply that's how to use it but the purpose of the section
is how to use it.
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).
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.
The use of the markdown trailing whitespace to indicate
line break should NOT be done when the following line is empty.
This removes such improper use of whitespace in README.md files.
There was a comment in the form of:
... the liked/allowed ...
which should instead be:
... liked/allowed ...
and this was fixed with my sgit tool like:
sgit -e 's,the \(liked/allowed or compile\),\1,g' '*Makefile'
With the make indent rule there was a typo for indent as 'intent'. This
was fixed with my sgit tool like:
sgit -e 's/no intent\( tool found\)/no indent\1/g' '*Makefile'
This is not only to help with formatting - especially important in
markdown files - but it's no longer really necessary to do it. One
might not feel the need to do it in non-markdown files but I did it
anyway to be consistent. Thus instead of showing Un*x/UN*X it shows
Unix/UNIX.
A question of whether or not it should all be the same case is another
thing entirely but if this is desired at some point it should be easy to
do anyway - with some care in case it's in formatted text.
A note about the glob: why '.' when there are C files and other file
types where it could be dangerous to modify? Because I did a git grep
first so I knew that it was safe.
This is a HUGE commit:
417 files changed, 874 insertions(+), 874 deletions(-)
As the IOCCC website now is https enabled I have updated the
'http://www.ioccc' to 'https://www.ioccc'.
There was also a typo in Makefiles where it said 'for VERY WELCOME' when
it should be 'are VERY WELCOME'.
Finally slashdot.org is also https enabled so references to
'http://slashdot' were changed to 'https://slashdot'.
This was done by my sgit tool (see https://github.com/xexyl/sgit)
like:
sgit -e 's,http://www.ioccc,https://www.ioccc,g' -e 's/for VERY WELCOME/are VERY WELCOME/g' -e .
but because I didn't have a list of files that should be modified I had
to be careful which files to commit as I had files that were changed but
not ready to be committed. Since I did it in steps, finding typos as I
went along, I actually ran sgit three times but to simplify the above
(and to show that it's possible to do more than one sed command) I made
it all as one. Since I did not have a list of files ahead of time I had
to determine what files to commit, first going through them like:
for j in $(for i in $(git status|grep modified|cut -d: -f2); do \
git grep 'https://www.ioccc' "$i"; done|cut -d: -f1|sort|uniq); \
do git diff "$j"; done|less -r
(I had to pipe through less because of a strange problem with the git
diff which appears to be because of a terminal problem maybe due to the
command above but it was all I could come up with in a very tired head.)
The above and
git status | grep modified:
showed that some C files had been modified which obviously should not be
done so I had to do:
git co '*c'
to undo those changes.
Finally to commit the correct files I did:
for i in $(git status|grep modified|cut -d: -f2); do \
git grep -E 'https://www.ioccc|https://slashdot|are VERY WELCOME' "$i"; \
done |cut -d: -f1|sort|uniq|xargs git commit -v
or so (with any formatting issues or typos here due to typos in the log
due to the terminal (in)sanity issue described).
As I was looking at 2004/burley/README.md it occurred to me that
numerous entries have been modified in ways that are incongruent with
what the author(s) originally wrote about the entry. In some cases this
has been noted in the README.md file (like has been added to
2004/burley/README.md itself) but not in all. That should probably be
checked for and I will do that in time most likely but in the meantime
it felt even better to update the FAQ about this which this commit does
as well.
This is to make it more standard which further allows one to run make on
some other source code, say because they want to try and fix an entry
but forget to update the Makefile. Or if they're the author they can not
worry about it in some cases. But since LDFLAGS is the standard way it
seems better to have the LIBS variable in the Makefile be LDFLAGS.
Maybe there is a reason to not have this and I'm happy to close this in
that case but it does seem better this way so I'm doing this commit.
As besides the entries that are not supposed to compile/cannot compile
due to architectural limitations all the entries can compile in macOS
(though some do not work - yet(? I have plans to work on more later)) it
was not necessary to not silence the warnings after all as the entries
that don't work will be easy to identify ('they don't work' :-) ) so I
can just do make CSILENCE= all in the directory of those entries which
solves the problem I had originally thought of.
Some of the Makefiles have retained other changes I had to make
yesterday to get the entries to work with clang in linux but most of
them were either not changed or were made better with the rollback of
the commit that originally silenced warnings.
Now work on silencing warnings for linux can be done.
Due to the fact we now have .orig.c files and thus the possibility of
winner.orig or prog.orig being built I have updated all the .gitignore
files so that these files ignored. This was done with the following
shell commands, for reference:
for i in $(find 19* 200* 201[0123] -mindepth 2 -maxdepth 2 -name .gitignore) ; do echo $(dirname "$i"|sed -e 's,[0-9]\{4\}/,,g').orig >> "$i"; done
for i in $(find 201[4-9] 2020 -mindepth 2 -maxdepth 2 -name .gitignore) ; do echo prog.orig >> "$i"; done
and the two commands is because it was only in 2014 that the winning
entries were renamed to prog so prog.orig is the correct glob.
Used the following script to check for warnings
not silenced via ${CSILENCE}:
```sh
find ???? -mindepth 1 -maxdepth 1 -type d | while read dir; do
(cd "$dir"; echo =-=-= "$dir" =-=-= ; csilence -v 1 clobber all ; echo ; csilence -v 1 clobber alt)
done 2>&1 | less
```
GCC objected to the '##' and some other cpp directives that were being
used.
This unfortunately did mess up the formatting of the some of the code
but I tried to preserve the art and the periodic table of elements
formatting (this was preserved but whether I got all the art or not
preserved I do not know) as these parts seemed too important to not
preserve.
Unfortunately this fix required heavy modification to the original file
and inclusion of a file that was once generated by the Makefile but now
it works for both macOS and Linux. It unfortunately will generate a lot
of warnings in Linux (or at least some - in Rocky Linux and Fedora Linux
it generates a lot of warnings about GCC extensions and with clang it
also generates warning(s?) about reserved keywords for a total of 45131
(!!) warnings) but still it now works with Linux and macOS (clean
compilation).
See the thanks-for-fixes.md file for example warnings and what this fix
entailed.
There were two things that had to change with my previous fix (getting
it to compile), one in code and one in the Makefile.
Instead of doing ',1' after the calls to longjmp() do ',0'. The way it
originally was is in binary expressions but since the function returns
void I made the result be 0 rather than 1 and along with the other
change it works (though maybe it would work with 1 anyway but it seems
not to be necessary and I don't feel like testing it now).
The Makefile change is that it won't work right with the optimiser
enabled so that was disabled.
I removed this entry from bugs.md (which was listed twice by accident -
and some other things were too) and updated it in the
thanks-for-fixes.md file as well.
The fix thank you's have been moved from `README.md` to
`thanks-for-fixes.md`.
**WARNING**: Some mistakes may have been made in doing this.
We presume later changes by others will correct any issues.
The `CONTRIBUTING.md` was renamed `how-to-enter.md`.
A 3rd line of links was added to top level html such as
`contact.html`, `index.html`, `judges.html`, `winners.html`,
and `years.html`.
Improved blank line use in a number (but not all) `README.md` files.
The is a file excluded from this commit that has had the change because
there are other changes but the file is incomplete. That file will be
committed when the fixes are complete which will happen at a later date.
The tarball, whilst in a subdirectory, did not extract into a
subdirectory so that if one did tar xvf img/fs.tar it would still
overwrite the files. As well make clobber would wipe the files out. This
does mean one will have to update the tarball if they are to use it but
one presumes that they would know how to do this.
Note that kernel is still under img/ but it's not part of the tarball
and it's supposed to be outside a tarball too.
Landon pointed out some issues that I missed (thank you Landon .. I was
very tired and I hope that I got everything this time) in commit
4b0a2cb64a:
0. The make clobber rule removes the git files 2004/gavin/kernel and
2004/gavin/fs.tar.
1. The 2004/gavin/fs.tar file contains the file "README.md" which, when
untarred, will overwrite the git file 2004/gavin/README.md.
2. The 2004/gavin/fs.tar file contains the file "gavin.c" which, when
untarred, will overwrite the git file 2004/gavin/gavin.c.
3. The 2004/gavin/fs.tar file is a tar file that could be related with
just checking in the 3 files "prim", "sh" and "vi".
and I discovered another issue too namely that the tarball had the wrong
version of gavin.c in it as well (prior to the fix for clang).
Now the tarball is in the img/ subdirectory and the tarball contents (is
that tar ? :-) ) looks like:
$ tar ft img/fs.tar
fs/
fs/gavin.c
fs/vi
fs/README.md
fs/sh
fs/prim
I added to the todo.md file that this file should be verified to match
the contents of 2004/gavin and I gave a command to do to test this - at
the end of working on this entry or maybe better yet right before this
repo is to be folded back into the winner repo.
Updated .gitignore so that the files that are in img/fs.tar are not
added to the repo. The tarball is not meant to be extracted anyway but
rather copied to a disk for usage of the entry. It will be extracted to
verify that the contents match that of the entry itself (2004/gavin
directory).
Forgetfully I forgot :-) to add the source file so it only worked with
my local copy. The README.md file was modified and the Makefile was
updated but the source code was not added so using make alt would only
result in an error. This fixes that blunder.
Now vi users can more easily enjoy this entry without getting
frustrated! Obviously that includes myself. Use j/k/l/h keys instead.
There's some circular fun in the README.md about this based on what the
judges' originally wrote (that made me laugh out loud because it's
true - I did get lost quite easily though I did solve it ...
eventually).