We sort with lines starting with # first.
We sort with lines starting with * second.
We sort with lines that do not start with [#!*] third.
We sort with lines starting with ! fourth.
Example usage in vim with a keyboard macro <escape>f:
```vim
:map ^[f 1G!G../../bin/sgi^M
```
or via .vimrc:
```vimrc
" sort the entire .gitignore file using ../../bin/sgi
:map ^[f 1G!G../../bin/sgi^M
```
NOTE: The ^[ above is ((Escape)) and ^M is ((Control-M)).
Example usage in shell:
```sh
rm -f t && ../../bin/sgi < .gitignore > t && mv -f t .gitignore
```
Suggested usage:
```sh
bin/all-run.sh bin/sort.gitignore -v 1
```
Sorted all winner .gitignore according to this method.
Sorted all year level .gitignore according to this method.
Sorted top level .gitignore according to this method.
The .gitignore was updated but it cannot be sorted because it excludes
'*.mid' but then negates the .mid files in the repo, cvikl.mid and
entertainer.mid. These have to come after the exclusion of '*.mid'. This
is important as one might use the entry to create a .mid file that is
not done in the try script. The make clobber rule does not remove
'*.mid' files as doing so would remove the ones we want to keep.
try.sh now runs makegif.sh.
Fix makegif.sh to first compile the program, allow one to specify CC and
convert and check that the output file was created. In the case
convert(1) is not found or it fails to generate the output file it
suggests the user look at the FAQ entry about ImageMagick.
The alt code provided by the author back in 2020 uses Unicode but there
wasn't a script for it (the script run_clock.sh which I made some fixes
in last year was added by the judges but no version for the alt code was
added).
The scripts also have another fix in them: make clock or make clock.alt
first as if not and the program does not exist the script will happily
overwrite the C files and prevent it from being compiled. They use 'make
-B' just to be sure that it's compiled.
Be even more clear about certain notes that are vital to success in
making the cake. Of course in 2020/ferguson2 it's enciphered with the
Enigma machine (was part of a fun way to explore the entry but obviously
very few would do that since it's in plaintext in 2020/ferguson1).
The file cake.jpg was renamed to ioccc-cake.jpg. This file has a feeble
attempt to draw IOCCC on it but it does not show the cake iced properly
so I feel like it shouldn't be the main image. This image is linked to
but it is not embedded in the document.
The new cake.jpg is one from 14 February (my birthday) in 2022 (2022
because it's the best picture I found in recent years that show both the
top and the side so one can see how thick/tall it is or better see it
anyway). This should improve the presentation of the cake and do it much
more justice.
More notes have been made bold and capitalised as well as more explicit
and clearer.
Removed things that are not relevant (directly or indirectly) to the
recipe itself. For instance although fun the other IOCCC etc. just makes
the text longer and not get to the recipe which is the good part and
which was my original intent (obviously). For reference here that refers
to:
International Office of Cocoa, Chocolate and Sugar Confectionery
which is 'the other' IOCCC. A PDF file that was related to that was
removed which I might put elsewhere in time (other things removed might
or might not be put elsewhere too but that's none of that is certain
except I have copies of everything just in case I do wish to do that).
This commit will require a manifest update but that will likely not
happen until Saturday.
Improved `all-run.sh` and `readme2index.sh` so that
certain command line options (e.g., -p, -P, -u, -U ...)
are only passed along to other tools if they are
given on the command line.
all-run.sh VERSION changed from "1.1.1 2024-01-19"
to "1.1.2 2024-01-20",
readme2index.sh VERSION changed from "1.1 2024-01-16"
to "1.1.1 2024-01-20".
Added `quick-readme2index.sh` that only calls
`readme2index.sh` if the `index.html` is not
a non-empty file, or of either `.winner.json`
and/or `README.md` is newer than `index.html`.
Updated all `index.html` files because the
the file contains a comment that includes
the newly modified readme2index.sh VERSION.
I believe it was a mistake to add the \ before the $ as it was in a code
block. In one case a pair of '`'s was missing and those were added there
so that both are now code blocks. If it is not an error to have the '\'
before the '$' then the code block added should still be there but I
believe it was a mistake anyway.
Updated manifest as per recent file changes.
Updated winner `.winner.json` to reflect the manifest changes.
Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over
all winning entries.
These tools had slight improvements in the help usage message:
* bin/gen-author.sh VERSION="1.3.1 2024-01-16"
* bin/gen-inventory.sh VERSION="1.0.1 2024-01-16"
* bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16"
* bin/subst.default.sh VERSION="1.1.1 2024-01-16"
* bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16"
The `bin/readme2index.sh` tool was improved so that
if the `index.html` file exists and the tool forms
the exact same content, then the file `index.html`
file is NOT touched.
* bin/readme2index.sh VERSION="1.1 2024-01-16"
We used the following command to generate `index.html` files
for all winning entries:
```sh
bin/all_run.sh -v 3 bin/readme2index.sh
```
NOTE: We have not (yet) built HTML files above the winner directory
level (e.g., no year level nor top level HTML), nor have be built
non-index HTML files for winners.
NOTE: By default we are running `pandoc(1)` with:
```
--fail-if-warnings=true
```
This means that any problems with markdown to HTML
generates an error. This is done to be sure that
the HTML conversion is clean.
We had to fix the following `README.md` files:
* `2000/rince/README.md`
The reference [^2] was never used. We made a guess that [^2] applies
to the same spot as [^1]. Perhaps there is a better spot where
[^2] applies?
NOTE: For every reference, there MUST be some place where that
reference is used.
* 2012/vik/README.md
The string "$...$" is assumed to be a TeX encoded string.
NOTE: Every "$..$" needs to be backslashed as in "\$..\$".
* 2018/burton1/README.md
The reference [2] was duplicated. We changed the
second [2] to [3].
NOTE: Every reference needs to have a unique number.
* 2020/carlini/README.md
The string "$...$" is assumed to be a TeX encoded string.
NOTE: Every "$..$" needs to be backslashed as in "\$..\$".
We also found 2 errors in the `author/author_handle.json` file set:
* author/Anonymous_2001.json
The `author/Anonymous_2001.json` file was missing.
* author/Jari_Arkko.json
The winner ID for `1989_jar.1` had a typo.
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.
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.
The DATA variable still had html files which I removed a while back.
This made make fail.
Also there is a joke Easter egg that I added: something to do with
eating as that's also kind of the point of the entry: though eating
insects (or bugs for a joke I made originally, so that it can say there
are bugs that are not bugs). Snakes are carnivores: they don't eat
apples and although insects are not going to be filling enough they can
eat them. But what the joke is one has to discover for themselves!
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.
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.
Added key.txt which is based on the judges' try.this.txt file (which was
based on something I originally submitted) which only has the key rather
than the input. This file is then used by try.sh and try.alt.sh.
Pass -v to recode now so that one can see the settings used and in a
nice way.
The Makefile also has been updated with a new rule to compile the C++
code the author provided which can preprocess the output of the program
to make it more acceptable to some compilers.
Format/typo check README.md file.
This should complete 2020! There might be another change in another year
but besides that and the YYYY/README.md files the review of all entries
can be mostly considered done (mostly because I will probably do a very
quick pass but this pass is not important one way or another).
These files in particular were previously to be downloaded prior to use
of the program (or try section). These files have now been downloaded
and added to the repo.
Format/typo check README.md file.
Updated bugs.md with features/limitations.
The try.sh script tries to find md5sum and if it does not succeed it
tries for openssl. If it is openssl it uses the subcommand md5;
otherwise it just uses md5sum. Whatever the case if either is found it
writes the checksum of prog.c to md5.txt and then it uses prog to write
the checksum to prog.md5.txt. Then it uses diff -s on the two. If
neither tool is found it just skips that check.
Format/typo check README.md file.
The try.sh script does a number of things. First it checks if either
play(1) or aplay(1) are installed. If neither are installed it warns the
user and tells them they will have to play the WAV files manually (it'll
also refer them to the FAQ about SoX which is where play(1) comes from).
If either are installed it'll use that program (in order given above).
After setting that up it converts pi.wav to the digits and then plays
pi.wav (if possible). Then it does the same with jenny (see README.md
for details). Finally it does it for 10666-28 (the closest that
resembles IOCCC-28). It also plays one (if possible, obviously) from
stdin (written from the program).
Updated bugs.md with a limitation the author noted.
Format/typo checked README.md file.
Updated .gitignore.
The try.sh script is for the original entry. The try.alt.sh is of course
for the alt version that I only recently made.
Removed html files recode.html and chocolate-cake.html (the horror! But
there is the markdown file so all is good... or would be if it wasn't
for the fact it's enciphered as a fun way to experience the entry .. or
else otherwise a frustration if there wasn't
2020/ferguson1/chocolate-cake.md? :-) ).
Updated .gitignore.
Minor updates to chocolate cake file: but of course for most people they
might want 2020/ferguson1/chocolate-cake.md instead.
This should be all that needs to be done for 2020/ferguson2 - for now
anyway. The documentation has not been checked for typos/formatting but
that might happen another time.
Updated chocolate-cake.md file with some added notes.
Added PDF file ioccc-and-chocolate.pdf which was downloaded from a
website I originally linked to in chocolate-cake.md.
Removed html files based on the markdown files as the markdown files are
the source of them and this is being done differently now. In other
words index.html and inventory.html have not been removed, just those
that were created by me (or from what I wrote).
This does not format fix anything as I can always do that later. It is
after all my entry.
Minor fix in play.sh.
Minor update in bugs.md.
I believe this completes the review of 2020/ferguson1 but it's entirely
possible (almost certain) that things could be cleaned up more. However
in order to get through the rest of 2020 I am only doing quick passes
over my entries.
Why a try.sh for this? It shows that you can also automate the play (it
happens to come from the author's remarks, however, so there's that
too). Then it tells you to be serious by playing with a friend, either
real or imagined, rather than doing something so silly.
Update bugs.md with a INABIAF section.
The README.md file has been format/typo checked.
This alt code prints out the text one character at a time to make it
easier to read and more generally so it's not dumped out at once. This
also makes it a bit more like the original thing (at least as I recall
it :-) ).
The default sleep time is 400000 microseconds but one can change it
like:
make clobber SLEEP=0 alt
which would disable the delay, making it like the original.
If it's < 0 then it's set to the default.
I did not yet add a try.sh script. That'll likely come later when
working on 2020. I only did this now as I thought of this idea and
didn't want to forget it.
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.
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.