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 "<!---c-->" 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:
1 parent
c549f6585e
commit
3ddbac9e6b
357 files changed
+2432
-2399
No files matched your search
+2
-2
@@ -43,13 +43,13 @@ had to print a value 2053 or less when the `-i` flag was used.
|
||||
Several people discovered an undocumented feature in that
|
||||
certain comments such as:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
///*
|
||||
```
|
||||
|
||||
or:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
*\
|
||||
/
|
||||
```
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -11,7 +11,7 @@ version see the [original code](#original-code) section below.
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./birken.alt < 17_columns_wide_paint_by_numbers_file
|
||||
```
|
||||
|
||||
@@ -30,7 +30,7 @@ it should you wish (see below).
|
||||
|
||||
To see the program run on each text file, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
@@ -44,7 +44,7 @@ other entries where this was made an alternate version it is configurable at
|
||||
compile time. If you wish to speed it up by 100% you can instead do:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make clobber SLEEP=7500 alt
|
||||
```
|
||||
|
||||
@@ -55,7 +55,7 @@ If you wish to speed that up 200% (300% total) you can use instead try
|
||||
ctrl-c to terminate the program early but note that the terminal is likely to be
|
||||
messed up. In that case try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
reset
|
||||
```
|
||||
|
||||
@@ -70,7 +70,7 @@ hard to see the art of the entry but you may do so if you wish.
|
||||
|
||||
### Original build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -84,7 +84,7 @@ Use `birken` as you would `birken.alt` above.
|
||||
|
||||
To use the demo script with the original code, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -96,7 +96,7 @@ PLEASE be careful if you are sensitive to flashing colours!
|
||||
This program also wins the "Most amusing abuse of the iocccsize tool" award;
|
||||
although not the absolute best: it is possible to achieve 0 by writing:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
/* *\
|
||||
/....
|
||||
```
|
||||
@@ -319,7 +319,7 @@ This program demonstrates how to exploit a bug in IOCCC size tool version
|
||||
|
||||
If that line is added to the top of any program, the tool will report a size of 8.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
$ ./iocccsize -i < prog.c
|
||||
8
|
||||
```
|
||||
@@ -327,7 +327,7 @@ If that line is added to the top of any program, the tool will report a size of
|
||||
When that line is deleted from this program, the tool properly reports the
|
||||
secondary size limit of the program as 2048.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
$ ./iocccsize -i < birken.c
|
||||
2048
|
||||
```
|
||||
@@ -357,7 +357,7 @@ Carefully selected variable names also yielded wonderful expressions like `l=0`,
|
||||
`O=0`, `O=1` and `while(O)`. `"Tetris"` also makes a second appearance of
|
||||
sorts:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
[T][e][t]--; while(R+i) { s
|
||||
```
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable1 name group1 group2
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -26,39 +26,39 @@ We need not limit ourselves to the two major political parties in the US today.
|
||||
|
||||
Let us consider:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable1 Cooper Mac PC
|
||||
```
|
||||
|
||||
Simon works for Apple, so you would expect Mac. :-)
|
||||
Landon is a long time Mac user:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable1 Noll Mac PC
|
||||
```
|
||||
|
||||
That works too! Now Leo brings PCs to the IOCCC judging for cross-platform
|
||||
testing:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable1 Broukhis Mac PC
|
||||
```
|
||||
|
||||
We can test other people. The late Steve Jobs:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable1 Jobs Mac PC
|
||||
```
|
||||
|
||||
That works! How about Bill?
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable1 Gates Mac PC
|
||||
```
|
||||
|
||||
A PC guy as expected. What about that other Steve?
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable1 Ballmer Mac PC
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [2013 cable2 bugs](../../bugs.html#2013_cable2
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable2 file.bmp [color]
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ For more detailed information see [2013 cable2 bugs](../../bugs.html#2013_cable2
|
||||
|
||||
For different OCR examples:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -10,14 +10,14 @@ available. See the [Alternate code](#alternate-code) section below.
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable3 bios-image-file floppy-image-file [harddisk-image-file]
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable3.sh
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ An alternate version, which should compile in Windows, is provided.
|
||||
Assuming `make` is available and will function:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -173,7 +173,7 @@ non-UNIX platforms. For example, for Windows/MS Visual Studio, instead of the
|
||||
Makefile definition of KB, use something slightly different - add the following
|
||||
entry to the Preprocessor Definitions list in the Project Properties page:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
KB=(kb=H(8),kbhit())&&(r[1190]=getch(),H(7))
|
||||
```
|
||||
|
||||
@@ -189,7 +189,7 @@ offsets) this is not the case, and to run successfully on these systems, you
|
||||
will need to explicitly declare these functions by adding the appropriate
|
||||
include to the top of the source:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
#include <unistd.h>
|
||||
```
|
||||
|
||||
@@ -197,7 +197,7 @@ NOTE: this has been done in [cable3.c](cable3.c).
|
||||
|
||||
### Usage
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cable3 bios-image-file floppy-image-file [harddisk-image-file]
|
||||
```
|
||||
|
||||
@@ -205,7 +205,7 @@ PLEASE NOTE that under Unices the keyboard must be in raw mode for the emulator
|
||||
to work properly. Therefore the emulator is best run from a shell script that
|
||||
looks something like:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
stty cbreak raw -echo min 0
|
||||
./cable3 bios floppy.img harddisk.img
|
||||
stty cooked echo
|
||||
@@ -223,7 +223,7 @@ put the keyboard into raw mode (and afterwards it needs to be put back to
|
||||
cooked). So, run the emulator using something like this script (provided as
|
||||
[cable3.sh](cable3.sh)):
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
stty cbreak raw -echo min 0
|
||||
./cable3 bios fd.img
|
||||
stty cooked echo
|
||||
@@ -237,7 +237,7 @@ whole bunch of software which is in the included file `hd.img`.
|
||||
For the more adventurous, you can start off with (for example) a blank 40MB
|
||||
image file called hd.img made using e.g. Makefile. Then use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
stty cbreak raw -echo min 0
|
||||
./cable3 bios fd.img hd.img
|
||||
stty cooked echo
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [2013 dlowe bugs](../../bugs.html#2013_dlowe).
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dlowe [number...]
|
||||
```
|
||||
|
||||
@@ -27,13 +27,13 @@ where `[number...]` is one or more number, space separated.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
What is different about the above if you do something like:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo 'IOCCC winning entry 2013/dlowe' > ioccc.txt
|
||||
./try.sh
|
||||
rm -f ioccc.txt
|
||||
@@ -43,7 +43,7 @@ What is different about the above if you do something like:
|
||||
|
||||
To make it simpler to see try showing just the different line like:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./diff.sh
|
||||
```
|
||||
|
||||
@@ -58,7 +58,7 @@ with one argument or when all arguments are equal?
|
||||
|
||||
For extra fun, compile and run [fun.c](fun.c):
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
printf("%d %d %d\n", (int)(-1.0/0.0), (int)(0.0/0.0), (int)(1.0/0.0));
|
||||
@@ -91,7 +91,7 @@ Which one is correct? :)
|
||||
NOTE: `make all` will compile [fun.c](fun.c) but to provide a different compiler
|
||||
you can do something like:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make CC=clang fun
|
||||
```
|
||||
|
||||
@@ -105,7 +105,7 @@ A tiny implementation of command-line
|
||||
|
||||
### Synopsis
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
$ ./sparkl 0 1 2 3 4 5 6 7
|
||||
▁▂▃▄▅▆▇▉
|
||||
|
||||
@@ -115,7 +115,7 @@ A tiny implementation of command-line
|
||||
|
||||
NOTE: this has been provided in [slflen.sh](slflen.sh) so you can try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./slflen.sh
|
||||
```
|
||||
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,20 +18,20 @@ For more detailed information see [2013 endoh1 bugs](../../bugs.html#2013_endoh1
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh1 [file.lazy]
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
You might also enjoy running:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc -E endoh1.c | less
|
||||
```
|
||||
|
||||
@@ -50,7 +50,7 @@ This entry can be considered an abuse of the GCC's optimizer; it takes GCC about
|
||||
|
||||
### Remarks
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
less endoh1.c
|
||||
gcc -o endoh1 endoh1.c
|
||||
./endoh1
|
||||
@@ -66,7 +66,7 @@ especially, [Lazy K][2].
|
||||
This program will shine when it is used as a library. For example,
|
||||
[hello.lazy](hello.lazy) is a "Hello world" program written in Lazy K.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
$ lazy hello.lazy
|
||||
Hello, world!
|
||||
```
|
||||
@@ -75,7 +75,7 @@ where `lazy` is [a reference implementation of Lazy K][3]. At the same time,
|
||||
[hello.lazy](hello.lazy) is *a valid C program* that uses [endoh1.c](endoh1.c)
|
||||
as a library.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
$ gcc -o hello -xc hello.lazy
|
||||
$ ./hello
|
||||
Hello, world!
|
||||
@@ -136,7 +136,7 @@ I confirmed that the program successfully worked with the following compilers:
|
||||
|
||||
Recent compilers with `-Wall -W -Wextra -pedantic` say nothing.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
gcc -Wall -W -Wextra -pedantic prog.c
|
||||
clang -Wall -W -Wextra -pedantic prog.c
|
||||
tcc -Wall -W -Wextra -pedantic prog.c
|
||||
@@ -173,7 +173,7 @@ combinator calculus. The rewriting rules are shown in the shape of the code.
|
||||
|
||||
Consider a sequence of function applications in C:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
s(x)(x)(x)(x)...
|
||||
```
|
||||
|
||||
@@ -182,7 +182,7 @@ type", such as `typedef f (*f)();`.
|
||||
|
||||
So, I used a heavily nested function pointer type:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
typedef void *(*(*(*...(*(f))()...)())())
|
||||
```
|
||||
|
||||
@@ -207,7 +207,7 @@ However, no type in C is callable and has a reference at the same time.
|
||||
So, I addressed this issue by generating many function definitions
|
||||
statically by (ab)using macros:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
void *x1; void f1(void *y) { return apply(x1, y); }
|
||||
void *x2; void f2(void *y) { return apply(x2, y); }
|
||||
void *x3; void f3(void *y) { return apply(x3, y); }
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make check
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@ download one or both before exiting.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
less jpeg.c
|
||||
```
|
||||
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [2013 endoh3 bugs](../../bugs.html#2013_endoh3
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh3
|
||||
```
|
||||
|
||||
@@ -29,7 +29,7 @@ system up for this or if you want to verify that everything is oky.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
|
||||
./try.sh ABC
|
||||
@@ -75,7 +75,7 @@ notation](http://en.wikipedia.org/wiki/ABC_notation).
|
||||
|
||||
Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc -o endoh3 endoh3.c
|
||||
echo "CDEFGABc" | ./endoh3 > /dev/dsp
|
||||
```
|
||||
@@ -83,20 +83,20 @@ Try:
|
||||
If `/dev/dsp` is not available on your system, use an OSS sound wrapper such
|
||||
as `padsp` or `aoss`:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo "CDEFGABc" | ./endoh3 | padsp tee /dev/dsp > /dev/null
|
||||
```
|
||||
|
||||
If you are using Mac OS X, try [sox](http://sox.sourceforge.net/) like so:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo "CDEFGABc" | ./endoh3 | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio
|
||||
```
|
||||
|
||||
If that does not work, use the attached script to convert the output into a wave
|
||||
file format:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo "CDEFGABc" | ./endoh3 | ruby wavify.rb > cde.wav
|
||||
```
|
||||
|
||||
@@ -107,7 +107,7 @@ You can also enjoy some music scores that I attached. With `/dev/dsp` you can
|
||||
do so like:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat twinkle.abc | ./endoh3 > /dev/dsp
|
||||
cat menuet.abc | ./endoh3 > /dev/dsp
|
||||
```
|
||||
@@ -185,7 +185,7 @@ You know, it is ["the famous song"](http://en.wikipedia.org/wiki/4%E2%80%B233%E2
|
||||
|
||||
Here is a magical expression which I found by brute-force:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
(c % 32 + 5) * 9 / 5 % 13 + n / 32 * 12 - 22
|
||||
```
|
||||
|
||||
@@ -228,7 +228,7 @@ frequency by multiplying the value by `n` times.
|
||||
|
||||
Finally, the following code generates a saw wave:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
for(c = 0; c < len; c++) putchar(a = n * D);
|
||||
```
|
||||
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ If you wish to change the size (see the [Author's remarks](#authors-remarks)
|
||||
below) you can do so with the `SIZE` variable. For instance you can do:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make clobber SIZE=50,50 all
|
||||
```
|
||||
|
||||
@@ -29,7 +29,7 @@ For more detailed information see [2013 endoh4 bugs](../../bugs.html#2013_endoh4
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh4 < file
|
||||
./endoh4.sh file
|
||||
```
|
||||
@@ -41,7 +41,7 @@ line it will feed to the program [endoh4.c](endoh4.c).
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh4.sh cube.txt
|
||||
```
|
||||
|
||||
@@ -51,13 +51,13 @@ The author recommends the use of xterm.
|
||||
|
||||
For an example, if you are a football/soccer fan, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt
|
||||
```
|
||||
|
||||
You can provide more than one file:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt cube.txt
|
||||
```
|
||||
|
||||
@@ -66,7 +66,7 @@ Hit ctrl-c/intr to go to the next file.
|
||||
If you wish to change the size to `50,50` without passing any arg:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
SIZE=50,50 ./endoh4.sh
|
||||
```
|
||||
|
||||
@@ -115,7 +115,7 @@ clang, and tcc. It should not trigger warnings with `-pedantic` and `-Wextra`.
|
||||
|
||||
You may want to use `tput` to hide the terminal cursor.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
tput civis
|
||||
./endoh4 < cube.txt
|
||||
tput cnorm
|
||||
@@ -123,7 +123,7 @@ You may want to use `tput` to hide the terminal cursor.
|
||||
|
||||
or
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh4.sh cube.txt
|
||||
```
|
||||
|
||||
@@ -131,14 +131,14 @@ or
|
||||
|
||||
You can change the screen size. Let the aspect ratio be about 3:1.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc -DS=120,40 -o endoh4 endoh4.c
|
||||
```
|
||||
|
||||
The shape of this code is the geometric net of a regular tetrahedron.
|
||||
So, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./endoh4 < endoh4.c # or ./endoh4.sh
|
||||
```
|
||||
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [2013 hou bugs](../../bugs.html#2013_hou).
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./hou [scene-file-name] [options]
|
||||
```
|
||||
|
||||
@@ -29,7 +29,7 @@ effects should be more or less recognizable when you see 16.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -62,7 +62,7 @@ This program will loop infinitely while progressively refining a
|
||||
NOTE: the author refers to [a.c](a.c), placed in a gzipped file `a.c.gz`. We do not
|
||||
include it but it can be generated like:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc -Wall hou.c -o hou -lm
|
||||
./hou > a.c
|
||||
```
|
||||
@@ -78,7 +78,7 @@ needing to create a temporary file.
|
||||
This program is a programmable rendering engine with a built-in default scene.
|
||||
The standard command line is:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./hou [scene-file-name] [options]
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,14 +18,14 @@ For more detailed information see [2013 mills bugs](../../bugs.html#2013_mills).
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./mills
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./mills &
|
||||
```
|
||||
|
||||
@@ -61,7 +61,7 @@ while you are there, click on an ad. They could use the money.
|
||||
|
||||
It would be possible to fix this by adding
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
n=1,setsockopt(s,SOL_SOCKET,SO_REUSEADDR,&n,sizeof n),
|
||||
```
|
||||
|
||||
|
||||
+15
-15
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -10,7 +10,7 @@ information on all of these builds.
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./horizontal_cat [files...] > [output]
|
||||
./vertical_cat [files...] > [output]
|
||||
```
|
||||
@@ -20,19 +20,19 @@ information on all of these builds.
|
||||
|
||||
To understand the various intermediate source files that are built, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make understanding
|
||||
```
|
||||
|
||||
Also try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
NOTE: Use - for standard input. For example:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./vertical_cat - -
|
||||
```
|
||||
|
||||
@@ -69,7 +69,7 @@ judging this entry.
|
||||
`Misaka` is a file concatenation utility, with at least two modes of
|
||||
operation:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc misaka.c -o horizontal_cat
|
||||
./horizontal_cat [files...] > [output]
|
||||
|
||||
@@ -94,7 +94,7 @@ files vertically.
|
||||
I thought the lack of horizontal concatenation must have been an oversight,
|
||||
so I implemented this utility:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc misaka.c -o horizontal_cat
|
||||
./horizontal_cat files...
|
||||
```
|
||||
@@ -109,7 +109,7 @@ can specify `-` multiple times to get `stdin` multiplied horizontally. For
|
||||
example, if you have `seq(1)` in your shell, you can add line numbers to both
|
||||
sides of [misaka.c](misaka.c) like this:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
seq -f ' %.0f ' 45 | ./horizontal_cat - misaka.c -
|
||||
```
|
||||
|
||||
@@ -126,7 +126,7 @@ files vertically, so I included a vertical mode. But supporting vertical
|
||||
mode with command line options would be no fun. Instead, vertical mode is
|
||||
enabled by concatenating the source code horizontally:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./horizontal_cat misaka.c misaka.c > misaka2.c
|
||||
gcc misaka2.c -o vertical_cat
|
||||
./vertical_cat files...
|
||||
@@ -135,7 +135,7 @@ enabled by concatenating the source code horizontally:
|
||||
`vertical_cat` works more or less like `cat`, except you can use
|
||||
`vertical_cat` to duplicate `stdin`:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./vertical_cat - -
|
||||
```
|
||||
|
||||
@@ -147,7 +147,7 @@ was just more [cats](https://rationalwiki.org/wiki/Fun:Cat). So I implemented
|
||||
one more mode, this one is enabled by concatenating [misaka.c](misaka.c)
|
||||
vertically:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./vertical_cat misaka.c misaka.c > misaka3.c
|
||||
gcc misaka3.c -o long_cat
|
||||
./long_cat
|
||||
@@ -157,7 +157,7 @@ vertically:
|
||||
exponentially longer by concatenating more files vertically (up to 31 levels
|
||||
high, depending on `sizeof(int)` for your compiler):
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./vertical_cat misaka.c misaka.c misaka.c > misaka4.c
|
||||
gcc misaka4.c -o loong_cat
|
||||
|
||||
@@ -171,7 +171,7 @@ high, depending on `sizeof(int)` for your compiler):
|
||||
If your terminal has really thin fonts, you can also make this output fatter
|
||||
by concatenating files horizontally:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./vertical_cat misaka.c misaka.c | ./horizontal_cat - - > misaka7.c
|
||||
gcc misaka7.c -o long_fat_cat
|
||||
|
||||
@@ -182,7 +182,7 @@ by concatenating files horizontally:
|
||||
Output width is determined by the first level of stacked programs, so a
|
||||
triangle like the following will not have horizontally expanded output:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./horizontal_cat misaka.c misaka.c | ./vertical_cat misaka.c - > misaka9.c
|
||||
gcc misaka9.c -o same_as_long_cat
|
||||
```
|
||||
@@ -192,7 +192,7 @@ together, you can feed the source to a
|
||||
[brainfuck](https://en.wikipedia.org/wiki/Brainfuck) interpreter to get an
|
||||
overview of how the programs are stacked. Example:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
perl bf.pl misaka9.c
|
||||
```
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo "YYYY/MM/DD" | ./morgan1
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@ follows:
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
For the console version (ncurses):
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./morgan2
|
||||
```
|
||||
|
||||
For the graphical version (X11):
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./morgan2 X
|
||||
```
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./robison
|
||||
# enter an expression
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user