From 75829b4561bd4225e97dba824f3d58d33fd4340a Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Tue, 8 Oct 2024 12:34:18 -0700
Subject: [PATCH] Fixes in 2006 html files and some of 2011
---
2006/monge/README.md | 30 +++++----
2006/monge/index.html | 45 +++++++++----
2006/night/README.md | 2 +-
2006/night/index.html | 2 +-
2006/sloane/README.md | 10 +--
2006/sloane/index.html | 10 +--
2006/stewart/README.md | 18 +++--
2006/stewart/index.html | 22 ++++--
2006/sykes2/README.md | 2 +-
2006/sykes2/index.html | 2 +-
2006/toledo2/README.md | 99 +++++++++++++++++----------
2006/toledo2/index.html | 145 +++++++++++++++++++++++++++++++++-------
2006/toledo3/README.md | 12 ++--
2006/toledo3/index.html | 12 ++--
2011/dlowe/README.md | 10 +--
2011/dlowe/index.html | 10 +--
bugs.html | 51 +++++++-------
bugs.md | 49 +++++++-------
18 files changed, 349 insertions(+), 182 deletions(-)
diff --git a/2006/monge/README.md b/2006/monge/README.md
index 47dca022f..b93d960a7 100644
--- a/2006/monge/README.md
+++ b/2006/monge/README.md
@@ -147,20 +147,24 @@ as you like (as understood by the C function `isspace()`).
Supported operations and functions are:
-```
- Operation | Description
+- `+`, `-`, `*`, `/`
+ - Arithmetic operations, priority of * , / over +,- is respected.
+- `<,>`
+ - Compares the real parts of two complex numbers (the imaginary part
+ is ignored). Any number of conditions is allowed, the iteration will
+ just stop as soon as one of them fails.
+- `Abs2`
+ - Calculates the squared norm, i.e.: `Abs2(a+b*i)` is `(a*a+b*b)+0*i`.
+- `Re`
+ - Extract the real part, i.e.: `Re(a+b*i)` is `a+0*i`.
+- `Im`
+ - Extract the imaginary part, i.e.: `Im(a+b*i)` is` b+0*i`.
+- `Exp`
+ - Calculates the complex exponential, i.e. `Exp(a+b*i)` is `e^a*(cos(b)+sin(b)*i)`.
- +,-,*,/ | Arithmetic operations, priority of * , / over +,- is respected.
- <,> | Compares the real parts of two complex numbers (the imaginary part
- | is ignored). Any number of conditions is allowed, the iteration will
- | just stop as soon as one of them fails.
- Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
- Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
- Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
- Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is e^a*(cos(b)+sin(b)*i).
- Ln | Calculates the principal value of the natural logarithm
- | i.e. Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.
-```
+- `Ln`
+ - Calculates the principal value of the natural logarithm i.e. `Ln(a+b*i)`
+ is `ln(a*a+b*b)/2 + atan(b/a)*i`.
Here are a few examples of fractals you can draw:
diff --git a/2006/monge/index.html b/2006/monge/index.html
index d469ec8e6..83f429fbf 100644
--- a/2006/monge/index.html
+++ b/2006/monge/index.html
@@ -491,18 +491,39 @@ expression must be an assignment ([variable] = [expr]) or a compari
< or > ([expr1] < [expr2] or [expr1] > [expr2]), and you can add spaces
as you like (as understood by the C function isspace()).
Supported operations and functions are:
- Operation | Description
-
- +,-,*,/ | Arithmetic operations, priority of * , / over +,- is respected.
- <,> | Compares the real parts of two complex numbers (the imaginary part
- | is ignored). Any number of conditions is allowed, the iteration will
- | just stop as soon as one of them fails.
- Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
- Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
- Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
- Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is e^a*(cos(b)+sin(b)*i).
- Ln | Calculates the principal value of the natural logarithm
- | i.e. Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.
++, -, *, /
+<,>
+Abs2
+Abs2(a+b*i) is (a*a+b*b)+0*i.Re
+Re(a+b*i) is a+0*i.Im
+Im(a+b*i) isb+0*i.Exp
+Exp(a+b*i) is e^a*(cos(b)+sin(b)*i).Ln
+Ln(a+b*i)
+is ln(a*a+b*b)/2 + atan(b/a)*i.Here are a few examples of fractals you can draw:
make
-There is an alternate version that supports arrow keys. See the alternate
+ There is an alternate version that supports arrow keys. See the Alternate
code section below. We recommend the alt version so that you can see what this looked like back in 2006.
-If you wish to see the original faster version see original
+If you wish to see the original faster version see Original
code below.To use:
diff --git a/2006/sloane/README.md b/2006/sloane/README.md
index 962e3c581..b4d8811a9 100644
--- a/2006/sloane/README.md
+++ b/2006/sloane/README.md
@@ -5,7 +5,7 @@
```
We recommend the alt version so that you can see what this looked like back in 2006.
-If you wish to see the original faster version see [original
+If you wish to see the original faster version see [Original
code](#original-code) below.
@@ -29,7 +29,7 @@ it. To do so try:
./sloane.alt
```
-If you wish to make it like the original, as if the below [Original
+If you wish to make it like the original, as if the below [original
code](#original-code) was being used, you can do:
```
@@ -57,13 +57,13 @@ Should you wish to see the original you may do so with the original code,
./sloane
```
-WARNING: if you are easily overstimulated with fast movement or have
+**WARNING**: if you are easily overstimulated with fast movement or have
photosensitivity please be careful running this version and instead see the
above!
-NOTE: again as above, to see what is going on, we recommend that you instead use
+**NOTE**: again as above, to see what is going on, we recommend that you instead use
the alternate code which we described in the [To build](#to-build) and
-[try](#try) sections above.
+[Try](#try) sections above.
## Judges' Comments:
diff --git a/2006/sloane/index.html b/2006/sloane/index.html
index 41a63528c..4f521086c 100644
--- a/2006/sloane/index.html
+++ b/2006/sloane/index.html
@@ -411,7 +411,7 @@ Location: US - United States of America
./nightTo build:
make altTo use:
@@ -423,7 +423,7 @@ value used in ./slone.altusleep(). The default is 75000 but you c
it. To do so try:
make clobber SLEEP=70000 clobber alt
./sloane.alt
-If you wish to make it like the original, as if the below Original
+ If you wish to make it like the original, as if the below original
code was being used, you can do:
@@ -434,12 +434,12 @@ code was being used, you can do: make SLEEP=0 clobber alt
./sloane.alt
make clobber all
./sloane
-WARNING: if you are easily overstimulated with fast movement or have +
WARNING: if you are easily overstimulated with fast movement or have photosensitivity please be careful running this version and instead see the above!
-NOTE: again as above, to see what is going on, we recommend that you instead use +
NOTE: again as above, to see what is going on, we recommend that you instead use the alternate code which we described in the To build and -try sections above.
+Try sections above.Looks almost good enough to eat, dunnit? I suppose you could argue that, at first blush, this looks like a self-reproducing program.
diff --git a/2006/stewart/README.md b/2006/stewart/README.md index a29c64104..b64b8a47e 100644 --- a/2006/stewart/README.md +++ b/2006/stewart/README.md @@ -32,9 +32,9 @@ where `file` is one of: > spirals3 spirals4 squares stars stars2NOTE: you cannot specify a different width from height; it’s one number.
-NOTE: convert(1) belongs to ImageMagick.
NOTE: you cannot specify a different width from height; it’s one number.
+NOTE: convert(1) belongs to ImageMagick.
./try.sh
After running the program on a few files it will ask you if you wish to run it @@ -452,9 +452,20 @@ a reasonably experienced user who can parse formats in their mind. :-)
The program should be run with the following
./stewart <m> <n> <ifs>
where:
- m = The size of the picture (picture will be m X m in size).
- n = The number of iterations to run (More will make for a clearer picture).
- ifs = The file to use as input.
+m
+n
+ifs
+The program will spit out an XBM image on standard out. Minimal checking is done on the arguments mainly that there are 3. Wrong arguments will cause the program to bomb out.
@@ -500,6 +511,7 @@ another kind of fractal, those from the IFS:Included in my submission will be a tarball of some IFS files, including one that attempts (not very well) to mimic the IOCCC logo (I figure it can’t hurt to attempt to suck up, right?).
+(NOTE from Judges: we extracted the files.)
I would try to explain how to create an IFS file but I am not smart enough to condense it down to something that is coherent.
Basically the break down is:
diff --git a/2006/sykes2/README.md b/2006/sykes2/README.md index 3d63f0977..32c10fbd4 100644 --- a/2006/sykes2/README.md +++ b/2006/sykes2/README.md @@ -46,7 +46,7 @@ string actually forms part of the lookup table. Intel CC warns about the lack of a declaration for the argument to `main()`. (`gcc` does not notice this though, even with `-Wall`.) But anyway it can -easily be declared as int at the expense of 4 more characters. +easily be declared as `int` at the expense of 4 more characters. I'm not sure of the effects on a hard disk of rewriting the same file multiple times per second for a long time. Run at your own risk! diff --git a/2006/sykes2/index.html b/2006/sykes2/index.html index adad230ab..123a8a22e 100644 --- a/2006/sykes2/index.html +++ b/2006/sykes2/index.html @@ -432,7 +432,7 @@ of brackets to a minimum, and to keep the character count as low as possible.Intel CC warns about the lack of a declaration for the argument to main().
(gcc does not notice this though, even with -Wall.) But anyway it can
-easily be declared as int at the expense of 4 more characters.
int at the expense of 4 more characters.
I’m not sure of the effects on a hard disk of rewriting the same file multiple times per second for a long time. Run at your own risk!
Z=kbhit()?getch():0 - write --> putchar(7[o]) - system --> nothing -``` +- `read` + - `Z=kbhit()?getch():0` +- `write` + - `putchar(7[o])` +- `system` + - nothing Notice that you'll have to do `#includeHALT.COM to stop the emulator (so it closes
by the provided C.BIOS.
To get a complete CP/M system, you will need the following files
from the SOURCE directory:
ASM.COM DDT.COM DUMP.COM ED.COM LOAD.COM
- PIP.COM STAT.COM SUBMIT.COM XSUB.COM
+ASM.COMDDT.COMDUMP.COMED.COMLOAD.COMPIP.COMSTAT.COMSUBMIT.COMXSUB.COMTo import them, you must run the emulator with an argument, by example:
./toledo2 DDT.COM
@@ -530,15 +539,26 @@ bit 2) and C (Carry, bit 0).
It is easy if your platform has getch()/kbhit() and
ANSI terminal:
read --> Z=kbhit()?getch():0
- write --> putchar(7[o])
- system --> nothing
+read
+Z=kbhit()?getch():0write
+putchar(7[o])system
+Notice that you’ll have to do #include <conio.h> as well.
Also add the following to trap Ctrl-C:
-#include <signal.h>
-signal(SIGINT, SIG_IGN);
-NOTE: this is what the alternate code is for!
-NOTE from the judges: in Unix like systems getch() is part of curses but this
+
#include <signal.h>
+ signal(SIGINT, SIG_IGN);
+NOTE: this is what the alternate code is for!
+NOTE from the Judges: in Unix like systems getch() is part of curses but this
is not what is needed.
On PC/DOS you need to add ANSI.SYS to CONFIG.SYS.
In Unix the min 0 on stty is required but circa 2001
@@ -555,25 +575,98 @@ counter is the c pointer and
main loop reads every opcode and
separates them in one of three common forms. A lot of ternary operators selects
the instruction.
o[0] = B register o[1] = C register
- o[2] = D register o[3] = E register
- o[4] = H register o[5] = L register
- o[6] = Flags o[7] = A or accumulator
+o[0]
+o[1]
+o[2]
+o[3]
+o[4]
+o[5]
+o[6]
+o[7]
+The following instructions do peripheral operation:
- 76 Quits emulator
- DB 00 Reads key pressed status
- DB 01 Reads key
- DB 02 Reads byte from file (Carry=EOF)
- D3 xx Writes byte from acc. to console
- ED ED 02 Reads sector
- ED ED 03 Writes sector
+76
+DB 00
+DB 01
+DB 02
+D3 xx
+ED ED 02
+ED ED 03
+Memory addresses:
- FBFA = Low source/target direction
- FBFB - High source/target direction
- FBFC - Sector
- FBFD - Low cylinder
- FBFE - High cylinder
- FBFF - Drive.
+FBFA
+FBFB
+FBFC
+FBFD
+FBFE
+FBFF
+The BIOS is tailor made for this emulator, and helps to simplify it.
make
-NOTE: this entry requires the X11/Xlib.h header file and the X11 library to
+
NOTE: this entry requires the X11/Xlib.h header file and the X11 library to
compile. For more information see the
FAQ on “X11”.
The author provided two alternate versions, one which adds a status bar and another that makes it text only. The author also provided a version that they -tested with Windows. See alternate code below.
+tested with Windows. See Alternate code below. ./toledo3 [1 | 2 | 3 [b]]
Can the evaluation function be enhanced to make the program play stronger?
Using toledo3-sbar.c (which is too large for this IOCCC size -rules) creates a status display about gameplay on the window title bar.
-Using toledo3-txt.c turns this into being purely text based.
+Using toledo3-sbar.c (which is too +large for this IOCCC’s size rules) creates a status display about gameplay on +the window title bar.
+Using toledo3-txt.c turns this into +being purely text based.