convert spoiler language and towards deobfuscation language
This commit is contained in:
1 parent
50a2a6293c
commit
4d6009b58f
98 files changed
+195
-358
No files matched your search
+1
-1
@@ -41,7 +41,7 @@ better debugger or trace could easily be added.
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
The author's comments is a detailed program explanation and spoiler. If you
|
||||
The author's comments contains detailed deobfuscation information. If you
|
||||
want a real challenge, don't read any further and try to understand the program
|
||||
via the source.
|
||||
|
||||
|
||||
@@ -420,7 +420,7 @@ better debugger or trace could easily be added.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<pre><code> ./paul.alt</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The author’s comments is a detailed program explanation and spoiler. If you
|
||||
<p>The author’s comments contains detailed deobfuscation information. If you
|
||||
want a real challenge, don’t read any further and try to understand the program
|
||||
via the source.</p>
|
||||
<h3 id="historical-note">Historical note:</h3>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ which we have done for the wider audience.
|
||||
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".
|
||||
|
||||
### Obfuscation spoiler:
|
||||
### Debfuscation:
|
||||
|
||||
This is another rot13 job (believe it or not) - the `#define`s are a
|
||||
novel way of adding tokens: `#define b12(x) 12 x` means that at
|
||||
|
||||
+1
-1
@@ -418,7 +418,7 @@ which we have done for the wider audience.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>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”.</p>
|
||||
<h3 id="obfuscation-spoiler">Obfuscation spoiler:</h3>
|
||||
<h3 id="debfuscation">Debfuscation:</h3>
|
||||
<p>This is another rot13 job (believe it or not) - the <code>#define</code>s are a
|
||||
novel way of adding tokens: <code>#define b12(x) 12 x</code> means that at
|
||||
some point in the source a <code>12</code> is followed by the compressed nested
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ By use of pointers to functions returning a struct of pointers
|
||||
to functions!
|
||||
|
||||
|
||||
### Spoiler:
|
||||
### Deobfuscation:
|
||||
|
||||
This program prints out the string:
|
||||
|
||||
|
||||
+1
-1
@@ -425,7 +425,7 @@ well.</p>
|
||||
it is done?</p>
|
||||
<p>By use of pointers to functions returning a struct of pointers
|
||||
to functions!</p>
|
||||
<h3 id="spoiler">Spoiler:</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation:</h3>
|
||||
<p>This program prints out the string:</p>
|
||||
<blockquote>
|
||||
<p>the quick brown fox jumped over the lazy dog</p>
|
||||
|
||||
@@ -86,7 +86,7 @@ In other words, even if we took steps to present the algorithm clearly, (we
|
||||
haven't) the relation of the computation performed to the specification of what
|
||||
the program was supposed to do would still be hard to understand.
|
||||
|
||||
### Quasi-spoiler on internals:
|
||||
### Quasi-deobfuscation on internals:
|
||||
|
||||
The program plays [Conway's Game of
|
||||
Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) in the root window's
|
||||
|
||||
@@ -458,7 +458,7 @@ In other words, even if we took steps to present the algorithm clearly, (we
|
||||
haven’t) the relation of the computation performed to the specification of what
|
||||
the program was supposed to do would still be hard to understand.</p></li>
|
||||
</ol>
|
||||
<h3 id="quasi-spoiler-on-internals">Quasi-spoiler on internals:</h3>
|
||||
<h3 id="quasi-deobfuscation-on-internals">Quasi-deobfuscation on internals:</h3>
|
||||
<p>The program plays <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway’s Game of
|
||||
Life</a> in the root window’s
|
||||
background pixmap. It starts by setting the background to random
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@ eliminated. As AG also refrains from abusing the preprocessor, it
|
||||
doesn't really have much to offer in terms of "surface obfuscation".
|
||||
Instead, it tries to achieve both its speed and its obscurity through a
|
||||
careful choice of algorithms. Some of the finer points of those
|
||||
algorithms are outlined in the spoiler below.
|
||||
algorithms are outlined in the deobfuscation information below.
|
||||
|
||||
|
||||
### How it works:
|
||||
|
||||
@@ -487,7 +487,7 @@ eliminated. As AG also refrains from abusing the preprocessor, it
|
||||
doesn’t really have much to offer in terms of “surface obfuscation”.
|
||||
Instead, it tries to achieve both its speed and its obscurity through a
|
||||
careful choice of algorithms. Some of the finer points of those
|
||||
algorithms are outlined in the spoiler below.</p>
|
||||
algorithms are outlined in the deobfuscation information below.</p>
|
||||
<h3 id="how-it-works">How it works:</h3>
|
||||
<p>Here follows a description of some of the data structures and
|
||||
algorithms used by AG. It is by no means complete, but it may help
|
||||
|
||||
@@ -125,7 +125,7 @@ compilers) complain that there is no control path leading to a return from
|
||||
`main()`. At 125 characters, it still fits on a single line (for those of us
|
||||
who don't mind ruining our eyes with 132 column screens).
|
||||
|
||||
### Spoiler:
|
||||
### Deobfuscation:
|
||||
|
||||
The first statement points the base of `l` (the argument vector) to
|
||||
be the first argument by incrementing it. It then assigns `O` to
|
||||
|
||||
@@ -481,7 +481,7 @@ return causes the line just written to be overwritten. <code>lint</code> (and mo
|
||||
compilers) complain that there is no control path leading to a return from
|
||||
<code>main()</code>. At 125 characters, it still fits on a single line (for those of us
|
||||
who don’t mind ruining our eyes with 132 column screens).</p>
|
||||
<h3 id="spoiler">Spoiler:</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation:</h3>
|
||||
<p>The first statement points the base of <code>l</code> (the argument vector) to
|
||||
be the first argument by incrementing it. It then assigns <code>O</code> to
|
||||
point to the character before the first character of the second
|
||||
|
||||
@@ -68,7 +68,7 @@ numbers to get a pleasing result, or use it for your high school algebra
|
||||
class.
|
||||
|
||||
|
||||
### SPOILER:
|
||||
### DEOBFUSCATION:
|
||||
|
||||
As should be obvious from 20 feet away, the program is a cubic plotter.
|
||||
It plots against certain artists, splattering their cubes with graphs
|
||||
|
||||
@@ -429,7 +429,7 @@ newsletter and a PDF file of just the pages cited.</p>
|
||||
<p>Run it with any 4 numeric arguments, e.g. <code>./horton 3 2 1 0</code>. Play with the
|
||||
numbers to get a pleasing result, or use it for your high school algebra
|
||||
class.</p>
|
||||
<h3 id="spoiler">SPOILER:</h3>
|
||||
<h3 id="deobfuscation">DEOBFUSCATION:</h3>
|
||||
<p>As should be obvious from 20 feet away, the program is a cubic plotter.
|
||||
It plots against certain artists, splattering their cubes with graphs
|
||||
of their cubic equations. Those dastardly arguments are mere coefficients,
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ parameter or an invalid parameter is given, then 5 is assumed. The
|
||||
maximum parameter is determined only by the amount of CPU time, virtual
|
||||
memory and display (or file) space available.
|
||||
|
||||
### SPOILER:
|
||||
### DEOBFUSCATION:
|
||||
|
||||
OK, so you have probably seen magic square printers before. But what
|
||||
about one that deals with even sizes as well as odd ones, or one that
|
||||
|
||||
+1
-1
@@ -424,7 +424,7 @@ other functions (apart from <code>main()</code>).</p>
|
||||
parameter or an invalid parameter is given, then 5 is assumed. The
|
||||
maximum parameter is determined only by the amount of CPU time, virtual
|
||||
memory and display (or file) space available.</p>
|
||||
<h3 id="spoiler">SPOILER:</h3>
|
||||
<h3 id="deobfuscation">DEOBFUSCATION:</h3>
|
||||
<p>OK, so you have probably seen magic square printers before. But what
|
||||
about one that deals with even sizes as well as odd ones, or one that
|
||||
prints out a different one each time (or attempts to, at any rate)?</p>
|
||||
|
||||
@@ -85,7 +85,7 @@ compile it and compare how it works to the original code.
|
||||
|
||||
## Author's remarks:
|
||||
|
||||
### SPOILER:
|
||||
### DEOBFUSCATION:
|
||||
|
||||
This is a program which takes any text file as input and 'flips'
|
||||
the input file along a diagonal running from the top left corner
|
||||
|
||||
@@ -439,7 +439,7 @@ find out why?</p>
|
||||
<p>You might also wish to redirect the output to another file,
|
||||
compile it and compare how it works to the original code.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="spoiler">SPOILER:</h3>
|
||||
<h3 id="deobfuscation">DEOBFUSCATION:</h3>
|
||||
<p>This is a program which takes any text file as input and ‘flips’
|
||||
the input file along a diagonal running from the top left corner
|
||||
down to the bottom right. In other words, the first row in the
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
```
|
||||
|
||||
|
||||
The author provided a spoiler version as alternate code. See [Alternate
|
||||
The author provided a deobfuscated version as alternate code. See [Alternate
|
||||
code](#alternate-code) below.
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Mode may be a value from 0 to 12.
|
||||
|
||||
## Alternate code:
|
||||
|
||||
The author provided us a spoiler version that might be of interest to some.
|
||||
The author provided us a deobfuscated version that might be of interest to some.
|
||||
|
||||
|
||||
### Alternate build:
|
||||
|
||||
+2
-2
@@ -403,7 +403,7 @@ Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em
|
||||
<!-- BEFORE: 1st line of markdown file: 1994/tvr/README.md -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>The author provided a spoiler version as alternate code. See <a href="#alternate-code">Alternate
|
||||
<p>The author provided a deobfuscated version as alternate code. See <a href="#alternate-code">Alternate
|
||||
code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
@@ -416,7 +416,7 @@ code</a> below.</p>
|
||||
<pre><code> ./try.color.sh # for colour displays
|
||||
./try.bw.sh # for Black & White displays</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The author provided us a spoiler version that might be of interest to some.</p>
|
||||
<p>The author provided us a deobfuscated version that might be of interest to some.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
|
||||
@@ -111,7 +111,7 @@ To see the game from start to complete, try:
|
||||
|
||||
Not all compiler errors are bad.
|
||||
|
||||
For spoilers see the end of the notes from the author below.
|
||||
For deobfuscation information see the end of the notes from the author below.
|
||||
|
||||
To use:
|
||||
|
||||
@@ -174,7 +174,7 @@ The goal of the game is to escape the dungeon.
|
||||
Here is a walk-through for the game, including a few dead-ends:
|
||||
|
||||
|
||||
### SPOILER
|
||||
### DEOBFUSCATION
|
||||
|
||||
``` <!---sh-->
|
||||
cc -Describe -Door westley.c
|
||||
|
||||
@@ -463,7 +463,7 @@ arguments:</p>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Not all compiler errors are bad.</p>
|
||||
<p>For spoilers see the end of the notes from the author below.</p>
|
||||
<p>For deobfuscation information see the end of the notes from the author below.</p>
|
||||
<p>To use:</p>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
@@ -501,7 +501,7 @@ the opening message each time, as if you are playing an adventure game
|
||||
with “verbose” turned on).</p>
|
||||
<p>The goal of the game is to escape the dungeon.</p>
|
||||
<p>Here is a walk-through for the game, including a few dead-ends:</p>
|
||||
<h3 id="spoiler">SPOILER</h3>
|
||||
<h3 id="deobfuscation">DEOBFUSCATION</h3>
|
||||
<pre><code> cc -Describe -Door westley.c
|
||||
cc -Describe -Drain westley.c
|
||||
cc -Describe -Dwarf westley.c
|
||||
|
||||
+2
-8
@@ -214,15 +214,9 @@ enjoy randomly changing patterns (the delay is 3 seconds),
|
||||
but there is a secret switch to suppress looping: useful
|
||||
if you want to pipe the output to a printer.
|
||||
|
||||
`uudecode` the spoiler below if you really want to know.
|
||||
Here is a but of deobfuscation:
|
||||
|
||||
```
|
||||
begin 664 spoiler
|
||||
M*%1H92!C;VQO;B J:7,J('1H92!S96-R970@<W=I=&-H("T@=&AE('-P86-E
|
||||
=(&)E9F]R92!I="!I<R!N;W0@82!M:7-T86ME*0II
|
||||
|
||||
end
|
||||
```
|
||||
> The colon **is** the secret switch - the space before it is not a mistake.
|
||||
|
||||
If `Variable` is used, the actual value of `cycle` doesn't matter,
|
||||
as far as it is > 1. To figure out what difference
|
||||
|
||||
+4
-6
@@ -524,12 +524,10 @@ the opening for step 1 is not a single line but a cross:</p>
|
||||
enjoy randomly changing patterns (the delay is 3 seconds),
|
||||
but there is a secret switch to suppress looping: useful
|
||||
if you want to pipe the output to a printer.</p>
|
||||
<p><code>uudecode</code> the spoiler below if you really want to know.</p>
|
||||
<pre><code> begin 664 spoiler
|
||||
M*%1H92!C;VQO;B J:7,J('1H92!S96-R970@<W=I=&-H("T@=&AE('-P86-E
|
||||
=(&)E9F]R92!I="!I<R!N;W0@82!M:7-T86ME*0II
|
||||
|
||||
end</code></pre>
|
||||
<p>Here is a but of deobfuscation:</p>
|
||||
<blockquote>
|
||||
<p>The colon <strong>is</strong> the secret switch - the space before it is not a mistake.</p>
|
||||
</blockquote>
|
||||
<p>If <code>Variable</code> is used, the actual value of <code>cycle</code> doesn’t matter,
|
||||
as far as it is > 1. To figure out what difference
|
||||
<code>cycle</code> makes when <code>Variable</code> is not used, try</p>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
make all
|
||||
```
|
||||
|
||||
The authors provided a spoiler version, originally uuencoded but uudecoded by us
|
||||
The authors provided a deobfuscated version, originally uuencoded but uudecoded by us
|
||||
in 2023. See [Alternate code](#alternate-code) below.
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ For more detailed information see [1995/vanschnitz in bugs.html](../../bugs.html
|
||||
|
||||
## Alternate code:
|
||||
|
||||
The authors provided a spoiler version of the program. Originally uuencoded we
|
||||
have decoded it for the wider audience in [vanschnitz.alt.c](%%REPO_URL%%/1995/vanschnitz/vanschnitz.alt.c). The
|
||||
`uuencode`d blob is still available in their remarks below. They encourage you
|
||||
to first try and figure out the program without the spoiler.
|
||||
The authors provided a deobfuscated version of the program. Originally uuencoded we
|
||||
have decoded it for the wider audience in [vanschnitz.alt.c](%%REPO_URL%%/1995/vanschnitz/vanschnitz.alt.c).
|
||||
|
||||
They encourage you to first try and figure out the program without reading the deobfuscated version,
|
||||
|
||||
|
||||
### Alternate build:
|
||||
@@ -120,90 +120,10 @@ solution wherein the disks end up on peg 2; for an even
|
||||
number of disks, they will end on peg 3. This should
|
||||
provide some hint as to what sort of algorithm is used.
|
||||
|
||||
We have included a [spoiler](%%REPO_URL%%/1995/vanschnitz/vanschnitz.alt.c) version of the program, with
|
||||
We have included a [deobfuscated](%%REPO_URL%%/1995/vanschnitz/vanschnitz.alt.c) version of the program, with
|
||||
meaningful symbol names and comments, but we encourage you
|
||||
to try to decipher the program without it...
|
||||
|
||||
```
|
||||
begin 444 spoiler.c
|
||||
M(VEF;F1E9B`@24Y)5$E!3$E:140*"B\J"B`J("!)9B!N(&ES;B=T(&1E9FEN
|
||||
M960L(&UA:V4@:70@-0H@*B\*(VEF;F1E9B`@;@HC9&5F:6YE("!N(#`U"B-E
|
||||
M;F1I9@H*+RH*("H@4V]M92!U<V5F=6P@=F%R:6%B;&5S"B`J+PHC9&5F:6YE
|
||||
M("!42$E37T9)3$4@7U]&24Q%7U\@"B-D969I;F4@($9/4DU!5%]35%))3D<@
|
||||
M(DUO=F4@9&ES:R`E9"!F<F]M('!E9R`E9"!T;R!P96<@)61<;B(*(V1E9FEN
|
||||
M92`@24Y)5$E!3$E:140*"B\J"B`J(%1R86YS;&%T92!N(&EN=&\@8FET<PH@
|
||||
M*B\*(VEF("`@("`@;B8P,0HC9&5F:6YE("!B:70P"B-E;F1I9@HC:68@("`@
|
||||
M("!N)C`R"B-D969I;F4@(&)I=#$*(V5N9&EF"B-I9B`@("`@(&XF,#0*(V1E
|
||||
M9FEN92`@8FET,@HC96YD:68*(VEF("`@("`@;CX^,PHC9&5F:6YE("!B:70S
|
||||
M"B-E;F1I9@H*+RH*("H@2&5R92=S('1H92!P<F]G<F%M(0H@*B\*;6%I;B@I
|
||||
M>PIP<FEN=&8H"B-I;F-L=61E(%1(25-?1DE,10HC9&5F:6YE("!.3U=?1$]?
|
||||
M5$A%7TY534)%4E,*(VEN8VQU9&4@5$A)4U]&24Q%"BD[?0H*(V5L<V4*"B\J
|
||||
M"B`J($-H96-K('1O('-E92!I9B!T:&4@;G5M8F5R(&ES('IE<F\@*&)O='1O
|
||||
M;2!O9B!R96-U<G-I;VXI"B`J+PHC:69D968@("!B:70P"B-D969I;F4@($Y?
|
||||
M25-?3D]47UI%4D\*(V5N9&EF"B-I9F1E9B`@(&)I=#$*(V1E9FEN92`@3E])
|
||||
M4U].3U1?6D523PHC96YD:68*(VEF9&5F("`@8FET,@HC9&5F:6YE("!.7TE3
|
||||
M7TY/5%]:15)/"B-E;F1I9@HC:69D968@("!B:70S"B-D969I;F4@($Y?25-?
|
||||
M3D]47UI%4D\*(V5N9&EF"@HC:69D968@("!.7TE37TY/5%]:15)/"B-U;F1E
|
||||
M9B`@($Y?25-?3D]47UI%4D\*"B\J"B`J($1E8W)E;65N="!N"B`J+PHC:69N
|
||||
M9&5F("!B:70P"B-D969I;F4@(&)I=#`*(VEF;F1E9B`@8FET,0HC9&5F:6YE
|
||||
M("!B:70Q"B-I9FYD968@(&)I=#(*(V1E9FEN92`@8FET,@HC:69N9&5F("!B
|
||||
M:70S"B-D969I;F4@(&)I=#,*(V5L<V4*(W5N9&5F("`@8FET,PHC96YD:68*
|
||||
M(V5L<V4*(W5N9&5F("`@8FET,@HC96YD:68*(V5L<V4*(W5N9&5F("`@8FET
|
||||
M,0HC96YD:68*(V5L<V4*(W5N9&5F("`@8FET,`HC96YD:68*"B\J"B`J("!(
|
||||
M97)E)W,@<F5C=7)S:6]N"B`J+PHC:6YC;'5D92!42$E37T9)3$4*"B\J"B`J
|
||||
M("!.;W1E.B!/9&0@;G5M8F5R960@9&ES:W,@86QW87ES(&-Y8VQE(&9R;VT@
|
||||
M,2`]/B`R(#T^(#,@/3X@,2`]/B`R(#T^(#,*("H@($5V96X@;G5M8F5R960@
|
||||
M9&ES:W,@86QW87ES(&-Y8VQE(&9R;VT@,2`]/B`S(#T^(#(@/3X@,2`]/B`S
|
||||
M(#T^(#(*("HO"@HO*@H@*B!#:&5C:R!T;R!S964@:68@;B!I<R!Z97)O+B!)
|
||||
M9B!S;RP@=V4G<F4@;6]V:6YG(&1I<VL@,2X*("H@26X@9V5N97)A;"P@9F]R
|
||||
M(&%N>2!N('=E)W)E(&UO=FEN9R!D:7-K(&XK,2X@5&AA="!M96%N<R!T:&%T
|
||||
M"B`J('=H96X@;B!I<R!O9&0L('=E)W)E(&UO=FEN9R!A;B!E=F5N(&1I<VLL
|
||||
M(&%N9"!V:6-E('9E<G-A+@H@*B\*(VEF;F1E9B`@8FET,`HC:69N9&5F("!B
|
||||
M:70Q"B-I9FYD968@(&)I=#(*(VEF;F1E9B`@8FET,PHC9&5F:6YE("!.7TE3
|
||||
M7UI%4D\*(V5N9&EF"B-E;F1I9@HC96YD:68*(V5N9&EF"@HC:69D968@("!.
|
||||
M7TE37UI%4D\*(W5N9&5F("`@3E])4U]:15)/"@HC:69N9&5F("!.3U=?1$]?
|
||||
M5$A%7TY534)%4E,*1D]234%47U-44DE.1PHC96QS90H*+RH*("H@($EF(&1I
|
||||
M<VL@,2!I<R!O;B!P96<@,BP@;6]V92!I="`R(#T^(#,*("HO"B-I9F1E9B`@
|
||||
M($1)4TM?3TY%7TE37T].7U!%1U]45T\*+#$L,BPS"B-U;F1E9B`@($1)4TM?
|
||||
M3TY%7TE37T].7U!%1U]45T\*(V1E9FEN92`@1$E32U]/3D5?25-?3TY?4$5'
|
||||
M7U1(4D5%"B-E;'-E"@HO*@H@*B`@268@9&ES:R`Q(&ES(&]N('!E9R`S+"!M
|
||||
M;W9E(&ET(#,@/3X@,0H@*B\*(VEF9&5F("`@1$E32U]/3D5?25-?3TY?4$5'
|
||||
M7U1(4D5%"BPQ+#,L,0HC=6YD968@("!$25-+7T].15])4U]/3E]014=?5$A2
|
||||
M144*(V5L<V4*"B\J"B`J("!$:7-K(#$@;75S="!B92!O;B!P96<@,2X@36]V
|
||||
M92!I="`Q(#T^(#(*("HO"BPQ+#$L,@HC9&5F:6YE("!$25-+7T].15])4U]/
|
||||
M3E]014=?5%=/"B-E;F1I9@HC96YD:68*(V5N9&EF"B-E;'-E"@HO*@H@*B`@
|
||||
M2&5R92P@=V4@:&%N9&QE(&1I<VMS(#XQ+B!296UE;6)E<B!T:&%T(&]D9',@
|
||||
M8WEC;&4@,2`]/B`R(#T^(#,@/3X@,2P*("H@(&%N9"!E=F5N<R!C>6-L92`Q
|
||||
M(#T^(#(@/3X@,R`]/B`Q+B!#;VUB:6YE('1H:7,@=VET:"!T:&4@:VYO=VQE
|
||||
M9&=E"B`J("!O9B!W:&5R92!D:7-K(#$@:7,L(&%N9"!W92!C86X@9&5T97)M
|
||||
M:6YE(&AO=R!T;R!M;W9E(&%N>2!D:7-K+@H@*B\*(VEF;F1E9B`@3D]77T1/
|
||||
M7U1(15].54U"15)3"D9/4DU!5%]35%))3D<*(V5L<V4*"B\J"B`J("!0<FEN
|
||||
M="!T:&4@9&ES:R!N=6UB97(N(%)E;65M8F5R+"!D:7-K(&YU;6)E<B`](&XK
|
||||
M,0H@*B\*+#$*(VEF9&5F("`@8FET,`HK,0HC96YD:68*(VEF9&5F("`@8FET
|
||||
M,0HK,@HC96YD:68*(VEF9&5F("`@8FET,@HK-`HC96YD:68*(VEF9&5F("`@
|
||||
M8FET,PHK.`HC96YD:68*"B\J"B`J("!$:7-K(#$@;VX@<&5G(#(@"B`J+PHC
|
||||
M:69D968@("!$25-+7T].15])4U]/3E]014=?5%=/"B-I9F1E9B`@(&)I=#`*
|
||||
M+#$L,R`@("`O*B!%=F5N.B`Q(#T^(#,@("AN(&ES(&]D9"P@<V\@=&AE(&1I
|
||||
M<VL@:7,@979E;BD@*B\*(V5L<V4*+#,L,2`@("`O*B`@3V1D.B`S(#T^(#$@
|
||||
M("HO"B-E;F1I9@HC96QS90H*+RH*("H@($1I<VL@,2!O;B!P96<@,R`*("HO
|
||||
M"B-I9F1E9B`@($1)4TM?3TY%7TE37T].7U!%1U]42%)%10HC:69D968@("!B
|
||||
M:70P"BPR+#$@("`@+RH@179E;CH@,B`]/B`Q("HO"B-E;'-E"BPQ+#(@("`@
|
||||
M+RH@($]D9#H@,2`]/B`R("HO"B-E;F1I9@HC96QS90H*+RH*("H@($1I<VL@
|
||||
M,2!O;B!P96<@,2`*("HO"B-I9F1E9B`@(&)I=#`*+#,L,B`@("`O*B!%=F5N
|
||||
M.B`S(#T^(#(@*B\*(V5L<V4*+#(L,R`@("`O*B`@3V1D.B`R(#T^(#,@*B\*
|
||||
M(V5N9&EF"B-E;F1I9@HC96YD:68*(V5N9&EF"B-E;F1I9@H*+RH*("H@($UO
|
||||
M<F4@<F5C=7)S:6]N"B`J+PHC:6YC;'5D92!42$E37T9)3$4*"B\J"B`J("!)
|
||||
M;F-R96UE;G0@;@H@*B\*(VEF9&5F("`@8FET,`HC=6YD968@("!B:70P"B-I
|
||||
M9F1E9B`@(&)I=#$*(W5N9&5F("`@8FET,0HC:69D968@("!B:70R"B-U;F1E
|
||||
M9B`@(&)I=#(*(VEF9&5F("`@8FET,PHC=6YD968@("!B:70S"B-E;'-E"B-D
|
||||
M969I;F4@(&)I=#,*(V5N9&EF"B-E;'-E"B-D969I;F4@(&)I=#(*(V5N9&EF
|
||||
M"B-E;'-E"B-D969I;F4@(&)I=#$*(V5N9&EF"B-E;'-E"B-D969I;F4@(&)I
|
||||
M=#`*(V5N9&EF"@HC96YD:68@("\J("-I9F1E9B!.7TE37TY/5%]:15)/("HO
|
||||
M"@HC96YD:68@("\J("-E;'-E(&]F("-I9FYD968@24Y)5$E!3$E:140@*B\*
|
||||
`
|
||||
end
|
||||
```
|
||||
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
@@ -408,7 +408,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- BEFORE: 1st line of markdown file: 1995/vanschnitz/README.md -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>The authors provided a spoiler version, originally uuencoded but uudecoded by us
|
||||
<p>The authors provided a deobfuscated version, originally uuencoded but uudecoded by us
|
||||
in 2023. See <a href="#alternate-code">Alternate code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
@@ -419,10 +419,9 @@ in 2023. See <a href="#alternate-code">Alternate code</a> below.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The authors provided a spoiler version of the program. Originally uuencoded we
|
||||
have decoded it for the wider audience in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/vanschnitz/vanschnitz.alt.c">vanschnitz.alt.c</a>. The
|
||||
<code>uuencode</code>d blob is still available in their remarks below. They encourage you
|
||||
to first try and figure out the program without the spoiler.</p>
|
||||
<p>The authors provided a deobfuscated version of the program. Originally uuencoded we
|
||||
have decoded it for the wider audience in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/vanschnitz/vanschnitz.alt.c">vanschnitz.alt.c</a>.</p>
|
||||
<p>They encourage you to first try and figure out the program without reading the deobfuscated version,</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
@@ -476,86 +475,9 @@ the resulting program (on a Unix system) is to do the command</p>
|
||||
solution wherein the disks end up on peg 2; for an even
|
||||
number of disks, they will end on peg 3. This should
|
||||
provide some hint as to what sort of algorithm is used.</p>
|
||||
<p>We have included a <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/vanschnitz/vanschnitz.alt.c">spoiler</a> version of the program, with
|
||||
<p>We have included a <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/vanschnitz/vanschnitz.alt.c">deobfuscated</a> version of the program, with
|
||||
meaningful symbol names and comments, but we encourage you
|
||||
to try to decipher the program without it…</p>
|
||||
<pre><code> begin 444 spoiler.c
|
||||
M(VEF;F1E9B`@24Y)5$E!3$E:140*"B\J"B`J("!)9B!N(&ES;B=T(&1E9FEN
|
||||
M960L(&UA:V4@:70@-0H@*B\*(VEF;F1E9B`@;@HC9&5F:6YE("!N(#`U"B-E
|
||||
M;F1I9@H*+RH*("H@4V]M92!U<V5F=6P@=F%R:6%B;&5S"B`J+PHC9&5F:6YE
|
||||
M("!42$E37T9)3$4@7U]&24Q%7U\@"B-D969I;F4@($9/4DU!5%]35%))3D<@
|
||||
M(DUO=F4@9&ES:R`E9"!F<F]M('!E9R`E9"!T;R!P96<@)61<;B(*(V1E9FEN
|
||||
M92`@24Y)5$E!3$E:140*"B\J"B`J(%1R86YS;&%T92!N(&EN=&\@8FET<PH@
|
||||
M*B\*(VEF("`@("`@;B8P,0HC9&5F:6YE("!B:70P"B-E;F1I9@HC:68@("`@
|
||||
M("!N)C`R"B-D969I;F4@(&)I=#$*(V5N9&EF"B-I9B`@("`@(&XF,#0*(V1E
|
||||
M9FEN92`@8FET,@HC96YD:68*(VEF("`@("`@;CX^,PHC9&5F:6YE("!B:70S
|
||||
M"B-E;F1I9@H*+RH*("H@2&5R92=S('1H92!P<F]G<F%M(0H@*B\*;6%I;B@I
|
||||
M>PIP<FEN=&8H"B-I;F-L=61E(%1(25-?1DE,10HC9&5F:6YE("!.3U=?1$]?
|
||||
M5$A%7TY534)%4E,*(VEN8VQU9&4@5$A)4U]&24Q%"BD[?0H*(V5L<V4*"B\J
|
||||
M"B`J($-H96-K('1O('-E92!I9B!T:&4@;G5M8F5R(&ES('IE<F\@*&)O='1O
|
||||
M;2!O9B!R96-U<G-I;VXI"B`J+PHC:69D968@("!B:70P"B-D969I;F4@($Y?
|
||||
M25-?3D]47UI%4D\*(V5N9&EF"B-I9F1E9B`@(&)I=#$*(V1E9FEN92`@3E])
|
||||
M4U].3U1?6D523PHC96YD:68*(VEF9&5F("`@8FET,@HC9&5F:6YE("!.7TE3
|
||||
M7TY/5%]:15)/"B-E;F1I9@HC:69D968@("!B:70S"B-D969I;F4@($Y?25-?
|
||||
M3D]47UI%4D\*(V5N9&EF"@HC:69D968@("!.7TE37TY/5%]:15)/"B-U;F1E
|
||||
M9B`@($Y?25-?3D]47UI%4D\*"B\J"B`J($1E8W)E;65N="!N"B`J+PHC:69N
|
||||
M9&5F("!B:70P"B-D969I;F4@(&)I=#`*(VEF;F1E9B`@8FET,0HC9&5F:6YE
|
||||
M("!B:70Q"B-I9FYD968@(&)I=#(*(V1E9FEN92`@8FET,@HC:69N9&5F("!B
|
||||
M:70S"B-D969I;F4@(&)I=#,*(V5L<V4*(W5N9&5F("`@8FET,PHC96YD:68*
|
||||
M(V5L<V4*(W5N9&5F("`@8FET,@HC96YD:68*(V5L<V4*(W5N9&5F("`@8FET
|
||||
M,0HC96YD:68*(V5L<V4*(W5N9&5F("`@8FET,`HC96YD:68*"B\J"B`J("!(
|
||||
M97)E)W,@<F5C=7)S:6]N"B`J+PHC:6YC;'5D92!42$E37T9)3$4*"B\J"B`J
|
||||
M("!.;W1E.B!/9&0@;G5M8F5R960@9&ES:W,@86QW87ES(&-Y8VQE(&9R;VT@
|
||||
M,2`]/B`R(#T^(#,@/3X@,2`]/B`R(#T^(#,*("H@($5V96X@;G5M8F5R960@
|
||||
M9&ES:W,@86QW87ES(&-Y8VQE(&9R;VT@,2`]/B`S(#T^(#(@/3X@,2`]/B`S
|
||||
M(#T^(#(*("HO"@HO*@H@*B!#:&5C:R!T;R!S964@:68@;B!I<R!Z97)O+B!)
|
||||
M9B!S;RP@=V4G<F4@;6]V:6YG(&1I<VL@,2X*("H@26X@9V5N97)A;"P@9F]R
|
||||
M(&%N>2!N('=E)W)E(&UO=FEN9R!D:7-K(&XK,2X@5&AA="!M96%N<R!T:&%T
|
||||
M"B`J('=H96X@;B!I<R!O9&0L('=E)W)E(&UO=FEN9R!A;B!E=F5N(&1I<VLL
|
||||
M(&%N9"!V:6-E('9E<G-A+@H@*B\*(VEF;F1E9B`@8FET,`HC:69N9&5F("!B
|
||||
M:70Q"B-I9FYD968@(&)I=#(*(VEF;F1E9B`@8FET,PHC9&5F:6YE("!.7TE3
|
||||
M7UI%4D\*(V5N9&EF"B-E;F1I9@HC96YD:68*(V5N9&EF"@HC:69D968@("!.
|
||||
M7TE37UI%4D\*(W5N9&5F("`@3E])4U]:15)/"@HC:69N9&5F("!.3U=?1$]?
|
||||
M5$A%7TY534)%4E,*1D]234%47U-44DE.1PHC96QS90H*+RH*("H@($EF(&1I
|
||||
M<VL@,2!I<R!O;B!P96<@,BP@;6]V92!I="`R(#T^(#,*("HO"B-I9F1E9B`@
|
||||
M($1)4TM?3TY%7TE37T].7U!%1U]45T\*+#$L,BPS"B-U;F1E9B`@($1)4TM?
|
||||
M3TY%7TE37T].7U!%1U]45T\*(V1E9FEN92`@1$E32U]/3D5?25-?3TY?4$5'
|
||||
M7U1(4D5%"B-E;'-E"@HO*@H@*B`@268@9&ES:R`Q(&ES(&]N('!E9R`S+"!M
|
||||
M;W9E(&ET(#,@/3X@,0H@*B\*(VEF9&5F("`@1$E32U]/3D5?25-?3TY?4$5'
|
||||
M7U1(4D5%"BPQ+#,L,0HC=6YD968@("!$25-+7T].15])4U]/3E]014=?5$A2
|
||||
M144*(V5L<V4*"B\J"B`J("!$:7-K(#$@;75S="!B92!O;B!P96<@,2X@36]V
|
||||
M92!I="`Q(#T^(#(*("HO"BPQ+#$L,@HC9&5F:6YE("!$25-+7T].15])4U]/
|
||||
M3E]014=?5%=/"B-E;F1I9@HC96YD:68*(V5N9&EF"B-E;'-E"@HO*@H@*B`@
|
||||
M2&5R92P@=V4@:&%N9&QE(&1I<VMS(#XQ+B!296UE;6)E<B!T:&%T(&]D9',@
|
||||
M8WEC;&4@,2`]/B`R(#T^(#,@/3X@,2P*("H@(&%N9"!E=F5N<R!C>6-L92`Q
|
||||
M(#T^(#(@/3X@,R`]/B`Q+B!#;VUB:6YE('1H:7,@=VET:"!T:&4@:VYO=VQE
|
||||
M9&=E"B`J("!O9B!W:&5R92!D:7-K(#$@:7,L(&%N9"!W92!C86X@9&5T97)M
|
||||
M:6YE(&AO=R!T;R!M;W9E(&%N>2!D:7-K+@H@*B\*(VEF;F1E9B`@3D]77T1/
|
||||
M7U1(15].54U"15)3"D9/4DU!5%]35%))3D<*(V5L<V4*"B\J"B`J("!0<FEN
|
||||
M="!T:&4@9&ES:R!N=6UB97(N(%)E;65M8F5R+"!D:7-K(&YU;6)E<B`](&XK
|
||||
M,0H@*B\*+#$*(VEF9&5F("`@8FET,`HK,0HC96YD:68*(VEF9&5F("`@8FET
|
||||
M,0HK,@HC96YD:68*(VEF9&5F("`@8FET,@HK-`HC96YD:68*(VEF9&5F("`@
|
||||
M8FET,PHK.`HC96YD:68*"B\J"B`J("!$:7-K(#$@;VX@<&5G(#(@"B`J+PHC
|
||||
M:69D968@("!$25-+7T].15])4U]/3E]014=?5%=/"B-I9F1E9B`@(&)I=#`*
|
||||
M+#$L,R`@("`O*B!%=F5N.B`Q(#T^(#,@("AN(&ES(&]D9"P@<V\@=&AE(&1I
|
||||
M<VL@:7,@979E;BD@*B\*(V5L<V4*+#,L,2`@("`O*B`@3V1D.B`S(#T^(#$@
|
||||
M("HO"B-E;F1I9@HC96QS90H*+RH*("H@($1I<VL@,2!O;B!P96<@,R`*("HO
|
||||
M"B-I9F1E9B`@($1)4TM?3TY%7TE37T].7U!%1U]42%)%10HC:69D968@("!B
|
||||
M:70P"BPR+#$@("`@+RH@179E;CH@,B`]/B`Q("HO"B-E;'-E"BPQ+#(@("`@
|
||||
M+RH@($]D9#H@,2`]/B`R("HO"B-E;F1I9@HC96QS90H*+RH*("H@($1I<VL@
|
||||
M,2!O;B!P96<@,2`*("HO"B-I9F1E9B`@(&)I=#`*+#,L,B`@("`O*B!%=F5N
|
||||
M.B`S(#T^(#(@*B\*(V5L<V4*+#(L,R`@("`O*B`@3V1D.B`R(#T^(#,@*B\*
|
||||
M(V5N9&EF"B-E;F1I9@HC96YD:68*(V5N9&EF"B-E;F1I9@H*+RH*("H@($UO
|
||||
M<F4@<F5C=7)S:6]N"B`J+PHC:6YC;'5D92!42$E37T9)3$4*"B\J"B`J("!)
|
||||
M;F-R96UE;G0@;@H@*B\*(VEF9&5F("`@8FET,`HC=6YD968@("!B:70P"B-I
|
||||
M9F1E9B`@(&)I=#$*(W5N9&5F("`@8FET,0HC:69D968@("!B:70R"B-U;F1E
|
||||
M9B`@(&)I=#(*(VEF9&5F("`@8FET,PHC=6YD968@("!B:70S"B-E;'-E"B-D
|
||||
M969I;F4@(&)I=#,*(V5N9&EF"B-E;'-E"B-D969I;F4@(&)I=#(*(V5N9&EF
|
||||
M"B-E;'-E"B-D969I;F4@(&)I=#$*(V5N9&EF"B-E;'-E"B-D969I;F4@(&)I
|
||||
M=#`*(V5N9&EF"@HC96YD:68@("\J("-I9F1E9B!.7TE37TY/5%]:15)/("HO
|
||||
M"@HC96YD:68@("\J("-E;'-E(&]F("-I9FYD968@24Y)5$E!3$E:140@*B\*
|
||||
`
|
||||
end</code></pre>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
@@ -32,12 +32,12 @@ For more detailed information see [1996/huffman in bugs.html](../../bugs.html#19
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
If you are still confused and want to read a spoiler, check out
|
||||
If you are still confused and want to run the deobfuscation command, check out
|
||||
the source and it will be clear as mud!
|
||||
|
||||
And for a misleading hint, consider who won! :-)
|
||||
|
||||
And if you really can't see what is going on, here is an extra spoiler:
|
||||
And if you really can't see what is going on, try this deobfuscation command:
|
||||
|
||||
``` <!---sh-->
|
||||
./huffman < huffman.c 2>/dev/null
|
||||
|
||||
@@ -412,10 +412,10 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>If you are still confused and want to read a spoiler, check out
|
||||
<p>If you are still confused and want to run the deobfuscation command, check out
|
||||
the source and it will be clear as mud!</p>
|
||||
<p>And for a misleading hint, consider who won! :-)</p>
|
||||
<p>And if you really can’t see what is going on, here is an extra spoiler:</p>
|
||||
<p>And if you really can’t see what is going on, try this deobfuscation command:</p>
|
||||
<pre><code> ./huffman < huffman.c 2>/dev/null</code></pre>
|
||||
<p>This entry was very well received at the IOCCC BOF.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
|
||||
+8
-8
@@ -111,20 +111,20 @@ I decided it would be better this way...
|
||||
These restrictions have been removed for your convenience.
|
||||
|
||||
The following lines describe how this program works; if you don't
|
||||
want to know it at this time, please skip them. If this entry would
|
||||
by some mistake win the contest, please do not rot13 this - I hate
|
||||
rot13 spoilers since it is somewhat complicated on a Mac to
|
||||
reverse them. Anyone out there should have enough discipline and
|
||||
rot13 shouldn't be required, really. After all, we are not children
|
||||
anymore :-)
|
||||
want to know it at this time, please skip them.
|
||||
|
||||
You should have enough discipline to make an effort to understand
|
||||
the code without reading the deobfuscation information below.
|
||||
After all, we are not children anymore :-)
|
||||
|
||||
## Deobfuscation information
|
||||
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
|
||||
This paragraph is not part of the author's remarks, but is a helpful
|
||||
gift from the judges; if you read too fast to stop yourself, this should
|
||||
give you enough time to stop, which you really need to do RIGHT NOW if
|
||||
you don't want to read the spoilers, which really do spoil everything,
|
||||
we mean it.
|
||||
you don't want to read the deobfuscation information: we mean it.
|
||||
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
|
||||
|
||||
+6
-8
@@ -481,18 +481,16 @@ My first private version would only run when compiled on a Friday.
|
||||
I decided it would be better this way…
|
||||
These restrictions have been removed for your convenience.</p>
|
||||
<p>The following lines describe how this program works; if you don’t
|
||||
want to know it at this time, please skip them. If this entry would
|
||||
by some mistake win the contest, please do not rot13 this - I hate
|
||||
rot13 spoilers since it is somewhat complicated on a Mac to
|
||||
reverse them. Anyone out there should have enough discipline and
|
||||
rot13 shouldn’t be required, really. After all, we are not children
|
||||
anymore :-)</p>
|
||||
want to know it at this time, please skip them.</p>
|
||||
<p>You should have enough discipline to make an effort to understand
|
||||
the code without reading the deobfuscation information below.
|
||||
After all, we are not children anymore :-)</p>
|
||||
<h2 id="deobfuscation-information">Deobfuscation information</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>This paragraph is not part of the author’s remarks, but is a helpful
|
||||
gift from the judges; if you read too fast to stop yourself, this should
|
||||
give you enough time to stop, which you really need to do RIGHT NOW if
|
||||
you don’t want to read the spoilers, which really do spoil everything,
|
||||
we mean it.</p>
|
||||
you don’t want to read the deobfuscation information: we mean it.</p>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>The source file needs to be present because the words are read from
|
||||
it. The wordlist is encoded within the source using a 24 entry
|
||||
|
||||
@@ -112,7 +112,7 @@ is the same as
|
||||
```
|
||||
|
||||
- The file [dorssel.html](dorssel.html) contains all the information needed to
|
||||
understand this program. For an obfuscated spoiler, try
|
||||
understand this program. For deobfuscation information, try:
|
||||
|
||||
``` <!---sh-->
|
||||
./dorssel < dorssel.md
|
||||
|
||||
@@ -468,7 +468,7 @@ text that can be reversibly Morsified, i.e.</li>
|
||||
<pre><code> ./dorssel < dorssel.c | ./dorssel</code></pre>
|
||||
<ul>
|
||||
<li>The file <a href="dorssel.html">dorssel.html</a> contains all the information needed to
|
||||
understand this program. For an obfuscated spoiler, try</li>
|
||||
understand this program. For deobfuscation information, try:</li>
|
||||
</ul>
|
||||
<pre><code> ./dorssel < dorssel.md</code></pre>
|
||||
<!--
|
||||
|
||||
@@ -115,7 +115,8 @@ looping. To see the resulting program run, redirect the output from
|
||||
|
||||
and then compile it.
|
||||
|
||||
### Spoilers And Hints:
|
||||
|
||||
### Deobfuscation And Hints:
|
||||
|
||||
The big key to this program is figuring out what the names of the
|
||||
functions ought to be; a bit of research may allow you to guess at
|
||||
|
||||
@@ -470,7 +470,7 @@ looping. To see the resulting program run, redirect the output from
|
||||
<code>schnitzi</code> into another file, like this</p>
|
||||
<pre><code> ./schnitzi 4 > sort.c</code></pre>
|
||||
<p>and then compile it.</p>
|
||||
<h3 id="spoilers-and-hints">Spoilers And Hints:</h3>
|
||||
<h3 id="deobfuscation-and-hints">Deobfuscation And Hints:</h3>
|
||||
<p>The big key to this program is figuring out what the names of the
|
||||
functions ought to be; a bit of research may allow you to guess at
|
||||
a few crucial ones.</p>
|
||||
|
||||
@@ -99,7 +99,7 @@ Count the number of non-whitespace characters in the source
|
||||
file to find out what dark force drove me to write this ;-).
|
||||
|
||||
|
||||
### Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
First of all, if you run a C beautifier on the program (thereby of course losing
|
||||
the nice code shape I worked so hard on ;-) ) the code will become a bit more
|
||||
|
||||
@@ -445,7 +445,7 @@ valid exit value to indicate failure (replace them with <code>EOF</code> resp.
|
||||
<h3 id="special-notes">Special notes</h3>
|
||||
<p>Count the number of non-whitespace characters in the source
|
||||
file to find out what dark force drove me to write this ;-).</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>First of all, if you run a C beautifier on the program (thereby of course losing
|
||||
the nice code shape I worked so hard on ;-) ) the code will become a bit more
|
||||
readable.</p>
|
||||
|
||||
@@ -34,7 +34,7 @@ NOTE: `n` is an integer.
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
Don't read the author remarks until you're ready for the spoiler.
|
||||
Don't read the author remarks until you're ready for some obfuscation information.
|
||||
Just stop and read the program; it won't take long. Once you've figured
|
||||
out what it does, run it. It may surprise you.
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Don’t read the author remarks until you’re ready for the spoiler.
|
||||
<p>Don’t read the author remarks until you’re ready for some obfuscation information.
|
||||
Just stop and read the program; it won’t take long. Once you’ve figured
|
||||
out what it does, run it. It may surprise you.</p>
|
||||
<p>This entry won, not because the obfuscation is impenetrable, but because
|
||||
|
||||
@@ -117,7 +117,7 @@ the game entertaining, see if you can find
|
||||
in the source code.)
|
||||
|
||||
|
||||
### GAME STRATEGY SPOILER
|
||||
### GAME STRATEGY DEOBFUSCATION
|
||||
|
||||
The trick, of course, is to drop items in empty rooms to mark them. That way
|
||||
you usually know if you're in a room you've seen before. It greatly aids
|
||||
|
||||
@@ -481,7 +481,7 @@ the game entertaining, see if you can find</p>
|
||||
<pre><code> the fish scales Q)++j<
|
||||
the shooting star -~- ~ -~i +</code></pre>
|
||||
<p>in the source code.)</p>
|
||||
<h3 id="game-strategy-spoiler">GAME STRATEGY SPOILER</h3>
|
||||
<h3 id="game-strategy-deobfuscation">GAME STRATEGY DEOBFUSCATION</h3>
|
||||
<p>The trick, of course, is to drop items in empty rooms to mark them. That way
|
||||
you usually know if you’re in a room you’ve seen before. It greatly aids
|
||||
mapping.</p>
|
||||
|
||||
@@ -159,7 +159,7 @@ style](https://wiki.c2.com/?OneTrueBraceStyle).
|
||||
|
||||
* `Hibachi` can serve [www.ioccc.org](https://www.ioccc.org).
|
||||
|
||||
* Commented spoiler available.
|
||||
* Commented deobfuscation information available.
|
||||
|
||||
### Known Issues
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@ style</a>.</p></li>
|
||||
<li><p><code>HTTP/1.0 200 OK</code> == <code>HTTP/1.1 200 OK CRLF Connection: close</code> ?</p></li>
|
||||
<li><p><code>getenv()</code> == <code>putenv()</code> ?</p></li>
|
||||
<li><p><code>Hibachi</code> can serve <a href="https://www.ioccc.org">www.ioccc.org</a>.</p></li>
|
||||
<li><p>Commented spoiler available.</p></li>
|
||||
<li><p>Commented deobfuscation information available.</p></li>
|
||||
</ul>
|
||||
<h3 id="known-issues">Known Issues</h3>
|
||||
<ul>
|
||||
|
||||
+2
-2
@@ -202,7 +202,7 @@ hit enter after every key), but it works.
|
||||
The game requires lots of space on the runtime stack space due to deep
|
||||
recursion, among other things. :-)
|
||||
|
||||
See spoilers below for more notes about portability.
|
||||
See the "**DEOBFUSCATION**" section below for more notes about portability.
|
||||
|
||||
|
||||
### ABOUT THE CODE
|
||||
@@ -280,7 +280,7 @@ It probably will also compile and work on many (all?) other \*nix platforms as
|
||||
well. How does it achieve this incredible feat?
|
||||
|
||||
|
||||
### SPOILER
|
||||
### DEOBFUSCATION
|
||||
|
||||
Read the following only if you give up figuring it out :-)
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ with <code>-DNO_STTY</code>. The game interface will be a bit annoying (you will
|
||||
hit enter after every key), but it works.</p>
|
||||
<p>The game requires lots of space on the runtime stack space due to deep
|
||||
recursion, among other things. :-)</p>
|
||||
<p>See spoilers below for more notes about portability.</p>
|
||||
<p>See the “<strong>DEOBFUSCATION</strong>” section below for more notes about portability.</p>
|
||||
<h3 id="about-the-code">ABOUT THE CODE</h3>
|
||||
<p>Clearly, the author is very, very confused. Although he has broken up the file
|
||||
into sections labelled with helpful headings, and although he has left ample
|
||||
@@ -577,7 +577,7 @@ on the following architectures:</p>
|
||||
</ul>
|
||||
<p>It probably will also compile and work on many (all?) other *nix platforms as
|
||||
well. How does it achieve this incredible feat?</p>
|
||||
<h3 id="spoiler">SPOILER</h3>
|
||||
<h3 id="deobfuscation">DEOBFUSCATION</h3>
|
||||
<p>Read the following only if you give up figuring it out :-)</p>
|
||||
<h4 id="the-evil-hack">The Evil Hack</h4>
|
||||
<p>The program (ab)uses an implicit assumption underlying practically all
|
||||
|
||||
@@ -248,7 +248,7 @@ changing the definitions of `W`, `H` and `I` at the beginning of the code.
|
||||
parameter.
|
||||
|
||||
|
||||
### Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
Sure, I don't want to deprive you of the pleasure of digging
|
||||
into the infernal mess created by my corrupted mind (writing
|
||||
|
||||
@@ -553,7 +553,7 @@ numbers.</li>
|
||||
<li>There should be some way to switch from Mandelbrot to Julia with chosen
|
||||
parameter.</li>
|
||||
</ul>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>Sure, I don’t want to deprive you of the pleasure of digging
|
||||
into the infernal mess created by my corrupted mind (writing
|
||||
this remark I noticed that I was ending sentences with ‘;’ instead
|
||||
|
||||
@@ -222,7 +222,7 @@ In Unix the min 0 on `stty` is required but circa 2001
|
||||
it was not required.
|
||||
|
||||
|
||||
### How it works (SPOILER)
|
||||
### How it works (deobfuscation)
|
||||
|
||||
The `l` array contains the 64K memory; it is initialized with a boot image
|
||||
loaded from the `C` file. The [program
|
||||
|
||||
@@ -534,7 +534,7 @@ is not what is needed.</p>
|
||||
<p>On PC/DOS you need to add <code>ANSI.SYS</code> to <code>CONFIG.SYS</code>.</p>
|
||||
<p>In Unix the min 0 on <code>stty</code> is required but circa 2001
|
||||
it was not required.</p>
|
||||
<h3 id="how-it-works-spoiler">How it works (SPOILER)</h3>
|
||||
<h3 id="how-it-works-deobfuscation">How it works (deobfuscation)</h3>
|
||||
<p>The <code>l</code> array contains the 64K memory; it is initialized with a boot image
|
||||
loaded from the <code>C</code> file. The <a href="https://en.wikipedia.org/wiki/Program_counter">program
|
||||
counter</a> is the <code>c</code> pointer and
|
||||
|
||||
@@ -198,7 +198,8 @@ Just say
|
||||
|
||||
(Btw, tcc has its roots in IOCCC...)
|
||||
|
||||
### Obfuscations (a.k.a. spoilers...)
|
||||
|
||||
### Deobfuscation
|
||||
|
||||
* The initialized char array includes the source code of the real program,
|
||||
as well as its name and commands to build and run it, all
|
||||
|
||||
@@ -536,7 +536,7 @@ C99, or long lines as an extension. This code has been tested on:</p></li>
|
||||
<li><p>AIX 5.3, IBM eServer p5-550, gcc 3.3.3 and AIX CC Version 6</p>
|
||||
<p>(Btw, tcc has its roots in IOCCC…)</p></li>
|
||||
</ul>
|
||||
<h3 id="obfuscations-a.k.a.-spoilers">Obfuscations (a.k.a. spoilers…)</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<ul>
|
||||
<li>The initialized char array includes the source code of the real program,
|
||||
as well as its name and commands to build and run it, all
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ the actual `argv` strings to be writable, though.
|
||||
- Some seemingly redundant code works to eliminate warnings and evade a gcc bug.
|
||||
|
||||
|
||||
### Spoilers
|
||||
### Deobfuscation
|
||||
|
||||
The parser parses function names, subtraction, and division as single-letter
|
||||
unary operators. A bitmask encoded hash table is used to check no-ops/digits
|
||||
|
||||
+1
-1
@@ -462,7 +462,7 @@ the actual <code>argv</code> strings to be writable, though.</li>
|
||||
<li>This program doesn’t work with <code>%e</code> style numbers like <code>1e-4</code>.</li>
|
||||
<li>Some seemingly redundant code works to eliminate warnings and evade a gcc bug.</li>
|
||||
</ul>
|
||||
<h3 id="spoilers">Spoilers</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>The parser parses function names, subtraction, and division as single-letter
|
||||
unary operators. A bitmask encoded hash table is used to check no-ops/digits
|
||||
and another hash function maps the ASCII to a function ordinal, which is then
|
||||
|
||||
@@ -153,7 +153,7 @@ reflection ray at an object's surface, given the incoming
|
||||
direction and surface normal.
|
||||
|
||||
|
||||
#### Further details (contains spoilers):
|
||||
#### Further deobfuscation:
|
||||
|
||||
The program is not quite a traditional [ray
|
||||
tracer](https://en.wikipedia.org/wiki/Ray_tracing_(graphics)), but a "[sphere
|
||||
|
||||
@@ -480,7 +480,7 @@ by the source code itself: the geometric construction of a
|
||||
reflection ray at an object’s surface, given the incoming
|
||||
direction and surface normal.</p></li>
|
||||
</ul>
|
||||
<h4 id="further-details-contains-spoilers">Further details (contains spoilers):</h4>
|
||||
<h4 id="further-deobfuscation">Further deobfuscation:</h4>
|
||||
<p>The program is not quite a traditional <a href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">ray
|
||||
tracer</a>, but a “<a href="sphere-tracing.pdf">sphere
|
||||
tracer</a>” which uses distance fields to encode proximity to
|
||||
|
||||
@@ -259,7 +259,7 @@ a usage of `I` (complex's imaginary unit), but I bet this is cygwin's issue;
|
||||
it is surely a C99 feature.
|
||||
|
||||
|
||||
### Obfuscation w/ Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
First of all, the source code itself serves as an initial configuration.
|
||||
Preprocessing directives (such as `#include`)'s `#` serve as walls.
|
||||
|
||||
@@ -554,7 +554,7 @@ 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-w-spoiler">Obfuscation w/ Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</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
|
||||
|
||||
+3
-2
@@ -150,7 +150,7 @@ The design of the program explicitly allows for `EOF` even if it does not equal
|
||||
endian-independent.
|
||||
|
||||
|
||||
### Obfuscations (SPOILERS!)
|
||||
### Debfuscation
|
||||
|
||||
Many obfuscations used are typical for standard IOCCC entries:
|
||||
|
||||
@@ -218,7 +218,8 @@ Having said this important trick, other details should be relatively easier to
|
||||
follow. The order of lookup table, for example, is very important,
|
||||
and the biggest constant 6177 is not arbitrarily chosen.
|
||||
|
||||
More spoilers can be found at <https://gist.github.com/lifthrasiir/3909337>
|
||||
Even [more deobfuscation information](https://gist.github.com/lifthrasiir/3909337) is available.
|
||||
|
||||
|
||||
### Acknowledgement
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ 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="obfuscations-spoilers">Obfuscations (SPOILERS!)</h3>
|
||||
<h3 id="debfuscation">Debfuscation</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>
|
||||
@@ -547,7 +547,7 @@ one character.</li>
|
||||
<p>Having said this important trick, other details should be relatively easier to
|
||||
follow. The order of lookup table, for example, is very important,
|
||||
and the biggest constant 6177 is not arbitrarily chosen.</p>
|
||||
<p>More spoilers can be found at <a href="https://gist.github.com/lifthrasiir/3909337" class="uri">https://gist.github.com/lifthrasiir/3909337</a></p>
|
||||
<p>Even <a href="https://gist.github.com/lifthrasiir/3909337">more deobfuscation information</a> is available.</p>
|
||||
<h3 id="acknowledgement">Acknowledgement</h3>
|
||||
<p>The cleaner (size-optimized) version of this program was originally published
|
||||
in my website in July 2011. Sun Park and others have reviewed it and made me
|
||||
|
||||
@@ -106,7 +106,7 @@ and to satisfy IOCCC's size rule.
|
||||
|
||||
These led to the good obfuscation.
|
||||
|
||||
See [Spoiler section](#spoiler) in detail, if you need.
|
||||
See the [deobfuscation section](#Deobfuscation) in detail, if you need.
|
||||
|
||||
|
||||
### Limitation
|
||||
@@ -119,8 +119,8 @@ Also, it requires a space between identifiers. In short, use `(S K)` instead of
|
||||
|
||||
Huge memory may be required to compile the program (about 300 MB on my machine).
|
||||
|
||||
In addition, there are some limitations (and workarounds) mentioned in [Spoiler
|
||||
section](#spoiler).
|
||||
In addition, there are some limitations (and workarounds) mentioned in
|
||||
the [deobfuscation section](#Deobfuscation).
|
||||
|
||||
But I think it would only matter when you run the attached programs.
|
||||
|
||||
@@ -156,7 +156,7 @@ run it as a standalone program, at least. In fact, tcc does not support the
|
||||
macro, but does work.
|
||||
|
||||
|
||||
### Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
The whole program is interpreted by macro expansion.
|
||||
For example, `S (K I)` is translated to a normal C code, `(s)((k)(i))`, or
|
||||
|
||||
@@ -450,15 +450,15 @@ and to satisfy IOCCC’s size rule.</p>
|
||||
<li>Short coding.</li>
|
||||
</ul>
|
||||
<p>These led to the good obfuscation.</p>
|
||||
<p>See <a href="#spoiler">Spoiler section</a> in detail, if you need.</p>
|
||||
<p>See the <a href="#Deobfuscation">deobfuscation section</a> in detail, if you need.</p>
|
||||
<h3 id="limitation">Limitation</h3>
|
||||
<p>This program supports only “Combinator-calculus style notation” of Lazy K.
|
||||
“Unlambda style” and “Iota and Jot” style are not supported.</p>
|
||||
<p>Also, it requires a space between identifiers. In short, use <code>(S K)</code> instead of
|
||||
<code>(SK)</code>, “`sk”, <code>**i*i*i*ii*i*i*ii</code>, or <code>11111100011100</code>.</p>
|
||||
<p>Huge memory may be required to compile the program (about 300 MB on my machine).</p>
|
||||
<p>In addition, there are some limitations (and workarounds) mentioned in <a href="#spoiler">Spoiler
|
||||
section</a>.</p>
|
||||
<p>In addition, there are some limitations (and workarounds) mentioned in
|
||||
the <a href="#Deobfuscation">deobfuscation section</a>.</p>
|
||||
<p>But I think it would only matter when you run the attached programs.</p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>I confirmed that the program successfully worked with the following compilers:</p>
|
||||
@@ -486,7 +486,7 @@ It is a gcc extension, and also supported by clang. If your compiler does not
|
||||
support it, you cannot use the program as a library. But you can compile and
|
||||
run it as a standalone program, at least. In fact, tcc does not support the
|
||||
macro, but does work.</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>The whole program is interpreted by macro expansion.
|
||||
For example, <code>S (K I)</code> is translated to a normal C code, <code>(s)((k)(i))</code>, or
|
||||
simply <code>s(k(i))</code>.</p>
|
||||
|
||||
@@ -181,7 +181,7 @@ For the same reason, do not post a score that contains only `z1092`.
|
||||
You know, it is ["the famous song"](http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3).
|
||||
|
||||
|
||||
### Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
Here is a magical expression which I found by brute-force:
|
||||
|
||||
|
||||
@@ -516,7 +516,7 @@ such as <code>C2E2</code>.</p>
|
||||
But I do not attach it to protect you from W****r.</p>
|
||||
<p>For the same reason, do not post a score that contains only <code>z1092</code>.
|
||||
You know, it is <a href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">“the famous song”</a>.</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>Here is a magical expression which I found by brute-force:</p>
|
||||
<pre><code> (c % 32 + 5) * 9 / 5 % 13 + n / 32 * 12 - 22</code></pre>
|
||||
<p>Interestingly, it converts an ASCII number of ABC notes
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ quite memory consuming, requires IEEE754-compliant `double`, and assumes `int` t
|
||||
doesn't copy saved sessions across different endianness.
|
||||
|
||||
|
||||
### Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
```
|
||||
3225 3225 3225 9 9 3225 3225
|
||||
|
||||
+1
-1
@@ -538,7 +538,7 @@ quite memory consuming, requires IEEE754-compliant <code>double</code>, and assu
|
||||
<li>Though technically endian-dependent, <code>a.c</code> remains portable providing that one
|
||||
doesn’t copy saved sessions across different endianness.</li>
|
||||
</ul>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<pre><code> 3225 3225 3225 9 9 3225 3225
|
||||
1 1 1 1 1 1 1 1 1 1
|
||||
4225 1226 1 1 1 1 1222 1226
|
||||
|
||||
@@ -62,7 +62,7 @@ more than 1000 words.
|
||||
You may want to use a large display with a very small terminal font.
|
||||
|
||||
|
||||
### Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
See [spoilers.html](spoilers.html).
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ more than 1000 words.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="remarks">Remarks</h3>
|
||||
<p>You may want to use a large display with a very small terminal font.</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>See <a href="spoilers.html">spoilers.html</a>.</p>
|
||||
<!--
|
||||
|
||||
|
||||
@@ -227,7 +227,8 @@ This allows for a convenient test suite:
|
||||
PATH=. eprog < test.in | diff - test.out
|
||||
```
|
||||
|
||||
### Spoilers:
|
||||
|
||||
### Deobfuscation:
|
||||
|
||||
If you do not want to puzzle out how it works, see [spoilers.html](spoilers.html).
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ To stifle these complaints:</p>
|
||||
This allows for a convenient test suite:</p>
|
||||
<pre><code> ln -sf prog eprog
|
||||
PATH=. eprog < test.in | diff - test.out</code></pre>
|
||||
<h3 id="spoilers">Spoilers:</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation:</h3>
|
||||
<p>If you do not want to puzzle out how it works, see <a href="spoilers.html">spoilers.html</a>.</p>
|
||||
<!--
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ Those techniques are about the use of 64 bit integers in order to do SIMD work,
|
||||
in a portable way without ever using any SSE/AVX or other non-portable compiler
|
||||
inline functions! The irony though, is that when compiling the program on modern
|
||||
X86 architectures indeed SSE/AVX is used for the long longs. Following is some
|
||||
"Spoiler" information, So if you want to play tough, stop reading at this point.
|
||||
deobfuscation information, So if you want to play tough, stop reading at this point.
|
||||
|
||||
|
||||
### Portable SIMD programming:
|
||||
|
||||
@@ -526,7 +526,7 @@ code more magical and efficient, at the same time.</p>
|
||||
in a portable way without ever using any SSE/AVX or other non-portable compiler
|
||||
inline functions! The irony though, is that when compiling the program on modern
|
||||
X86 architectures indeed SSE/AVX is used for the long longs. Following is some
|
||||
“Spoiler” information, So if you want to play tough, stop reading at this point.</p>
|
||||
deobfuscation information, So if you want to play tough, stop reading at this point.</p>
|
||||
<h3 id="portable-simd-programming">Portable SIMD programming:</h3>
|
||||
<p>So how is this done? Quite simply by using the whole <code>long long</code> arithmetic’s
|
||||
capability. I think the C99 standard assures us that <code>long long</code> has at least 64
|
||||
|
||||
@@ -62,7 +62,7 @@ terminal supports bold.
|
||||
|
||||
Hint 2: Do `wc -c prog.c`. This is very long one-liner.
|
||||
|
||||
Spoiler: Open the source with an editor like `vim` or `emacs`.
|
||||
Deobfuscation hint: Open the source with an editor like `vim` or `emacs`.
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
|
||||
<p>Hint 1: Do <code>less prog.c</code>. You will see an <strong>emphasized</strong> string if your
|
||||
terminal supports bold.</p>
|
||||
<p>Hint 2: Do <code>wc -c prog.c</code>. This is very long one-liner.</p>
|
||||
<p>Spoiler: Open the source with an editor like <code>vim</code> or <code>emacs</code>.</p>
|
||||
<p>Deobfuscation hint: Open the source with an editor like <code>vim</code> or <code>emacs</code>.</p>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
@@ -64,7 +64,7 @@ the source code from all angles..
|
||||
* Find `main()` function.
|
||||
|
||||
|
||||
### Spoiler
|
||||
### Deobfuscation
|
||||
|
||||
This program is a joke PDP-11 emulator. ("ll-dpd" is embedded in the code.
|
||||
Read it upside down.)
|
||||
|
||||
@@ -438,7 +438,7 @@ the same reason. But I believe it is reasonably portable.</li>
|
||||
the source code from all angles..</li>
|
||||
<li>Find <code>main()</code> function.</li>
|
||||
</ul>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>This program is a joke PDP-11 emulator. (“ll-dpd” is embedded in the code.
|
||||
Read it upside down.)</p>
|
||||
<p>You got it? This program is supposed to be used in this way:</p>
|
||||
|
||||
@@ -380,7 +380,7 @@ to be.
|
||||
|
||||
### Examine the algorithm
|
||||
|
||||
Spoilers ahead. Duh!
|
||||
Deobfuscation information ahead. Duh!
|
||||
|
||||
Pseudocode, with comments matching those in the C source:
|
||||
|
||||
|
||||
@@ -666,7 +666,7 @@ as <code>(256 + 128 + 4 + 2) * 512</code> minimizes the character count. That’
|
||||
judges get when they don’t like programs that are longer than they need
|
||||
to be.</p>
|
||||
<h3 id="examine-the-algorithm">Examine the algorithm</h3>
|
||||
<p>Spoilers ahead. Duh!</p>
|
||||
<p>Deobfuscation information ahead. Duh!</p>
|
||||
<p>Pseudocode, with comments matching those in the C source:</p>
|
||||
<pre><code> /* run */
|
||||
if (non-NULL and nonempty argv[1]) {
|
||||
|
||||
@@ -62,12 +62,12 @@ This code has been compiled and tested on:
|
||||
* X86-FreeBSD 10.3, clang 3.4.1, -O0 and -O3
|
||||
* TCC 0.9.26 (x86-64), used as a proxy for [2001/bellard](../../2001/bellard/index.html)
|
||||
* UNIX V7 pcc (Johnson's C compiler) on a [simulated PDP-11/45](http://simh.trailing-edge.com/)
|
||||
(see spoiler for further detail)
|
||||
(see the "**DEOBFUSCATION** section below for further detail)
|
||||
|
||||
<div style="margin-bottom:60em;margin-top:4em"><strong>Spoiler below; scroll down.</strong></div>
|
||||
<div style="margin-bottom:60em;margin-top:4em"><strong>Deobfuscation information below; scroll down.</strong></div>
|
||||
|
||||
|
||||
### SPOILER:
|
||||
### DEOBFUSCATION:
|
||||
|
||||
This started life as a personal challenge: write the shortest hex dump utility
|
||||
in C.
|
||||
@@ -172,7 +172,7 @@ but it uses more characters in just setting up its obfuscation than this entire
|
||||
solution!
|
||||
|
||||
|
||||
### BIGGER SPOILER:
|
||||
### MORE DEOBFUSCATION:
|
||||
|
||||
If you are unhappy with the way DEL (character 127) is handled,
|
||||
replace the cryptic expression `4<(4^l>>5)?l:46` with `32>l|l>126?46:l`.
|
||||
@@ -180,7 +180,7 @@ Both take the same number of characters, but the former is a bit more interestin
|
||||
Bonus question: how does the first expression work?
|
||||
|
||||
|
||||
### BIGGEST SPOILER (and some history):
|
||||
### EVEN MORE DEOBFUSCATION (and some history):
|
||||
|
||||
Technically, `char o[0];` is illegal (SS 6.7.6.2) according to ISO (N1570). And
|
||||
`char o[];` is a conditionally supported feature (SS 6.7.6.2, 6.10.8.3).
|
||||
|
||||
@@ -432,12 +432,12 @@ It adds several nice-to-have features, and allows salt-to-taste customizability.
|
||||
<li>X86-FreeBSD 10.3, clang 3.4.1, -O0 and -O3</li>
|
||||
<li>TCC 0.9.26 (x86-64), used as a proxy for <a href="../../2001/bellard/index.html">2001/bellard</a></li>
|
||||
<li>UNIX V7 pcc (Johnson’s C compiler) on a <a href="http://simh.trailing-edge.com/">simulated PDP-11/45</a>
|
||||
(see spoiler for further detail)</li>
|
||||
(see the “<strong>DEOBFUSCATION</strong> section below for further detail)</li>
|
||||
</ul>
|
||||
<div style="margin-bottom:60em;margin-top:4em">
|
||||
<strong>Spoiler below; scroll down.</strong>
|
||||
<strong>Deobfuscation information below; scroll down.</strong>
|
||||
</div>
|
||||
<h3 id="spoiler">SPOILER:</h3>
|
||||
<h3 id="deobfuscation">DEOBFUSCATION:</h3>
|
||||
<p>This started life as a personal challenge: write the shortest hex dump utility
|
||||
in C.</p>
|
||||
<p>The self-imposed ground rules in the hunt for shortest:</p>
|
||||
@@ -514,12 +514,12 @@ and it is more interesting to remove characters by changing code than by filteri
|
||||
<a href="../../1986/bright/index.html">1986/bright</a> is similar in function,
|
||||
but it uses more characters in just setting up its obfuscation than this entire
|
||||
solution!</p>
|
||||
<h3 id="bigger-spoiler">BIGGER SPOILER:</h3>
|
||||
<h3 id="more-deobfuscation">MORE DEOBFUSCATION:</h3>
|
||||
<p>If you are unhappy with the way DEL (character 127) is handled,
|
||||
replace the cryptic expression <code>4<(4^l>>5)?l:46</code> with <code>32>l|l>126?46:l</code>.
|
||||
Both take the same number of characters, but the former is a bit more interesting.
|
||||
Bonus question: how does the first expression work?</p>
|
||||
<h3 id="biggest-spoiler-and-some-history">BIGGEST SPOILER (and some history):</h3>
|
||||
<h3 id="even-more-deobfuscation-and-some-history">EVEN MORE DEOBFUSCATION (and some history):</h3>
|
||||
<p>Technically, <code>char o[0];</code> is illegal (SS 6.7.6.2) according to ISO (N1570). And
|
||||
<code>char o[];</code> is a conditionally supported feature (SS 6.7.6.2, 6.10.8.3).
|
||||
However, it works in modern C implementations as an extension, including GCC,
|
||||
|
||||
@@ -157,13 +157,11 @@ designed to allow exhaustive, hand-counted values for comparison with the tool v
|
||||
These test cases were vital in debugging and regression testing, and provided a way to
|
||||
determine which tool was correct when there were differences.
|
||||
|
||||
```
|
||||
A version of this tool in more clearly written C
|
||||
is presented for the Judge's consideration as a more accurate replacement for `iocccsize`.
|
||||
This obfuscated entry is derived from (and compatible with) that code,
|
||||
but due to obfuscation, has had some significant, deep changes for the contest.
|
||||
Nevertheless, the more clearly written code remains a spoiler for this entry.
|
||||
```
|
||||
> A version of this tool in more clearly written C<br>
|
||||
> is presented for the Judge's consideration as a more accurate replacement for `iocccsize`.<br>
|
||||
> This obfuscated entry is derived from (and compatible with) that code,<br>
|
||||
> but due to obfuscation, has had some significant, deep changes for the contest.<br>
|
||||
> Nevertheless, the more clearly written code remains deobfuscation information about this entry.
|
||||
|
||||
NB: `iocccsize` gets a different answer from `tac` on its own
|
||||
[iocccsize.c](%%REPO_URL%%/2018/iocccsize.c) source code;
|
||||
|
||||
@@ -506,11 +506,13 @@ whitespace surrounds English words, not necessarily C tokens, as in <code>a+=1;<
|
||||
designed to allow exhaustive, hand-counted values for comparison with the tool values.
|
||||
These test cases were vital in debugging and regression testing, and provided a way to
|
||||
determine which tool was correct when there were differences.</p>
|
||||
<pre><code> A version of this tool in more clearly written C
|
||||
is presented for the Judge's consideration as a more accurate replacement for `iocccsize`.
|
||||
This obfuscated entry is derived from (and compatible with) that code,
|
||||
but due to obfuscation, has had some significant, deep changes for the contest.
|
||||
Nevertheless, the more clearly written code remains a spoiler for this entry.</code></pre>
|
||||
<blockquote>
|
||||
<p>A version of this tool in more clearly written C<br>
|
||||
is presented for the Judge’s consideration as a more accurate replacement for <code>iocccsize</code>.<br>
|
||||
This obfuscated entry is derived from (and compatible with) that code,<br>
|
||||
but due to obfuscation, has had some significant, deep changes for the contest.<br>
|
||||
Nevertheless, the more clearly written code remains deobfuscation information about this entry.</p>
|
||||
</blockquote>
|
||||
<p>NB: <code>iocccsize</code> gets a different answer from <code>tac</code> on its own
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/iocccsize.c">iocccsize.c</a> source code;
|
||||
<code>tac</code> gets the correct answer. This is due to the aforementioned bugs within <code>iocccsize</code>,
|
||||
|
||||
+11
-11
@@ -117,7 +117,7 @@ If you find yourself in an evolutionary dead end, try:
|
||||
0. Preface
|
||||
1. What it is
|
||||
2. How it works
|
||||
3. Hints (Keyboards, Options, Spoilers, Example Invocations)
|
||||
3. Hints (Keyboards, Options, Deobfuscation, Example Invocations)
|
||||
4. Obfuscation (Techniques, Beauty)
|
||||
5. How to build (S and N Constants, Compilation, Portability, Installing)
|
||||
6. Final thoughts
|
||||
@@ -125,10 +125,10 @@ If you find yourself in an evolutionary dead end, try:
|
||||
|
||||
## **0. Preface**
|
||||
|
||||
**SPOILER WARNING: A great deal of this document and the man page is full of
|
||||
spoilers of different types; as such I would recommend that you try running the
|
||||
**DEOBFUSCATION NOTES: A great deal of this document and the man page is full of
|
||||
deobfuscation information of different types; as such I would recommend that you try running the
|
||||
judges suggested invocations as well as running `make test` before you get into
|
||||
the document or the man page, unless you don't mind any spoilers. I don't reveal
|
||||
the document or the man page, unless you don't mind reading deobfuscation information. I don't reveal
|
||||
much in the way of obfuscation however so if you just want documentation on the
|
||||
program, how to compile, etc. then there isn't need to heed this note.**
|
||||
|
||||
@@ -165,7 +165,7 @@ thoroughly in **[Hints](#hints)**).
|
||||
**[Hints](#hints):** Perhaps the longest part of this document because in it I
|
||||
document the [keyboards](#keyboards), [options](#options), subtleties, including
|
||||
features that might appear to be bugs but aren't - including an
|
||||
[input error](#error), an [Easter egg spoiler](#spoiler) and quite a few
|
||||
[input error](#error), an [Easter egg obfuscation](#obfuscation) and quite a few
|
||||
[example invocations](#invocations). If you've read the man page you probably
|
||||
don't need this unless there is something specific you're after.
|
||||
|
||||
@@ -263,7 +263,7 @@ try and show the way they work) for those interested I will cite the summary:
|
||||
the fittest individuals dominating over the weaker ones.
|
||||
```
|
||||
|
||||
**SPOILER WARNING: Some of the below might help you follow the code more
|
||||
**DEOBFUSCATION NOTE: Some of the below might help you follow the code more
|
||||
easily.**
|
||||
|
||||
For each *generation* there is a total of `N` *offspring*; generation 0 is
|
||||
@@ -387,7 +387,7 @@ can actually produce but there is a certain type of input error that might
|
||||
### Options
|
||||
</div>
|
||||
|
||||
Skip to [Spoilers](#spoiler).
|
||||
Skip to the [deobfuscation section](#deobfuscation).
|
||||
|
||||
There are a number of options you can pass to the program besides the target
|
||||
string; some I will document here (the summary being in the man page). You can
|
||||
@@ -453,7 +453,7 @@ decent parameters - come to an answer here but if necessary kill the program.
|
||||
|
||||
4. Repeat the steps only this time don't enable quiet mode. Look at the
|
||||
offspring output. If you still don't see what it is and want to know see
|
||||
**[Spoilers](#spoiler)** below.
|
||||
**[Deobfuscation information](#deobfuscation)** below.
|
||||
|
||||
Finally any argument that doesn't start with a `-` passed into the program
|
||||
will become the target string. The same rule applies to the number for `-r`:
|
||||
@@ -558,8 +558,8 @@ it no longer cares about the `-` for option parsing. In other words options
|
||||
are only parsed if the first character is `-` and if the parser hasn't seen
|
||||
the `-` - *in an earlier element of `argv`. This is not a bug!*
|
||||
|
||||
<div id="spoiler">
|
||||
### Spoilers
|
||||
<div id="deobfuscation">
|
||||
### Deobfuscation
|
||||
</div>
|
||||
|
||||
Skip to [Example Invocations](#invocations).
|
||||
@@ -981,7 +981,7 @@ implementation of the Weasel program otherwise).
|
||||
There is obviously a reason `38` is the chosen size but the only hints I
|
||||
provide are those in **[How it works](#how)** and specifically an Easter egg I
|
||||
referenced there (it's *not the only Easter egg* but it's the only Easter egg I
|
||||
won't spoil; yes this ironically and amusingly means I've left a rotten egg
|
||||
won't deobfuscate; yes this ironically and amusingly means I've left a rotten egg
|
||||
somewhere!).
|
||||
|
||||
The Makefile simplifies how to reconfigure this value with the variable
|
||||
|
||||
+10
-12
@@ -470,17 +470,17 @@ while using more Cenozoic minded code migration, read <a href="rpm.html">rpm.htm
|
||||
<li>Preface</li>
|
||||
<li>What it is</li>
|
||||
<li>How it works</li>
|
||||
<li>Hints (Keyboards, Options, Spoilers, Example Invocations)</li>
|
||||
<li>Hints (Keyboards, Options, Deobfuscation, Example Invocations)</li>
|
||||
<li>Obfuscation (Techniques, Beauty)</li>
|
||||
<li>How to build (S and N Constants, Compilation, Portability, Installing)</li>
|
||||
<li>Final thoughts</li>
|
||||
<li>Winning comments, thanks, dedications, links, etc.</li>
|
||||
</ol>
|
||||
<h2 id="preface"><strong>0. Preface</strong></h2>
|
||||
<p><strong>SPOILER WARNING: A great deal of this document and the man page is full of
|
||||
spoilers of different types; as such I would recommend that you try running the
|
||||
<p><strong>DEOBFUSCATION NOTES: A great deal of this document and the man page is full of
|
||||
deobfuscation information of different types; as such I would recommend that you try running the
|
||||
judges suggested invocations as well as running <code>make test</code> before you get into
|
||||
the document or the man page, unless you don’t mind any spoilers. I don’t reveal
|
||||
the document or the man page, unless you don’t mind reading deobfuscation information. I don’t reveal
|
||||
much in the way of obfuscation however so if you just want documentation on the
|
||||
program, how to compile, etc. then there isn’t need to heed this note.</strong></p>
|
||||
<p>I was at a loss on how to present my remarks; on the one hand I wanted to give
|
||||
@@ -509,7 +509,7 @@ thoroughly in <strong><a href="#hints">Hints</a></strong>).</p>
|
||||
<p><strong><a href="#hints">Hints</a>:</strong> Perhaps the longest part of this document because in it I
|
||||
document the <a href="#keyboards">keyboards</a>, <a href="#options">options</a>, subtleties, including
|
||||
features that might appear to be bugs but aren’t - including an
|
||||
<a href="#error">input error</a>, an <a href="#spoiler">Easter egg spoiler</a> and quite a few
|
||||
<a href="#error">input error</a>, an <a href="#obfuscation">Easter egg obfuscation</a> and quite a few
|
||||
<a href="#invocations">example invocations</a>. If you’ve read the man page you probably
|
||||
don’t need this unless there is something specific you’re after.</p>
|
||||
<p><strong><a href="#obfuscation">Obfuscation</a>:</strong> Some of the techniques that might not be used.</p>
|
||||
@@ -580,7 +580,7 @@ try and show the way they work) for those interested I will cite the summary:</p
|
||||
principles first laid down by Charles Darwin of "survival of the fittest.".
|
||||
Since in nature, competition among individuals for scanty resources results in
|
||||
the fittest individuals dominating over the weaker ones.</code></pre>
|
||||
<p><strong>SPOILER WARNING: Some of the below might help you follow the code more
|
||||
<p><strong>DEOBFUSCATION NOTE: Some of the below might help you follow the code more
|
||||
easily.</strong></p>
|
||||
<p>For each <em>generation</em> there is a total of <code>N</code> <em>offspring</em>; generation 0 is
|
||||
the pseudo-randomly initialised array <em>without parents.</em> Each offspring has its
|
||||
@@ -664,7 +664,7 @@ it includes a literal space <code>' '</code> but it doesn’t include other
|
||||
can actually produce but there is a certain type of input error that might
|
||||
<em>appear</em> to be a bug; see specifically <a href="#error">Input Error Example</a>.</p>
|
||||
<h3 id="options">Options</h3>
|
||||
<p>Skip to <a href="#spoiler">Spoilers</a>.</p>
|
||||
<p>Skip to the <a href="#deobfuscation">deobfuscation section</a>.</p>
|
||||
<p>There are a number of options you can pass to the program besides the target
|
||||
string; some I will document here (the summary being in the man page). You can
|
||||
join options but there is a caveat with spaces and <code>-r</code> option as well as
|
||||
@@ -708,7 +708,7 @@ With the default string most modern systems shouldn’t take much time to - give
|
||||
decent parameters - come to an answer here but if necessary kill the program.</p></li>
|
||||
<li><p>Repeat the steps only this time don’t enable quiet mode. Look at the
|
||||
offspring output. If you still don’t see what it is and want to know see
|
||||
<strong><a href="#spoiler">Spoilers</a></strong> below.</p></li>
|
||||
<strong><a href="#deobfuscation">Deobfuscation information</a></strong> below.</p></li>
|
||||
</ol>
|
||||
<p>Finally any argument that doesn’t start with a <code>-</code> passed into the program
|
||||
will become the target string. The same rule applies to the number for <code>-r</code>:
|
||||
@@ -770,9 +770,7 @@ itself) and then the target string would <em>literally</em> be set to <code>-r</
|
||||
it no longer cares about the <code>-</code> for option parsing. In other words options
|
||||
are only parsed if the first character is <code>-</code> and if the parser hasn’t seen
|
||||
the <code>-</code> - <em>in an earlier element of <code>argv</code>. This is not a bug!</em></p>
|
||||
<div id="spoiler">
|
||||
<h3 id="spoilers">Spoilers</h3>
|
||||
</div>
|
||||
<h3 id="deobfuscation">Deobfuscation</h3>
|
||||
<p>Skip to <a href="#invocations">Example Invocations</a>.</p>
|
||||
<p>The Easter egg: Since Dawkins references the <a href="https://en.wikipedia.org/wiki/Infinite_monkey_theorem">Infinite Monkey Theorem</a> it
|
||||
simulates a monkey using a typewriter! This mode has the following changes:</p>
|
||||
@@ -1071,7 +1069,7 @@ implementation of the Weasel program otherwise).</p>
|
||||
<p>There is obviously a reason <code>38</code> is the chosen size but the only hints I
|
||||
provide are those in <strong><a href="#how">How it works</a></strong> and specifically an Easter egg I
|
||||
referenced there (it’s <em>not the only Easter egg</em> but it’s the only Easter egg I
|
||||
won’t spoil; yes this ironically and amusingly means I’ve left a rotten egg
|
||||
won’t deobfuscate; yes this ironically and amusingly means I’ve left a rotten egg
|
||||
somewhere!).</p>
|
||||
<p>The Makefile simplifies how to reconfigure this value with the variable
|
||||
<code>MAX_SIZE</code>:</p>
|
||||
|
||||
@@ -65,7 +65,7 @@ So I had to sit down and solve those tricky questions with Nano and a C
|
||||
compiler.
|
||||
|
||||
|
||||
### Little spoilers:
|
||||
### A bit of deobfuscation:
|
||||
|
||||
Basically, the program draws animated ASCII art of the Big Dipper using Annie
|
||||
Jump Cannon's spectral classification system of stars and I think the colors of
|
||||
@@ -121,7 +121,7 @@ mostly is okay. YMMV, as they say.
|
||||
Please do not feed little babies chocolate.
|
||||
|
||||
|
||||
### Major spoilers:
|
||||
### Major deobfuscation:
|
||||
|
||||
I incorporated the [Fletcher 16 checksum
|
||||
algorithm](https://en.wikipedia.org/wiki/Fletcher%27s_checksum) into the source
|
||||
|
||||
@@ -429,7 +429,7 @@ file <em>poikola.pdf</em>.</p>
|
||||
this star and may I have some Easter eggs?”</p>
|
||||
<p>So I had to sit down and solve those tricky questions with Nano and a C
|
||||
compiler.</p>
|
||||
<h3 id="little-spoilers">Little spoilers:</h3>
|
||||
<h3 id="a-bit-of-deobfuscation">A bit of deobfuscation:</h3>
|
||||
<p>Basically, the program draws animated ASCII art of the Big Dipper using Annie
|
||||
Jump Cannon’s spectral classification system of stars and I think the colors of
|
||||
the output are as accurate as possible.</p>
|
||||
@@ -467,7 +467,7 @@ show anything at all. In other cases it won’t show all the colours right but
|
||||
mostly is okay. YMMV, as they say.</p>
|
||||
<h3 id="warnings-and-restrictions-required-by-law">Warnings and restrictions required by law:</h3>
|
||||
<p>Please do not feed little babies chocolate.</p>
|
||||
<h3 id="major-spoilers">Major spoilers:</h3>
|
||||
<h3 id="major-deobfuscation">Major deobfuscation:</h3>
|
||||
<p>I incorporated the <a href="https://en.wikipedia.org/wiki/Fletcher%27s_checksum">Fletcher 16 checksum
|
||||
algorithm</a> into the source
|
||||
for security reasons; it might be challenging to make changes without breaking
|
||||
|
||||
@@ -162,7 +162,7 @@ and the call with current continuation `c`.
|
||||
is, how the state of the program is stored and how the Unlambda functions are
|
||||
implemented.
|
||||
|
||||
More on this in the **Spoilers** section.
|
||||
More on this in the **Deobfuscation** section.
|
||||
|
||||
|
||||
### Build notes:
|
||||
@@ -197,7 +197,7 @@ for storing `char`s for later printing. This might produce some warnings, but
|
||||
since it was developed using `char`s it should be always used safely.
|
||||
|
||||
|
||||
### Spoilers:
|
||||
### Deobfuscation:
|
||||
|
||||
- You can examine the [progSpoiler.c](%%REPO_URL%%/2019/adamovsky/progSpoiler.c) file. It is the original
|
||||
final version of the interpreter, before I started the downsizing. It accepts
|
||||
@@ -254,13 +254,13 @@ were shuffled both for `S` functions and Apply functions in the same way to hide
|
||||
the meaning of `f` and `r` prefixes.
|
||||
|
||||
|
||||
### Identification spoiler:
|
||||
### Identification deobfuscation:
|
||||
|
||||
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' spoilers:
|
||||
### Judges' debobfuscaiton:
|
||||
|
||||
It is not a bug, it is a feature. :)
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ and the call with current continuation <code>c</code>.</li>
|
||||
is, how the state of the program is stored and how the Unlambda functions are
|
||||
implemented.</li>
|
||||
</ul>
|
||||
<p>More on this in the <strong>Spoilers</strong> section.</p>
|
||||
<p>More on this in the <strong>Deobfuscation</strong> section.</p>
|
||||
<h3 id="build-notes">Build notes:</h3>
|
||||
<p>The program does not require any special treatment by compilers. Some warnings
|
||||
had to be suppressed when compiling with <code>-Wall -Wextra -pedantic</code>. Those were
|
||||
@@ -524,7 +524,7 @@ world situation even when <code>size_t</code> is bigger than <code>long long</co
|
||||
for storing <code>char</code>s for later printing. This might produce some warnings, but
|
||||
since it was developed using <code>char</code>s it should be always used safely.</li>
|
||||
</ul>
|
||||
<h3 id="spoilers">Spoilers:</h3>
|
||||
<h3 id="deobfuscation">Deobfuscation:</h3>
|
||||
<ul>
|
||||
<li><p>You can examine the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/adamovsky/progSpoiler.c">progSpoiler.c</a> file. It is the original
|
||||
final version of the interpreter, before I started the downsizing. It accepts
|
||||
@@ -570,10 +570,10 @@ 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="identification-deobfuscation">Identification deobfuscation:</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-spoilers">Judges’ spoilers:</h3>
|
||||
<h3 id="judges-debobfuscaiton">Judges’ debobfuscaiton:</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
|
||||
|
||||
@@ -61,13 +61,13 @@ Compiles cleanly with:
|
||||
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):
|
||||
results: (The Makefile contains some deobfuscation information):
|
||||
|
||||
``` <!---sh-->
|
||||
out=cat ./check.sh ./prog
|
||||
```
|
||||
|
||||
Interestingly, and a spoiler here: macOS and FreeBSD implement the common
|
||||
Interestingly, and a bit of deobfuscation 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
|
||||
latter two also behave slightly differently on what they count as whitespace:
|
||||
|
||||
@@ -430,9 +430,9 @@ The output should look familiar.</p>
|
||||
<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>
|
||||
results: (The Makefile contains some deobfuscation information):</p>
|
||||
<pre><code> out=cat ./check.sh ./prog</code></pre>
|
||||
<p>Interestingly, and a spoiler here: macOS and FreeBSD implement the common
|
||||
<p>Interestingly, and a bit of deobfuscation 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
|
||||
latter two also behave slightly differently on what they count as whitespace:
|
||||
|
||||
@@ -225,7 +225,7 @@ 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:
|
||||
### Further deobfuscation, 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
|
||||
|
||||
@@ -565,7 +565,7 @@ 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>
|
||||
<h3 id="further-deobfuscation-engineering-and-obfuscation-galore">Further deobfuscation, 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
|
||||
|
||||
@@ -184,7 +184,9 @@ 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?
|
||||
|
||||
See also this [deobfuscation page](http://c-faq.com/ansi/constasconst.html>).
|
||||
|
||||
If your keyboard has no arrow keys, you can probably find alternate keys by
|
||||
reading the source code.
|
||||
|
||||
@@ -506,7 +506,8 @@ 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>See also this <a href="http://c-faq.com/ansi/constasconst.html%3E">deobfuscation page</a>.</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>
|
||||
|
||||
@@ -228,7 +228,7 @@ 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
|
||||
### Major deobfuscation
|
||||
|
||||
It is commonly believed that [Mike Keith's
|
||||
algorithm](http://www.cadaeic.net/calendar.htm) published in _Journal of
|
||||
|
||||
@@ -521,7 +521,7 @@ 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="major-deobfuscation">Major deobfuscation</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
|
||||
|
||||
@@ -185,7 +185,7 @@ The gameplay file is long but it includes game printouts as well as explaining
|
||||
the many different gameplay modes. The [play.sh][] script automates most (if
|
||||
not all) of the gameplay modes described in the gameplay file (it also
|
||||
allows you to change colours like [snake-colours.sh][]) as well as the judges'
|
||||
suggestions (that I don't document so as to not spoil them). You can pass in
|
||||
suggestions (that I don't document so as to not deobfuscate them). You can pass in
|
||||
environmental variables to both scripts though obviously some will conflict with
|
||||
different options in play.sh.
|
||||
|
||||
@@ -519,7 +519,7 @@ I submitted three Snake versions; these are the other layouts for those few
|
||||
The [prog.2.c](%%REPO_URL%%/2020/ferguson1/prog.2.c) has more digraphs but I think no other significant differences.
|
||||
|
||||
The [prog.3.c](%%REPO_URL%%/2020/ferguson1/prog.3.c) is in a more artistic layout (a backwards S), has at least one
|
||||
additional obfuscation technique (see spoilers) but it also has more digraphs
|
||||
additional obfuscation technique (see deobfuscation information) but it also has more digraphs
|
||||
and as the judges said they feel that digraphs are dated so that's probably why
|
||||
they chose the first layout. The [prog.3-j.c](%%REPO_URL%%/2020/ferguson1/prog.3-j.c) version is
|
||||
[prog.3.c](%%REPO_URL%%/2020/ferguson1/prog.3.c) with a shorter `J` macro.
|
||||
|
||||
@@ -547,7 +547,7 @@ file for players.</p>
|
||||
the many different gameplay modes. The <a href="play.sh">play.sh</a> script automates most (if
|
||||
not all) of the gameplay modes described in the gameplay file (it also
|
||||
allows you to change colours like <a href="snake-colours.sh">snake-colours.sh</a>) as well as the judges’
|
||||
suggestions (that I don’t document so as to not spoil them). You can pass in
|
||||
suggestions (that I don’t document so as to not deobfuscate them). You can pass in
|
||||
environmental variables to both scripts though obviously some will conflict with
|
||||
different options in play.sh.</p>
|
||||
<p>Probably just as important is <a href="chocolate-cake.html">chocolate-cake.html</a>
|
||||
@@ -819,7 +819,7 @@ been warned.</li>
|
||||
(more likely none) who are interested to see them.</p>
|
||||
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/prog.2.c">prog.2.c</a> has more digraphs but I think no other significant differences.</p>
|
||||
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/prog.3.c">prog.3.c</a> is in a more artistic layout (a backwards S), has at least one
|
||||
additional obfuscation technique (see spoilers) but it also has more digraphs
|
||||
additional obfuscation technique (see deobfuscation information) but it also has more digraphs
|
||||
and as the judges said they feel that digraphs are dated so that’s probably why
|
||||
they chose the first layout. The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/prog.3-j.c">prog.3-j.c</a> version is
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/prog.3.c">prog.3.c</a> with a shorter <code>J</code> macro.</p>
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ What is compiling this entry about?
|
||||
[Having a good .. time](https://southpark.fandom.com/wiki/Asspen/Script)!
|
||||
|
||||
This winning entry also comes with a [JavaScript timelapse
|
||||
spoiler](spoiler.html) that shows how this entry was written.
|
||||
deobfuscation](spoiler.html) that shows how this entry was written.
|
||||
|
||||
|
||||
## Author's remarks:
|
||||
|
||||
@@ -417,7 +417,7 @@ If you use the wrong code, you’re gonna have a bad time.
|
||||
What is compiling this entry about?
|
||||
<a href="https://southpark.fandom.com/wiki/Asspen/Script">Having a good .. time</a>!</p>
|
||||
<p>This winning entry also comes with a <a href="spoiler.html">JavaScript timelapse
|
||||
spoiler</a> that shows how this entry was written.</p>
|
||||
deobfuscation</a> that shows how this entry was written.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="synopsis">Synopsis</h3>
|
||||
<pre><code> echo "Hello world" | ./prog 12345 > encoded.c
|
||||
|
||||
Reference in new issue
Block a user