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!
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.
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.
As was discussed with Landon this was a mistake even if it helped with
consistency. There was even a brilliant pun that was destroyed with that
commit which I think is worth pointing out:
cp README.md hill
./ant hill
in 1991/ant ... even if it's technically 'anthill'.
I hope that I got all links fixed in years.html and winners.html. As
well I tried to make sure I got all handles fixed in all/summary.txt.
Nevertheless these should be checked. For some handles they were never
updated (at least in the html files - though maybe summary.txt too, not
sure) in the first place so there was nothing to do.
Typo fixes like references to *.hint when it should be README.md. There
probably are others that need to be fixed but haven't been located yet.
There were many files renamed in this commit and I hope I got all the
references to the old names changed to the new names. To explain this
commit there were some older entries that had the wrong directory name:
not the surname but something else.
Very possibly there are other directories that need to be renamed and I
am actually aware of one right now but since it's in 2005 (which is
close to being worked on) I am not changing that now but just noting it:
2005/anon should be changed to 2005/anonymous (unless there's a very
good reason I am unaware of). But like I said since 2005 will be worked
on soon I have not touched it.
The Makefiles, .gitignore, the all/summary.txt, years.html and
winners.html files as well as the directories and the files under the
renamed directories have all been updated.
This is a rather big update and it might be that there are conflicts. If
so I will fix them. I will have to update 2005/anon later on to try and
prevent this from happening but very possibly there will be conflicts
here. It's also possible I missed some changes in years.html and/or
winners.html and/or summary/all.txt but I think I got them all. These
should be verified later on.
Although I previously got them to all compile they did not all work. Now
they do except that jaw does not work properly in macOS (I have noticed
something odd in linux too but it appears to work mostly if not
entirely).
Yusuke Endoh pointed out for 1990/theorem that atof() nowadays needs
include stdlib.h so this was added to the file. As well I added the
inclusion of string.h for strcmp(). I also fixed some segfaults in this
entry (even though the judges pointed out that for NULL pointer one
needs the four '0 0 0 0' it still segfaulted under those conditions) so
that everything should work now under both linux and macOS. There were
iirc two parts to this: one the NULL pointer is no longer dereferenced
but also the type being passed to strcmp() was a int * and not a char *.
This prevented 1990/theorem/sorter from working at all (segfault) and as
I recall it there was another segfault I encountered as well.
For 1990/jaw Yusuke Endoh provided a ruby implementation of btoa as it's
not always available in modern systems. Thank you Yusuke!
In 1990/jaw shark.sh had to be modified as well. This had to do with '.'
not being in the default PATH.
As well I had previously made a mistake about btoa versus atob as both
were referenced in 1990/jaw/README.md. I believe I have this correct
now.
Many if not all the README files were modified with various changes
including formatting (like turning them into markdown) and section
titles amongst other things.
I seem to recall I'm missing something here but I can't recall what I
recall :-) so this will have to suffice this time round (maybe it was
the btoa/atob issue that I just remembered and added above but I'm not
sure).
Added Makefiles for 1990 entries.
In a some cases the source code was modified.
Modified 1990 README.md files.
In some cases the program still cannot be compiled.
We we move 1988-2004 entries from all of a year's winning entries
in a single directory to each winner being in their own sub-directory
under the given year directory.