add notices to those who wish for a greater challenge
We add the following level-3 header to help people identify text they may wish to skip if they wish for a greater challenge: ``` ``` After that notice we add: ``` **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. ``` And sometimes follow with: ``` ``` Or sometimes follow with: ``` ``` Where the alt code impacts a "greater challenge", we add instead: ``` **If you want a greater challenge, don't read any further**: just try to understand the program without looking at the Alternate code. If you get stuck, come back and look at the Alternate code. ``` And where a given command impacts a "greater challenge", we add instead: ``` **If you want a greater challenge, don't read any further**: just try to understand the program without running the command below. If you get stuck, come back and run the following command: ``` Perform `make www` to perform the above and test under macOS.
This commit is contained in:
1 parent
7af7a80cca
commit
2e2ae5f132
112 files changed
+845
-216
No files matched your search
+1
-1
@@ -38,7 +38,7 @@ These nods to not run afoul of the guideline:
|
||||
because the entry [2019/dogon](dogon/index.html) appropriately pays homage
|
||||
to past entries without blatantly reusing their code.
|
||||
|
||||
...We'll stop spouting spoilers now. Have fun exploring all the entries!
|
||||
...We'll stop spouting too many details now. Have fun exploring all the entries!
|
||||
|
||||
|
||||
## Remarks on some of submissions that did not win
|
||||
|
||||
@@ -254,13 +254,21 @@ were shuffled both for `S` functions and Apply functions in the same way to hide
|
||||
the meaning of `f` and `r` prefixes.
|
||||
|
||||
|
||||
### Identification spoiler:
|
||||
### 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.
|
||||
|
||||
|
||||
### Identification
|
||||
|
||||
The alternative build path `make identify` output commemorates a [previous IOCCC
|
||||
winning entry][9] which uses similar methods to mess with the size tool.
|
||||
|
||||
|
||||
### Judges' spoiler:
|
||||
### How this entry works:
|
||||
|
||||
It is not a bug, it is a feature. :)
|
||||
|
||||
|
||||
@@ -570,10 +570,14 @@ continuation and exit functions were swapped. The names of <code>S</code> and Ap
|
||||
were shuffled both for <code>S</code> functions and Apply functions in the same way to hide
|
||||
the meaning of <code>f</code> and <code>r</code> prefixes.</p></li>
|
||||
</ul>
|
||||
<h3 id="identification-spoiler">Identification spoiler:</h3>
|
||||
<h3 id="notice-to-those-who-wish-for-a-greater-challenge">NOTICE to those who wish for a greater challenge</h3>
|
||||
<p><strong>If you want a greater challenge, don’t read any further</strong>:
|
||||
just try to understand the program via the source.</p>
|
||||
<p>If you get stuck, come back and read below for additional hints and information.</p>
|
||||
<h3 id="identification">Identification</h3>
|
||||
<p>The alternative build path <code>make identify</code> output commemorates a <a href="../../2014/birken/index.html" title="Best use of port 1701">previous IOCCC
|
||||
winning entry</a> which uses similar methods to mess with the size tool.</p>
|
||||
<h3 id="judges-spoiler">Judges’ spoiler:</h3>
|
||||
<h3 id="how-this-entry-works">How this entry works:</h3>
|
||||
<p>It is not a bug, it is a feature. :)</p>
|
||||
<p>The crash is caused by a stack overflow. Conventional Unlabmda interpreters
|
||||
implement the Unlambda execution stack using data structures on the heap. This
|
||||
|
||||
+13
-3
@@ -59,14 +59,24 @@ Compiles cleanly with:
|
||||
### Description:
|
||||
|
||||
Included is a test script, useful for the corner cases. As in all good Unix
|
||||
programs, it is silent upon success; any output demonstrates an error. Instead
|
||||
of checking correctness, the [check.sh](%%REPO_URL%%/2019/burton/check.sh) script can simply output the
|
||||
results: (The Makefile contains the spoiler):
|
||||
programs, it is silent upon success; any output demonstrates an error.
|
||||
|
||||
|
||||
### 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 without running the command below.
|
||||
|
||||
If you get stuck, come back and run the following command:
|
||||
|
||||
``` <!---sh-->
|
||||
out=cat ./check.sh ./prog
|
||||
```
|
||||
|
||||
Instead of checking correctness, the
|
||||
[check.sh](%%REPO_URL%%/2019/burton/check.sh) script can simply
|
||||
output the results:
|
||||
|
||||
Interestingly, and a spoiler here: macOS and FreeBSD implement the common
|
||||
utility "correctly". CentOS and Ubuntu both share a "flawed" utility that
|
||||
changes output format based upon input redirection or pipeline(!). As well, the
|
||||
|
||||
@@ -428,10 +428,15 @@ The output should look familiar.</p>
|
||||
cc -Wall -Wextra -Weverything -pedantic $WARN -include stdio.h -o prog prog.c</code></pre>
|
||||
<h3 id="description">Description:</h3>
|
||||
<p>Included is a test script, useful for the corner cases. As in all good Unix
|
||||
programs, it is silent upon success; any output demonstrates an error. Instead
|
||||
of checking correctness, the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/check.sh">check.sh</a> script can simply output the
|
||||
results: (The Makefile contains the spoiler):</p>
|
||||
programs, it is silent upon success; any output demonstrates an error.</p>
|
||||
<h3 id="notice-to-those-who-wish-for-a-greater-challenge">NOTICE to those who wish for a greater challenge</h3>
|
||||
<p><strong>If you want a greater challenge, don’t read any further</strong>:
|
||||
just try to understand the program without running the command below.</p>
|
||||
<p>If you get stuck, come back and run the following command:</p>
|
||||
<pre><code> out=cat ./check.sh ./prog</code></pre>
|
||||
<p>Instead of checking correctness, the
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/check.sh">check.sh</a> script can simply
|
||||
output the results:</p>
|
||||
<p>Interestingly, and a spoiler here: macOS and FreeBSD implement the common
|
||||
utility “correctly”. CentOS and Ubuntu both share a “flawed” utility that
|
||||
changes output format based upon input redirection or pipeline(!). As well, the
|
||||
|
||||
+22
-14
@@ -225,20 +225,6 @@ character juxtaposed against a very ancient one, not to mention the program
|
||||
includes some famous name dropping and documents itself as usual.
|
||||
|
||||
|
||||
### Further spoilers, engineering, and obfuscation galore:
|
||||
|
||||
Those wait for you, curious and intrepid reader, in the attached
|
||||
[apholife.c](%%REPO_URL%%/2019/dogon/apholife.c) file, which is a partially obfuscated version of the
|
||||
program I wrote with a lot of helpful annotations and comments for myself and
|
||||
posterity, revealing some of the magic under the hood. This program is also a
|
||||
somewhat improved version which uses `ldexp()`s in the draw routine and has
|
||||
bigger constants, so it can zoom up to level 1024 if memory allows, and it tries
|
||||
its best to avoid dumping core on the poor user when its memory runs out, rather
|
||||
it enters freeze mode where you can still travel in calculated frozen
|
||||
space-time. Well, it's not nice and tame, it even has an escape key, usage
|
||||
message, and to top it all it even avoids `gets(3)`!
|
||||
|
||||
|
||||
### Special thanks:
|
||||
|
||||
To Tom Rockiki, the original co-writer of Golly, a personal friend and hashlife
|
||||
@@ -258,6 +244,28 @@ most obfuscated way of calculating the GOL function on a 64 bits `8*8` leaf:
|
||||
This uses only 19 bitwise operations and six shifts to calculate the inner 6x6
|
||||
next generation bits of the input 8x8 !
|
||||
|
||||
|
||||
### 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.
|
||||
|
||||
|
||||
### Further information, engineering, and obfuscation galore:
|
||||
|
||||
Those wait for you, curious and intrepid reader, in the attached
|
||||
[apholife.c](%%REPO_URL%%/2019/dogon/apholife.c) file, which is a partially obfuscated version of the
|
||||
program I wrote with a lot of helpful annotations and comments for myself and
|
||||
posterity, revealing some of the magic under the hood. This program is also a
|
||||
somewhat improved version which uses `ldexp()`s in the draw routine and has
|
||||
bigger constants, so it can zoom up to level 1024 if memory allows, and it tries
|
||||
its best to avoid dumping core on the poor user when its memory runs out, rather
|
||||
it enters freeze mode where you can still travel in calculated frozen
|
||||
space-time. Well, it's not nice and tame, it even has an escape key, usage
|
||||
message, and to top it all it even avoids `gets(3)`!
|
||||
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
+15
-11
@@ -565,17 +565,6 @@ resulting <code>F</code> in hexadecimal…</p>
|
||||
<p>And yes, the layout hint involves a mix of the most trendy typographical
|
||||
character juxtaposed against a very ancient one, not to mention the program
|
||||
includes some famous name dropping and documents itself as usual.</p>
|
||||
<h3 id="further-spoilers-engineering-and-obfuscation-galore">Further spoilers, engineering, and obfuscation galore:</h3>
|
||||
<p>Those wait for you, curious and intrepid reader, in the attached
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/apholife.c">apholife.c</a> file, which is a partially obfuscated version of the
|
||||
program I wrote with a lot of helpful annotations and comments for myself and
|
||||
posterity, revealing some of the magic under the hood. This program is also a
|
||||
somewhat improved version which uses <code>ldexp()</code>s in the draw routine and has
|
||||
bigger constants, so it can zoom up to level 1024 if memory allows, and it tries
|
||||
its best to avoid dumping core on the poor user when its memory runs out, rather
|
||||
it enters freeze mode where you can still travel in calculated frozen
|
||||
space-time. Well, it’s not nice and tame, it even has an escape key, usage
|
||||
message, and to top it all it even avoids <code>gets(3)</code>!</p>
|
||||
<h3 id="special-thanks">Special thanks:</h3>
|
||||
<p>To Tom Rockiki, the original co-writer of Golly, a personal friend and hashlife
|
||||
master, who reviewed some earlier versions of the entry and freely shared some
|
||||
@@ -589,6 +578,21 @@ most obfuscated way of calculating the GOL function on a 64 bits <code>8*8</code
|
||||
(ts1 | s1)) & ((ts0 ^ s0) | a); }</code></pre>
|
||||
<p>This uses only 19 bitwise operations and six shifts to calculate the inner 6x6
|
||||
next generation bits of the input 8x8 !</p>
|
||||
<h3 id="notice-to-those-who-wish-for-a-greater-challenge">NOTICE to those who wish for a greater challenge</h3>
|
||||
<p><strong>If you want a greater challenge, don’t read any further</strong>:
|
||||
just try to understand the program via the source.</p>
|
||||
<p>If you get stuck, come back and read below for additional hints and information.</p>
|
||||
<h3 id="further-information-engineering-and-obfuscation-galore">Further information, engineering, and obfuscation galore:</h3>
|
||||
<p>Those wait for you, curious and intrepid reader, in the attached
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/apholife.c">apholife.c</a> file, which is a partially obfuscated version of the
|
||||
program I wrote with a lot of helpful annotations and comments for myself and
|
||||
posterity, revealing some of the magic under the hood. This program is also a
|
||||
somewhat improved version which uses <code>ldexp()</code>s in the draw routine and has
|
||||
bigger constants, so it can zoom up to level 1024 if memory allows, and it tries
|
||||
its best to avoid dumping core on the poor user when its memory runs out, rather
|
||||
it enters freeze mode where you can still travel in calculated frozen
|
||||
space-time. Well, it’s not nice and tame, it even has an escape key, usage
|
||||
message, and to top it all it even avoids <code>gets(3)</code>!</p>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
+14
-1
@@ -184,7 +184,7 @@ You will probably have a hard time analyzing this entry, because:
|
||||
### A few more things:
|
||||
|
||||
Did you notice the `enum` declaration? Could it be just an `int` or `const int`
|
||||
variable, instead? (spoiler: <http://c-faq.com/ansi/constasconst.html>)
|
||||
variable, instead?
|
||||
|
||||
If your keyboard has no arrow keys, you can probably find alternate keys by
|
||||
reading the source code.
|
||||
@@ -250,6 +250,19 @@ maybe not reduce consumption, but consume them differently... And I obtained
|
||||
it works on macOS too! I must confess it was challenging to remain below the
|
||||
size limit with this little change.
|
||||
|
||||
|
||||
### 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.
|
||||
|
||||
|
||||
### For more information
|
||||
|
||||
See <http://c-faq.com/ansi/constasconst.html> for more information.
|
||||
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
@@ -506,7 +506,7 @@ background color?</em></li>
|
||||
</ul>
|
||||
<h3 id="a-few-more-things">A few more things:</h3>
|
||||
<p>Did you notice the <code>enum</code> declaration? Could it be just an <code>int</code> or <code>const int</code>
|
||||
variable, instead? (spoiler: <a href="http://c-faq.com/ansi/constasconst.html" class="uri">http://c-faq.com/ansi/constasconst.html</a>)</p>
|
||||
variable, instead?</p>
|
||||
<p>If your keyboard has no arrow keys, you can probably find alternate keys by
|
||||
reading the source code.</p>
|
||||
<h3 id="limits-portability">Limits, Portability:</h3>
|
||||
@@ -551,6 +551,12 @@ maybe not reduce consumption, but consume them differently… And I obtained
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/duble/prog.c">prog.c</a>. With this version, no need to touch <code>sysctl</code> parameters, and
|
||||
it works on macOS too! I must confess it was challenging to remain below the
|
||||
size limit with this little change.</p>
|
||||
<h3 id="notice-to-those-who-wish-for-a-greater-challenge">NOTICE to those who wish for a greater challenge</h3>
|
||||
<p><strong>If you want a greater challenge, don’t read any further</strong>:
|
||||
just try to understand the program via the source.</p>
|
||||
<p>If you get stuck, come back and read below for additional hints and information.</p>
|
||||
<h3 id="for-more-information">For more information</h3>
|
||||
<p>See <a href="http://c-faq.com/ansi/constasconst.html" class="uri">http://c-faq.com/ansi/constasconst.html</a> for more information.</p>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
+1
-1
@@ -415,7 +415,7 @@ are rather similar to previous entries</p>
|
||||
</blockquote>
|
||||
<p>because the entry <a href="dogon/index.html">2019/dogon</a> appropriately pays homage
|
||||
to past entries without blatantly reusing their code.</p>
|
||||
<p>…We’ll stop spouting spoilers now. Have fun exploring all the entries!</p>
|
||||
<p>…We’ll stop spouting too many details now. Have fun exploring all the entries!</p>
|
||||
<h2 id="remarks-on-some-of-submissions-that-did-not-win">Remarks on some of submissions that did not win</h2>
|
||||
<p>Some entries tried to get around the size limit by submitting a data
|
||||
file that was really C code and then blindly including code in prog.c.</p>
|
||||
|
||||
+9
-1
@@ -89,11 +89,19 @@ and shows GHC also accepts our subset of Haskell:
|
||||
|
||||
#### Self-hosting compiler:
|
||||
|
||||
To avoid spoiling this entry by revealing the original Haskell source, we
|
||||
To avoid revealing the original Haskell source, we
|
||||
instead provide [hint.hs](%%REPO_URL%%/2019/lynn/hint.hs), the output of a certain stage of the
|
||||
compiler when run on itself. This intermediate output is hopefully difficult to
|
||||
understand, yet is accepted by our compiler:
|
||||
|
||||
|
||||
### 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 without running the command below.
|
||||
|
||||
If you get stuck, come back and run the following command:
|
||||
|
||||
``` <!---sh-->
|
||||
(./prog < hint.hs ; cat prog.c) > hint.c
|
||||
make hint
|
||||
|
||||
@@ -443,10 +443,14 @@ includes <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/
|
||||
and shows GHC also accepts our subset of Haskell:</p>
|
||||
<pre><code> ghc ghcfib.hs</code></pre>
|
||||
<h4 id="self-hosting-compiler">Self-hosting compiler:</h4>
|
||||
<p>To avoid spoiling this entry by revealing the original Haskell source, we
|
||||
<p>To avoid revealing the original Haskell source, we
|
||||
instead provide <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/hint.hs">hint.hs</a>, the output of a certain stage of the
|
||||
compiler when run on itself. This intermediate output is hopefully difficult to
|
||||
understand, yet is accepted by our compiler:</p>
|
||||
<h3 id="notice-to-those-who-wish-for-a-greater-challenge">NOTICE to those who wish for a greater challenge</h3>
|
||||
<p><strong>If you want a greater challenge, don’t read any further</strong>:
|
||||
just try to understand the program without running the command below.</p>
|
||||
<p>If you get stuck, come back and run the following command:</p>
|
||||
<pre><code> (./prog < hint.hs ; cat prog.c) > hint.c
|
||||
make hint
|
||||
./hint</code></pre>
|
||||
|
||||
@@ -228,7 +228,15 @@ compilers. Small change in code can produce really unexpected results, i.e. the
|
||||
compiler can skip a few expressions or statements without obvious reason.
|
||||
|
||||
|
||||
### Major spoilers
|
||||
### 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:
|
||||
|
||||
It is commonly believed that [Mike Keith's
|
||||
algorithm](http://www.cadaeic.net/calendar.htm) published in _Journal of
|
||||
|
||||
@@ -521,7 +521,11 @@ prime</a> is missing from output.</p>
|
||||
achieve exactly the same output from different optimization levels and
|
||||
compilers. Small change in code can produce really unexpected results, i.e. the
|
||||
compiler can skip a few expressions or statements without obvious reason.</p>
|
||||
<h3 id="major-spoilers">Major spoilers</h3>
|
||||
<h3 id="notice-to-those-who-wish-for-a-greater-challenge">NOTICE to those who wish for a greater challenge</h3>
|
||||
<p><strong>If you want a greater challenge, don’t read any further</strong>:
|
||||
just try to understand the program via the source.</p>
|
||||
<p>If you get stuck, come back and read below for additional hints and information.</p>
|
||||
<h3 id="how-this-entry-works">How this entry works:</h3>
|
||||
<p>It is commonly believed that <a href="http://www.cadaeic.net/calendar.htm">Mike Keith’s
|
||||
algorithm</a> published in <em>Journal of
|
||||
Recreational Mathematics</em>, Vol. 22, No. 4, 1990, p. 280, is the shortest way to
|
||||
|
||||
Reference in new issue
Block a user