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.
This commit is contained in:
Landon Curt Noll committed 2024-04-12 11:45:50 -07:00
1 parent c549f6585e
commit 3ddbac9e6b
357 files changed
+2432 -2399

No files matched your search

+9 -9
View File
@@ -1,20 +1,20 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
## To use:
```<!---sh-->
``` <!---sh-->
./akari [ input_file | - ] [ output_file | - ] [even]
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
@@ -56,7 +56,7 @@ keep odd pixels on odd [scanlines](https://en.wikipedia.org/wiki/Scan_line).
### Examples:
```<!---sh-->
``` <!---sh-->
gcc akari.c -o akari
./akari < example.ppm > odd_output.ppm
./akari - - even < example.ppm > even_output.ppm
@@ -82,7 +82,7 @@ Anything that is not parsable as `PGM` or `PPM` will be downsampled as
ASCII art. Since the source code is formatted as ASCII art, it's only
natural to try:
```<!---sh-->
``` <!---sh-->
./akari akari.c akari2.c
```
@@ -91,7 +91,7 @@ By default, this second program reads text from `stdin` and writes
expanded output to `stdout`. If the extra argument is specified, the
output text will also pass through a rot13 filter.
```<!---sh-->
``` <!---sh-->
gcc akari2.c -o akari2
./akari2 < input.txt > expanded_output.txt
./akari2 rot13 < input.txt > expanded_and_rot13_output.txt
@@ -100,20 +100,20 @@ output text will also pass through a rot13 filter.
You can combine the two programs together to have just a regular rot13
filter:
```<!---sh-->
``` <!---sh-->
./akari2 rot13 < input.txt | ./akari > rot13.txt
```
Of course, we wouldn't stop with just 2 programs, you can downsample
the source *again* and get yet another C program:
```<!---sh-->
``` <!---sh-->
./akari < akari.c | ./akari > akari3.c
```
We must go deeper:
```<!---sh-->
``` <!---sh-->
./akari < akari.c | ./akari | ./akari > akari4.c
```
+8 -8
View File
@@ -1,6 +1,6 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
@@ -9,20 +9,20 @@
Zoom out and make your terminal window 53 or more lines deep.
```<!---sh-->
``` <!---sh-->
./blakely < blakely.c | head -300
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
For those who have a lot of time, try:
```<!---sh-->
``` <!---sh-->
./blakely < t0_3.dat
```
@@ -40,7 +40,7 @@ is a [Garden of Eden](http://en.wikipedia.org/wiki/Garden_of_Eden_%28cellular_au
If you have enough time to spare, put the plan of your garden in a text file,
and run:
```<!---sh-->
``` <!---sh-->
./blakely - < garden.txt
```
@@ -54,7 +54,7 @@ over tabs.
In order to see the main feature of the code, type:
```<!---sh-->
``` <!---sh-->
./blakely < blakely.c
```
@@ -72,7 +72,7 @@ layout of the source-code is such that it evolves to a digital representation of
the first 15 decimal places of pi after 4 time steps. This was setup using the
other feature of the program which can be demonstrated as follows:
```<!---sh-->
``` <!---sh-->
./blakely - < 3.dat
```
@@ -81,7 +81,7 @@ more grids (taking a few minutes to display the last). Waiting for any more
grids will take a substantial amount of time. The final grid has been put into
[evolve_to_3.dat](evolve_to_3.dat), and if you type
```<!---sh-->
``` <!---sh-->
./blakely < evolve_to_3.dat
```
+3 -3
View File
@@ -1,6 +1,6 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
@@ -18,14 +18,14 @@ For more detailed information see [2011 borsanyi bugs](../../bugs.html#2011_bors
## To use:
```<!---sh-->
``` <!---sh-->
./borsanyi < some_data_file
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
+12 -12
View File
@@ -1,6 +1,6 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
@@ -19,7 +19,7 @@ For more detailed information see [2011 dlowe bugs](../../bugs.html#2011_dlowe).
## To use:
```<!---sh-->
``` <!---sh-->
./dlowe -<n_iterations> corpus1/ [...] corpus0/ < start.net > trained.net
```
@@ -27,7 +27,7 @@ NOTE: In the above command, the directory args MUST end in a `/`.
Then to use `trained.net`:
```<!---sh-->
``` <!---sh-->
./dlowe file [file ...] < trained.net
```
@@ -36,7 +36,7 @@ Then to use `trained.net`:
Try these pre-trained networks:
```<!---sh-->
``` <!---sh-->
./try.sh
```
@@ -44,7 +44,7 @@ NOTE: The `dlowe-aux-data/` directory, which [try.sh](try.sh) refers to, was
created by:
```<!---sh-->
``` <!---sh-->
tar -jxf dlowe-aux-data.tar.bz2
```
@@ -63,7 +63,7 @@ on the C code of entries that were supplied to the 20Th IOCCC.
The `ioccc-winlose-trained.net` was trained using the
[earlystop.pl](earlystop.pl) tool:
```<!---sh-->
``` <!---sh-->
rm -f ioccc-winlose-trained.net
./earlystop.pl ioccc-winlose-trained.net ioccc_won_training/ ioccc_lost_training/ ioccc_won_test/ ioccc_lost_test/
```
@@ -101,7 +101,7 @@ The resulting `ioccc-winlose-trained.net` file was included in the
The [dlowe.c](dlowe.c) was explicitly excluded from this trailing set, so this
test is interesting:
```<!---sh-->
``` <!---sh-->
./dlowe dlowe.c < dlowe-aux-data/ioccc-winlose-trained.net
```
@@ -127,7 +127,7 @@ data sets on which to test:
We created the [english-trained.net](dlowe-aux-data/english-trained.net) as follows:
```<!---sh-->
``` <!---sh-->
./dlowe -8000 dlowe-aux-data/english-1/ dlowe-aux-data/english-0/ < /dev/null > dlowe-aux-data/english-trained.net
```
@@ -139,7 +139,7 @@ We created the [english-trained.net](dlowe-aux-data/english-trained.net) as foll
We created the [png-trained.net](dlowe-aux-data/png-trained.net) as follows:
```<!---sh-->
``` <!---sh-->
./dlowe -8000 png-1/ png-0/ < /dev/null > dlowe-aux-data/png-trained.net
```
@@ -151,7 +151,7 @@ We created the [png-trained.net](dlowe-aux-data/png-trained.net) as follows:
We created the [xor-trained.net](dlowe-aux-data/xor-trained.net) as follows:
```<!---sh-->
``` <!---sh-->
./dlowe -8000 dlowe-aux-data/xor-1/ dlowe-aux-data/xor-0/ < /dev/null > dlowe-aux-data/xor-trained.net
```
@@ -189,7 +189,7 @@ The neurons' activation function is the logistic function `1 / (1 + e ^ -x)`.
### Classifying
```<!---sh-->
``` <!---sh-->
./dlowe file [file ...] < trained.net
```
@@ -205,7 +205,7 @@ trained, but it's geared toward interpretation as a *probability* or a
### Training
```<!---sh-->
``` <!---sh-->
./dlowe -<n_iterations> corpus1/ [...] corpus0/ < start.net > end.net
```
+4 -4
View File
@@ -1,13 +1,13 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
## To use:
```<!---sh-->
``` <!---sh-->
./eastman
```
@@ -19,7 +19,7 @@ NOTE: to restore your cursor in your shell, try `reset`.
Run the program. Quit it (ctrl-c/intr). Resize your terminal window. Run it
again. Try doing this a number of times with different sizes each time.
```<!---sh-->
``` <!---sh-->
./eastman
```
@@ -60,7 +60,7 @@ program is running, though. It only checks the size once, when it starts up.
To compile:
```<!---sh-->
``` <!---sh-->
cc -lm eastman.c
```
+10 -10
View File
@@ -1,6 +1,6 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
@@ -18,14 +18,14 @@ For more detailed information see [2011 fredriksson bugs](../../bugs.html#2011_f
## To use:
```<!---sh-->
``` <!---sh-->
./fredriksson [-icvtnk#] regexp < file
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
@@ -55,7 +55,7 @@ Implements a variant of `grep`.
To search regexp from file, do:
```<!---sh-->
``` <!---sh-->
./fredriksson [-icvtnk#] regexp < file
```
@@ -123,13 +123,13 @@ expressions by putting `]` as the first character, and putting `-` last.
Just say
```<!---sh-->
``` <!---sh-->
./fredriksson -k3 cat < file
```
* Like with `cat`, you can append line numbers too:
```<!---sh-->
``` <!---sh-->
./fredriksson -nk3 cat < file
```
@@ -173,7 +173,7 @@ Just say
* Depending on the file, it might require a lot of stack space. If the
program segfaults (because of this), say
```<!---sh-->
``` <!---sh-->
ulimit -s unlimited
```
@@ -207,7 +207,7 @@ Just say
extracts and builds that, and then calls it. More precisely, the command
to build is
```<!---sh-->
``` <!---sh-->
gcc -O3 ag.c -o ag
```
@@ -260,14 +260,14 @@ Just say
* No numerical values, other than in the initialized char array, try
```<!---sh-->
``` <!---sh-->
./fredriksson -ck0 [0-9] < fredriksson.c
```
This should print 1, as there is a number `3` in the char array (only).
You can also try
```<!---sh-->
``` <!---sh-->
./fredriksson -ck0 [0-9] < ag.c
```
+5 -5
View File
@@ -1,20 +1,20 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
## To use:
```<!---sh-->
``` <!---sh-->
echo "some text" | ./goren
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
@@ -27,13 +27,13 @@ In the words of [René François Ghislain Magritte Magritte](http://en.wikipedia
One may ask the surrealist question:
```<!---sh-->
``` <!---sh-->
echo 'If | is just a representation of a pipe, then how can data stuff it?' | ./goren
```
However if one takes a firm stand and declares:
```<!---sh-->
``` <!---sh-->
echo '| is just a representation of a pipe because I say so! So stuff it!' | ./goren
```
+7 -7
View File
@@ -1,27 +1,27 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
## To use:
```<!---sh-->
``` <!---sh-->
./hamaji < a_nonogram_file
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
If you have perl installed you should be able to reproduce
[dragon.nono](dragon.nono) like:
```<!---sh-->
``` <!---sh-->
perl c2nono.pl hamaji.c | ./hamaji
```
@@ -181,7 +181,7 @@ with the well obfuscated code.
This program uses two C99 features. One line comments and `long long`.
GCC's `-ansi -pedantic` check should pass:
```<!---sh-->
``` <!---sh-->
cc -ansi -pedantic -std=c99 hamaji.c
```
@@ -196,7 +196,7 @@ memory layout, undefined evaluation order (e.g., `a[i++]=i`), etc.
This program won't work if the size of `long long` literal is less than 8.
By grepping the source code of gcc
```<!---sh-->
``` <!---sh-->
grep LONG_LONG_TYPE_SIZE gcc/config/*/*
```
@@ -224,7 +224,7 @@ was randomly generated. The [codegolf.nono](codegolf.nono) and
You can reproduce [dragon.nono](dragon.nono) from [hamaji.c](hamaji.c) using
[c2nono.pl](c2nono.pl):
```<!---sh-->
``` <!---sh-->
perl c2nono.pl hamaji.c | ./hamaji
```
+5 -5
View File
@@ -1,20 +1,20 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
## To use:
```<!---sh-->
``` <!---sh-->
./hou 'expression'
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
@@ -32,7 +32,7 @@ source code. What does it mean?
The calculator obeys the precedence rules and allows parenthesis.
```<!---sh-->
``` <!---sh-->
./hou '1+2*3'
./hou '(1+2)*3'
```
@@ -41,7 +41,7 @@ What exactly does the text formatting do?
What does this evaluate to in C?
```<!---c-->
``` <!---c-->
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
```
+3 -3
View File
@@ -1,20 +1,20 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
## To use:
```<!---sh-->
``` <!---sh-->
./konno lower_case_word
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
+3 -3
View File
@@ -1,6 +1,6 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
@@ -18,14 +18,14 @@ For more detailed information see [2011 richards bugs](../../bugs.html#2011_rich
## To use:
```<!---sh-->
``` <!---sh-->
echo expression | ./richards
```
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
+4 -4
View File
@@ -2,7 +2,7 @@
If you have X11 installed:
```<!---sh-->
``` <!---sh-->
make
```
@@ -13,7 +13,7 @@ Windows](toledo.alt2.c). See [Alternate code](#alternate-code) below.
## To use:
```<!---sh-->
``` <!---sh-->
./toledo
```
@@ -49,7 +49,7 @@ but you can change them about however you like, even with other keys. For
instance to swap `LEFT` and `RIGHT`:
```<!---sh-->
``` <!---sh-->
make clobber LEFT=XK_Right:XK_d RIGHT=XK_Left:XK_a alt
```
@@ -75,7 +75,7 @@ the source early on, right before the code gets hard to follow, or using the
Like Oscar's previous winning X11 program for the 19th IOCCC, if
you remove both the X11 include files and replace them with
```<!---c-->
``` <!---c-->
#include "layer.c"
```
+11 -11
View File
@@ -1,6 +1,6 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
@@ -21,20 +21,20 @@ For more detailed information see [2011 vik bugs](../../bugs.html#2011_vik).
## To use:
```<!---sh-->
``` <!---sh-->
./vik file.mod > audio_file.raw
```
If you have `mplayer(1)`:
```<!---sh-->
``` <!---sh-->
./vik file.mod | mplayer -demuxer rawaudio -
```
Alternatively, you can convert the file to a WAV:
```<!---sh-->
``` <!---sh-->
./vik file.mod > file.raw; ./raw2wav file.raw > file.wav
```
@@ -43,7 +43,7 @@ and then play `file.wav` with a program that can play WAV files.
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
@@ -66,7 +66,7 @@ This version is based on the author's remarks and it should work for Windows.
Assuming that `make` is similar enough try:
```<!---sh-->
``` <!---sh-->
make alt
```
@@ -87,7 +87,7 @@ initialization for?
Does it take your system a long time to compile? You may want to do:
```<!---sh-->
``` <!---sh-->
cc -S vik.c
```
@@ -153,7 +153,7 @@ Bertilsson, also known as Deelite:
Compiling for Unix systems (including cygwin) is straight forward:
```<!---sh-->
``` <!---sh-->
gcc -o vik vik.c
```
@@ -162,13 +162,13 @@ Compiling for Unix systems (including cygwin) is straight forward:
#### Convert MOD file to raw 44.1kHz stereo audio file
```<!---sh-->
``` <!---sh-->
./vik mad_world.mod > audio_file.raw
```
#### Listen to the MOD file (streaming to mplayer)
```<!---sh-->
``` <!---sh-->
./vik randowan.mod | mplayer -demuxer rawaudio -
```
@@ -210,7 +210,7 @@ Microsoft compilers adds a carriage return to newlines, and to compile
the program with this platform, the following line can be added after
the main declaration in order for the program to run correctly:
```<!---c-->
``` <!---c-->
_setmode(_fileno(stdout), 0x8000);
```
+10 -10
View File
@@ -1,6 +1,6 @@
## To build:
```<!---sh-->
``` <!---sh-->
make
```
@@ -10,7 +10,7 @@ binary mode from text mode. See [alternate code](#alternate-code) below.
## To use:
```<!---sh-->
``` <!---sh-->
./zucker > image.ppm
```
@@ -19,7 +19,7 @@ Now open `image.ppm` with your image viewer of choice.
## Try:
```<!---sh-->
``` <!---sh-->
./try.sh
```
@@ -36,7 +36,7 @@ that distinguish binary and text.
### Alternate build:
```<!---sh-->
``` <!---sh-->
make alt
```
@@ -68,7 +68,7 @@ This entry uses no local variables. None! At! All!
This program makes pretty pictures. To see the default output, try
running
```<!---sh-->
``` <!---sh-->
./zucker > ioccc2011.ppm
```
@@ -82,7 +82,7 @@ Netpbm files, and are available on multiple platforms.
With macOS you can type at the command line:
```<!---sh-->
``` <!---sh-->
open ioccc2021.ppm
```
@@ -90,7 +90,7 @@ and it will open image in the default application Preview.app.
To use ImageMagick you might do something like:
```<!---sh-->
``` <!---sh-->
convert ioccc2011.ppm ioccc2011.png
```
@@ -98,7 +98,7 @@ and then open `ioccc2011.png` in your viewer of choice.
To use GraphicsMagick you might do something like:
```<!---sh-->
``` <!---sh-->
gm convert ioccc2011.ppm ioccc2011.png
```
@@ -107,14 +107,14 @@ and then open `ioccc2011.png` in your viewer of choice.
Aside from the default image, you may create your own by running the
program as follows:
```<!---sh-->
``` <!---sh-->
./zucker "your text" > image.ppm
```
To mitigate long runtime, the program can be invoked in a "preview"
mode by appending `-preview` to the command line arguments, like so:
```<!---sh-->
``` <!---sh-->
./zucker faster\! -preview > image.ppm
```