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
+11
-11
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -19,13 +19,13 @@ For more detailed information see [1992 adrian bugs](../../bugs.html#1992_adrian
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
For the slow minded, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./adsleep 32767
|
||||
```
|
||||
|
||||
@@ -134,7 +134,7 @@ character list.
|
||||
With the automaton specification in `filename`, invoke the program by
|
||||
typing
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./adrian filename
|
||||
```
|
||||
|
||||
@@ -151,7 +151,7 @@ occurs if your automaton has more than 257 states.
|
||||
|
||||
Running:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./adrian from < your_mailbox
|
||||
```
|
||||
|
||||
@@ -169,7 +169,7 @@ the regular expression:
|
||||
|
||||
I suggest using `adrian.c` as input, and storing the output in `adwc.c`:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./adrian < adrian.c > adwc.c
|
||||
```
|
||||
|
||||
@@ -181,13 +181,13 @@ in the input file.
|
||||
Another possibly interesting automaton can be created by slightly
|
||||
adjusting the `adrian.c` file. Change the first line to read
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
/* . echo| . */
|
||||
```
|
||||
|
||||
and repeat the process above
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./adrian <adrian.c > adecho.c
|
||||
```
|
||||
|
||||
@@ -204,7 +204,7 @@ employed.
|
||||
Two other adjustments to the first line also yield useful results. By
|
||||
changing it to
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
/* . head; . */
|
||||
```
|
||||
|
||||
@@ -221,7 +221,7 @@ specified (again this was changed to `__FILE__`).
|
||||
|
||||
By setting the first line to
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
/* . basename . */
|
||||
```
|
||||
|
||||
@@ -240,7 +240,7 @@ The resulting base name is printed to stdout.
|
||||
|
||||
Lastly, by setting the first line to
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
/* . sleep . */
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -21,14 +21,14 @@ For more detailed information see [1992 albert bugs](../../bugs.html#1992_albert
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./albert number
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -64,7 +64,7 @@ The [albert.alt.c](albert.c) file is the fixed file, whereas the
|
||||
|
||||
To compile this alternate version:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -76,7 +76,7 @@ Use `albert.alt` as you would `albert` above.
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
@@ -106,7 +106,7 @@ if you want to factor Fermat's 4th number. Then just run it.
|
||||
Or you may type `./albert <some-number>`
|
||||
A nice one is also (30 ones):
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./albert 111111111111111111111111111111
|
||||
```
|
||||
|
||||
@@ -114,7 +114,7 @@ Apart from the foregoing there are no special execution instructions.
|
||||
|
||||
To customize the program into a factorizer of a fixed number, use
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc albert.c -o 4294967297
|
||||
```
|
||||
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./ant Makefile
|
||||
|
||||
./ant Makefile rule
|
||||
@@ -18,7 +18,7 @@ where `Makefile` is a Makefile to use and `rule` is an optional rule to use.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
+11
-11
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 num num
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
To see good C Preprocessor buzzard.1, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make babble.cppcb
|
||||
cat babble.cppcb
|
||||
```
|
||||
@@ -54,19 +54,19 @@ short strings.
|
||||
`buzzard.1` is a simple mathematical program. It expects two numeric
|
||||
arguments.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 0 <num>
|
||||
```
|
||||
|
||||
will print out the factorial of `<num>`.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 <num1> <num2>
|
||||
```
|
||||
|
||||
will print out the largest common factor of `num1` and `num2`.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 1 <num2>
|
||||
```
|
||||
|
||||
@@ -171,21 +171,21 @@ programs is the conditional (given that we have loops).
|
||||
Since all you can do in the given operation output set is
|
||||
assignment, we implement "conditional assignment":
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
if (x) y = z;
|
||||
```
|
||||
|
||||
To implement this, we constrain `x` to be either 0 or 1, and
|
||||
simply compute:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
y = (z * x) + (y * (1-x));
|
||||
```
|
||||
|
||||
This is more obscured by factoring out common terms and restricting
|
||||
ourselves to two operand operations:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
temp = z; (temp == z)
|
||||
temp -= y; (temp == z-y)
|
||||
temp *= x; (temp == (z-y)*x)
|
||||
@@ -199,7 +199,7 @@ Next we imagine we have a [pc](https://en.wikipedia.org/wiki/Program_counter).
|
||||
we're not currently coming up on statement pc. To handle this, we simply make
|
||||
every operation conditional on the pc having the correct value:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
if (pc == some_constant) y = z;
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -13,13 +13,13 @@ code](#alternate-code) below for details.
|
||||
First, you must make sure that `first` is made first (even though `make all`
|
||||
should make first first :-) ):
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make first
|
||||
```
|
||||
|
||||
Second:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
# get help:
|
||||
echo help | cat third help.th - | ./first
|
||||
|
||||
@@ -29,7 +29,7 @@ Second:
|
||||
|
||||
Third:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat third help.th - | ./first
|
||||
```
|
||||
|
||||
@@ -50,7 +50,7 @@ Fourth:
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -63,7 +63,7 @@ fix that the author notes in their remarks.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -75,7 +75,7 @@ Use `buzzard.2.alt` as you would `buzzard.2` above.
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
@@ -125,7 +125,7 @@ Do not expect to be able to do anything interesting with `first`.
|
||||
To do something interesting, you need to feed `first` the file
|
||||
[third](third) first. In unix, you can do
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat third help.th - | ./first
|
||||
```
|
||||
|
||||
@@ -226,7 +226,7 @@ When you get the `Ok.` message from `third`, try out some sample
|
||||
you in a normal way. It only prints `'Ok.'` after you define a word).
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
2 3 + . cr
|
||||
```
|
||||
|
||||
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -21,14 +21,14 @@ For more detailed information see [1992 gson bugs](../../bugs.html#1992_gson).
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./ag word word2 word3 < /path/to/dictionary
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -45,7 +45,7 @@ following locations though the last one is more ironic:
|
||||
|
||||
Then using the proper dictionary file it does:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./ag free software foundation < /usr/share/dict/words
|
||||
./ag obfuscated c contest < /usr/share/dict/words
|
||||
./ag unix international < /usr/share/dict/words
|
||||
@@ -73,7 +73,7 @@ weren't allowed to print!
|
||||
The author provided an obfuscated script that can be used to construct
|
||||
dictionaries which has been put in as [mkdict.sh](mkdict.sh). To use try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat README.md | ./mkdict.sh > words
|
||||
```
|
||||
|
||||
@@ -103,7 +103,7 @@ have one already, you can make your own dictionary by concatenating a few
|
||||
hundred of your favourite Usenet articles and piping them through the following
|
||||
obfuscated shell script:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
#!/bin/sh
|
||||
z=a-z];tr [A-Z\] \[$z|sed s/[\^$z[\^$z*/_/g|tr _ \\012|grep ..|sort -u
|
||||
```
|
||||
@@ -258,7 +258,7 @@ those bits that should remain zero. For example, the following
|
||||
program prints all those 16-bit integers that contain zeroes in all
|
||||
even bit positions:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
main(){int i=0,s=0xAAAA;do{printf("%04x\t",i);}while(i=((i|~s)+1)&s);}
|
||||
```
|
||||
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
# text mode
|
||||
./imc -text
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
To see a number of options and configurations:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -164,7 +164,7 @@ standard error to indicate its progress (one dot per pixel line).
|
||||
|
||||
Here are a couple of good pictures to draw:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./imc -s 512,512 -f 600000 -l 512 -m 16 -c.00805,.74274 > screen1.ras
|
||||
./imc -s512,512 -j-.523,-.535 > screen2.ras
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
If your machine support the X Window System, Version 11:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -24,7 +24,7 @@ For more detailed information see [1992 kivinen bugs](../../bugs.html#1992_kivin
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./kivinen.alt
|
||||
|
||||
./kivinen.alt a
|
||||
@@ -41,7 +41,7 @@ Also try changing the speed that the game moves. For instance if you wish to
|
||||
change the `usleep(3)` value to `30000` from `20000`, try:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make clobber SLEEP=30000 alt # make it slower
|
||||
|
||||
make clobber SLEEP=10000 alt # make it faster
|
||||
@@ -59,7 +59,7 @@ code.
|
||||
|
||||
### Original build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [1992 lush bugs](../../bugs.html#1992_lush).
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./lush.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./marangon
|
||||
```
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./nathan
|
||||
# enter some text
|
||||
```
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
To see some other fun uses:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -58,7 +58,7 @@ distribute some winning entries outside of the US.
|
||||
Nathan Sidwell stated that he was willing to distribute the winning source. To
|
||||
read HIS instructions of how to obtain his winning program one was able to run:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make nathan
|
||||
./nathan
|
||||
```
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [1992 vern bugs](../../bugs.html#1992_vern).
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./vern 3 # <-- default is 2
|
||||
```
|
||||
|
||||
@@ -42,7 +42,7 @@ suggested above. :-)
|
||||
|
||||
For a real quick game try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./vern
|
||||
|
||||
65 55
|
||||
@@ -124,7 +124,7 @@ wouldn't pass the character limit. A nice side effect is that the
|
||||
initial source is gloriously difficult to peruse. In particular, the Makefile
|
||||
does:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
sed <vern.c 's/{ /(/g;s/} /)/g;s/; /#define /' | \
|
||||
sed 's/} /=/g;s/{ /i/g' >vern.tmp.c
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -22,7 +22,7 @@ For more detailed information see [1992 westley bugs](../../bugs.html#1992_westl
|
||||
If lost:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./whereami.sh lat long
|
||||
```
|
||||
|
||||
@@ -36,7 +36,7 @@ should just use the `westley` and `westley.alt` programs directly.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -48,14 +48,14 @@ The author provided a version for the US which we added. To build:
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./whereami.alt.sh lat long
|
||||
```
|
||||
|
||||
@@ -67,7 +67,7 @@ NOTE: this alternative version also needs a terminal with at least 80 columns.
|
||||
The [try.sh](try.sh) script uses both the original entry and the alternate code
|
||||
so one can try the same script for both:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -76,7 +76,7 @@ so one can try the same script for both:
|
||||
|
||||
To find the approximate place where this entry was judged, type:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./whereami 37 -122 # NOTE: - means west of meridian
|
||||
|
||||
# or if you don't have curses installed:
|
||||
@@ -164,7 +164,7 @@ is reasonably accurate.
|
||||
|
||||
For a domestic (US) version with higher resolution, try:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
main(l,a,n,d)char**a;{for(d=atoi(a[1])/2*80-atoi(a[2])-2043;
|
||||
n="bnaBCOCXdBBHGYdAP[A M E R I C A].AqandkmavX|ELC}BOCd"
|
||||
[l++-3];)for(;n-->64;)putchar(!d+++33^l&1);}
|
||||
@@ -173,7 +173,7 @@ For a domestic (US) version with higher resolution, try:
|
||||
The code will test the 80-column wrap and document itself if it is
|
||||
joined together as one 160-character line and listed. You should see:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
main(l,a,n,d)...
|
||||
[A M E R I C A]...
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user