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
+18
-18
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [1996 august bugs](../../bugs.html#1996_august
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.c test.oc | ./august > test.oo
|
||||
./august < test.oo
|
||||
```
|
||||
@@ -33,7 +33,7 @@ The above should print a `!` followed by a newline.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -43,33 +43,33 @@ The above should print a `!` followed by a newline.
|
||||
This entry can feed on itself. If you C pre-process the source,
|
||||
you can compile the interpreter:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make august.oc
|
||||
```
|
||||
|
||||
We can now compile the interpreter as follows:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.c august.oc | ./august > august.oo
|
||||
```
|
||||
|
||||
and use the compiled interpreter to execute some previously
|
||||
compiled code:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.oo test.oo | ./august
|
||||
```
|
||||
|
||||
And we can have the compiled interpreter interpret itself which
|
||||
in turn compiles the test program:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.oo august.oo fac.oo | ./august
|
||||
```
|
||||
|
||||
And if you have lots of spare time, you can recurse one level deeper:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.oo august.oo august.oo fac.oo | ./august
|
||||
```
|
||||
|
||||
@@ -107,25 +107,25 @@ can go wrong. But this is what seasoned C programmers are used to.
|
||||
Assume that the interpreter has been compiled (source in [august.c](august.c)
|
||||
and binary in august) and that we have this in a file named `test.oc`:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
main() { putchar('!'); putchar('\n'); exit(0); }
|
||||
```
|
||||
|
||||
We can then compile by
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.c test.oc | ./august > test.oo
|
||||
```
|
||||
|
||||
And run the compiled program by
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./august < test.oo
|
||||
```
|
||||
|
||||
Or even simpler:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.c test.oc | ./august | ./august
|
||||
```
|
||||
|
||||
@@ -141,26 +141,26 @@ need to use an external one. To pre-process [august.c](august.c) use the
|
||||
command from the Makefile, but add the `-E` flag and change 60000 to 40000,
|
||||
i.e.:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc -E -DZ=40000 .... august.c > august.oc
|
||||
```
|
||||
|
||||
If `august.oc` contain some junk line starting with a `#` (most likely
|
||||
it does) then remove it like:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
sed -i'' '/^#/d' august.oc
|
||||
```
|
||||
|
||||
OK, we can now compile the interpreter:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.c august.oc | ./august > august.oo
|
||||
```
|
||||
|
||||
And we can run it:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.oo test.oo | ./august
|
||||
```
|
||||
|
||||
@@ -168,13 +168,13 @@ Here we have the interpreter interpreting another interpreter that runs
|
||||
the program. Did you think that was too fast? Just throw in another
|
||||
level of interpretation:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.oo august.oo test.oo | ./august
|
||||
```
|
||||
|
||||
And another...
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat august.oo august.oo august.oo test.oo | ./august
|
||||
```
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dalbec
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -11,7 +11,7 @@ section.
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./eldby.alt
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ problematic for some people, can be configured to different speeds by way of the
|
||||
value used in `usleep()`. The default is `35000` but you can easily change
|
||||
it. To do so try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make SLEEP=20000 clobber alt
|
||||
./eldby.alt
|
||||
```
|
||||
@@ -41,7 +41,7 @@ This version is the original which has no sleep time in between updates.
|
||||
|
||||
### Original build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,14 +18,14 @@ For more detailed information see [1996 gandalf bugs](../../bugs.html#1996_ganda
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./gandalf
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ BTW: it is perilous to 'try' the patience of
|
||||
|
||||
For misleading C pre-processor output, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cc -E gandalf.c
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,14 +18,14 @@ For more detailed information see [1996 huffman bugs](../../bugs.html#1996_huffm
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo 'Huffman Decoding' | ./huffman
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ And for a misleading hint, consider who won! :-)
|
||||
|
||||
And if you really can't see what is going on, here is an extra spoiler:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./huffman < huffman.c 2>/dev/null
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -24,7 +24,7 @@ For more detailed information see [1996 jonth bugs](../../bugs.html#1996_jonth).
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./jonth :0 :0
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ off the other so that you can properly play.
|
||||
NOTE: if there is no X service open this will crash. If this is the case you
|
||||
might try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./jonth
|
||||
```
|
||||
|
||||
@@ -49,7 +49,7 @@ These are supposed to happen. As is written in the
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./jonth host1:0 host2:0
|
||||
```
|
||||
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./rcm < file.gz
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ where `file.gz` is some gzipped file.
|
||||
|
||||
For more information try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ For more information try:
|
||||
|
||||
For a good no-op try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
gzip -c < rcm.c | ./rcm
|
||||
```
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./schweikh1
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
To find the day that Easter falls on in the current year and to show all Easter
|
||||
dates from 1582 to 2199:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./schweikh2
|
||||
```
|
||||
|
||||
@@ -24,19 +24,19 @@ The program accepts up to 4 parameters:
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
What happens if you pass only three parameters like the below?
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./schweikh2 15 1 0
|
||||
```
|
||||
|
||||
The author also suggests:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
while :; do grep -v '#' schweikh2.c; done
|
||||
```
|
||||
|
||||
@@ -51,7 +51,7 @@ The original program, with only slight obfuscations, may be found
|
||||
in [hunni.c](hunni.c). The perl script, [hunni.pl](hunni.pl), obfuscates it
|
||||
appropriately. Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
less hunni.c
|
||||
|
||||
perl ./hunni.pl < hunni.c
|
||||
@@ -137,7 +137,7 @@ minutes (`gcc -O3`).
|
||||
|
||||
### Sample arguments:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./schweikh2 6
|
||||
./schweikh2 7 0
|
||||
./schweikh2 7 7 0
|
||||
@@ -151,7 +151,7 @@ minutes (`gcc -O3`).
|
||||
The diamond pattern can be continued without a break.
|
||||
For a nice printout try this on your Bourne compatible shell:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
while :; do grep -v '#' schweikh2.c; done
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -12,7 +12,7 @@ It may render your system unusable for a limited amount of time
|
||||
or force you to reboot using the Big Red Button! This is **NOT** a joke.
|
||||
You have been warned.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./schweikh3
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ systems.
|
||||
|
||||
But still it is a useful utility. To use try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./schweikh3
|
||||
```
|
||||
|
||||
@@ -57,7 +57,7 @@ You have to select maximum ANSI C conformance of your
|
||||
compiler. The source fails to compile under a C++ compiler due to
|
||||
the `new' identifier which is a C++ reserved word:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
$ g++ schweikh3.c
|
||||
schweikh3.c:9: parse error before `new'
|
||||
schweikh3.c:16: parse error before `new'
|
||||
@@ -71,7 +71,7 @@ the `new' identifier which is a C++ reserved word:
|
||||
The source fails to compile on compilers that recognize the inline
|
||||
keyword by default, e.g. gcc:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
$ gcc schweikh3.c
|
||||
schweikh3.c:46: parse error before `void'
|
||||
schweikh3.c: In function `main':
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./clock1.sh
|
||||
./clock2.sh
|
||||
./clock3.sh
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -34,14 +34,14 @@ provided, to show the differences.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
@@ -81,7 +81,7 @@ larger.
|
||||
|
||||
The code is simple; the arguments passed are:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./westley minute_map hour_map hand_symbol clock_image
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user