Created `quick-start.md` to hold the FAQ 0.0 content. Used `sgit(1)` to change: * faq.html#enter ==> quick-start.html#enter * faq.html#enter_questions ==> quick-start.html#enter_questions * faq.html#step_0 ==> quick-start.html#step_0 * faq.html#step_1 ==> quick-start.html#step_1 * faq.html#step_2 ==> quick-start.html#step_2 * faq.html#register ==> quick-start.html#register * faq.html#step_3 ==> quick-start.html#step_3 * faq.html#step_4 ==> quick-start.html#step_4 * faq.html#step_5 ==> quick-start.html#step_5 * faq.html#step_6 ==> quick-start.html#step_6 * faq.html#step_7 ==> quick-start.html#step_7 * faq.html#step_submit ==> quick-start.html#step_submit Via: ```sh sgit -e 's/faq\.html#enter/quick-start.html#enter/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#enter_questions/quick-start.html#enter_questions/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_0/quick-start.html#step_0/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_1/quick-start.html#step_1/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_2/quick-start.html#step_2/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#register/quick-start.html#register/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_3/quick-start.html#step_3/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_4/quick-start.html#step_4/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_5/quick-start.html#step_5/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_6/quick-start.html#step_6/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_7/quick-start.html#step_7/g' '*.md' '*.hdr' 'inc/*.html' sgit -e 's/faq\.html#step_submit/quick-start.html#step_submit/g' '*.md' '*.hdr' 'inc/*.html' ``` The former FAQ 0.0 section in `faq.html` now just refers to `quick-start.html`. Modified menu and non-JS menu so that "Enter the IOCCC" refers to `quick-start.html`. Changed `bin/gen-top-html.sh` VERSION from "1.4.10 2024-11-23" to "1.4.11 2025-01-09". Performed `make www` on macOS to complete the above.
To build:
make all
To use:
echo foo bar | ./dg
Try:
./try.sh
Judges' remarks:
Some C preprocessors got confused about single quotes in certain cases. In particular, the following source line:
b12(ase(bco(acp(bi(acp(bcp(acp(bpl(aqu(bqu(A))))))))))))))))))))))))))))))
sometimes has to be changed to:
b12(ase(bco(acp(bi(acp(bcp(acp(bpl('A'))))))))))))))))))))))))))))
particularly if the C preprocessor botches single quotes in cpp expansions, which we have done for the wider audience.
Author's remarks:
If my preprocessor could hack it, I could write this as one single line rather than 4, but when I do that I get a complaint "defines nested too deeply".
NOTICE to those who wish for a greater challenge:
If you want a greater challenge, don't read any further: just try to understand the program via the source.
If you get stuck, come back and read below for additional hints and information.
How this entry works:
This is another rot13 job (believe it or not) - the #defines are a
novel way of adding tokens: #define b12(x) 12 x means that at
some point in the source a 12 is followed by the compressed nested
#defines. The b12 gets the previous compression as an argument, and
prepends the 12, thus making another step in the recreation of the
source. The axx() #defines do the same, but add tokens after.
As for the rot13 algorithm, it relies on index(3) to find if the
character is in the set A-Za-z. l[] is an array that gets filled
with:
"nopqrstuvwxyzzzzabcdefghijklmmmmNOPQRSTUVWXYZZZZABCDEFGHIJKLMMMM"
If index(3) says the char is in the alphabet, then XOR the offset
with 16 to translate, and output, otherwise pass it unchanged.