From 6ce71468abbf1346764a5e9c463e33a7cf4f31fc Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:07:24 -0700 Subject: [PATCH 1/7] Fix broken links in 2001/westley --- 2001/westley/README.md | 11 ++++++----- 2001/westley/index.html | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/2001/westley/README.md b/2001/westley/README.md index 8e83f048e..d5fb6cbd5 100644 --- a/2001/westley/README.md +++ b/2001/westley/README.md @@ -47,15 +47,16 @@ For more detailed information see [2001 westley bugs](../../bugs.html#2001_westl The author stated that one can sort (ignoring leading blanks i.e. `sort -b`) the code by line and it will always sort the order of the input. -This is compiled by default; use `westley.sort` as you would `westley` above. +This is generated and compiled by default; use `westley.sort` as you would +`westley` above. ## Punch card code: -The author also stated that if you just sort the code you'll get the with -`sort`) version that just prints out the punch card. The -[westley.punch.c](%%REPO_URL%%/2001/westley/westley.punch.c) code is specifically so that Westley can punch -everyone in the face! :-) This is also compiled by default. +The author also stated that if you just sort the code (`sort westley.c`) you'll +get a version that just prints out the punch card. The `westley.punch.c` +(generated by `make` via `sort westley.c`) code is specifically so that Westley +can punch everyone in the face! :-) This is also compiled by default. ### Punch card try: diff --git a/2001/westley/index.html b/2001/westley/index.html index 69e1cbeb3..d6e3c065d 100644 --- a/2001/westley/index.html +++ b/2001/westley/index.html @@ -419,12 +419,13 @@ code below.

Sorted code:

The author stated that one can sort (ignoring leading blanks i.e. sort -b) the code by line and it will always sort the order of the input.

-

This is compiled by default; use westley.sort as you would westley above.

+

This is generated and compiled by default; use westley.sort as you would +westley above.

Punch card code:

-

The author also stated that if you just sort the code you’ll get the with -sort) version that just prints out the punch card. The -westley.punch.c code is specifically so that Westley can punch -everyone in the face! :-) This is also compiled by default.

+

The author also stated that if you just sort the code (sort westley.c) you’ll +get a version that just prints out the punch card. The westley.punch.c +(generated by make via sort westley.c) code is specifically so that Westley +can punch everyone in the face! :-) This is also compiled by default.

Punch card try:

    echo 'Brian Westley does it again!' | ./westley.punch 2>/dev/null

Alternate code:

From 369f77ac084f926e6a83b6ba00611ea97146140a Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:07:36 -0700 Subject: [PATCH 2/7] Fix broken links in 2004/hibachi --- 2004/hibachi/README.md | 2 +- 2004/hibachi/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/2004/hibachi/README.md b/2004/hibachi/README.md index 80e511566..69f3378c9 100644 --- a/2004/hibachi/README.md +++ b/2004/hibachi/README.md @@ -26,7 +26,7 @@ we are considering starting an IOCCC standards body just to reign in the likes of Mr Howe. This entry also has the dubious honour of being the only one to have been -submitted with its own [configure](%%REPO_URL%%/2004/hibachi/build/configure) script. +submitted with its own `configure` script. NOTE: the author states there is a tarball `hibachi.tgz` but this was extracted so the file does not exist here. diff --git a/2004/hibachi/index.html b/2004/hibachi/index.html index 76e816829..d05a50867 100644 --- a/2004/hibachi/index.html +++ b/2004/hibachi/index.html @@ -409,7 +409,7 @@ are not exactly sure how many organisations will be upset with this entry, but we are considering starting an IOCCC standards body just to reign in the likes of Mr Howe.

This entry also has the dubious honour of being the only one to have been -submitted with its own configure script.

+submitted with its own configure script.

NOTE: the author states there is a tarball hibachi.tgz but this was extracted so the file does not exist here.

Author’s remarks:

From 671465c9ddcf5cf1859e39753cf836f1a2234f29 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:07:51 -0700 Subject: [PATCH 3/7] Fix broken links in 2006/sykes1 --- 2006/sykes1/README.md | 4 ++-- 2006/sykes1/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/2006/sykes1/README.md b/2006/sykes1/README.md index 6025ee4d8..b9278c11f 100644 --- a/2006/sykes1/README.md +++ b/2006/sykes1/README.md @@ -103,7 +103,7 @@ can do so like: ## Judges' remarks: -Read the [sykes1.html](sykes1.html) page source. +Read the `sykes1.html` (generated by `make`) page source. Now then read the C source. Confused? :-) If it's not clear try: ``` @@ -147,7 +147,7 @@ shows you how to build the cube piece by piece, rendered in glorious 3D ASCII. ASCII art is all very well, but you also have a web browser, right? Well, just -open the file [sykes1.html](sykes1.html). This html file is just a copy of +open the file `sykes1.html`. This html file is just a copy of [sykes1.c](%%REPO_URL%%/2006/sykes1/sykes1.c), which helpfully contains an html document that should make the browser display for you a nice animated GIF, showing you how to build the cube. Rendered in glorious 3D color. diff --git a/2006/sykes1/index.html b/2006/sykes1/index.html index d4754041e..9d15ac23c 100644 --- a/2006/sykes1/index.html +++ b/2006/sykes1/index.html @@ -436,7 +436,7 @@ maximum:

can do so like:

    ./try.sh

Judges’ remarks:

-

Read the sykes1.html page source. +

Read the sykes1.html (generated by make) page source. Now then read the C source. Confused? :-) If it’s not clear try:

    diff -s sykes1.c sykes1.html

For extra credit, understand what happens when you give this entry @@ -460,7 +460,7 @@ need to be very lucky indeed to stumble across a solution.

shows you how to build the cube piece by piece, rendered in glorious 3D ASCII.

ASCII art is all very well, but you also have a web browser, right? Well, just -open the file sykes1.html. This html file is just a copy of +open the file sykes1.html. This html file is just a copy of sykes1.c, which helpfully contains an html document that should make the browser display for you a nice animated GIF, showing you how to build the cube. Rendered in glorious 3D color.

From b89ba8a57dd1cc16b81302761cf0bb6074fadc67 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:08:12 -0700 Subject: [PATCH 4/7] Fix broken links in 2012/zeitak --- 2012/zeitak/README.md | 2 +- 2012/zeitak/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/2012/zeitak/README.md b/2012/zeitak/README.md index 48c68a1fe..4eb75f96c 100644 --- a/2012/zeitak/README.md +++ b/2012/zeitak/README.md @@ -15,7 +15,7 @@ code](#alternate-code) below. ``` where `file` is the file to be checked for nesting errors. For example, you may -try [incorrect.c](%%REPO_URL%%/2012/zeitak/incorrect.c) and the program itself. You may also run it on +try [incorrect.1.quote.c](%%REPO_URL%%/2012/zeitak/incorrect.1.quote.c) and the program itself. You may also run it on text files that are not code. diff --git a/2012/zeitak/index.html b/2012/zeitak/index.html index c0f676dd2..b834a15ee 100644 --- a/2012/zeitak/index.html +++ b/2012/zeitak/index.html @@ -402,7 +402,7 @@ code below.

To use:

    ./zeitak < file

where file is the file to be checked for nesting errors. For example, you may -try incorrect.c and the program itself. You may also run it on +try incorrect.1.quote.c and the program itself. You may also run it on text files that are not code.

Try:

    make test
From 4db5148d44bf5694095bce0c9da90a823ac20993 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:08:25 -0700 Subject: [PATCH 5/7] Fix broken links in 2014/endoh1 + make clobber --- 2014/endoh1/Makefile | 3 ++- 2014/endoh1/spoilers.html | 4 ++-- 2014/endoh1/spoilers.md | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/2014/endoh1/Makefile b/2014/endoh1/Makefile index 6c4e48c1c..fdbf6f34a 100644 --- a/2014/endoh1/Makefile +++ b/2014/endoh1/Makefile @@ -224,7 +224,8 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} ${RM} -rf *.dSYM - ${RM} -f main.c treacle.c + ${RM} -f main.c treacle.c + ${RM} -f alpha.txt ast.txt raw.txt reg.txt seq.txt @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ diff --git a/2014/endoh1/spoilers.html b/2014/endoh1/spoilers.html index 386160758..6f60754b3 100644 --- a/2014/endoh1/spoilers.html +++ b/2014/endoh1/spoilers.html @@ -480,9 +480,9 @@ renaming and automatic register allocation only for this purpose.

  • alpha.rb applies “alpha-renaming” to the instruction sequence.
  • register.rb applies “register allocation”.
  • assemble.rb converts the sequence to the final stack-machine instructions.
  • -
  • interp.c is an implementation of the VM.
  • +
  • vm.c is an implementation of the VM.
  • link.rb generates main.c by linking the instructions and interpreter source.
  • -
  • gen-prog.c generates prog.c based on main.c.
  • +
  • gen-prog.rb generates prog.c based on main.c.
  • You can run the process by rake command. ruby-minisat gem is needed.

        $ gem install ruby-minisat
    diff --git a/2014/endoh1/spoilers.md b/2014/endoh1/spoilers.md
    index 4fdc5d91f..0cdb97f3c 100644
    --- a/2014/endoh1/spoilers.md
    +++ b/2014/endoh1/spoilers.md
    @@ -116,9 +116,9 @@ The compiler tool chain is the following.
     * [alpha.rb](%%REPO_URL%%/2014/endoh1/alpha.rb) applies "alpha-renaming" to the instruction sequence.
     * [register.rb](%%REPO_URL%%/2014/endoh1/register.rb) applies "register allocation".
     * [assemble.rb](%%REPO_URL%%/2014/endoh1/assemble.rb) converts the sequence to the final stack-machine instructions.
    -* [interp.c](%%REPO_URL%%/2014/endoh1/interp.c) is an implementation of the VM.
    +* [vm.c](%%REPO_URL%%/2014/endoh1/vm.c) is an implementation of the VM.
     * [link.rb](%%REPO_URL%%/2014/endoh1/link.rb) generates `main.c` by linking the instructions and interpreter source.
    -* [gen-prog.c](%%REPO_URL%%/2014/endoh1/gen-prog.c) generates [prog.c](%%REPO_URL%%/2014/endoh1/prog.c) based on `main.c`.
    +* `gen-prog.rb` generates [prog.c](%%REPO_URL%%/2014/endoh1/prog.c) based on `main.c`.
     
     You can run the process by `rake` command.  `ruby-minisat` gem is needed.
     
    
    From 8ec504fed59778dee699b7626a4a5188dd7b615d Mon Sep 17 00:00:00 2001
    From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
    Date: Tue, 30 Apr 2024 10:10:01 -0700
    Subject: [PATCH 6/7] Update thanks file for recent links fixes
    
    .. as some of the text was incorrect or outdated.
    ---
     thanks-for-help.html | 5 +++++
     thanks-for-help.md   | 7 +++++++
     2 files changed, 12 insertions(+)
    
    diff --git a/thanks-for-help.html b/thanks-for-help.html
    index 86ae7f937..6a8e2b78b 100644
    --- a/thanks-for-help.html
    +++ b/thanks-for-help.html
    @@ -3804,6 +3804,9 @@ program to be used. Thus the Makefile rule looks like:

    The LDFLAGS were updated to have -lm as the author suggested it uses the math.h library which not all systems link in by default (Linux for instance does not).

    +

    The author noted that one can build a.c and refers to it in documentation. The +rule in the Makefile was originally removed as part of the above but it was +restored so that one can see what the author is talking about.

    Further, after the file 2013/hou/doc/example.markdown was moved to 2013/hou/doc/example.html to match the rest of the repo this broke make which Cody also fixed.

    @@ -3880,6 +3883,8 @@ install gem. Then it tells you how to install rake. If then it tells you to install a specific gem and then to try again. Finally if rake succeeds it will verify that prog is executable and if it is it will run it.

    +

    After more work on the manifest was done Cody had to update the clobber rule +to remove some text files so as to not cause problems with an invalid manifest.

    Cody also added the try.sh script.

    Barely worth noting but done nonetheless, Cody renamed the read_me.html file to spoilers.html to be clearer in its purpose as diff --git a/thanks-for-help.md b/thanks-for-help.md index d81bf5394..af746e00a 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -4859,6 +4859,10 @@ The `LDFLAGS` were updated to have `-lm` as the author suggested it uses the `math.h` library which not all systems link in by default (Linux for instance does not). +The author noted that one can build `a.c` and refers to it in documentation. The +rule in the Makefile was originally removed as part of the above but it was +restored so that one can see what the author is talking about. + Further, after the file `2013/hou/doc/example.markdown` was moved to [2013/hou/doc/example.html](2013/hou/doc/example.html) to match the rest of the repo this broke `make` which Cody also fixed. @@ -4963,6 +4967,9 @@ then it tells you to install a specific gem and then to try again. Finally if `rake` succeeds it will verify that `prog` is executable and if it is it will run it. +After more work on the manifest was done Cody had to update the `clobber` rule +to remove some text files so as to not cause problems with an invalid manifest. + Cody also added the [try.sh](%%REPO_URL%%/2014/endoh1/try.sh) script. **_Barely_** worth noting but done nonetheless, Cody renamed the `read_me.html` From f13c8a7be2732306ed3356b1694b6dd7612b4545 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:14:03 -0700 Subject: [PATCH 7/7] Fix remaining broken links in 2013/hou Now the tool bin/find-missing-links.sh exits 0! --- 2013/hou/README.md | 2 +- 2013/hou/doc/example.html | 2 +- 2013/hou/doc/example.md | 2 +- 2013/hou/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/2013/hou/README.md b/2013/hou/README.md index d470f493c..43dc2b907 100644 --- a/2013/hou/README.md +++ b/2013/hou/README.md @@ -147,7 +147,7 @@ restrictions](#self-imposed-restrictions) section below for more details. * The building process does not involve any OS tool beyond `cc(1)` and `make(1)`. No `gzip(1)` compression! `a.c.gz` doesn't fit in 2053 bytes, anyway. -* Neither [hou.c](%%REPO_URL%%/2013/hou/hou.c) nor [a.c](%%REPO_URL%%/2013/hou/a.c) (the *real* decompressed source) uses +* Neither [hou.c](%%REPO_URL%%/2013/hou/hou.c) nor `a.c` (the *real* decompressed source) uses `#define` (or `cc -D`) at all. * The source code is not required at runtime. * `a.c` does not drop optional features to reduce size. There are pure diff --git a/2013/hou/doc/example.html b/2013/hou/doc/example.html index 488834a31..6aff52cbf 100644 --- a/2013/hou/doc/example.html +++ b/2013/hou/doc/example.html @@ -605,7 +605,7 @@ editing program, you need to convert the RGB values from 0..255 to 0..1, and then put here its square. Only after squaring you get your real, lively color in the output image, as opposed to something dull and gray. You need to do the same if you use a RGB texture. And yes, that is the what the second sqrt(3) in -a.c is for.

    +a.c is for.

    Going beyond colors, to define a shiny or dull surface one needs more maths, and optics. The jargon for this is BRDF (Bidirectional Reflectance Distribution Function) importance sampling. Let’s continue to function o.

    diff --git a/2013/hou/doc/example.md b/2013/hou/doc/example.md index f927e9b18..a5e1ad6c9 100644 --- a/2013/hou/doc/example.md +++ b/2013/hou/doc/example.md @@ -312,7 +312,7 @@ editing program, you need to convert the RGB values from 0..255 to 0..1, and then put here its *square*. Only after squaring you get your real, lively color in the output image, as opposed to something dull and gray. You need to do the same if you use a RGB texture. And yes, that is the what the second `sqrt(3)` in -[a.c](%%REPO_URL%%/2013/hou/a.c) is for. +`a.c` is for. Going beyond colors, to define a shiny or dull surface one needs more maths, and optics. The jargon for this is `BRDF` (Bidirectional Reflectance Distribution diff --git a/2013/hou/index.html b/2013/hou/index.html index ec98be038..f8dc003b5 100644 --- a/2013/hou/index.html +++ b/2013/hou/index.html @@ -494,7 +494,7 @@ restrictions section below for more details.