Skip to content

Commit 1f306da

Browse files
committed
update HTML as per PR #35
Thank you @fanf2.
1 parent 09578bd commit 1f306da

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

1998/fanf/index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,6 @@ <h2 id="try">Try:</h2>
454454
<p>Enter an expression on standard input. To try some we have selected:</p>
455455
<pre><code> ./try.sh</code></pre>
456456
<h2 id="judges-remarks">Judges’ remarks:</h2>
457-
<h3 id="historical-aside">Historical aside:</h3>
458-
<p>At a time the code in <a href="https://github.com/ioccc-src/winner/blob/master/1998/fanf/fanf.c">fanf.c</a> was that of <a href="https://github.com/ioccc-src/winner/blob/master/1998/fanf/fanf.orig.c">fanf.orig.c</a>
459-
but to get this to compile in modern systems it had to be translated to what you
460-
now see. The intermediate steps can still be performed but they might be
461-
different from the past. This should be kept in mind as you read the below
462-
remarks.</p>
463457
<p>This program translates lambda expressions into combinator
464458
expressions. But you do not need to know Lambda Calculus to be
465459
impressed by this program!</p>

thanks-for-help.html

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,18 +2632,28 @@ <h3 id="winning-entry-source-code-dorssel.c">Winning entry source code: <a href=
26322632
<h2 id="winning-entry-1998fanf">Winning entry: <a href="1998/fanf/index.html">1998/fanf</a></h2>
26332633
<h3 id="winning-entry-source-code-fanf.c">Winning entry source code: <a href="https://github.com/ioccc-src/winner/blob/master/1998/fanf/fanf.c">fanf.c</a></h3>
26342634
</div>
2635-
<p><a href="#cody">Cody</a> fixed this to compile. The problem was the intermediate steps to get to the
2636-
final code that is compiled. The code is now what it essentially becomes when
2637-
processed completely. The intermediate steps can now be performed to see how it
2638-
expands but it can still compile and be used.</p>
2639-
<p>Cody also added a second arg to <code>main()</code> out of an abundance of caution as some
2640-
versions of <code>clang</code> complain about the number of args to <code>main()</code>. These versions
2641-
claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
2642-
possible though that this will change so it is fixed in case this happens. As it
2643-
is mostly just through the C pre-processor Cody added a new macro to make the
2644-
code look like the original with just an extra arg. See the
2645-
FAQ on “<a href="faq.html#arg_count">main function args</a>
2646-
for more details.</p>
2635+
<p><a href="#cody">Cody</a> fixed this to compile. Tony Finch fixed it again to be
2636+
more like the original submission. The double preprocessing is a joke
2637+
about C and a joke about OFL so the program is less funny without it.</p>
2638+
<p>There were a couple of problems with the double preprocessing that
2639+
upset modern compilers:</p>
2640+
<ul>
2641+
<li><p>Recent versions of <code>gcc</code> wrap <code>#line</code> marks around the expansion
2642+
of <code>EOF</code> which broke up <code>#define ef E(EOF)</code> across multiple lines.
2643+
This can be avoided by processing <code>#include</code> in the second
2644+
preprocessor phase.</p>
2645+
<p>(Tony vaguely remembers some indecision about when to <code>#include</code>,
2646+
in particular whether preprocessing the headers twice would lead
2647+
to trouble. Early <code>#include</code> seemed to work and was shorter so
2648+
that was what the original submission did.)</p></li>
2649+
<li><p>System headers can be sensitive to compiler options, for example
2650+
<code>restrict</code> keywords might be omitted when compiling with
2651+
<code>-std=gnu90</code>. Consistency options need to be used at all stages.</p></li>
2652+
</ul>
2653+
<p>Cody also added a second arg to <code>main()</code>. Tony removed both args since
2654+
neither of them are used and it’s shorter that way (though it provokes
2655+
a warning about a non-prototype function definition). See the FAQ on
2656+
<a href="faq.html#arg_count">main function args</a>” for more details.</p>
26472657
<p>In some versions of <code>clang</code> <code>-Wno-int-conversion</code> had to be added to the
26482658
<code>CSILENCE</code> variable of the Makefile.</p>
26492659
<p>Cody also added the <a href="https://github.com/ioccc-src/winner/blob/master/1998/fanf/try.sh">try.sh</a> script to show the output of some

0 commit comments

Comments
 (0)