349 Commits
Author SHA1 Message Date
Landon Curt Noll 2ba12ecc3c restore *.orig.c to each entry
Under each yyyy/dir there is a file of the form '*.orig.c'
containing the original source code, or as close as we can
get to the original source code.
2023-07-06 21:49:38 -07:00
Cody Boone Ferguson b198d4e5a4 Fix 1990/stig/Makefile for linux
The paths in the shell command did not have './' to it and this no
longer works. I believe it did work in macOS but I no longer remember
for sure.
2023-07-06 11:16:10 -07:00
Cody Boone Ferguson 245beb7759 Mark infinite loop a feature in 1990/westley
It seems more like a feature than a bug if one enters input that is not
a number > 0. This was considered a bug in the bugs.md file and noted in
the README.md file but it seems like it's not something that should be
fixed but merely noted as a feature.
2023-07-01 08:04:39 -07:00
Cody Boone Ferguson f78bb2b1ab Un-rot13 and format fix 1990/tbr/README.md
Per discussion months ago with Landon the idea of rot13 will in general
be discouraged and the website will likely have a link to undo rot13
text. Also this was necessary to figure out how to format the
file.
2023-07-01 07:59:03 -07:00
Landon Curt Noll ac41f07a83 move fix thanks a file, update top level html links, rename CONTRIBUTING.md
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.
2023-06-06 16:59:53 -07:00
Cody Boone Ferguson a981cacbee Begin centralising thank yous to a single file
NOTE: this is just one way to fix the problem described below but it can
be modified - perhaps greatly changed - or rejected and done
differently. That being said it does isolate the entries that can be
modified except for the one by Simon Cooper as I had intended to do all
entries before a commit but I am too tired to continue and there are
more important things to be done for the IOCCC (hopefully later today).
I don't mind but I wanted to save Landon some of the work as I started
the problem even though all with good intention after Landon noted he
wanted to thank those in the README.md files.

First I would like to also apologise to any previous winners if there
was upset or concern; this was all done with the best intentions and I
know that it was a fine line but the judges' goal is to make it so
previous entries do work in modern systems so that everyone can enjoy
them. Still I am sorry if I caused any offence or anything else! I
actually agree with the situation and I had been wondering about how to
go about it too. Now for the rationale behind this update.

A couple previous winners have voiced concern about the way the thank
you notes are displayed in the README.md files I have started the work
to save Landon some of the trouble as although it was with good
intentions (and based on the note that Landon wanted to thank those who
fixed an entry) I started the problem so it seems only right that I help
rectify it. I also agree with the problem and had thought of it before,
even thinking that in some entries it needs not have any reference to
anyone but the winner! This commit has removed the thank you notes from
several entries and added a THANKS.md file.

The THANKS.md file has the rest of the entries that were fixed as well
which should if nothing else help isolate the entries that need to be
modified. Some entries actually referred to me but were not a thank you
note due to a fix; some were from winners themselves for instance.

Note that I did not update the bugs.md file or any other file that might
refer to these things in the README.md files. The bugs.md for instance
refers to adding credits to those who fix problems or provide missing
links or files to the respective README.md files and this will have to
change once the way this is done is finalised. But hopefully this is a
help to Landon so that he may also focus on the important jprint tool in
the mkiocccentry repo.
2023-06-06 04:50:41 -07:00
Cody Boone Ferguson 7521206b29 Change infinite loop bug status in 1990/theorem
If one passes to the Fibonacci or theorem_bkp program 0 0 it enters an
infinite loop repeatedly printing 0. I think this is better to be just
documented and not fixed. Another condition where this occurred was
fixed but as I recall that might have affected usability and this one in
any event does not.
2023-05-28 12:33:53 -07:00
Landon Curt Noll 5927927e51 Add .id to all winning entries 2023-05-13 11:45:33 +10:00
Landon Curt Noll 9d0f9326aa Merge pull request #722 from xexyl/spinellis
Add mastodon link for Diomidis Spinellis
2023-05-13 11:41:09 +10:00
Cody Boone Ferguson 104a8496e7 Add mastodon link for Diomidis Spinellis 2023-05-12 11:05:22 -07:00
Landon Curt Noll c69445d067 Add .top and .year files
This will be used by tools that will build the web site
and tools that form JSON files (such as `.winner.json').
2023-05-12 20:10:38 +10:00
Cody Boone Ferguson 66231b2150 Remove 'America' (A) from 'USA' :-)
This to make the country code consistent with mkiocccentry (and I guess
international standard country codes).

This affects many README.md files and (for one line) winners.csv.
2023-04-22 04:21:38 -07:00
Cody Boone Ferguson 28554b7791 Add missing alt code to 1990/baruch
I did this a while back but somehow forgot to do a git add baruch.alt.c
so the alt code was only referenced in the README.md and Makefile. That
has now been corrected.
2023-04-17 10:07:31 -07:00
Cody Boone Ferguson 3d4d6669cc Update 1990 winning entries' README.md files
Format and typo fixes.
2023-04-14 06:22:23 -07:00
Cody Boone Ferguson de006b0a73 Fix 1990/stig/Makefile to use ${SH}, not ${ZSH}
This is because not all systems have zsh installed. Why not bash?
Because it returned a syntax error. It might be possible to get it to
work with bash but there's a chance that a system might not have bash.
Of course SHELL is set to bash so that might be an irrelevant point. I
know not all sh implementations are good so that's another thing to
consider but for now it'll do.
2023-04-13 03:04:06 -07:00
Cody Boone Ferguson 861f3fb5a6 Fix description of bug in 1990/westley
Add to README.md that one thing (a crash without an arg) is at this time
not a bug but a feature.

Fix the statement that a negative number causes the entry to enter an
infinite loop. Instead any input that's not a number > 0 will cause the
program to enter an infinite loop.
2023-04-11 06:05:30 -07:00
Cody Boone Ferguson 4bf3f302cb 'comments' -> 'remarks' in all README.md files
As in

    sgit -e 's/\([Aa]uthor.*\)comments/\1remarks/g' -e 's/\([Jj]udge.*\)comments/\1remarks/g' '*README.md'
2023-04-10 11:01:39 -07:00
Cody Boone Ferguson f0eb23a14e Fixes URL for Diomidis Spinellis entries 2023-04-10 06:08:10 -07:00
Cody Boone Ferguson 9b3bdcae58 Reapply no arg check in 1990/theorem
Due to a misunderstanding between Landon and me after some discussion on
GitHub it was recommended that I reapply this fix so I have done so.

I've updated the bugs.md file to change the definition of INABIAF (it's
not a bug it's a feature) as well as adding another known bug with this
entry to the file (this has also been added to README.md).

In bugs.md I also added towards the top a note to the winning authors
about fixes applied to their entries. Particularly if an author objects
to the fix we'll be happy to undo it even if it impacts the usability of
the program. There there is an apology too. We know there's a fine line
and although we have tried to use good judgement invariably some will be
the wrong decision. Thank you for understanding and apologies!
2023-04-10 05:34:33 -07:00
Cody Boone Ferguson ececfced3e Check 1990/jaw/README.md for typos
Removed this task from todo.md, changing it to refer to just make sure
all README.md files have been checked for typos.

I _believe_ this means 1990 has been checked for typos except for the
1990/README.md file itself.
2023-04-09 06:38:40 -07:00
Cody Boone Ferguson f95e8c6956 Updates and fixes + add alt code in 1990/westley
Fix formatting in README.md.

Removed statement of judges that they fixed it for modern compilers that
object to 's' added to an int for short int as this is what I did and
the source that was imported had not been fixed though this might have
been a simple mistake. I had not noticed this before.

Update bugs.md: a known bug and one INABIAF (crashes on no arg).

Added alt code with the 1s as it's instructive to show what was once
allowed but is not now.
2023-04-09 06:07:08 -07:00
Cody Boone Ferguson ec111b36f5 Remove erroneous statement in 1990/jaw/README.md
Originally I had thought that a command in the commands to try did not
work in macOS. But I looked at the code a while back and it's only
because of the errno == 0 message in macOS and the fact the entry uses
perror(). I noted it's not a bug in bugs.md at the time but I did not
remove that part from the README.md (the part that says it doesn't
work).
2023-04-09 06:01:53 -07:00
Cody Boone Ferguson 8b9a9e1b83 Fix author format in 1990/theorem/README.md
Since it's probably not easy to see in a diff this does indeed mean that
spaces were added at the end of each line.
2023-04-09 05:42:55 -07:00
Cody Boone Ferguson 5adf8b8efb Format, typo and other fixes in 1990/tbr/README.md
The typo of most importance (maybe the only typo) was that when I linked
to the archive tarball I left off /archive in the link.

Noted in the judges' comments that in the smaller version provided by
the author the exit() returns void problem is fixed but it still uses
gets(), not fgets(). I don't see the reason to do that as it'll compile
and it's really only an aside and not the entry.
2023-04-09 05:40:09 -07:00
Cody Boone Ferguson 88257dc777 Format and typo fixes in 1990/stig/README.md 2023-04-09 05:36:48 -07:00
Cody Boone Ferguson a9d9250afb Format fixes in 1990/scjones/README.md
This includes moving from the author's comments the note from the judges
that he had sent a note to the judges asking something about the award
title along with the judges' reply. It seemed like the more appropriate
place to have it.
2023-04-09 05:32:07 -07:00
Cody Boone Ferguson ebd000e60c Fixes in 1990/pjr/README.md
Format fixes.

Remove judges' rot13 spoilers (or rather decipher it) since Landon told
me gone are the days of spoilers. He also told me that the eventual
website will have a button to click to decipher the rot13 spoilers but
I'm keeping rot13 content from authors at least for now.
2023-04-09 05:27:15 -07:00
Cody Boone Ferguson a3bb267ec0 Format fixes in 1990/jaw/README.md
I did not check for typos and I believe I only fixed one. I will look
for typos at a later time.
2023-04-09 05:10:17 -07:00
Cody Boone Ferguson 8ba53b5eb4 Format fixes in 1990/dg/README.md 2023-04-09 05:00:24 -07:00
Cody Boone Ferguson 138764caf8 Author format fix in 1990/cmills/README.md
Each line of author information has to end with spaces or else the
author information will be on a line by itself.
2023-04-09 04:57:53 -07:00
Cody Boone Ferguson 510963f2ed Authors format fix in 1990/baruch/README.md
Each line of author information has to end with spaces or else the
author information will be on a line by itself.
2023-04-09 04:52:50 -07:00
Cody Boone Ferguson 081876e662 Minor fixes in 1990/dds/README.md
Format fixes in README.md including making unordered lists to make the
rendered content easier to read and follow.

I've also become aware of a problem with the way the author formatting
was done in recent days in the README.md files that now have to all be
fixed: there needs to be spaces after each line or else the author
information will be one line which is definitely wrong. I think the only
one I got this right is, ironically or not :-), my own entries, namely
because I wanted to make sure that they looked okay (I did 'make sure'
that some of the others did too but that was to changes that I was
unsure of .. ironically leaving out one I should have known but probably
just forgot). Thus many pull requests will be made unless I do it in a
mass fix which I suppose is possible to save time.
2023-04-09 04:45:55 -07:00
Cody Boone Ferguson 7c3f59b633 Format fixes in 1990/cmills/README.md 2023-04-09 04:08:41 -07:00
Cody Boone Ferguson a42e1c6515 Remove unreferenced 1990/cmills.alt.c
As discussed on GitHub this is rarely needed for gets() to fgets()
change (which again is useful - but problematic either way - to prevent
warnings during compile, linking or execution of the program sometimes,
including with this entry, output interspersed with the program's
output).

There was no need to modify the Makefile as the alt target was already
not defined.

BTW: if the compiler compiles, the linker links and the user executes
does that make the compiler the jury, the linker the judge and user the
executioner? :-)
2023-04-09 04:00:46 -07:00
Cody Boone Ferguson 9b07c646f7 Minor fixes + alt code in 1990/baruch
Fixed formatting in README.md.

Add alt code based on authors' suggestion except that the string
replacement was not done because it seems like the output would be not
better but worse. There's a joke in the alternate code section of the
README.md file.
2023-04-09 03:54:01 -07:00
Cody Boone Ferguson d83e53d44b Format fixes in 1990/theorem/README.md 2023-04-09 02:52:36 -07:00
Cody Boone Ferguson 15f61c58db Fix bugs in 1990/theorem
In this case these were not features.

The most important bug fix actually prevented the entry from working
properly: the generated code for the Fibonacci sequence just printed 0
over and over again. Added a segfault prevention here as it seemed like
if I'm going to fix it I might as well fix it properly. Removed this bug
from bugs.md.

A set of possible issues with the char m[][] array was also including
the size limit in the fgets() calls (that was my fault due to missing
the proper type of m at the time). Still might be good to test with
longer lines of input. Commands with known output are correct
nonetheless.

The other bug was due to the gets() to fgets() change where blank lines
were added where they shouldn't be. Now one can do ls | ./sorter and get
no blank lines after each file in the listing.
2023-04-08 08:28:38 -07:00
Cody Boone Ferguson ddbc5152ab Remove 1990/cmills alt code
The alt code was the version that works for modern systems before the
gets()/fgets() change (the fix being changing a read only char * to a
char []) but this is not at this time in the archive. The README.md file
refers to the archive, noting it is the original code before the bug
fix.
2023-04-08 03:30:58 -07:00
Cody Boone Ferguson f19d8b03f6 Remove tbr.alt from 1990/tbr/.gitignore 2023-04-08 03:23:12 -07:00
Cody Boone Ferguson 48751e845c Remove alt code of 1990/tbr
Instead link to archive tarball. The alt code is just the gets() version
and it was decided that that should not normally be in the entry
directory.
2023-04-08 03:10:44 -07:00
Cody Boone Ferguson 58f30bd65e Add note about fgets() in 1990/tbr
About why it's useful. It's a problem to keep gets() but it might be a
problem to not keep it as well. Nevertheless with macOS the output of
the alternative code (which probably should be deleted but this can
happen another time) is confusing:

    $ ./tbr.alt
    $ warning: this program uses gets(), which is unsafe.
    []

The [] is the cursor on a blank line. The first line of output of the
program (which is not supposed to have a newline) instead has the
warning and then a newline appended to it.
2023-04-07 11:02:58 -07:00
Cody Boone Ferguson 965759365d Add note about fgets() in 1990/cmills
About why it's useful. It's both a problem to keep gets() but it's also
potentially a problem to change it to fgets(). But as it will prevent
alarming the user with warnings about gets() and also causing messed up
output (see below) this is useful.

With the original code one will see under macOS something like:

    $ ./cmills.alt
    Shuffle...
    warning: this program uses gets(), which is unsafe.
    Total $1000.  Wager?

which is very wrong.

I did not delete the cmills.alt.c but perhaps it should be deleted. That
can come another time.
2023-04-07 10:59:36 -07:00
Cody Boone Ferguson cdc2cffdd0 Undo no arg check in 1990/theorem
As part of the redefinition of INABIAF one of the segfault fixes has
been undone. The others were necessary as part of making the entry work
in modern systems but this one should not have been done. Instead the
Makefile and README.md warn about it.

I did however discover another bug with this entry that makes one of the
generated programs not work. I documented that in bugs.md and I'll look
at it another time.
2023-04-07 10:36:44 -07:00
Cody Boone Ferguson 6d64e78dc5 Undo NULL file protection in 1990/dds
As part of the redefinition of INABIAF the NULL file protection was
removed. The bus error fix, the erroneous prototype to fopen() and the
fgets() fix are still applied as these allow the entry to work properly
(and without an obnoxious warning at compile, linking or runtime about
gets()).
2023-04-07 10:30:00 -07:00
Cody Boone Ferguson 06a5665f5d Make alt code for gets() / fgets() changes
As both Landon and I have been wondering if changing entries to use
fgets() is bordering on tampering with entries I decided to make the
original (sometimes bug fixed) versions (using gets()) alt code. I had
originally started to make the fgets() version of each entry the alt but
since the fgets() versions can handle input better and since some also
fixed bugs (see below) I decided to make the original version the alt
code (this also is how it is for other entries).

There were some exceptions here. If the change also fixed some crashes
or other bugs outside of the gets() to fgets() conversion I did not
bother to make an alt version. An example is 1992/dds. In some cases the
alt code does have bug fixes in which case they were added.

Updated the Makefiles and .gitignore files as well for the alt target
and the new files (compiled and in the case of 1992/adrian additional
source files in the Makefile alt rule).

This should solve the problem observed by Landon and me. It wouldn't be
a problem to change it so the alt version is the one that uses fgets()
but I think that might be the wrong choice.

In some entries I altogether avoided changing to fgets() say if the
author notes it uses gets() (in one case even providing a version that
uses fgets()). In some cases using fgets() introduces a bug so those are
also not changed.

As for 1990/tbr there's a strong reason for not having the fgets()
version being the alt. In macOS in particular (in linux - or maybe gcc,
not sure - it shows a warning at linker time) it will mess up the first
line of output in a potentially confusing way. For instance:

    $ ./tbr.alt
    $ warning: this program uses gets(), which is unsafe.
    # nothing here, what to do?

And that touches on another issue of making the alt version the one that
uses gets(): the warnings that can be alarming during compilation,
linking and (in the case of macOS) runtime.

Not all entries should be or can be changed to fgets() but some can and
it's warranted for these reasons. More will possibly happen in the
future.
2023-04-05 05:22:35 -07:00
Cody Boone Ferguson e09f677b37 Mass typo fix (all README.md and Makefiles)
As in

    sgit -e 's/the terms this license/the terms of this license/g' '*/Makefile' '*/README.md'
2023-04-02 09:27:13 -07:00
Cody Boone Ferguson e805f41d34 Mass fixes to headers in README.md files
There were many many README.md files with the wrong heading level for
different sections. These have been changed.

To help go through the changes it should be noted I used sgit and also
here is what is changed:

The 'Try', 'To build' and 'To run' lines have two '#'s. Some had one and
others had three.

An exception is that in 1984/anonymous/README.md for the alternative
code that had three '#'s. This is not consistent yet and it might be
that only two are desired. But for now that one at least has three.
2023-03-31 06:43:59 -07:00
Cody Boone Ferguson df63e2f423 Further bug fix 1990/theorem
If not enough args were specified it would segfault.

It also now uses fgets() instead of gets().
2023-03-29 11:10:28 -07:00
Cody Boone Ferguson b6afde51d6 Typo fix in 1990/scjones/README.md 2023-03-27 10:38:46 -07:00
Landon Curt Noll 350da723cc improve architecture and Optimization comments in Makefiles 2023-03-26 22:13:13 -07:00