From 8cb2cc6b7f334c951728d688f38ab69e6b720c5b Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Sun, 19 Feb 2023 07:11:21 -0800
Subject: [PATCH 01/11] Minor fixes in 2020/burton
In the check_be.sh script the default expected prog_be to be in the path
but that's not likely so make it ./prog_be instead.
Updated README.md to change prog.be to be prog_be and also add a note
about it segfaulting without an argument at the judges' comments, close
to the top.
The Makefile also warns on the entry segfaulting on no argument. This
way the viewers can have a warning. I will look at doing this with other
entries that might segfault too but later on.
I also added some example invocations to highlight something Dave Burton
mentioned in his remarks. Of course if he's against this I have no
problem there but I think it enhances the README.
---
2020/burton/Makefile | 2 ++
2020/burton/README.md | 18 ++++++++++++++----
2020/burton/check_be.sh | 2 +-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/2020/burton/Makefile b/2020/burton/Makefile
index ccf753142..346e2a909 100644
--- a/2020/burton/Makefile
+++ b/2020/burton/Makefile
@@ -436,9 +436,11 @@ all: ${TARGET} ${DATA}
@${TRUE}
prog: prog.c
+ @echo "NOTE: this program will segfault without an argument."
${CC} ${CFLAGS} -DB=${B} -DI=${I} -DT=${T} -DS=${S} $< -o $@ ${LIBS}
prog_be: prog.c
+ @echo "NOTE: this program will segfault without an argument."
${CC} ${CFLAGS} -DB=${_B} -DI=${_I} -DT=${_T} -DS=${_S} $< -o $@ ${LIBS}
check: check.sh
diff --git a/2020/burton/README.md b/2020/burton/README.md
index 128aace9e..81c998235 100644
--- a/2020/burton/README.md
+++ b/2020/burton/README.md
@@ -24,18 +24,28 @@ The code for this entry can be found in prog.c
./prog 85
+ ./prog 128 128
+ ./prog 128 128 128
+ ./prog 128 128 128 128
+ # Can you determine why this shows strange output for the first and third
+ # but not the second? Can you find a pattern here? What happens if you
+ # specify different numbers?
+
### Selected Judges Remarks:
This tiny one-liner is a bit-twiddlers delight! It does all of the work
without looping.
To understand how it works, a good place to start is to look at the hex
-value that results when the two magic constants are XOR'ed.
+value that results when the two magic constants are XORed.
Once you've figured out what happens with one set of constants, how can
choosing new constants, but using the same computation generate a reversed
result?
+NOTE: this entry will dump core if you do not specify an argument.
+
+
## Author's comments:
Invoke this with a single non-negative integer less than 256, and a useful transformation occurs.
@@ -47,7 +57,7 @@ so they are truly configuration parameters, not logic.
### Notes
-One ping argument only. It will SEGV on zero arguments, and
+One ping argument only. It will segfault on zero arguments, and
display strange results if more than one argument.
Small, non-negative integers only. Useful range is 0 .. 511, sorta, for LE; 0 .. 255 for BE.
@@ -70,11 +80,11 @@ On a little-endian machine:
On a big-endian machine:
- clang -include stdio.h -include stdlib.h -Wall -Weverything -pedantic -DB=7091606191627001958LL -DI=6006468689561538903LL -DT=1 -DS=0 -o prog.be prog.c
+ clang -include stdio.h -include stdlib.h -Wall -Weverything -pedantic -DB=7091606191627001958LL -DI=6006468689561538903LL -DT=1 -DS=0 -o prog_be prog.c
You might be interested to compile it both ways on the same host, and try:
- ./prog 1; ./prog.be 1
+ ./prog 1; ./prog_be 1
-----------------------------------------------------------------------------------------------------
(c) Copyright 1984-2020, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
diff --git a/2020/burton/check_be.sh b/2020/burton/check_be.sh
index 55a3a2a0e..903ff8749 100644
--- a/2020/burton/check_be.sh
+++ b/2020/burton/check_be.sh
@@ -1,7 +1,7 @@
#!/bin/sh
prog="$1"
-: ${prog:=prog_be}
+: ${prog:=./prog_be}
check_code() {
/bin/echo -n "$1 "; $prog $1 | rev
From 895b1f67c1dd48595f86a532118a869d8057bdf7 Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Sun, 19 Feb 2023 07:50:46 -0800
Subject: [PATCH 02/11] Minor update to 2020/endoh1/README.md
Just added a subheading for the keyboard commands (under how to use) to
help them stand out.
---
2020/endoh1/README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/2020/endoh1/README.md b/2020/endoh1/README.md
index 93415fee8..12a79f2d0 100644
--- a/2020/endoh1/README.md
+++ b/2020/endoh1/README.md
@@ -57,6 +57,8 @@ It uses ncurses:
You will see a terminal-wide field of a minesweeper. Probe a cell by mouse click.
If a cell turns out to have a mine (or not), the program determines whether its neighbors have a mine or not, and automatically probes (or flags) the cell.
+##### Keyboard commands
+
* `R`: new game (You can also click the smiley face at the top line.)
* `Q`: quit
From ef3d85978b6e3ee4040f0f75817ed216e34ab4f0 Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Sun, 19 Feb 2023 07:54:47 -0800
Subject: [PATCH 03/11] Minor fixes in 2020/kurdyukov4
The Makefile referenced a URL that no longer is valid (or less valid?).
The README.md referred to shakespeare.txt but the file (extracted from
the file downloaded from the curl invocation in the Makefile) is
Shakespeare.txt (in some places it was capitalised).
There were some formatting fixes in the README.md file too.
There is a .gitignore added but not in this commit - an upcoming commit.
It has the two files in that gzip file added but since it also had other
files I've kept it for a separate commit. A question of whether the
files should just be part of the entry is another to maybe consider but
for now it's not.
---
2020/kurdyukov4/Makefile | 2 +-
2020/kurdyukov4/README.md | 80 ++++++++++++++++++++-------------------
2 files changed, 43 insertions(+), 39 deletions(-)
diff --git a/2020/kurdyukov4/Makefile b/2020/kurdyukov4/Makefile
index f8e37b6f5..52d31d8f4 100644
--- a/2020/kurdyukov4/Makefile
+++ b/2020/kurdyukov4/Makefile
@@ -440,7 +440,7 @@ alt: ${ALT_TARGET}
data: ${DATA}
${DATA}:
- ${CURL} -o $@.gz http://ioccc.org/2019/mills/$@.gz && ${GUNZIP} $@.gz
+ ${CURL} -o $@.gz https://www.ioccc.org/2019/mills/$@.gz && ${GUNZIP} $@.gz
###############
# utility rules
diff --git a/2020/kurdyukov4/README.md b/2020/kurdyukov4/README.md
index fca9c0865..9f0a74e8a 100644
--- a/2020/kurdyukov4/README.md
+++ b/2020/kurdyukov4/README.md
@@ -23,8 +23,9 @@ The code for this entry can be found in prog.c
./prog Eugene_Onegin.txt 2000 10 1
# For those not knowing Russian, just to see how the UTF-8 characters are handled
-(*Performance depends on the number of same hashes found.*
-*Too many identical strings if the context length is small. author*)
+*Performance depends on the number of same hashes found.
+Too many identical strings if the context length is small.
+-- Author*
### Selected Judges Remarks:
@@ -32,18 +33,19 @@ We were able to write our own program performing the same trick
using the (still non-standard, for some reason) library function `memmem`,
but that way it works too fast regardless of the context length, and it's much less fun.
-(*Wow, amazing! Very fast, but there is a drawback to randomness.*
-*If some string only appears after half the input, the first instance*
-*of this string will have a 50% chance of occurrence.*
-*Example:*
+*Wow, amazing! Very fast, but there is a drawback to randomness.
+If some string only appears after half the input, the first instance
+of this string will have a 50% chance of occurrence.
+Example:*
- echo "00000000000000000000 01 02 02 02 02 02 02" > test.txt
- ./prog test.txt 1000 2 123
- # more twos in output
- ./rand test.txt 1000 2 123
- # more ones in output
+ echo "00000000000000000000 01 02 02 02 02 02 02" > test.txt
+ ./prog test.txt 1000 2 123
+ # more twos in output
+ ./rand test.txt 1000 2 123
+ # more ones in output
-*But this will happen very rarely on real data. author*)
+*But this will happen very rarely on real data.
+-- Author*
Try using the same random seed and varying the context size.
@@ -74,32 +76,34 @@ Randomness and performance depend inversely on this parameter and the size of th
You can try this with the inputs provided with `2019/mills` from the IOCCC winners.
- $ ./prog shakespeare.txt 2001 10 12345
- r sons, wives for them, as the hope I had it. This is the way they be not too ra
- sh a trial of you only. Therefore will not out of door? Nurse: Marry, bachelor,
- Have other some, he is in Rome: but where is Warwick frowns at his. PRINCE EDWAR
- D: Where is the light: But I will watch thy waking, what work he makes Amongst y
- ou? Come, sirs, We shall write to you, fortune and The hazard of much blood. I w
- ould to heaven, respective lenity, And fire-eyed fury be my convoy in the senten
- ced; 'tis too horrible, so bloody on the banks If they were created, Would bring
- them to our presence? FLORIZEL: And those his golden crown, What is six winters
- ? they are but Lewis and Warwick bids you come too late come from the king's fri
- end, and will do't; for, look you, sir, For still thy true servitor: I will rend
- an oak And peg thee in his knotty entrails till Thou hast hazel eyes: what eye
- but such an eye would spy out such a day to-morrow, or next day: He is within th
- e limit of the like, forsworn to love, Send her a story of more woe Than this is
- a merry ballad, but a very pretty one. MOPSA: Thou hast amazed me, My name is E
- lbow: I do lean upon, Now thou art: Thy tears are womanish; thy wild acts denote
- The unreasonably: come, you must: and there, I then do't to them? VOLUMNIA: Now
- the red pestilence hangs in our aim, which is yours. What is't your honour, as
- in war, since then, You have said before: My child is dead; or 'twere not 'long
- of him; but he, like you, lads; about your ears it is Menenius? Second Officer:
- Come, come, young wanton and effeminate boy, Takes on the hungry beach Fillip th
- e stars Shall bitterly begin his wooing that we have in hand are angry And frown
- ing brow to brow, ourselves, Still your own affections are devised, As blanks, b
- enevolences, and I thank thee for it. KING HENRY VI: Master lieutenant comes. Ma
- ster lieutenant comes. Master lieutenant, pray you,-- CORIOLANUS: What's that to
- him? CHRISTOPHER: At Pembroke, Sir James Blunt, And Rice ap Thomas with a virtu
+
+ $ ./prog Shakespeare.txt 2001 10 12345
+ r sons, wives for them, as the hope I had it. This is the way they be not too ra
+ sh a trial of you only. Therefore will not out of door? Nurse: Marry, bachelor,
+ Have other some, he is in Rome: but where is Warwick frowns at his. PRINCE EDWAR
+ D: Where is the light: But I will watch thy waking, what work he makes Amongst y
+ ou? Come, sirs, We shall write to you, fortune and The hazard of much blood. I w
+ ould to heaven, respective lenity, And fire-eyed fury be my convoy in the senten
+ ced; 'tis too horrible, so bloody on the banks If they were created, Would bring
+ them to our presence? FLORIZEL: And those his golden crown, What is six winters
+ ? they are but Lewis and Warwick bids you come too late come from the king's fri
+ end, and will do't; for, look you, sir, For still thy true servitor: I will rend
+ an oak And peg thee in his knotty entrails till Thou hast hazel eyes: what eye
+ but such an eye would spy out such a day to-morrow, or next day: He is within th
+ e limit of the like, forsworn to love, Send her a story of more woe Than this is
+ a merry ballad, but a very pretty one. MOPSA: Thou hast amazed me, My name is E
+ lbow: I do lean upon, Now thou art: Thy tears are womanish; thy wild acts denote
+ The unreasonably: come, you must: and there, I then do't to them? VOLUMNIA: Now
+ the red pestilence hangs in our aim, which is yours. What is't your honour, as
+ in war, since then, You have said before: My child is dead; or 'twere not 'long
+ of him; but he, like you, lads; about your ears it is Menenius? Second Officer:
+ Come, come, young wanton and effeminate boy, Takes on the hungry beach Fillip th
+ e stars Shall bitterly begin his wooing that we have in hand are angry And frown
+ ing brow to brow, ourselves, Still your own affections are devised, As blanks, b
+ enevolences, and I thank thee for it. KING HENRY VI: Master lieutenant comes. Ma
+ ster lieutenant comes. Master lieutenant, pray you,-- CORIOLANUS: What's that to
+ him? CHRISTOPHER: At Pembroke, Sir James Blunt, And Rice ap Thomas with a virtu
+
-----------------------------------------------------------------------------------------------------
(c) Copyright 1984-2020, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
From cbb3395551f3ff6bb48b2ea749f1fd48292d814b Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Sun, 19 Feb 2023 08:02:31 -0800
Subject: [PATCH 04/11] Typo fix in 2020/kurdyukov3/README.md
---
2020/kurdyukov3/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2020/kurdyukov3/README.md b/2020/kurdyukov3/README.md
index 86fee32d1..3269f3b70 100644
--- a/2020/kurdyukov3/README.md
+++ b/2020/kurdyukov3/README.md
@@ -35,7 +35,7 @@ is it a pnuch crad)?
Compile and try this:
-cat some.input.txt | ./prog
+cat input.txt | ./prog
The program can work with letters that are not represented in English, as long as these letters are encoded in the higher part of the single-byte character set (use `iconv` to convert from UTF-8 and back).
From a4b15edeea89e7d59918aebacc6196f1b2da13db Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Sun, 19 Feb 2023 08:19:03 -0800
Subject: [PATCH 05/11] Fixes in 2020/kurdyukov2
The Makefile now chmod +x makegif.sh as it's referred to in the
README.md.
Change word 'Depends' to 'Dependencies' in makegif.sh to read a bit
easier.
Make README.md a bit easier to read (as English is not Ilya's first
language).
Made the command Ilya suggests to make GIFs so that it makes use of the
command the judges suggested, noting that it's just an example.
Added middle name to my name to match my name as a winner.
Of course if Ilya objects to any of this (or any other entry of his) I'm
certainly okay with rolling back the changes (same with his other
entries) but I believe that this will make it a bit easier to try out
the entry.
---
2020/kurdyukov2/Makefile | 5 ++++-
2020/kurdyukov2/README.md | 36 ++++++++++++++++++++++++------------
2020/kurdyukov2/makegif.sh | 2 +-
3 files changed, 29 insertions(+), 14 deletions(-)
mode change 100644 => 100755 2020/kurdyukov2/makegif.sh
diff --git a/2020/kurdyukov2/Makefile b/2020/kurdyukov2/Makefile
index 549937925..1dadb3989 100644
--- a/2020/kurdyukov2/Makefile
+++ b/2020/kurdyukov2/Makefile
@@ -417,7 +417,7 @@ MAY_NEED_GCC= gcc
#
OBJ= prog.o prog_png.o prog_ppm.o
DATA= sample.jpg
-TARGET= prog prog_png prog_ppm
+TARGET= prog prog_png prog_ppm makegif
#
ALT_OBJ=
ALT_TARGET=
@@ -439,6 +439,9 @@ prog_png: prog.png.c
prog_ppm: prog.ppm.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
+makegif: makegif.sh
+ ${CHMOD} +x $?
+
# alternative executable
#
alt: ${ALT_TARGET}
diff --git a/2020/kurdyukov2/README.md b/2020/kurdyukov2/README.md
index 7f09808b9..77ae3c1cc 100644
--- a/2020/kurdyukov2/README.md
+++ b/2020/kurdyukov2/README.md
@@ -37,7 +37,7 @@ What is the complexity? Is it obvious from the source code?
## Author's comments:
### Usage
-This program divides the image into a specified number of rectangles. This process is content aware, so algorithm tries to match most of the information. However, it doesn't finds the best theoretically possible layout.
+This program divides the image into a specified number of rectangles. This process is content aware, so algorithm tries to match most of the information. However, it doesn't find the best theoretically possible layout.
./prog 1000 input.jpg output.jpg
@@ -45,13 +45,15 @@ This program divides the image into a specified number of rectangles. This proce
You can build three versions, depending on the image format.
-Default is JPEG version, if you have the *libjpeg* development package installed in your system, then `make` without arguments should do the thing.
+Default is JPEG version; if you have the `libjpeg` development package installed
+in your system, then `make` without arguments should do the right thing.
-If you want to use *libjpeg* compiled from sources, then use `LIBS` define to specify the path to includes and the library.
+If you want to use `libjpeg` compiled from sources, then use `LIBS` define to
+specify the path to includes and the library.
make prog LIBJPEG="-Ijpeg-6b jpeg-6b/libjpeg.a"
-Use this command to build a PNG version (you need *libpng*):
+Use this command to build a PNG version (you need `libpng`):
make prog_png LIBPNG="-lpng"
@@ -61,7 +63,7 @@ And the PPM version (no additional dependencies, can read raw/ASCII PPM, writes
### Building on macOS
-- Thanks to Cody Ferguson for this information!
+- Thanks to Cody Boone Ferguson for this information!
First, make sure you have the compiler tools installed e.g. by:
@@ -71,7 +73,7 @@ Make sure you install [MacPorts](https://www.macports.org/install.php). Then do:
$ sudo port install jpeg libpng ImageMagick
-The program itself doesn't need ImageMagick, install it only if you plan to make gifs from the results using "makegif.sh".
+The program itself doesn't need ImageMagick, install it only if you plan to make GIFs from the results using `makegif.sh`.
After that’s installed you need to run make with these options:
@@ -79,15 +81,25 @@ After that’s installed you need to run make with these options:
### Notes
-Made this thing while experimenting with the idea of representing an image with rectangles (lossy compression). It's not very good in that sense, but the results look funny, like a kind of cubism pixelart.
+Made this thing while experimenting with the idea of representing an image with
+rectangles (lossy compression). It's not very good in that sense, but the
+results look funny, like a kind of cubism pixelart.
-Do not use values above 50000, it gonna be slow.
+Do not use values above 50000, it'll be slow.
-To understand how this works, just try running with 1,2,3,4... number of rectangles. At each iteration, the rectangle with the biggest difference from the picture data is split (halves may have different size) horizontally or vertically to get the minimum difference.
+To understand how this works, just try running with 1,2,3,4... number of
+rectangles. At each iteration, the rectangle with the biggest difference from
+the picture data is split (halves may have different size) horizontally or
+vertically to get the minimum difference.
-You can use this command to make a gif from output images (uses ImageMagick):
-`convert -delay 10 -dither none -loop 0 $(ls out*.png | sort -V) $(ls out*.png | sort -rV) +map out.gif`
-Also provided `makegif.sh` to aid with gif creation.
+You can use this command to make a GIF from output images (uses ImageMagick).
+For instance after running the command suggested by the judges:
+
+
+ convert -delay 10 -dither none -loop 0 $(ls out*.jpg | sort -V) $(ls out*.jpg | sort -rV) +map out.gif
+
+
+Also provided `makegif.sh` to aid with GIF creation.
-----------------------------------------------------------------------------------------------------
diff --git a/2020/kurdyukov2/makegif.sh b/2020/kurdyukov2/makegif.sh
old mode 100644
new mode 100755
index 2fd63a145..f84533f0f
--- a/2020/kurdyukov2/makegif.sh
+++ b/2020/kurdyukov2/makegif.sh
@@ -7,7 +7,7 @@ dir="gif"
[ $# -lt 3 ] && [ "$ext" = "png" -o "$ext" = "ppm" ] && prog="./prog_$ext"
[ -f "$image" ] || {
echo "Usage: makegif.sh image.jpg output.gif ./prog"
- echo "Depends: ImageMagick, bc (basic calculator)"
+ echo "Dependencies: ImageMagick, bc (basic calculator)"
echo "Note: don't use large images (dimensions above 1000), ImageMagick may fail."
echo "Uses \"gif\" directory for temporary files."
exit 1
From 1756325e81dd21db8ba5f6fa634d8fc7d42fea43 Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Sun, 19 Feb 2023 08:37:18 -0800
Subject: [PATCH 06/11] Fixes in 2020/ferguson1
Typo fix.
Rename COMPILING -> COMPILING.md and HACKING -> HACKING.md. I have not
tested the formatting on either of these but they should be okay.
Updated the COMPILING (portability information) as I know it works under
Apple M1 chips too.
---
2020/ferguson1/{COMPILING => COMPILING.md} | 17 ++++++++++-------
2020/ferguson1/{HACKING => HACKING.md} | 14 ++++++++------
2020/ferguson1/Makefile | 2 +-
2020/ferguson1/README.md | 2 +-
2020/ferguson1/spoilers.md | 2 +-
5 files changed, 21 insertions(+), 16 deletions(-)
rename 2020/ferguson1/{COMPILING => COMPILING.md} (83%)
rename 2020/ferguson1/{HACKING => HACKING.md} (97%)
diff --git a/2020/ferguson1/COMPILING b/2020/ferguson1/COMPILING.md
similarity index 83%
rename from 2020/ferguson1/COMPILING
rename to 2020/ferguson1/COMPILING.md
index a514cf214..2ac12b5a4 100644
--- a/2020/ferguson1/COMPILING
+++ b/2020/ferguson1/COMPILING.md
@@ -13,15 +13,18 @@ should you run into trouble.
# Portability
-I have tested this under macOS Catalina, Fedora (29 and also 31 - no that's not
-a typo, I upgraded from 29 to 31 as I had delayed upgrading to 30 due to a
-number of issues and being busy) and CentOS 7.7.1908. It obviously requires
-ncurses but other than that nothing extra should be needed. Note that the
-testing of Fedora 29 was earlier in the development however (but then 29 is also
-EOL).
+I have tested this under macOS Catalina, macOS Ventura (and probably between the
+two), Fedora (29 and also 31 - no that's not a typo, I upgraded from 29 to 31 as
+I had delayed upgrading to 30 due to a number of issues and being busy) and
+CentOS 7.7.1908. It should work under any modern linux system and maybe other
+Unices as well as macOS (as noted).
+
+It obviously requires ncurses but other than that nothing extra should be
+needed. Note that the testing of Fedora 29 was earlier in the development
+however (but then 29 is also EOL).
Furthermore I do not believe - but I cannot confirm either - that endianness
-matters; I only have Intel CPUs.
+matters; I only have Intel CPUs and arm64 (MacBook Pro M1).
I imagine that it works for 32-bit systems but I do not know for sure.
diff --git a/2020/ferguson1/HACKING b/2020/ferguson1/HACKING.md
similarity index 97%
rename from 2020/ferguson1/HACKING
rename to 2020/ferguson1/HACKING.md
index 0a6730489..4b4e19e29 100644
--- a/2020/ferguson1/HACKING
+++ b/2020/ferguson1/HACKING.md
@@ -1,9 +1,11 @@
-# WARNING: There are some things cited in this document that are no longer
-# correct, might be misleading or otherwise not clear. This is both intentional
-# and unintentional. This is especially true for claims that something means
-# something specific. Put another way just because the table says something
-# doesn't mean it's the whole truth: no misleading comments but misleading
-# document that talks about some parts of the code!
+## Warning / caveat about this document
+
+WARNING: There are some things cited in this document that are no longer
+correct, might be misleading or otherwise not clear. This is both intentional
+and unintentional. This is especially true for claims that something means
+something specific. Put another way just because the table says something
+doesn't mean it's the whole truth: no misleading comments but misleading
+document that talks about some parts of the code!
In this document I provide information to the herpetologist hackers to help them
to modify certain things and add features for their studying of snakes. Or if
diff --git a/2020/ferguson1/Makefile b/2020/ferguson1/Makefile
index c20d49d13..f236752b1 100644
--- a/2020/ferguson1/Makefile
+++ b/2020/ferguson1/Makefile
@@ -420,7 +420,7 @@ MAY_NEED_GCC= gcc
##############################
#
OBJ= prog.o termcaps.o
-DATA= COMPILING HACKING bugs.md cannibalism.log \
+DATA= COMPILING.md HACKING.md bugs.md cannibalism.log \
chocolate-cake.md crazy.log gameplay.md \
snake-colours.sh snake.1 spoilers.md \
termcaps.c terminals.md troubleshooting.md
diff --git a/2020/ferguson1/README.md b/2020/ferguson1/README.md
index 696610398..1289a6cb9 100644
--- a/2020/ferguson1/README.md
+++ b/2020/ferguson1/README.md
@@ -314,7 +314,7 @@ I can think of at the least the following:
the max size or very close to it. In fact if you have the shedding size to be
even one on every move even if you normally can't win with the same size
screen you might find it happens much more easily! You could of course play
- with these paramters in different ways together - there are certainly
+ with these parameters in different ways together - there are certainly
different combinations than I have given.
- Of course you could also enable one or both cheat modes. You might be
considered a filthy cheat but both modes are quite fun (one being enabled by
diff --git a/2020/ferguson1/spoilers.md b/2020/ferguson1/spoilers.md
index eb8de02a2..03254de0e 100644
--- a/2020/ferguson1/spoilers.md
+++ b/2020/ferguson1/spoilers.md
@@ -40,7 +40,7 @@ actually done in more detail.
First I initialise curses; if this fails I print an error message ('curses
error') and return 1. Next the screen size is determined and I subtract 1 from
-each the x/y. If it's too small curses is ended and an error message ('screen
+both x/y. If it's too small curses is ended and an error message ('screen
too small') is printed - returning 1.
Next the max size of the snake is determined: if `MAXSIZE` is specified then
From d8a9777b0ec5d4e5272bc6484883d27b5e8d679c Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Sun, 19 Feb 2023 09:01:38 -0800
Subject: [PATCH 07/11] Fixes in 2020/ferguson2
Fix dead links by using the Internet Wayback Machine.
Slight rewording a subsection in recode.md.
---
2020/ferguson2/README.md | 8 ++++----
2020/ferguson2/enigma.1 | 8 ++++----
2020/ferguson2/recode.html | 4 ++--
2020/ferguson2/recode.md | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/2020/ferguson2/README.md b/2020/ferguson2/README.md
index 0bd7880b4..b7470f4df 100644
--- a/2020/ferguson2/README.md
+++ b/2020/ferguson2/README.md
@@ -663,7 +663,7 @@ that.
[1992 Worst Abuse of the Rules]: http://www.ioccc.org/1992/nathan/nathan.hint
[1998 ASCII / Morse code translator]: http://www.ioccc.org/1998/dorssel/dorssel.hint
[2014 Morse audio transcoder]: http://www.ioccc.org/2014/vik/README.md
-[Enigma Message Procedures]: http://users.telenet.be/d.rijmenants/en/enigmaproc.htm
+[Enigma Message Procedures]: https://web.archive.org/web/20200710094321/http://users.telenet.be/d.rijmenants/en/enigmaproc.htm
[Interactive Enigma Machine]: http://enigmaco.de/enigma/enigma.html
[enigma.1]: enigma.1
[recode.1]: recode.1
@@ -673,9 +673,9 @@ that.
[obfuscation.md]: obfuscation.md
[obfuscation.txt]: obfuscation.txt
[obfuscation.key]: obfuscation.key
-[Tony Sale's pages on The Enigma cipher machine]: http://www.codesandciphers.co.uk/enigma/index.htm
-[Technical Details of the Enigma Machine]: http://users.telenet.be/d.rijmenants/en/enigmatech.htm
-[The German Enigma Cipher Machine]: http://users.telenet.be/d.rijmenants/en/enigma.htm
+[Tony Sale's pages on The Enigma cipher machine]: https://web.archive.org/web/20200621180323/http://www.codesandciphers.co.uk/enigma/index.htm
+[Technical Details of the Enigma Machine]: https://web.archive.org/web/20200710094303/http://users.telenet.be/d.rijmenants/en/enigmatech.htm
+[The German Enigma Cipher Machine]: https://web.archive.org/web/20200710094243/http://users.telenet.be/d.rijmenants/en/enigma.htm
[How the Enigma was Set Up and Operated]: http://www.ellsbury.com/enigma3.htm
[https://ioccc.xexyl.net/2020/enigma]: https://ioccc.xexyl.net/2020/enigma
diff --git a/2020/ferguson2/enigma.1 b/2020/ferguson2/enigma.1
index 3598e55be..775dbaa6e 100644
--- a/2020/ferguson2/enigma.1
+++ b/2020/ferguson2/enigma.1
@@ -68,14 +68,14 @@ Written by Cody Boone Ferguson for IOCCC 2020 (the 27th IOCCC).
.PP
\fB\What is recode and why is it recommended?
@@ -540,7 +540,7 @@ anyway?
As I was making the above silly list something occurred to me. My other entries this year include a recipe for a wonderful double-layered chocolate fudge cake diff --git a/2020/ferguson2/recode.md b/2020/ferguson2/recode.md index bbd6a4c65..e32ea3618 100644 --- a/2020/ferguson2/recode.md +++ b/2020/ferguson2/recode.md @@ -39,7 +39,7 @@ Alternatively if you just want the recipe you could look at my Snake entry - [Example uses](#exampleuses) -- [Delicious Enigma: Double-layered Chocolate Fudge Cake](#cake) +- [Deliciously Enigmatic: Double-layered Chocolate Fudge Cake](#cake) # What is recode and why is it recommended? @@ -515,7 +515,7 @@ anyway? * Best idea: try the below experiment! -# Delicious Enigma: Double-layered Chocolate Fudge Cake +# Delicious Enigmatic: Double-layered Chocolate Fudge Cake As I was making the above silly list something occurred to me. My other entries this year include a recipe for a wonderful double-layered chocolate fudge cake From 6cca4fca75a3d110e2abe1af5689ea5b7ee00c04 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sun, 19 Feb 2023 09:04:20 -0800 Subject: [PATCH 08/11] Spelling error (typo?) in 2020/otterness/README.md --- 2020/otterness/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2020/otterness/README.md b/2020/otterness/README.md index 28a3c57f9..f2d2998e6 100644 --- a/2020/otterness/README.md +++ b/2020/otterness/README.md @@ -28,7 +28,7 @@ In an entry that boasts not using literals, one would expect to see straightforw small integers like `!(x^x)< Date: Sun, 19 Feb 2023 09:10:35 -0800 Subject: [PATCH 09/11] Typo fixes in 2020/yang/README.md It appears that the entry name is 'Mile' but since it's compiled to be 'prog' the command invocations should refer to ./prog not ./mile. I kept the other references to Mile as is. I'm aware that this entry does not seem to work under macOS but it could be that I've been working on this year too much and I need to finish up (fortunately I have only one more entry to look at). But it might be that it's simply not functional under macOS. --- 2020/yang/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2020/yang/README.md b/2020/yang/README.md index e4dd1316a..37c749dc7 100644 --- a/2020/yang/README.md +++ b/2020/yang/README.md @@ -44,7 +44,7 @@ spoiler](spoiler.html) that shows how this entry was written. ## Author's comments: ### Synopsis - echo "Hello world" | ./mile 12345 > encoded.c + echo "Hello world" | ./prog 12345 > encoded.c gcc -DPIN=12345 encoded.c -o ./decoded && ./decoded @@ -59,7 +59,7 @@ Mile is a C code generator. Run without arguments for the help message below: When run with an encoding PIN (first command line argument), Mile will read bytes from stdin and generate C code on stdout. Example: - echo "Hello, world!" | ./mile 56789 > encoded.c + echo "Hello, world!" | ./prog 56789 > encoded.c This generated code will reproduce the same input bytes on stdout when executed, if it was compiled with the same encoding PIN. From 3a31b9882b598b725fd2ceefd189420eb05112f8 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sun, 19 Feb 2023 09:15:13 -0800 Subject: [PATCH 10/11] Minor adjustments to 2020/tsoj/README.md Note which keys move which directions. Change 'Highscore' to 'High score'. --- 2020/tsoj/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2020/tsoj/README.md b/2020/tsoj/README.md index 1460ab298..e08f2103d 100644 --- a/2020/tsoj/README.md +++ b/2020/tsoj/README.md @@ -29,7 +29,7 @@ reverse indentation style. ## Author's comments: #### Controls - Movement: -`w`, `a`, `s`, `d` +`w` (forwards), `a` (left), `s` (backwards), `d` (right) - Fire: `space` - Quit: @@ -73,7 +73,7 @@ cc -std=c99 -O3 prog.c -o prog - `-Wno-misleading-indentation` - `-Wno-maybe-uninitialized` - You may experience a mild [motion aftereffect](https://en.wikipedia.org/wiki/Motion_aftereffect) when playing for too long -#### Highscore +#### High score Score will be shown in the top left corner. My best was **156**. If you beat that I'll send you the image of a very expensive chocolate. #### Features From 6970259b77b9674f0060e58a84ae0225ae846b46 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sun, 19 Feb 2023 09:16:49 -0800 Subject: [PATCH 11/11] Add 2020/.gitignore A lot of files were made by 2020 that are not part of the repo but were not ignored. I believe I have added them all. --- 2020/.gitignore | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 2020/.gitignore diff --git a/2020/.gitignore b/2020/.gitignore new file mode 100644 index 000000000..867483279 --- /dev/null +++ b/2020/.gitignore @@ -0,0 +1,20 @@ +burton/check +burton/check_be +burton/prog_be +endoh2/spoiler/ +endoh3/clock +endoh3/clock.c +endoh3/run_clock +ferguson2/recode +kurdyukov2/out.gif +kurdyukov2/out*.jpg +kurdyukov2/output.ppm +kurdyukov2/random.ppm +kurdyukov2/prog_png +kurdyukov2/prog_ppm +kurdyukov3/prog.extra +kurdyukov3/prog.orig +kurdyukov4/Eugene_Onegin.txt +kurdyukov4/Shakespeare.txt +yang/code.c +yang/encoded.c