302 Commits
Author SHA1 Message Date
Cody Boone Ferguson 4cd3f99d6d Format/typo fix 1985/applin/README.md
This should hopefully be the final pass of this file.
2023-10-16 13:04:11 -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 61418e10f7 Removed space before ';'s in 1985/august/primes.sh 2023-10-16 10:31:47 -07:00
Cody Boone Ferguson c31796a55c Add script primes.sh to 1985/august for fun
The inspiration of the script is based on a 'try' command I added to the
README.md a while back to have more fun with the entry. The difference
is that it allows you to specify the number of lines to print (or up to
the number of lines).

There might be some misleading output in a way but this is a mystery for
users to solve.
2023-10-16 10:09:46 -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 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
Cody Boone Ferguson 4836ed4622 Greatly improve my 1985/sicherman fix
My original fix that made it not require -traditional-cpp translated
some macros that rather made the entry not look as good by which I mean
it did not look like it used to but now much less is commented out
because the macro is left as is (though in use it is commented out ..
does that mean it's not used or used? :-) ). But now the main() function
type and args looks like it originally did except for one difference. It originally looked like:

    main(C,V)
    char **V;
    /*      C program. (If you don't
     *      understand it look it
     */     up.) (In the C Manual)

and it was changed to:

    main(/*/,('\b'*'\b'>=_|_>'\t'*'\n')
    char **('\b'*'\b'>=_|_>'\t'*'\n')
    * C program. (If you don't
    * understand it look it
    * up.) (In the /*/ /*C*/ manual)

but now it looks like:

    main(/*C,V)
    char **V;*/
    /*	C program. (If you don't
     *	understand it look it
     *	up.) (In the C */manual)

which is much better and much more like the original entry.
2023-10-04 03:17:00 -07:00
Cody Boone Ferguson 4bd4a86adb Silence compilation of 1985/sicherman
A warning that might not have been previously triggered, odd and
unlikely as it might seem, was triggered at least in macOS Sonoma and it
has now been disabled: -Wno-implicit-int.

The entry used to require in modern days -traditional-cpp but like the
others I fixed this and that did introduce new warnings as code had to
be commented out in some cases like this entry (it did not matter in
this entry if it was commented out but it had to be due to compiler
errors otherwise). Even so this warning should have been triggered
already due to main() and subr() not specifying a return type.
2023-10-04 03:07:32 -07:00
Cody Boone Ferguson ae7e6ca529 Remove outdated message about macOS in 1985/applin
I fixed this quite some time back but never removed the warning. Test
compiling everything in the new macOS I discovered this and other
problems which will have to be looked at later.
2023-09-26 12:24:12 -07:00
Cody Boone Ferguson 8ee4eeceb7 Add <br> to 1985/august author info 2023-07-12 04:48:50 -07:00
Cody Boone Ferguson 528e180e5a Add <br> to 1985/applin author info 2023-07-12 04:48:08 -07:00
Cody Boone Ferguson 43c8fdeba4 Minor fix to 1985/sicherman 2023-07-11 09:34:39 -07:00
Cody Boone Ferguson 59bf07ba03 Add alt try command to 1985/lycklama/README.md 2023-07-11 09:29:50 -07:00
Cody Boone Ferguson 1d86daf19a Change LIBS to LDFLAGS in Makefiles
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.
2023-07-10 03:33:53 -07:00
Cody Boone Ferguson b6330673cc Restore silencing warnings in macOS
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.
2023-07-08 05:05:50 -07:00
Cody Boone Ferguson d89305ef3b Mass .gitignore update for .orig.c files
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.
2023-07-08 04:39:42 -07:00
Cody Boone Ferguson 9e3a5ac7b3 Change how 1985/lycklama is built + fix typo
Now that we have the original code in lycklama.orig.c we can have what
would more appropriately be an alternate version in lycklama.alt.c which
is now done.

Typo fix was really unfortunate: it was in an example command to try
which would have failed to work as the name was wrong.
2023-07-08 04:23:52 -07:00
Landon Curt Noll 2aa99f0644 revert commit d8425bb767 2023-07-07 05:36:08 -07:00
Landon Curt Noll d8425bb767 silence warnings under macOS for cc, clang and gcc
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
```
2023-07-07 01:11:22 -07:00
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 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 d691a69355 Slight improvement on 137d441beb 2023-05-22 05:00:09 -07:00
Cody Boone Ferguson 137d441beb Slight improvement on 9b0153d4cf 2023-05-22 04:48:36 -07:00
Cody Boone Ferguson 9b0153d4cf Make 1985/sicherman more like original wrt CPP
Although the no longer valid code is commented out the macros and the
extra function (subr()) now exist to make it look more like it used to
before the fix.

I have another version to make it even more like the original but a
question that has to be answered is which should be the sicherman.c.
This can be decided at another time but I see it both ways: the way it
is now provides more educational value but it seems less 'authentic'
too. But on the other hand having it closer to the original with
commented out code could also be an issue - maybe. Even so the working
version might have some code that can be replaced with the macros to
make it more like before (this has yet to be determined).
2023-05-22 04:43:26 -07:00
Cody Boone Ferguson 5296d0e065 Remove 1985/shapiro alt code
There was no functional difference; it was a matter of formatting: the
judges had split the last line into seven lines.
2023-05-22 04:17:56 -07:00
Cody Boone Ferguson 65ccc60e2e Minor fixes and updates in 1985/lycklama/README.md
Move try section below to run section.

Added try command.

Possible format fixes.
2023-05-22 04:03:40 -07:00
Cody Boone Ferguson 7098841f43 Format fixes to 1985/august/README.md 2023-05-22 03:55:03 -07:00
Cody Boone Ferguson cad95e4b2b Minor improvements to 1985/applin
Now prints a newline after the output. This is to make the output more
friendly to the user as seeing text like:

    $ ./applin
    Hello, world!$

can be confusing or at least annoying.

Further format fixed README.md.
2023-05-22 03:50:56 -07:00
Cody Boone Ferguson d235b565df Fix consistency of award titles
This was done quite easily with a bit of thought. I generated a script
that could be modified in vim if necessary (as it turned out to be
though some of it could have been generated too but I did not think of
everything at once and it is a hack).

This is how I generated it:

    echo '#!/bin/bash' > bin/check_awards.sh ; ( while read -r g ; do echo grep "$g"; done < <(sed -e 's,_,/,g' -e 's/"/\\"/g' tmp/year-auth-prize.csv | awk -F, '{print grep "\x22" $2 "\x22" " " $1 "/" "README.md"}' ); ) >> bin/check_awards.sh

Then I I modified the file (again this was a hack to make it easier and
quicker and better for being tired too) in vim to make the grep use -Hc
so I could pipe it to 'grep :0'. This found the files without the right
award. So the final command was:

    sh bin/check_awards.sh |grep :0

though I did have to edit some files several times.

For reference the script has been added to the repo too but with +x
permissions.

This change also required updating the CSV file in tmp/.
2023-05-13 07:02:07 -07:00
Landon Curt Noll 5927927e51 Add .id to all winning entries 2023-05-13 11:45:33 +10: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 7b3390ba11 Fix Jack Applin URL 2023-05-09 10:31:45 -07:00
Cody Boone Ferguson 0e0ded94ed Format fix + add links to 1985/README.md + todo
The todo has to do with the fact more years' README.md files have been
checked and updated.
2023-04-30 04:44:49 -07:00
Cody Boone Ferguson 6aa1141e29 Add optional usleep() to 1985/lycklama
With a tip from Yusuke Endoh I noticed that if you slow down the call to
write() you see some fun output. Now to make it as close to possible as
the original (there already is alt code! - mostly for fun display) I
don't call usleep() unless the macro Z is not 0. This way someone can
do:

    make CDEFINE+="-DZ=1000" clobber all

for example but if they just do make clobber all it won't be slow at all
or it'll be as slow as it takes the CPU to run it.
2023-04-27 06:15:55 -07:00
Cody Boone Ferguson 0c12a6e6a1 Fix 1985/applin under macOS
The solution is a curious one that I should have known. It wasn't even a
change in the code itself; rather in macOS one needs to include unistd.h
as with macOS without a proper prototype at least some functions do not
work right. This showed itself in 1984/anonymous as well though I had to
do a bit more to fix that one - provide a prototype in the code
(including the header file did not work - this was documented at one
point in the README.md and possibly bugs.md) and change the code
slightly as well. Ironically this was figured out through linux! See
bugs.md as I updated the on warnings section - this was an example entry
where some warnings are worth fixing.
2023-04-27 05:54:50 -07:00
Cody Boone Ferguson dbb2b396ce Make some words italic in 1985/sicherman/README.md 2023-04-22 03:58:20 -07:00
Cody Boone Ferguson 55575a126e Fix Lennart Augustsson URL, remove address
This will likely be the first of a series of commits where URLs are
checked (until I get tired of doing this of course) and more importantly
addresses are removed as these seem unneeded now and the odds are they
are no longer valid.
2023-04-22 03:51:10 -07:00
Cody Boone Ferguson 65d779944b Update 1985 winning entries' README.md files
Format and possibly typo fixes.
2023-04-14 06:15:47 -07:00
Cody Boone Ferguson d8e876794e Format and URL fixes in 198[568]/applin/README.md
Format fixes.

Dead link discovered. Use Internet Wayback Machine instead.
2023-04-14 06:03:57 -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 a4322d00ea Slight rewording in 1985/lycklama/README.md 2023-04-07 10:28:17 -07:00
Cody Boone Ferguson 078a4129fe Slight rewording in 1985/applin/README.md 2023-04-06 05:17:29 -07:00
Cody Boone Ferguson eb395363c8 Minor update to 1985/sicherman
Try and make it look a bit more like the original but still work without
-traditional-cpp.
2023-04-05 09:06:24 -07:00
Cody Boone Ferguson fa8a9b8b28 Remove 1985/sicherman -traditional-cpp requirement
For some good old C-fashioned fun I recommend people to compare
sicherman.c to sicherman.alt.c!

To the best of my knowledge with this there are no more entries that
require -traditional-cpp! The configure scripts in 2004/hibachi and
2005/mynx don't seem to be required to compile the code.

It's possible that other entries do need it that I've not yet discovered
but as of now no known entries need it.

Removed entry from bugs.md.
2023-04-05 06:16:26 -07:00
Cody Boone Ferguson 7253bc16f6 Fixes in 1985/lycklama/README.md + Makefile
Add alt target to Makefile. Won't work for most systems but the alt code
is there (particularly so people can see how it looked when run on
itself back then) so it might as well be possible to run make alt for
those who have an old compiler.

Format fixes in README.md.
2023-04-04 08:11:15 -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
Landon Curt Noll 350da723cc improve architecture and Optimization comments in Makefiles 2023-03-26 22:13:13 -07:00
Landon Curt Noll 1ce40b273d fix alt rules in Makefiles
For Makefiles that have alt related rules, moved
the related rules under the alt rule section.

In some cases where there is no alt code,
removed alt rules and/or targets.
2023-03-26 21:48:48 -07:00
Landon Curt Noll 720e619025 clean whitespace before clean rule in several Makefiles 2023-03-26 20:55:38 -07:00