Expand all leading tabs in markdown files
Given how problematic leading tabs in markdown files can be,
we have expanded all leading tabs in markdown files by:
```sh
find * -type f -name '*.md' -print |
while read -r file; do
rm -f "$file.tmp" ;
expand < "$file" > "$file.tmp" ;
mv -f -v "$file.tmp" "$file" ;
done
```
Given the previous changes to `bin/pandoc-wrapper.sh` and other recent
commits and recent pull requests, the were were **NO** changes to
any HTML files. This is a **good thing** as the expression goes.
No there are no leading tabs in any markdown files.
A check to catch any re-introduction of leading tabs
into any markdown file is on the way.
BTW: We do not have anything against leading tabs in files,
even though we have had to deal with their impact on forming
HTML from markdown files (as well as the calc source code).
It is just that this is one of those cases where tabs conflict
(sometimes caused by people wanting to change the classic
8-space tab model) with a desired outcome.
Perform `make www` to perform the above and test under macOS.
This commit is contained in:
1 parent
bf28cac593
commit
7712db4a17
117 files changed
+1758
-1758
No files matched your search
@@ -193,7 +193,7 @@ shifts mod 32:
|
||||
|
||||
```
|
||||
1<<48
|
||||
65536 0x00010000
|
||||
65536 0x00010000
|
||||
```
|
||||
|
||||
gcc 4.2.1 without arguments compiles cleanly (e.g. `cc prog.c -o prog`).
|
||||
|
||||
@@ -17,11 +17,11 @@ were added over time.
|
||||
dance began (this is called foreshadowing):
|
||||
|
||||
```
|
||||
() forced precedence
|
||||
- ~ ? unary minus, compl, byteswap
|
||||
* / % & << >> mul, div, mod, bitand, shift: left, right
|
||||
+ - | ^ add, sub, bitor, xor
|
||||
NUM 0-9
|
||||
() forced precedence
|
||||
- ~ ? unary minus, compl, byteswap
|
||||
* / % & << >> mul, div, mod, bitand, shift: left, right
|
||||
+ - | ^ add, sub, bitor, xor
|
||||
NUM 0-9
|
||||
```
|
||||
|
||||
This seemed like a reasonable candidate to experiment with obfuscation; perhaps
|
||||
@@ -34,39 +34,39 @@ The algorithm was and is rather straightforward:
|
||||
|
||||
```
|
||||
expr() {
|
||||
n = term()
|
||||
t = token()
|
||||
if (t == ADD) return n += expr()
|
||||
if (t == SUB) return n -= expr()
|
||||
if (t == BOR) return n |= expr()
|
||||
if (t == XOR) return n ^= expr()
|
||||
ungettoken(t)
|
||||
return n
|
||||
n = term()
|
||||
t = token()
|
||||
if (t == ADD) return n += expr()
|
||||
if (t == SUB) return n -= expr()
|
||||
if (t == BOR) return n |= expr()
|
||||
if (t == XOR) return n ^= expr()
|
||||
ungettoken(t)
|
||||
return n
|
||||
}
|
||||
term() {
|
||||
n = factor()
|
||||
t = token()
|
||||
if (t == MUL) return n *= term()
|
||||
if (t == DIV) return n /= term()
|
||||
if (t == AND) return n &= term()
|
||||
if (t == RSH) return n >> term()
|
||||
if (t == LSH) return n << term()
|
||||
ungettoken(t)
|
||||
return n
|
||||
n = factor()
|
||||
t = token()
|
||||
if (t == MUL) return n *= term()
|
||||
if (t == DIV) return n /= term()
|
||||
if (t == AND) return n &= term()
|
||||
if (t == RSH) return n >> term()
|
||||
if (t == LSH) return n << term()
|
||||
ungettoken(t)
|
||||
return n
|
||||
}
|
||||
factor() {
|
||||
t = token()
|
||||
if (t == LPAREN) {
|
||||
n = expr()
|
||||
if token() == RPAREN
|
||||
return n
|
||||
error()
|
||||
}
|
||||
if (t == SUB) return -factor()
|
||||
if (t == CMP) return ~factor()
|
||||
if (t == QUE) return byteswap(factor())
|
||||
if (t == DIG) return strtol()
|
||||
error()
|
||||
t = token()
|
||||
if (t == LPAREN) {
|
||||
n = expr()
|
||||
if token() == RPAREN
|
||||
return n
|
||||
error()
|
||||
}
|
||||
if (t == SUB) return -factor()
|
||||
if (t == CMP) return ~factor()
|
||||
if (t == QUE) return byteswap(factor())
|
||||
if (t == DIG) return strtol()
|
||||
error()
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ proceeds from there, using some identities that are confusingly similar and
|
||||
interestingly combined (increasing obfuscation):
|
||||
|
||||
```
|
||||
obc clr
|
||||
--- ---
|
||||
-~x x+1
|
||||
~-x x-1
|
||||
obc clr
|
||||
--- ---
|
||||
-~x x+1
|
||||
~-x x-1
|
||||
y-~x y+x+1
|
||||
```
|
||||
|
||||
|
||||
@@ -46,12 +46,12 @@ Compile the program as follows:
|
||||
|
||||
``` <!---sh-->
|
||||
cc -O3 -std=c99 \
|
||||
-Wall -Wextra -pedantic -o prog prog.c \
|
||||
-Delta_u="Du*laplacian(u)-u*v*v+F*(1-u)" \
|
||||
-Delta_v="Dv*laplacian(v)+u*v*v-v*(F+K)" \
|
||||
-DF=0.040 -DK=0.060 -DDu=0.200 -DDv=0.100 \
|
||||
-DUV_BACKGROUND=1,0 -DUV_DROP=-0.5,0.5 \
|
||||
-DTIMESTEP=1.0 -DSPEED=2 -DRGB=255:128:192
|
||||
-Wall -Wextra -pedantic -o prog prog.c \
|
||||
-Delta_u="Du*laplacian(u)-u*v*v+F*(1-u)" \
|
||||
-Delta_v="Dv*laplacian(v)+u*v*v-v*(F+K)" \
|
||||
-DF=0.040 -DK=0.060 -DDu=0.200 -DDv=0.100 \
|
||||
-DUV_BACKGROUND=1,0 -DUV_DROP=-0.5,0.5 \
|
||||
-DTIMESTEP=1.0 -DSPEED=2 -DRGB=255:128:192
|
||||
```
|
||||
|
||||
Then, run it with the `tcpserver` command in the
|
||||
|
||||
@@ -29,7 +29,7 @@ More generally use:
|
||||
``` <!---sh-->
|
||||
cc -o prog prog.c foo.c
|
||||
./prog
|
||||
^C # if necessary, where ^C is ctrl-C, interrrupt
|
||||
^C # if necessary, where ^C is ctrl-C, interrrupt
|
||||
```
|
||||
|
||||
to compile and run `prog` as whatever foo.c is in the joke PDP-11 emulator.
|
||||
|
||||
+13
-13
@@ -45,35 +45,35 @@ From the Makefile:
|
||||
# Game parameters
|
||||
#
|
||||
DU=99999 # Time between steps in microseconds.
|
||||
# Make it larger if the game is too fast for you.
|
||||
# Make it larger if the game is too fast for you.
|
||||
|
||||
DW=28 # Pipe-to-pipe spacing, in columns.
|
||||
# Farther apart is easier.
|
||||
# Farther apart is easier.
|
||||
|
||||
DD=20 # Space between pipes.
|
||||
# The difference between DD and DW is the width of a pipe.
|
||||
# Narrow pipes are easier to fly though.
|
||||
# The difference between DD and DW is the width of a pipe.
|
||||
# Narrow pipes are easier to fly though.
|
||||
|
||||
DH=8 # Height of gap in pipe.
|
||||
# Make this larger to make the game easier.
|
||||
# Make this larger to make the game easier.
|
||||
|
||||
DA=100 # Acceleration due to gravity (scaled by 256).
|
||||
# Smaller values make you glide slower.
|
||||
# Smaller values make you glide slower.
|
||||
|
||||
DI=-200 # Impulse velocity of a flap (scaled by 256).
|
||||
# Make larger if you want a less intense tapping experience!
|
||||
# Make larger if you want a less intense tapping experience!
|
||||
|
||||
DB='"<o^="' # Sprite for player when gliding.
|
||||
# HINT: Try using various emojis.
|
||||
# NOTE: The string MUST be enclosed inside double quotes.
|
||||
# HINT: Try using various emojis.
|
||||
# NOTE: The string MUST be enclosed inside double quotes.
|
||||
|
||||
DF='"<ov="' # Sprite for player when flapping.
|
||||
# HINT: Try using various emojis.
|
||||
# NOTE: The string MUST be enclosed inside double quotes.
|
||||
# HINT: Try using various emojis.
|
||||
# NOTE: The string MUST be enclosed inside double quotes.
|
||||
|
||||
DG='"Tap to Flap!"' # Instruction text.
|
||||
# Change to your native tongue.
|
||||
# NOTE: The string MUST be enclosed inside double quotes.
|
||||
# Change to your native tongue.
|
||||
# NOTE: The string MUST be enclosed inside double quotes.
|
||||
```
|
||||
|
||||
WARNING: if you have good eye-hand coordination and too much time on your hands
|
||||
|
||||
@@ -40,7 +40,7 @@ for a `compress(1)`-like compressor using a similar idea.
|
||||
Why is the sad smiley on line 12 in that particular place?
|
||||
|
||||
``` <!---c-->
|
||||
c=0) :( O
|
||||
c=0) :( O
|
||||
```
|
||||
|
||||
|
||||
|
||||
+59
-59
@@ -58,9 +58,9 @@ Bell](http://members.tip.net.au/~dbell/) once described
|
||||
as having one of the largest "yummo quotients" in number theory:
|
||||
|
||||
```
|
||||
complexity of the solution
|
||||
complexity of the solution
|
||||
yummo quotient = -----------------------------------
|
||||
complexity of the problem statement
|
||||
complexity of the problem statement
|
||||
```
|
||||
|
||||
[Erdős](https://en.wikipedia.org/wiki/Paul_Erdős) privately told one of the IOCCC judges:
|
||||
@@ -261,31 +261,31 @@ built. In biochemistry, each is assigned a TLI (see [Proteinogenic amino
|
||||
acid](https://en.wikipedia.org/wiki/Proteinogenic_amino_acid) for more info):
|
||||
|
||||
```
|
||||
ala Alanine
|
||||
cys Cysteine
|
||||
asp Aspartic acid
|
||||
glu Glutamic acid
|
||||
phe Phenylalanine
|
||||
gly Glycine
|
||||
his Histidine
|
||||
ile Isoleucine
|
||||
lys Lysine
|
||||
leu Leucine
|
||||
met Methionine
|
||||
asn Asparagine
|
||||
pyl Pyrrolysine
|
||||
pro Proline
|
||||
gln Glutamine
|
||||
arg Arginine
|
||||
ser Serine
|
||||
thr Threonine
|
||||
sec Selenocysteine
|
||||
val Valine
|
||||
trp Tryptophan
|
||||
tyr Tyrosine
|
||||
asx Asparagine or Aspartic acid
|
||||
glx Glutamic acid or Glutamine
|
||||
xle Leucine or Isoleucine
|
||||
ala Alanine
|
||||
cys Cysteine
|
||||
asp Aspartic acid
|
||||
glu Glutamic acid
|
||||
phe Phenylalanine
|
||||
gly Glycine
|
||||
his Histidine
|
||||
ile Isoleucine
|
||||
lys Lysine
|
||||
leu Leucine
|
||||
met Methionine
|
||||
asn Asparagine
|
||||
pyl Pyrrolysine
|
||||
pro Proline
|
||||
gln Glutamine
|
||||
arg Arginine
|
||||
ser Serine
|
||||
thr Threonine
|
||||
sec Selenocysteine
|
||||
val Valine
|
||||
trp Tryptophan
|
||||
tyr Tyrosine
|
||||
asx Asparagine or Aspartic acid
|
||||
glx Glutamic acid or Glutamine
|
||||
xle Leucine or Isoleucine
|
||||
unk Unknown
|
||||
```
|
||||
|
||||
@@ -294,10 +294,10 @@ the rule "[No original
|
||||
research](https://en.wikipedia.org/wiki/Wikipedia:No_original_research)"):
|
||||
|
||||
```
|
||||
and Androgynine
|
||||
xor Xenoricine
|
||||
not Notanamine
|
||||
tla Triletramine
|
||||
and Androgynine
|
||||
xor Xenoricine
|
||||
not Notanamine
|
||||
tla Triletramine
|
||||
```
|
||||
|
||||
Interestingly, the TLI are the perfect mnemonics for C language source.
|
||||
@@ -336,23 +336,23 @@ Another identity operation. I've done it for you already. Use this
|
||||
|
||||
``` <!---sh-->
|
||||
$ cat .indent.pro
|
||||
-bad /* blank line after decls */
|
||||
-bap /* blank line after functions */
|
||||
-br /* braces on if line */
|
||||
-i8 /* indent */
|
||||
-l999 /* line length */
|
||||
-npcs /* no space after function call names */
|
||||
-npsl /* don't break procedure type */
|
||||
-ut /* use tabs */
|
||||
-ce /* cuddle else */
|
||||
-nip /* no parameter indentation */
|
||||
-di1 /* declaration indent */
|
||||
-Tand
|
||||
-Tmet
|
||||
-Tthr
|
||||
-Tpro
|
||||
-Tser
|
||||
-Tala
|
||||
-bad /* blank line after decls */
|
||||
-bap /* blank line after functions */
|
||||
-br /* braces on if line */
|
||||
-i8 /* indent */
|
||||
-l999 /* line length */
|
||||
-npcs /* no space after function call names */
|
||||
-npsl /* don't break procedure type */
|
||||
-ut /* use tabs */
|
||||
-ce /* cuddle else */
|
||||
-nip /* no parameter indentation */
|
||||
-di1 /* declaration indent */
|
||||
-Tand
|
||||
-Tmet
|
||||
-Tthr
|
||||
-Tpro
|
||||
-Tser
|
||||
-Tala
|
||||
```
|
||||
|
||||
It looks like a perfect program should have:
|
||||
@@ -390,15 +390,15 @@ Pseudocode, with comments matching those in the C source:
|
||||
n = convert(argv[1])
|
||||
print n /* 2hx */
|
||||
while (n != 1) { /* one */
|
||||
if (n is odd) { /* odd */
|
||||
m = deep copy of n /* cpy */
|
||||
n <<= 1 /* shl */
|
||||
n += m /* add */
|
||||
increment n /* inc */
|
||||
} else { /* eve */
|
||||
n >>= 1 /* shr */
|
||||
}
|
||||
print n /* 2hx */
|
||||
if (n is odd) { /* odd */
|
||||
m = deep copy of n /* cpy */
|
||||
n <<= 1 /* shl */
|
||||
n += m /* add */
|
||||
increment n /* inc */
|
||||
} else { /* eve */
|
||||
n >>= 1 /* shr */
|
||||
}
|
||||
print n /* 2hx */
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -407,8 +407,8 @@ Pseudocode, with comments matching those in the C source:
|
||||
|
||||
``` <!---c-->
|
||||
typedef struct {
|
||||
size_t places; /* number of places in base 2 to the power of (8*sizeof(type)) */
|
||||
type *number; /* dynamically allocated memory for number */
|
||||
size_t places; /* number of places in base 2 to the power of (8*sizeof(type)) */
|
||||
type *number; /* dynamically allocated memory for number */
|
||||
} bignum
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user