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
+40
-31
@@ -259,7 +259,46 @@ a usage of `I` (complex's imaginary unit), but I bet this is cygwin's issue;
|
||||
it is surely a C99 feature.
|
||||
|
||||
|
||||
### Obfuscation
|
||||
### Notes about Additional Files
|
||||
|
||||
[logo.txt](logo.txt) is a source of the logo in this remark file.
|
||||
|
||||
[column.txt](column.txt) is a water column collapse, which is a popular demo of SPH.
|
||||
|
||||
[pour-out.txt](pour-out.txt) pours you a cup of tea.
|
||||
|
||||
[tanada.txt](tanada.txt) simulates "Terrace farming". ("Tanada" means a
|
||||
"[terraced rice](https://en.wikipedia.org/wiki/Terrace_(earthworks) fields)" in Japanese.)
|
||||
|
||||
[clock.txt](clock.txt) is a "water" clock created by HAMANO Tsukasa.
|
||||
|
||||
Other `*.txt` files are from the judges.
|
||||
|
||||
|
||||
[endoh1_color.c](%%REPO_URL%%/2012/endoh1/endoh1_color.c) is a variant that shows the density by using terminal 256
|
||||
colors.
|
||||
|
||||
|
||||
### Acknowledgments
|
||||
|
||||
I would like to thank my wife @hirekoke for her teaching me the SPH method.
|
||||
|
||||
The judges <del>ordered</del> suggested creating a color version
|
||||
after the contest.
|
||||
|
||||
The judges and HAMANO Tsukasa (The silver medalist at this IOCCC) kindly
|
||||
provided many configuration files.
|
||||
|
||||
|
||||
### 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:
|
||||
|
||||
First of all, the source code itself serves as an initial configuration.
|
||||
Preprocessing directives (such as `#include`)'s `#` serve as walls.
|
||||
@@ -283,36 +322,6 @@ extract "integer part of real part" from a complex value by assigning (and
|
||||
casting) it to an integer-type variable.
|
||||
|
||||
|
||||
### Notes about Additional Files
|
||||
|
||||
[logo.txt](logo.txt) is a source of the logo in this remark file.
|
||||
|
||||
[column.txt](column.txt) is a water column collapse, which is a popular demo of SPH.
|
||||
|
||||
[pour-out.txt](pour-out.txt) pours you a cup of tea.
|
||||
|
||||
[tanada.txt](tanada.txt) simulates "Terrace farming". ("Tanada" means a
|
||||
"[terraced rice](https://en.wikipedia.org/wiki/Terrace_(earthworks) fields)" in Japanese.)
|
||||
|
||||
[clock.txt](clock.txt) is a "water" clock created by HAMANO Tsukasa.
|
||||
|
||||
Other `*.txt` files are from the judges.
|
||||
|
||||
|
||||
[endoh1_color.c](%%REPO_URL%%/2012/endoh1/endoh1_color.c) is a variant that shows the density by using terminal 256
|
||||
colors.
|
||||
|
||||
### Acknowledgments
|
||||
|
||||
I would like to thank my wife @hirekoke for her teaching me the SPH method.
|
||||
|
||||
The judges <del>ordered</del> suggested creating a color version
|
||||
after the contest.
|
||||
|
||||
The judges and HAMANO Tsukasa (The silver medalist at this IOCCC) kindly
|
||||
provided many configuration files.
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
+20
-16
@@ -554,22 +554,6 @@ used to clear screen and move cursor to home.</p>
|
||||
and gcc-4.5.3 and clang-3.1 on Cygwin. On Cygwin, gcc and clang complain about
|
||||
a usage of <code>I</code> (complex’s imaginary unit), but I bet this is cygwin’s issue;
|
||||
it is surely a C99 feature.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>First of all, the source code itself serves as an initial configuration.
|
||||
Preprocessing directives (such as <code>#include</code>)’s <code>#</code> serve as walls.</p>
|
||||
<p>This program uses <code>double complex</code> to represent any 2D vector. But, note that
|
||||
the <code>x-axis</code> and <code>y-axis</code> are swapped (real axis = y-axis, imaginary axis =
|
||||
x-axis). The purpose of swapping is not only obfuscation, but also short
|
||||
coding: for example, to add gravity to total force, <code>force += G</code> suffices,
|
||||
rather than <code>force += G*I</code>.</p>
|
||||
<p>(Incidentally, you can exert horizontal gravity by using for instance <code>-DG=I</code>)</p>
|
||||
<p>Every five entries of <code>double complex a[]</code> contain information of one particle:
|
||||
position, wall-flag, density, force, and velocity, in turn.</p>
|
||||
<p>You can use <code>G</code>, <code>P</code>, and <code>V</code> as a guide to find the calculation code of
|
||||
gravity, pressure, and viscosity forces.</p>
|
||||
<p>Though some assignments may look meaningless, they are actually meaningful; they
|
||||
extract “integer part of real part” from a complex value by assigning (and
|
||||
casting) it to an integer-type variable.</p>
|
||||
<h3 id="notes-about-additional-files">Notes about Additional Files</h3>
|
||||
<p><a href="logo.txt">logo.txt</a> is a source of the logo in this remark file.</p>
|
||||
<p><a href="column.txt">column.txt</a> is a water column collapse, which is a popular demo of SPH.</p>
|
||||
@@ -586,6 +570,26 @@ colors.</p>
|
||||
after the contest.</p>
|
||||
<p>The judges and HAMANO Tsukasa (The silver medalist at this IOCCC) kindly
|
||||
provided many configuration files.</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="how-this-entry-works">How this entry works:</h3>
|
||||
<p>First of all, the source code itself serves as an initial configuration.
|
||||
Preprocessing directives (such as <code>#include</code>)’s <code>#</code> serve as walls.</p>
|
||||
<p>This program uses <code>double complex</code> to represent any 2D vector. But, note that
|
||||
the <code>x-axis</code> and <code>y-axis</code> are swapped (real axis = y-axis, imaginary axis =
|
||||
x-axis). The purpose of swapping is not only obfuscation, but also short
|
||||
coding: for example, to add gravity to total force, <code>force += G</code> suffices,
|
||||
rather than <code>force += G*I</code>.</p>
|
||||
<p>(Incidentally, you can exert horizontal gravity by using for instance <code>-DG=I</code>)</p>
|
||||
<p>Every five entries of <code>double complex a[]</code> contain information of one particle:
|
||||
position, wall-flag, density, force, and velocity, in turn.</p>
|
||||
<p>You can use <code>G</code>, <code>P</code>, and <code>V</code> as a guide to find the calculation code of
|
||||
gravity, pressure, and viscosity forces.</p>
|
||||
<p>Though some assignments may look meaningless, they are actually meaningful; they
|
||||
extract “integer part of real part” from a complex value by assigning (and
|
||||
casting) it to an integer-type variable.</p>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
+9
-1
@@ -150,7 +150,15 @@ The design of the program explicitly allows for `EOF` even if it does not equal
|
||||
endian-independent.
|
||||
|
||||
|
||||
### Obfuscation
|
||||
### 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:
|
||||
|
||||
Many obfuscations used are typical for standard IOCCC entries:
|
||||
|
||||
|
||||
@@ -493,7 +493,11 @@ character set and two’s complement representation.</li>
|
||||
<code>-1</code> (it has to be negative per the standard but not necessarily <code>-1</code>) and both
|
||||
<code>signed char</code> and <code>unsigned char</code>, for example. Furthermore it is
|
||||
endian-independent.</p>
|
||||
<h3 id="obfuscation">Obfuscation</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>Many obfuscations used are typical for standard IOCCC entries:</p>
|
||||
<ul>
|
||||
<li>Two arguments from <code>main()</code> function are reused as normal variables.</li>
|
||||
|
||||
@@ -193,6 +193,14 @@ Note that on MingW, `stdin` and `stdout` are not opened in binary mode by
|
||||
default, this means `Nyaruko` may not faithfully encode files on MingW.
|
||||
|
||||
|
||||
### 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.
|
||||
|
||||
|
||||
### Extra files
|
||||
|
||||
[obfuscation.html](obfuscation.html) - Contains full recording of how the code went from
|
||||
|
||||
@@ -523,6 +523,10 @@ combinations:</p>
|
||||
</ul>
|
||||
<p>Note that on MingW, <code>stdin</code> and <code>stdout</code> are not opened in binary mode by
|
||||
default, this means <code>Nyaruko</code> may not faithfully encode files on MingW.</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="extra-files">Extra files</h3>
|
||||
<p><a href="obfuscation.html">obfuscation.html</a> - Contains full recording of how the code went from
|
||||
blank state to an obfuscated program, gzipped to fit under 1MB. Requires
|
||||
|
||||
+13
-5
@@ -520,11 +520,6 @@ The program has been tested to work correctly on Linux/Solaris/MacOSX both in 32
|
||||
and 64 bits.
|
||||
|
||||
|
||||
### How the program works
|
||||
|
||||
See the file [how.html](how.html).
|
||||
|
||||
|
||||
### Acknowledgements
|
||||
|
||||
Christopher Hendrie, Bertram Felgenhauer, Alex Stangl, Seong-hoon Kang,
|
||||
@@ -547,6 +542,19 @@ Higher Order Symbol. Comput. 20, 3 (September 2007), 199-207.
|
||||
<http://www.pps.univ-paris-diderot.fr/~krivine/articles/lazymach.pdf>
|
||||
|
||||
|
||||
### 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:
|
||||
|
||||
See the file [how.html](how.html).
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
@@ -383,6 +383,10 @@
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<!-- BEFORE: 1st line of markdown file: 2012/tromp/how.md -->
|
||||
<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>
|
||||
<h1 id="obfuscation">Obfuscation</h1>
|
||||
<p>The program implements a so called <a href="https://en.wikipedia.org/wiki/Krivine_machine">Krivine
|
||||
machine</a>, enhanced with a <a href="https://en.wikipedia.org/wiki/BIOS">basic
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
### 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.
|
||||
|
||||
|
||||
# Obfuscation
|
||||
|
||||
The program implements a so called [Krivine
|
||||
|
||||
@@ -743,8 +743,6 @@ separate <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/
|
||||
and from a hardcoded sizeof of 4 to 8.</p>
|
||||
<p>The program has been tested to work correctly on Linux/Solaris/MacOSX both in 32
|
||||
and 64 bits.</p>
|
||||
<h3 id="how-the-program-works">How the program works</h3>
|
||||
<p>See the file <a href="how.html">how.html</a>.</p>
|
||||
<h3 id="acknowledgements">Acknowledgements</h3>
|
||||
<p>Christopher Hendrie, Bertram Felgenhauer, Alex Stangl, Seong-hoon Kang,
|
||||
and <a href="../../authors.html#Yusuke_Endoh">Yusuke Endoh</a> have contributed ideas and
|
||||
@@ -759,6 +757,12 @@ Cambridge Tracts in Theoretical Computer Science, Cambridge University Press, Oc
|
||||
A call-by-name lambda-calculus machine
|
||||
Higher Order Symbol. Comput. 20, 3 (September 2007), 199-207.
|
||||
<a href="http://www.pps.univ-paris-diderot.fr/~krivine/articles/lazymach.pdf" class="uri">http://www.pps.univ-paris-diderot.fr/~krivine/articles/lazymach.pdf</a></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="how-this-entry-works">How this entry works:</h3>
|
||||
<p>See the file <a href="how.html">how.html</a>.</p>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
Reference in new issue
Block a user