374 Commits
Author SHA1 Message Date
Cody Boone Ferguson ba0f1ea721 Fix heading level of 'Try' section
It was agreed to be '## Try:' but there were many files where it was
'### Try:'. This has been corrected.
2024-01-15 04:29:39 -08:00
Landon Curt Noll c6e6201209 release readme2index.sh version 1.0 2024-01-14
The initial release of `bin/readme2index.sh` tool that converts
`READMD.md` and various JSON files such as `.winner.json`
as well as "author/author_handle.json" files.

Applied the `readme2index.sh` tool to generate `2020/ferguson1/index.html`.

We generated the  `2020/ferguson1/index.html` by executing:

```sh
./bin/readme2index.sh -v 3 2020/ferguson1
```

NOTE: This above tool requires **pandoc to be installed**.
See the [pandoc web site](https://pandoc.org) for how
to install.  We used _HomeBrew_ to install it,
but there is also a _macports_ process as well.

NOTE: While the above web page does have formatting issues, it is
a first attempt data driven programmatic web page generation.

Some adjustments can be made by mostly improving `ioccc.css`,
and some perhaps by modifying how `bin/pandoc_wrapper.sh`
invokes pandoc.  But probably most of the improvements can
be made by fixing and improving `ioccc.css`.

TODO: Fix and improve the `2020/ferguson1/index.html`
web page by fixing and improving `ioccc.css`.

Moved scripts and tools needed to generate HTML pages
into a new `/bin` subdirectory.

TODO: Consider getting rid of the [build-ioccc
repo](https://github.com/ioccc-src/build-ioccc) and just use the
`/bin` subdirectory.

NOTE: Some links in the `2020/ferguson1/index.html`
web page do not (yet) exist.

TODO: Once the basic format of the `2020/ferguson1/index.html` web
page is somewhat reasonable, generate `index.html` pages for other
winners.  Generate the year level `index.html' files.
Generate the top level HTML files, including the missing
`location.html` file.

Greatly simplified the `.winner.json` file format,
removing a number of fields that were not strictly needed
for generating an inventory on a `index.html` page.

Updated various versions:

* `bin/gen-author.sh` VERSION="1.3 2024-01-14"
* `bin/gen-inventory.sh` VERSION="1.0 2024-01-14"
* `bin/manifest.winner.json.awk` VERSION="1.0 2024-01-14"
* `bin/pandoc_wrapper.sh` VERSION="1.3 2024-01-14"
* `bin/readme2index.sh` VERSION="1.0 2024-01-14"
* `bin/subst.default.sh` VERSION="1.1 2024-01-14"
* `bin/subst.winner-index.sh` VERSION="1.1 2024-01-14"
* `tmp/gen_path_list.found.sh` VERSION="1.1 2024-01-14"
* `tmp/gen_winner_json.sh` VERSION="1.1 2024-01-14"

The `.winner.json` file format from winner_JSON_format_version
"0.5 2023-11-04" to "1.0 2024-01-14".

All `.winner.json` files have been updated to use the
new `.winner.json` file format.

The manifest (`tmp/manifest.numbers` and `tmp/manifest.csv`) has
updated to use the new `.winner.json` file format.

The following procedure was used to generate the
`tmp/manifest.csv` manifest file:

0. open [manifest.numbers](manifest.numbers) in numbers: modify if/as needed

NOTE: Please try to keep the [manifest.numbers](manifest.numbers) spreadsheet
      in order order.  Use Organize -> Sort -> ((Sort Now)) to sort.

NOTE: Empty fields in the [manifest.numbers](manifest.numbers) spreadsheet
      are not allowed.  By default, a cell that is empty is colored
      as a warning.

1. File -> Export To -> CSV...
    * 1a. `[ ]` Include table names (unset)
    * 1b. Text Encoding: Unicode (UTF-8)
    * 1c. Click ((Save..))

2. Save As: manifest.csv
    * 2a. Select the `tmp` directory

3. Click ((Export))
    * 3a. If needed click ((Replace))

4. Execute ./tmp/[fix_csv.sh](fix_csv.sh)

NOTE: You must run the [fix_csv.sh](fix_csv.sh) in the above
      step in order to make the CSV file usable by other tools.

NOTE: If no changes are needed in the above step, the
      original file content will be restored.

5. Execute ./tmp/[gen_path_list.found.sh](gen_path_list.found.sh)

NOTE: The above step silently performs a `make clobber` at the
      top level, and so it takes a bit of time.

NOTE: If no changes are needed in the above step, the
      original file content will be restored.

6. Execute ./tmp/[check_path_list.sh](check_path_list.sh)

NOTE: The above step prints nothing and for an exit 0, then
      all is well.  If there is a problem, such as files
      found that are not part of the manifest, or files
      in the manifest that are not found, then an error
      message will be printed and the tool will exit non-zero.
      If errors are reported, go back to step 0 and
      correct the errors.

7. Execute ./tmp/[run_all.sh](run_all.sh) ./gen_winner_json.sh

NOTE: The above step will take a few seconds to run.  It will rebuild
      all `.winner.json` files for all winners.

NOTE: If no changes are needed in the above step, the
      original file content will be restored.

8. Execute `git status` and inspect changes

NOTE: Check in changes if and as needed.

NOTE: In a number of shell scripts under `bin/*.sh`,
      and in the `bin/manifest.winner.json.awk` script
      you will find comments of the form:

```
```

This is a note that when tools such as `jnamval` (and `jval` and `jfmt`) are
ready, these gross hacks should be replaced with calls to those tools.
Until they are ready, some must be careful with the layout of JSON files.

A number of bugs and typos have been fixed.

NOTE: Fixing typos in the files touched by this comment is welcome.
      This includes scripts, data files, text files, etc.

The _inventory_order_, _display_as_, _display_via_github_.  and
_winners_text_ fields of the [manifest.numbers](manifest.numbers)
spreadsheet were just set to have some initial values.
As they impact the inventory displayed on `index.html` pages,
their content needs to be improved.

NOTE: Improving the above mentioned fields of the
      [manifest.numbers](manifest.numbers) spreadsheet is welcome.
2024-01-14 22:03:28 -08:00
Landon Curt Noll 259d8c8503 update manifest, remove inventory.html, update .winner.json
Update the manifest as per recent file changes.

Removed inventory.html from all winners as the inventory will be
added to the winner `index.html` instead,

Updated winner `.winner.json` files as per the above.
2024-01-10 14:03:53 -08:00
Landon Curt Noll 5859489b60 update .winner.json based on updated manifest.csv
We used:

```sh
cd tmp
./run_all.sh ./gen_winner_json.sh
```
2023-12-28 19:22:06 -08:00
Cody Boone Ferguson ba764a1833 Fix tmp/format-headers.sh, format headers
The script had "s surrounding the git ls-files command which turned it
to a single file which of course is wrong.

Ran script again fixing many README.md files that had incorrect number
of blank lines for critical headers.

This will have to be done a final but a good number of files have been
corrected.
2023-12-27 08:54:28 -08:00
Landon Curt Noll c9a023ff09 note old Email, header formatting, improve copyright and license
For the top level and year level README.md, where email are found,
a note was added to the effect that email addresses found above are
for historical purposes only, and should not be used today.

Old references to asking for fixes, comments, when content was used,
and next contest links were replaced with a general reference to the FAQ.

Harmonized the Copyright and License and copyright dates.
Now using Creative Commons "CC BY-SA 4.0 DEED Attribution-ShareAlike 4.0
International".

The above Creative Commons will become the standard for the IOCCC.
Replaced old `png/by-sa-3.0-88x31.png` with a new ` png/by-sa.88x31.png` icon.
Updated the top level HTML files to use the license.
2023-12-26 14:43:30 -08:00
Cody Boone Ferguson 801f3fe90c Add missing comment in all Makefiles
The comment for the rule diff_alt_orig was missing. It was added like:

    sgit -e '/diff_alt_orig:/i \
    # diff alt and orig' '*Makefile'
2023-12-26 09:00:03 -08:00
Cody Boone Ferguson c7a10649ab Force -O0 in 2005/giljade - optimiser breaks it 2023-12-19 10:07:06 -08:00
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 6c01d17df7 Add markdown footnotes to 2005/persano 2023-12-03 11:40:59 -08:00
Cody Boone Ferguson 6a1e57c8d8 Minor improvements to 2005/giljade/test.sh
Instead of grep -C5 it's now grep -C10 in case there's ever a
compilation eror.

Make it say 'successfully compiled' rather than just 'compiled'.
2023-11-29 06:23:01 -08:00
Cody Boone Ferguson 3cd20c5038 Add input.txt to 2005/boutines + format/typo check
The input.txt file is what the author included in their remarks as
input to try out. This has been integrated into one of the commands to
try in the try section (which did not even have a command to try out -
it just referred to the command in the to use section).

BTW: the author mentioned the Mersenne prime. Did you know that Landon
Curt Noll has held eight world records related to large primes?
2023-11-22 08:47:45 -08:00
Cody Boone Ferguson cdc75eecec Format/typo check 2005/mynx
The bugs.md file was updated slightly and so was the thanks file, namely
suggesting that it might be possible for further code to be added to the
alt code to make it set up https (they already stated that there might
be a command line that could get it to work).
2023-11-22 08:31:52 -08:00
Cody Boone Ferguson 6ad8c4cb54 Add 2005/mikeash/try.sh, update bugs, typo/format 2023-11-22 08:19:48 -08:00
Cody Boone Ferguson 4e4c67112b Add 2005/klausler/try.sh + format/typo check 2023-11-22 07:43:51 -08:00
Cody Boone Ferguson cefc45f635 Add alt code to 2005/persano + format/typo checks
The alt code should (though untested) work in Windows which
distinguishes between text and binary. It uses the Windows functions
_fileno() and _setmode() to set binary mode on stdout.

The README.md file has been format/typo checked.
2023-11-22 07:03:46 -08:00
Cody Boone Ferguson d6824e6732 Fixes in 2005/sykes
Add PET program written in the emulator and add it to the try.sh script.

The try.sh script now explicitly requires one hit 'q' (or 'Q') to quit
(or else killing it or hitting interrupt); after one command is done
(hitting ctrl-c) it shows the menu again which has the quit option in
there. This makes it a bit easier or at least clearer (cleaner?).

The Makefile DATA variable had to be updated after file rename.

There were some other issues in the README.md file as well that I missed
yesterday.

The bugs.md file has been updated pointing out that one has to hit
ctrl-c or whatever the interrupt is set to.

I believe now that this entry should be complete.
2023-11-22 04:57:20 -08:00
Cody Boone Ferguson 7f3f7bc89e Rename kernal -> kernel in 2005/sykes 2023-11-21 14:56:13 -08:00
Cody Boone Ferguson 81dda4e3a1 Complete 2005/sykes review
The bugs.md file has been updated with INABIAF section. The README.md
refers to this file.

The README.md has had a slight improvement in that references to lines
in the author's remarks have been turned into links.
2023-11-21 14:25:00 -08:00
Cody Boone Ferguson 794903b627 Add 2005/sykes/try.sh and test.sh + make test rule
The try.sh is different from others in that it is a loop showing a menu
with different options to use the emulator. It notes at the start of
each iteration that one has to hit ctrl-c or whatever they have set
their interrupt as.

The test.sh is run by make test. The exit status is ignored as it
returns non-zero.

Format/typo check README.md.

I am not done with this entry as the bugs.md should probably be updated
to note some things the author noted. This will have to come another
time.
2023-11-21 12:48:58 -08:00
Cody Boone Ferguson 0f33a6784a Add 2005/timwi/try.sh + format/typo checks
It only has one command. This is because I don't want to knacker my
brain and I don't want to damage anyone else's brain either.

Format/typo check README.md.
2023-11-21 11:41:08 -08:00
Cody Boone Ferguson 0e5422c707 Format/typo check 2005/toledo/README.md 2023-11-21 11:15:49 -08:00
Cody Boone Ferguson db16049341 Format/typo check 2005/vik/README.md 2023-11-21 08:56:35 -08:00
Cody Boone Ferguson 9b61f06633 Fixes and formatting/typo check 2005/vince
The code (both alt and entry) no longer assumes that the source code
filename is the same as the running program with '.c' added. Instead it
uses __FILE__. This does make it slightly less obscure (see next part)
but it is also slightly less error prone at least in some cases. The way
it worked before is that it copied to a buffer '*argv' and then used
strcat(3) with the string ".c" to come up with the filename. The author
actually stated:

    As long as the source is in the same directory as the executable it
    should be able to find it.

... but this was not strictly true. Now as long as the source file it
was compiled as is in the directory it will find it even if the
executable was copied/linked/renamed to something else.

Format/typo check README.md file.
2023-11-21 08:10:30 -08:00
Cody Boone Ferguson 97af1f03bc Fix 2005/giljade/test.sh
The script did not check if all versions could be compiled, just that
180 versions were found. Now it reports an error if not all versions
(180) are found (exit code 1) or if any of the versions failed to
compile (exit code 2). Otherwise it returns 0, success.

The regexp for finding errors is '[^-]error' because the CFLAGS contain
the option -Wno-error which would be a false positive.

Now if any version fails to compile it will let the user know. Also in
that case out.count is kept so that one can look at the problem (it also
tells one how to show the results with grep(1) and even notes that if
they want to report it or try and fix it and open a GitHub pull request
that they're welcome to do so).

The giljade.c file's last line now ends on the column that it used to
before the fix of the test suite mode working. This does not affect the
output of the program and the fix did not either but it feels a bit
better this way anyway.
2023-11-21 05:49:19 -08:00
Cody Boone Ferguson 43897789a1 Fix and improve 2005/giljade/try.sh
After one exited less(1) the text about leaving the file there for one
to look at it with an editor was on the same line as other output.

Also use less -X so that the screen is not cleared. That way one can see
the last part of the file that they looked at.
2023-11-21 04:34:08 -08:00
Cody Boone Ferguson b3d59e5f9b Format/typo check 2005/jetro 2023-11-20 13:00:47 -08:00
Cody Boone Ferguson d1a462593f Bug fix and add alt code to 2005/anon
Previously the alt rule in the Makefile defined NO_STTY which stops the
code from using stty(1) at the beginning and at the end. The stty sane
resulted in a bus error in macOS and since the sole purpose was to set
echo back on I changed it to stty echo (which works). (The NO_STTY macro
is still checked, see below.)

Added alt code with vi(m) like movements.

The way to get it to not use stty is to use either make alt-no_stty or
no_stty. The former will compile into anon.alt and the latter will
compile into anon.

Format and typo fix README.md file.
2023-11-20 10:45:10 -08:00
Cody Boone Ferguson a9fbaf593f Many improvements to 2005/giljade presentation
The try.sh script lets one experience the entry without having to use
vi(m) .. you know, in case they're afraid of getting stuck :-) (and it
is easier too). The script leaves the file there (rather than piping to
less(1)) so that one can view it in a text editor if they wish.

The file test.sh runs the test suite mode but it filters out the running
of 'make', instead only showing the lines matching '^Line'. When it's
all done it checks if 180 versions (lines) were found (it writes to
stdout and another file with tee(1)). If it does not find 180 it is an
error and this is reported (with exit 1). If it does find 180 all is
good. The make test rule was added and uses this script.

Format and typo check README.md file.
2023-11-20 07:31:54 -08:00
Cody Boone Ferguson ea2f4dbb30 Actually add 2005/aidan/try.sh
The try.alt.sh was added but try.sh was left off by accident.
2023-11-20 03:43:44 -08:00
Cody Boone Ferguson 3e54799637 Add try scripts to 2005/aidan + format/typo checks
The try.sh script is for aidan.c; the try.alt.sh is for aidan.alt.c
(which I added some while back based on the author's remarks).

The README.md file has been format and typo fixed.
2023-11-20 03:42:06 -08:00
Cody Boone Ferguson 030480640e Format/typo check 2005/chia 2023-11-19 16:00:41 -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
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 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 d2188d1491 fix a few more standard header lines in winner README.md files 2023-11-02 16:01:23 -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 6993bc99e6 Change back bug status of 2005/anon
The things that were changed to bug status the other day are features
and in fact they provide for some fun interaction too.
2023-11-01 12:50:35 -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