31 Commits
Author SHA1 Message Date
Landon Curt Noll 4ee4c731f7 convert markdown copyright TAB chars into SPACE chars
While not strictly necessary, replacing the two ASCII tab characters
in the markdown copyright comment makes it easier to detect problematic
TAB indentation within markdown files.

After this commit, only 90 markdown files have leading ASCII TAB
characters.  And again, while not strictly necessary, we can consider
running expand on those 90 markdown files to see what effect that
might have on the HTML files they produce.

Replace leading ASCII TAB characters with multiples of 8 ASCII SPACE
characters (the default action of the `expand(1)` tool) might have
an negative effect on some HTML formatting where **hack-a-round**
formatting was attempted to fix broken indentation caused by
problematic ASCII TAB characters.

Think of this as a baseline for evaluating leading
TAB characters within markdown files.

TODO: Consider either using `expand(1)` to replace leading ASCII
TAB characters with multiples of 8 ASCII SPACE characters AND/OR
modifying the appropriate `bin` tool to convert leading ASCII TAB
characters into multiples of 8 ASCII SPACE characters.
2024-06-22 22:15:25 -07:00
Landon Curt Noll 3ddbac9e6b improve how markdown code language is commented
We added a space between the markdown triple code mark
and language that was enclosed in HTML comments.

So a line of the form:

````
```<!---c--->
````

became:

````
``` <!---c--->
````

This was done to **help** some code see that the HTML comment
string was not a markdown code specifier.   Not all code
understands this after this changed.  For example, `pandoc(1)`
still forms HTML classes of the form "&lt;!---c--&gt;"
when it encounters the above mentioned change.

We also fixed a problem with `2019/dogon/README.md` regarding
a markdown code block.

We also fixed a problem with `2020/yang/README.md` regarding
a markdown code block.
2024-04-12 11:45:50 -07:00
Landon Curt Noll b66c79254a add hack-a-round for language specified markdown code blocks
When language is specified in a markdown code block such as:

````
```c
    printf("Hello, world!\n");
```
````

is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.

A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment.  For example:

````
```<!---c-->
    printf("Hello, world!\n");
```
````

This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better  "_hack-a-round_" to the "markdown code language
specifier" problem is found.

The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:

```
<pre class="&lt;!---c--&gt;"><code> .. </code></pre>
```

We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.

For now, this hack-a-round will have to do.
2024-04-04 14:50:38 -07:00
Landon Curt Noll a996f8d2b8 improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces.

We add `--tab-stop=8` to all `pandoc(1)` executions in order to set
a better tab stop indentation, especially for tab intended code blocks.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26"
to "1.6 2024-03-31".

Fixed `1991/brnstnd/sorta.README.md` so that the sorta code
is code blocks.

Removed unneeded paragraph group in copyright in `inc/footer.default.html`.

Fixed excess whitespace after list Author on entry `index.html` page.

Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26"
to "1.6 2024-03-31".

Performed `make www` to perform the above and test under macOS.

TODO: Fix the problem of the initial line of code being extra intended.
TODO: Fix excess whitespace around code that is inline.
2024-04-01 04:48:48 -07:00
Landon Curt Noll cbc022d864 improve Copyright and CC
The inc/footer.default.html now has a common Copyright and CC BY-SA
4.0 License section for all generated HTML files.

All markdown files have a similar Copyright and CC
at the bottom in the form of an HTML comment.
2024-03-20 00:19:52 -07:00
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
Cody Boone Ferguson e257cd1af0 Add 1987/wall/try.sh
This script automates through a pipeline some of the input suggested in
the README.md. The README.md still has some of what try.sh has because
it shows that you can do it entering line by line.
2024-01-05 09:09:34 -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 bd574c791c fix more README.md headers 2023-11-02 16:44:05 -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 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 e1cd30eff0 change use of <br> with blackslash for markdown line breaks 2023-10-18 16:21:43 -07:00
Cody Boone Ferguson b2cd7434bf Format/typo check 1987/wall/README.md 2023-10-18 05:10:11 -07:00
Cody Boone Ferguson 3a2829f98e Clean up 1987/wall warnings, fix README.md to run
(Well .. some warnings. See below.)

Depending on system (compiler and possibly platform) different warnings
were being triggered. It was easy to fix the code for some of them (like
wrong prototypes and then #including stdlib.h) but this caused problems
in another way (in macOS clang - clang is more strict and has -Werror or
else an equivalent by default which might or might not be possible to
disable .. haven't tried it) but since the code works as is I simply
silenced the warnings in the Makefile.

A note that might be useful to know for other Makefiles that has to do
with the fact that macOS gcc equates to clang (which I have noted many
times as it's an unfortunate problem): since it is seen as gcc the
Makefile check for gcc only will be triggered in macOS even though the
compiler is clang.

A similar problem is that if one does in linux just 'make' they might
end up with the compiler being 'cc' so I added an ifeq in the Makefile
for just cc. It might or might not be useful to add this to the rest of
the entry Makefiles. The same warnings disabled for cc and gcc were
added.

Another thing to keep in mind is with gcc/cc in linux it will still show
the warnings that were silenced as in it will show that some warnings
might have been disabled (it won't warn about the problems but will note
that some warnings were disabled - no I can't figure out the real
purpose of it either other than to be extra careful .. or annoying :-) ).

In linux clang also triggers even more warnings including the ridiculous
misleading indentation that they unfortunately adopted from gcc. These
warnings were not disabled at this time.

As far as the README.md goes one of the to run commands was incorrect in
that when running './wall' by itself one should put in numbers only, not
just any text.
2023-09-28 04:13:43 -07:00
Cody Boone Ferguson 76cef25333 Fixes to thanks for fixes file
At least one entry was missing (1984/anonymous).

Some entries were removed. One such entry was not ever broken but
instead when I had renamed a file (to markdown) I forgot to update the
DATA variable in the Makefile which then broke compilation. This was
seen in the log and mistakenly believed that there was something wrong
with the entry when there wasn't. Other entries removed were not fixes
but notes.

Various README.md files have been updated for this sometimes just
formatting merely because I opened the file because for instance there
is an alternate version (many by me) that is referred to. I'd not be
surprised if more README.md files have to be updated for this much
better system but these will be found in time when I do another pass
(and some years I have not checked at all yet).
2023-07-01 09:49:26 -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 7591ae8a1c Update Larry Wall address and country code 2023-04-22 04:29:11 -07: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 95f384ec3f Update 1987 winning entries' README.md files
Format and typo fixes.
2023-04-14 06:18:56 -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 28541cbaa2 Remove 1987/wall alt code
Not needed as it's not instructive or useful. The archive suffices for
those who wish for the original.
2023-04-10 06:56:16 -07:00
Cody Boone Ferguson b1e1b3f7f9 Add note about fgets() in 1987/wall/README.md
As in why this was important to do (though once again keeping gets() is
a problem but it's a potential problem to not keep it as well).
2023-04-07 10:55:17 -07:00
Cody Boone Ferguson 06a5665f5d Make alt code for gets() / fgets() changes
As both Landon and I have been wondering if changing entries to use
fgets() is bordering on tampering with entries I decided to make the
original (sometimes bug fixed) versions (using gets()) alt code. I had
originally started to make the fgets() version of each entry the alt but
since the fgets() versions can handle input better and since some also
fixed bugs (see below) I decided to make the original version the alt
code (this also is how it is for other entries).

There were some exceptions here. If the change also fixed some crashes
or other bugs outside of the gets() to fgets() conversion I did not
bother to make an alt version. An example is 1992/dds. In some cases the
alt code does have bug fixes in which case they were added.

Updated the Makefiles and .gitignore files as well for the alt target
and the new files (compiled and in the case of 1992/adrian additional
source files in the Makefile alt rule).

This should solve the problem observed by Landon and me. It wouldn't be
a problem to change it so the alt version is the one that uses fgets()
but I think that might be the wrong choice.

In some entries I altogether avoided changing to fgets() say if the
author notes it uses gets() (in one case even providing a version that
uses fgets()). In some cases using fgets() introduces a bug so those are
also not changed.

As for 1990/tbr there's a strong reason for not having the fgets()
version being the alt. In macOS in particular (in linux - or maybe gcc,
not sure - it shows a warning at linker time) it will mess up the first
line of output in a potentially confusing way. For instance:

    $ ./tbr.alt
    $ warning: this program uses gets(), which is unsafe.
    # nothing here, what to do?

And that touches on another issue of making the alt version the one that
uses gets(): the warnings that can be alarming during compilation,
linking and (in the case of macOS) runtime.

Not all entries should be or can be changed to fgets() but some can and
it's warranted for these reasons. More will possibly happen in the
future.
2023-04-05 05:22:35 -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 e805f41d34 Mass fixes to headers in README.md files
There were many many README.md files with the wrong heading level for
different sections. These have been changed.

To help go through the changes it should be noted I used sgit and also
here is what is changed:

The 'Try', 'To build' and 'To run' lines have two '#'s. Some had one and
others had three.

An exception is that in 1984/anonymous/README.md for the alternative
code that had three '#'s. This is not consistent yet and it might be
that only two are desired. But for now that one at least has three.
2023-03-31 06:43:59 -07:00
Landon Curt Noll 1b1dd2f2e4 put all README.md files under CC BY-SA 4.0 License
This will make is easier for others to share README.md
files while requiring them to attribute the file
when using it.
2023-03-26 02:58:27 -07:00
Cody Boone Ferguson 31ee47176c Make 1987/wall use fgets() not gets()
Added in README.md a diff so one can see how it was done.
2023-03-21 10:16:00 -07:00
Cody Boone Ferguson 9cf605973f Minor changes to 1987
Typo fix in 1987/biggar/README.md.

Add another try in 1987/wall/README.md with a question to ponder.
2023-03-16 10:20:34 -07:00
Cody Boone Ferguson 564a25e0e7 More README.md files updated
Some of the files modified include some of the files modified yesterday;
others were not modified yesterday. I backtracked as I noticed some
sections are missing in earlier README.md files. However more have to be
checked in earlier years. I'm committing now as I have to do other
things and am likely done for the day.
2023-03-14 08:35:01 -07:00
Cody Boone Ferguson ddb942b35c Fix 1987/wall/README.md
Refer to compiled binary and also provide more input to try.
2023-02-13 09:00:00 -08:00
Cody Boone Ferguson 851e191519 Rename hint.txt and hint.text to README.md 2023-02-08 05:08:28 -08:00