341 Commits
Author SHA1 Message Date
Landon Curt Noll f929afd344 update .winner.json
We used:

```sh
./run_all.sh ./gen_winner_json.sh
```

to update `.winner.json` files due to recent changes
made to `manifest.csv`.
2023-12-05 22:51:27 -08:00
Landon Curt Noll 1e1f962c30 add to make clobber, removal of *.dSYM 2023-12-05 02:22:49 -08:00
Cody Boone Ferguson eed35127cc Minor update to 1994/weisberg
To make the entry a bit more user friendly and also easier to use with
other tools (in a pipeline - if anyone wanted to for some reason) the
Makefile was modified to print a newline after each number rather than a
space.

I noticed that the Alternate code section had no subsections for
'Alternate build' or 'Alternate use' and these were added as well. I am
not sure how this happened but I might do a quick pass through over all
entries once everything else is done just to be sure.
2023-11-25 08:36:28 -08:00
Cody Boone Ferguson 499bb21fc7 Add missing line break in 1994/dodsond2/README.md 2023-11-22 05:05:57 -08:00
Cody Boone Ferguson 30c59761df Mass fix Makefiles: $(MAKE) -> ${MAKE} 2023-11-19 06:31:28 -08:00
Cody Boone Ferguson bc35c37748 Improve how gcc/clang is detected in Makefiles
Rather than check if $(CC) IS gcc or IS clang check for $(CC) containing
gcc or clang. This is because in some systems or conditions the compiler
might not be called JUST gcc or JUST clang. For instance gcc in MacPorts
is called gcc-mp-13 (for example) but without this change one would have
to symlink gcc to gcc-mp-13 or copy it to gcc.

The FAQ has been updated to address this.
2023-11-18 06:10:02 -08:00
Cody Boone Ferguson 1181899ed9 Fix bug of 1994/dodsond2 wrt arrows stolen
The problem was that one could never get their arrows back from the
robber if they ended up shooting an arrow because that means the number
of arrows stolen could never be the right number of arrows. Now if the
number of arrows stolen (when you encounter the robber) is equal to the
number of arrows you found - the number of arrows you shot you get
arrows back: as long as the robber took some of course. At this point
the counters are reset so that the check does not fail the next time.
Previously it compared to just 3 as there are only three arrows. But in
the alt version (which was helpful to test this out more) this is
obviously a problem even if it wasn't in the original. It was however a
problem in the original because if you shot an arrow you could not get
them back even if you have zero and encounter the robber. Of course now
the check has to verify first (&&...) that the number of arrows stolen >
0 as otherwise the variables could get messed up.

This should actually complete 1994/dodsond2 unless of course I missed
something/made a mistake here.
2023-11-11 06:26:47 -08:00
Cody Boone Ferguson 9c568df22f Fix minor bug in 1994/dodsond2 alt code
The variable 'j' (the score) should start out at 0.
2023-11-11 04:52:18 -08:00
Cody Boone Ferguson 8e352b4b12 Format/typo check 1994/westley/README.md 2023-11-10 10:56:33 -08:00
Cody Boone Ferguson f36f2c3d39 Format/typo check 1994/weisberg + update Makefile
Added -Wno-implicit-int to Makefile.
2023-11-10 10:52:01 -08:00
Cody Boone Ferguson d2de7f49f2 Fixes in 1994/tvr
Format/typo fix README.md.

The entry now uses fgets(3); the alt code that the author included does
not (yet?).

Added entry to bugs.md for the fgets(3) for the alt code and a bug that
is noted by the judges, asking if [you] can fix it.
2023-11-10 10:48:30 -08:00
Cody Boone Ferguson 6d4386aab9 Format/typo checks in 1994/smr/README.md
... not that there is much to document :-)
2023-11-10 09:42:27 -08:00
Cody Boone Ferguson 9401db5b92 Minor fixes in 1994/shapiro/shapiro.md 2023-11-10 09:40:23 -08:00
Cody Boone Ferguson e25615b987 Format/typo fixes in 1994/shapiro
This completes 1994/shapiro as long as a formatting change in shapiro.md
is correct. That will be checked and if necessary it will be fixed.
2023-11-10 09:38:35 -08:00
Cody Boone Ferguson eb5845072e Format/typo check 1994/schnitzi 2023-11-10 09:17:45 -08:00
Cody Boone Ferguson ac6af6730d Format/typo check 1994/imc 2023-11-10 09:09:49 -08:00
Cody Boone Ferguson 0df21af4c4 Fix 1994/horton/Makefile and README.md
The alt code was being compiled with 'all' rather than 'alt'.

The README.md file also has had format updates including referring to
the alt code as well as the gtface.c.

This should complete 1994/horton.
2023-11-10 09:00:09 -08:00
Cody Boone Ferguson a6fa3a06d4 Minor fix in 1994/dodsond2 alt code
The original code checks for equality of number of arrows stolen before
giving back the arrows. If the number is not reset after recovering
arrows is set back to 0 that means that you can only recover them once.
The alt code checked for >= though and now it's been changed to be
equality like the original code.
2023-11-10 08:49:52 -08:00
Cody Boone Ferguson eecc3146c4 Fixes in 1994/dodsond2 + add alt code
Fixed bug where in some cases the program would enter an infinite loop,
forcing one to kill the program.

Fixed bug where only if you had more than one arrow would shooting it
take you to the room you shoot into (it now will do it even if you're
using the last arrow). This fix is done the same way as the above fix
was made as they both have to do with shooting the final arrow.

The alt code allows one to cheat by configuring (at compile time) the
number of arrows to start out with. If one loses (as in stolen) all
their arrows it will be (of course) 0 but if one also gets to the robber
they'll get back the 3 + starting number of arrows (in the original this
is just 3) assuming they have had that many stolen. That is a
(mis)feature or maybe a bug that is carried over from the original entry
that might or might not want to be fixed. I described how it might be
done in the bugs.md but as I don't have time to do it now, focusing
instead on the README.md files of the remaining entries.  The alt
version might allow one to more easily test this.

Besides the above (mis)feature or bug added to the bugs.md some features
that should not be fixed were added to bugs.md. It is questionable
whether or not the above should be fixed but it seems like since there
is dead code, if one ends up shooting an arrow then they cannot get
back the arrows that were stolen even they have have lost all that they
did not shoot, that it should be fixed. But it might be argued that
you're not supposed to get any back if you shoot them since in that case
these were already spent/used. At the same time one could argue that you
should at least get back the ones that were stolen.
2023-11-10 08:19:09 -08:00
Cody Boone Ferguson 4e759c36e3 Format/typo check 1994/dodsond1 2023-11-09 11:53:54 -08:00
Landon Curt Noll e00d20111d rename .inventory.html -> inventory.html
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.
2023-11-06 02:23:30 -08:00
Landon Curt Noll 4f88c4214b add initial .winner.json and .inventory.html for winners
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.
2023-11-06 00:22:19 -08:00
Cody Boone Ferguson 249e865de2 Mass edit README.md: remove top award/author lines
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.
2023-11-05 03:39:46 -08:00
Landon Curt Noll 360708f858 cleanup winner README.md files
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.
2023-11-04 03:21:11 -07:00
Landon Curt Noll 0f5ee6410c fix Alternate code heading in winner README.md files 2023-11-02 16:37:25 -07:00
Landon Curt Noll 0f93911e19 change Alternative code to Alternate code in winner README.md 2023-11-02 16:28:16 -07:00
Landon Curt Noll 3fc44672b8 fix a few more quasi-common headers in winner README.md files 2023-11-02 16:10:34 -07:00
Landon Curt Noll fbd20cfdc2 fix standard headers and header spacing in winner README.md files 2023-11-02 15:45:36 -07:00
Cody Boone Ferguson dc34871805 Add alt versions to 1994/schnitzi
The first version uses fgets(3). This version will compile (note that it
does not compile right away: one has to make other adjustments; it is
not a matter of just changing the code to use fgets()!) but when fed its
own source code it will not generate code that can be compiled let alone
use fgets(3).

The second version, schnitzi.alt2.c, has an increased buffer size but it
will not generate code with the same buffer size; rather the size will
be the original. I explain this in detail (did this quite some time
back) in the bugs.md file. I noticed today that the author gives quite
some details too which will be something I can look at later on. Right
now it's more important to get the website in order so that the next
contest can run! I will only look at this later on or else at a time
where I am unable to do the more important work but am able to do this
(though I don't know about that happening it is still something that
theoretically could happen).

The alt code already existed but it was changed to the second version as
the goal is to get it to use fgets(3) regardless of the buffer size.

Note that the other functionality of both alt versions is not affected.

More updates to bugs.md for this and the thanks file has had the entry
added to it (which should have been done earlier on but was neglected
due to the way it came about, the alt code).
2023-11-02 04:49:42 -07:00
Cody Boone Ferguson 5041a0d592 Typo fix in all entry Makefiles
Change the comment

    # Special flags for this entry

to

    # Special Makefile variables for this entry

because these are actually variables and not flags.
2023-11-01 03:36:29 -07:00
Landon Curt Noll 7cb3c44a3b removed .id files from winning dirs
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.
2023-11-01 01:19:36 -07:00
Landon Curt Noll a17fe36163 add tmp/fake.gen_inventory.sh tool
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.
2023-11-01 00:47:43 -07:00
Landon Curt Noll 2e5f868896 improve Nu Html Checker code in index.html 2023-11-01 00:17:07 -07:00
Landon Curt Noll 1883e441c7 remove use of FONT from stb index.html files
We are still seeing if we can get the validator to work.
2023-10-31 22:44:17 -07:00
Landon Curt Noll d6f3d20bac improve winner index.html for a validator attempt 2023-10-31 22:40:25 -07:00
Landon Curt Noll a42aeeca8f add stub index files for each winner 2023-10-31 22:26:09 -07:00
Cody Boone Ferguson d629239eef Fix 1994/horton - check args 2023-10-30 05:41:15 -07:00
Landon Curt Noll 8b71dd0d4f add or improve Bugs and (Mis)features text in README.md
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.
2023-10-30 00:19:21 -07:00
Cody Boone Ferguson 684ed89d7e Changing heading level of 'Alternate 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.
2023-10-26 04:36:57 -07:00
Cody Boone Ferguson b77347cc35 Change 'To run' to 'To use' in all README.md files
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.
2023-10-26 04:05:50 -07:00
Landon Curt Noll 00c9d60266 improve diff files
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.
2023-10-23 10:18:20 -07:00
Landon Curt Noll 71f1463547 Rename diff Makefile commands
Renamed these Makefile rules:

    orig_prog_diff ==> diff_orig_prog
    alt_prog_diff ==> diff_alt_prog

Updated thanks-for-fixes.md and faq.md accordingly.
2023-10-22 17:26:22 -07:00
Landon Curt Noll 8471e805ed add orig_prog_diff and alt_prog_diff rules to Makefiles 2023-10-18 17:00:02 -07:00
Landon Curt Noll 6625034139 replace trailing whitespace with blackslash in README.md
As an alternative to the markdown trailing whitespace as a line
break, we use a trailing blackslash as a markdown line break.
2023-10-18 15:49:51 -07:00
Landon Curt Noll f9750f114a fix improper use of whitespace in README.md files
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.
2023-10-18 15:33:10 -07:00
Cody Boone Ferguson 0942f4e6b2 Mass typo fix in Makefiles
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'
2023-10-16 10:35:34 -07:00
Cody Boone Ferguson ffdf581218 Mass typo fix in Makefiles
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'
2023-10-15 12:18:34 -07:00
Cody Boone Ferguson 73fc551f70 sgit -e 's/Un\*x/Unix/g' -e 's/UN\*X/UNIX/g' .
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.
2023-10-11 05:16:15 -07:00
Cody Boone Ferguson add7268842 Format fix 1980s and 1990s README.md files
I also updated the todo.md file as I left some things out that have to
be done. I only explicitly named one thing but when I go over them as a
final pass I will address the things in question (some will require
discussion).
2023-10-10 06:24:13 -07:00
Cody Boone Ferguson ef456bfb1e Mass typo fixes
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).
2023-10-07 04:35:47 -07:00