Commit Graph
3804 Commits
Author SHA1 Message Date
Landon Curt Noll a4bd2fff67 add sample 3 phase parse command line parse
Adjusted `inc/md2html.cfg` to improve the 3 phase parse process.

Added `tmp/sample_getopt.sh` as a demo of the 3 phase parse of command
line options and arguments for that a markdown to HTML tool that
uses the `inc/md2html.cfg` configuration file.

Try:

```sh
cd tmp
./sample_getopt.sh -v 3 foo
```

The `tmp/sample_getopt.sh` tool performs a somewhat complicated 3
phase getopt parse of simulated command line options and arguments
that a tool converting markdown to HTML and using the `inc/md2html.cfg`
configuration file would perform.  The tool does not actually use
the  `inc/md2html.cfg`, it just simulates the complex 3 phase getopt
parsing procedure.

Updated `tmp/README.md` accordingly.
2023-12-18 00:30:11 -08:00
Landon Curt Noll 19218d5fd8 Merge pull request #1736 from xexyl/cable32013
Add missing alt subsections to 2013/cable3
2023-12-17 13:58:31 -08:00
Landon Curt Noll 4360a1f695 add instructions for how to compile 1988/spinellis
Because of the nature of 1988/spinellis, we cannot compile
the entry directory.  While there may be workarounds to
automatically compile code that tries to read source from
standard input, such workarounds are likely not portable
or at best uglify the process.

NOTE: This entry should NOT use a `try.sh` nor `try.alt.sh`
approach.  Instead the user needs to be directed to perform
the actions.  We do this by echoing instructions from the Makefile.

We remove the entry line from `input.txt` and `input2.txt`
to make the echoed instructions in improve the clarity
of the echoed instructions.

We turn off all warnings, due to the fact that whatever
the user might enter might have minor issues.  As such,
and to be similar, we turn off all warnings to the compiled
commands just in case compiler writers or ANSI C does
something silly in the future.  ;-)

We clean up `make clean`, `make clobber` as well as
updating and sorting `.gitignore`.
2023-12-17 13:47:45 -08:00
Cody Boone Ferguson e4ca73288e Add missing alt subsections to 2013/cable3 2023-12-17 12:40:44 -08:00
Cody Boone Ferguson 6e35e2d6d0 Add missing alt subsection to 2011/vik 2023-12-17 12:39:09 -08:00
Cody Boone Ferguson d1489ed011 Add 1998/dlowe/try.alt.sh, add missing subsections 2023-12-17 12:37:23 -08:00
Cody Boone Ferguson 1a26232be0 Add missing alt subsections to 1995/vanschnitz
The spoiler.c was also renamed to vanschnitz.alt.c and the Makefile was
updated so that running make alt will compile it. The Makefile also now
has -Wno-implicit-int.
2023-12-17 12:29:12 -08:00
Cody Boone Ferguson 7b53858243 Add missing alt subsections in 1994/tvr 2023-12-17 12:24:34 -08:00
Cody Boone Ferguson d9c3005ec7 Minor fixes in FAQ
Let's just say that these minor issues have also gone up in smoke.
2023-12-17 12:23:02 -08:00
Landon Curt Noll ce4fc0e7f9 Merge pull request #1730 from xexyl/buzzard.2-1992 2023-12-17 12:19:56 -08:00
Landon Curt Noll 56bd051c11 Merge pull request #1728 from xexyl/dale88 2023-12-17 12:19:25 -08:00
Landon Curt Noll f530a1af9f Merge pull request #1727 from xexyl/hines87-make-alt 2023-12-17 12:17:46 -08:00
Landon Curt Noll 86b976216f Merge pull request #1723 from xexyl/hines87 2023-12-17 12:17:04 -08:00
Cody Boone Ferguson 43774f02c0 Add missing alt subsections to 1992/buzzard.2 2023-12-17 12:15:01 -08:00
Cody Boone Ferguson e4104152eb Add missing alt subsections to 1988/westley
The README.md file only had 'Alternate code' and no subsections for how
to build or use the alt code. This is because I had already gone through
this year before we changed the way to present alt code.
2023-12-17 12:11:40 -08:00
Landon Curt Noll 1c0e5140ff Merge pull request #1722 from xexyl/yang2019-try 2023-12-17 12:05:51 -08:00
Landon Curt Noll af6863db77 Merge pull request #1720 from xexyl/help-thanks 2023-12-17 12:04:17 -08:00
Cody Boone Ferguson bd2653d7d6 Remove 1988/dale alt code - had no purpose 2023-12-17 11:36:24 -08:00
Cody Boone Ferguson 0f467e3106 Fix 1987/hines/Makefile - remove alt target
I also added -Wno-implicit-int.
2023-12-17 11:32:49 -08:00
Cody Boone Ferguson 7b4c2b2a8a Fix 1987/lievaart/Makefile - remove alt targets 2023-12-17 11:31:29 -08:00
Cody Boone Ferguson f1e038f56e Remove alt target from 1987/westley/Makefile 2023-12-17 11:30:12 -08:00
Cody Boone Ferguson 571beb510c Remove 1987/westley alt code - had no purpose 2023-12-17 11:28:07 -08:00
Cody Boone Ferguson 2dafcafec9 Remove 1987/lievaart alt code - had no purpose 2023-12-17 11:26:30 -08:00
Cody Boone Ferguson 14610ab707 Remove 1987/hines alt code - had no purpose
It just was a different #include that used to work. The functionality is
the same.
2023-12-17 11:24:03 -08:00
Cody Boone Ferguson 9104ac41f3 Add 2019/yang/try.sh, update bugs.md + formatting
The try.sh script checks that the terminal size is large enough for two
files, the prog.c (last check) and sample_input.txt (provided by the
author). If it's too small for either it exits as it can't work. The
added ioccc.txt is very short in column and rows so that should not be a
problem (except in very extreme cases?).

The sample_input.txt file had trailing newlines removed because it
showed differences in output otherwise (and shouldn't).

The bugs.md was updated - add INABIAF for this entry.

Format/typo check README.md file.
2023-12-17 10:35:25 -08:00
Cody Boone Ferguson a76d3fde42 Add save state option in 2018/mills, update bugs
The save state option is based on the author's remarks that one can
change the W macro to MAP_SHARED. This is defined in the Makefile so a
variable called 'SAVE' was added which if not 1 will result in
MAP_PRIVATE. This way one can run

    make clobber SAVE=1 all

and it'll save state, assuming that (if you add a file) you run 'sync'
before exiting. If you don't run sync(1) it's likely the file won't
exist or it'll be corrupt (like a.out from mullender.c). README.md file
updated for this update. Note that the setting the W macro to ${MAP} is
only done for the make targets that had it set to MAP_PRIVATE. This is
because I guess that if it's already set to MAP_SHARED in the Makefile
there is a good reason for this. This is noted in the Makefile.

The bug I discovered happens whether or not state is saved (this had to
be verified before I did the above change that I added when I was
working on this entry some days back but never committed it for this
reason). If you run ./prog and then exit (ctrl-e) if you then run ./prog
again it'll show a strange message as if the image was corrupt. You have
to hit enter at this point (that's important) and then hit ctrl-e again.
When you run it a third time it'll be okay. I did not look at this in
detail but it probably should be fixed.

The Makefile also tries to make the note about preserving images to be
the state of the file (downloaded) at the time the entry won and how any
updates are unofficial stand out more.
2023-12-17 08:37:58 -08:00
Cody Boone Ferguson 3a470289db More updates to thanks file
Added something I did and also shorted (slightly) other parts of it.
2023-12-17 05:27:14 -08:00
Cody Boone Ferguson 811aba866a Add missing README to archive-2018.tar.bz2
This file is from my copy from the preview period of 2018 but that
somehow was missing. I had added this to /2018/README.md but this was
not carried over to the archive tarball.
2023-12-17 05:15:42 -08:00
Cody Boone Ferguson 924459f4d2 Try improving order/format of Cody in thanks file 2023-12-17 04:58:54 -08:00
Cody Boone Ferguson dd22c2ffbb Clarification in thanks file (2014/maffiodo2)
In this entry it could have been interpreted as the author provided the
try.sh script too rather than just the alternate code (which they did
provide but I put in the alt source code file).
2023-12-17 04:52:28 -08:00
Cody Boone Ferguson ee882e8fc4 Minor typo fix in thanks file
Also I changed (in the honour roll) 'Cody' to 'Cody Boone Ferguson' and
'Yusuke' to 'Yusuke Endoh'.
2023-12-17 04:49:11 -08:00
Landon Curt Noll f1c4b7aaf7 improve FAQ 5.6, thank Cody for finding broken links
The question for FAQ 5.6 was improved to be more compact
while addressing both broken and wrong web links.

Removed any direct reference to drugs in an effort to
avoid problems from those who are humor impaired,
as well as "bots" to might flag the site as connected to drugs.

Moved the reference to the tool used by Cory to find
broken links to the thanks page.
2023-12-16 21:01:03 -08:00
Landon Curt Noll 69cb88704b Merge pull request #1717 from xexyl/dogon2019-try 2023-12-16 12:06:26 -08:00
Landon Curt Noll d87700700c Merge pull request #1716 from xexyl/dead-invalid-links 2023-12-16 11:56:02 -08:00
Landon Curt Noll a84dae9444 Merge pull request #1715 from xexyl/diels-grabsch2-try 2023-12-16 11:45:17 -08:00
Landon Curt Noll 90f9b26281 Merge pull request #1714 from xexyl/sound-faq 2023-12-16 11:43:41 -08:00
Cody Boone Ferguson 01dd7bdee7 Add 2019/dogon/try.sh, update bugs.md, README.md
Updated Makefile so one can easily change the 'Z' macro by doing:

    make clobber MEMORY=... all

This is not usually useful but there are occasions where it is. As the
README.md points out this value must be a power of two!

The try.sh script runs the program on a number of the mc files, first
showing the input keys as a reminder (it also reminds one to keep in
mind the focus of windows).

The bugs.md is updated to note that it uses gets(3).

Format/typo check README.md file.

I changed the number of years ago that microorganisms appeared on Earth
as the number was off: there are those wondrous hydrothermal vents that
spewed mineral rich waters. Fun fact on the history of the Earth: did
you know that as of 2013 the number of years since the dinosaurs were
wiped out is not 65m years but actually 66m? That means that if you were
born before 2013 and you didn't die right before the revision that
you're in a rare group of people who have had a major historical update
as far as the dinosaurs go. But don't let it get to your head too much!
It also means you're ancient, possibly even a dinosaur, and you're
headed their way. :-) That's the price we must pay for being in that
group.
2023-12-16 09:33:17 -08:00
Cody Boone Ferguson 5906389fa8 Add FAQ about dead and invalid links
... and what one should do, of course. This includes an example of an
invalid link (albeit an extreme one :-) ) that I fixed quite some time
back (months ago) just to give an idea. But it's more useful to check
for dead links in the IOCCC website itself (linking to pages/files in
the website that is). Of course I'll be doing that once the README.md
files are in order but there's a high chance I won't be able to find
them all esp as after the website is done I have more to do.
2023-12-16 05:04:57 -08:00
Cody Boone Ferguson 8b51d5d83e Improve 2019/diels-grabsch/try.sh
Before doing 'diff -s sha512sum.txt prog.txt' it does a cat on both
files (in one command) so that one can see what is being compared
(or to verify what is being compared).
2023-12-16 04:18:55 -08:00
Cody Boone Ferguson 2a44ac299b Update FAQ about entries requiring sound libraries
This update was supposed to be committed in
0cbd1db764 which was for 2018/algmyr but
it was accidentally left out.
2023-12-16 04:11:18 -08:00
Landon Curt Noll 61f8812c5b Merge pull request #1713 from xexyl/diels-grabsch22019-try 2023-12-15 17:33:33 -08:00
Cody Boone Ferguson 51707205e9 Add 2019/diels-grabsch2/try.sh script
The try.sh script looks for sha512sum and shasum. If either of these are
found it will use the one found (in the order of sha512sum first and
shasum -a 512 second) and prog. If neither can be found it uses just
prog. If one of them can be found, however, it shows how the output is
the same.

The prog.c was restored from prog.orig.c. Like 2019/diels-grabsch1 the
purpose is no longer valid and even more problematic is the fact that
the checksum value obviously would not be correct otherwise. Makefile
updated instead.

The README.md file has been format/typo checked.

.gitignore updated - added files that try.sh script uses (though it does
delete them after use).
2023-12-15 13:44:53 -08:00
Cody Boone Ferguson 4fc1683dc0 Add 2019/diels-grabsch1/try.sh + other fixes
Add Shakespeare.txt from 2019/mills. This was used in the try commands
(now try.sh) by doing cd ../mills ; make ; cd ../diels-grabsch1 but this
is problematic because it requires that one has the same directory
structure. Even more than that there's talk about having a tarball with
each entry by itself so the text file has to be in this entry's
directory too.

The prog.c was reverted back to the original source code and the
Makefile updated to have a -Wno- option. Originally the idea was to make
the author's remarks true that even -Weverything of clang shows no
warnings (which certainly did at the time) be true. I had the thought
that it would be nice to keep CSILENCE empty. But this was bordering on
going too far and more recent versions of clang have yet another dubious
warning and it seems that that warning one cannot even prevent (but
doing so here would obviously not be okay) so if that is silenced it
would mean that CSILENCE is no longer empty anyway. This way is better
anyway as the code is now the same. Of course the statement by the
author that a certain paragraph in README.md is the same shape and size
as prog.c is no longer true but that can't be helped.

Format/typo check README.md file.
2023-12-15 12:44:34 -08:00
Cody Boone Ferguson 70b085933c Change bug status of 2019/ciura, add scripts etc.
I'm almost positive that my earlier fixes to the scripts for the other
languages was all that is needed and the reason they don't work is due
to the dictionary and the fact that in some languages it is hard if not
impossible to form perfect pangrams especially with the entire alphabet.
This appears to be the case with German. A point of interest that I put
in the German scripts is:

    # Are the umlauts ä, ö, ü and Eszett (ß) letters in the German alphabet? There
    # is more than one opinion on the subject but a lot of words do have an umlaut
    # (or Umlaut in German). In some (probably all) systems this script outputs
    # nothing probably because it's very hard to form a perfect pangram in German,
    # if it's not impossible. Nevertheless, we do include the other characters
    # whether or not they are in your view considered part of the alphabet for the
    # reason that so many words have them.

I put it 'if it's not impossible' because this also depends on what
letters are provided. These scripts give the entry every letter,
however, including those with diacritics so in the case of German it's
not going to work.  It is possible to make it work if you remove some
letters or you give a word that has all the letters (but that kind of
defeats the purpose). As for the other languages I don't know if it's
possible or not (and I'm not fluent in German either - I just know
some). A search suggested it's possible in some other languages but the
author noted it's not in Spanish at least according to their estimates.
Nevertheless I believe that the fixes I made are all that's needed so
this entry now has INABIAF in the bugs.md file.

Fixed the Makefile so the alt version would actually build. Added
scripts to use the alt version instead.

Format/typo check README.md file.

Added try.sh and try.alt.sh.

Downloaded and converted the PS file linked to by the author to PDF and
added to repo.
2023-12-15 12:17:23 -08:00
Landon Curt Noll 85f9224c9b Merge pull request #1710 from xexyl/burton2019 2023-12-15 10:45:25 -08:00
Landon Curt Noll 3ad4ed2d80 Merge pull request #1706 from xexyl/bellard2018-main-args 2023-12-15 10:42:06 -08:00
Cody Boone Ferguson 00b9181b11 Add 2019/burton/try.sh and other fixes/updates
The try.sh runs prog and wc side by side but in a way that is formatted
(including alignment) so it's easier to see what line is from which
program and it also runs make test.

The script cow was renamed cow.sh to help browsers with whether or not
to display or download.

The script check was renamed check.sh to help browsers with whether or
not to display or download.

The script check.sh was fixed in case the 'x' (passed in to the script
as an environmental variable) is not executable (it resets it back to
./prog) and also made to satisfy ShellCheck.

The script cow.sh was fixed for ShellCheck moo (or was it too? :-) ).
2023-12-15 09:30:14 -08:00
Cody Boone Ferguson ae420f7b32 Add 2019/adamovsky/try.sh, crash.unl + formatting
The crash.unl is what the judges put in their remarks (and at the end of
the file they say more). It was added so one can see what is meant.
Updated bugs.md for this - INABIAF.

The try.sh script is as usual.

The README.md file has been format/typo checked.
2023-12-15 08:36:22 -08:00
Cody Boone Ferguson eb73925850 Fix year in thanks file for poikola
The fixes made were accidentally put in 2019 instead of 2018.
2023-12-15 05:37:13 -08:00
Cody Boone Ferguson 475b0beec7 Improve 1984/mullender alt code
Using 2018/mills (an amazing entry) with trial and error I was able to
determine the approximate speed that the :-) moved across the screen and
now the alt code moves at almost exactly (I believe, at least) that
speed.

The mullender.alt2.c was deleted; instead that became mullender.alt.c.
This is because (I believe but have not confirmed) that the original did
not exit after it timed out and there's no need to have two alt versions
when they're so similar. One is good enough and the obvious choice is
the one that can keep going on.

.gitignore updated.
2023-12-15 04:52:39 -08:00