Commit Graph
74 Commits
Author SHA1 Message Date
Landon Curt Noll 658669a73a improve .gitignore files, fix index.html links, sync CNAME
fix experimental web site links in experimental index.html

sync CNAME with https://github.com/ioccc-src/winner/blob/master/CNAME

improve .gitignore files

Added to each .gitignore file, comments on how to sort.

Put into winner .gitignore files, ignore *.dSYM files.

Put into winner .gitignore files, ignore indent.c,
indent.o and indent files.  This is done so that the
winner directory can more self contained.

We did not put into winner .gitignore files, however,
excludes of .-files as found in the top level .gitignore file.
As .-files are not allowed by mkiocccentry, the top level
.gitignore file remains sufficient.

Added to year level .gitignore files, excludes of
mkentry or iocccsize files as needed.

Sorted (via sort -d -u) all .gitignore file.
2023-12-08 04:06:44 -08:00
Landon Curt Noll 6206201d8a add make genpath rules, .path files, updated .top and .year
Add .path files to each winner directory: a file containing
the path to the winner directory from the top directory.

Changed YYYY/.year files to contain the paths, from the top
directory, if the winning directories for the given year.

Changed `/.top` to contain the IOCCC years.

Added `make genpath` rule to the top Makefile and the
year Makefiles to generate the above.

Added FAQ 6.8 to `faq.md` to explain the above.

Updated manifest to reflect recent changes to the list of files.
2023-12-08 01:29:43 -08:00
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 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
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
Cody Boone Ferguson 57f49731c0 Typo/format check 1990/theorem/README.md
I believe that this completes 1990.
2023-11-04 07:39:58 -07:00
Landon Curt Noll f89a020d0f convert INABIAF headers in README.md to a Jargon File quote
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.
2023-11-02 17:17:40 -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 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
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 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 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
Landon Curt Noll 7077378e9b improve make clobber for 1990/theorem 2023-08-04 20:00:11 -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 7a96697c4c Fix 1990/theorem/Makefile for clang in linux
Disabled a warning that defaulted to an error. In this case it was
easier to do it this way due to the way the entry works.
2023-07-07 10:47:11 -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
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 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
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 3d4d6669cc Update 1990 winning entries' README.md files
Format and typo fixes.
2023-04-14 06:22:23 -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 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 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 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 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 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 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