fix many internal links
Fixed a number of internal links that need to go to the GitHub site. Ran `make www` to perform the above.
This commit is contained in:
1 parent
b84f8cbe28
commit
e7d69bc232
175 files changed
+645
-631
No files matched your search
+8
-7
@@ -70,7 +70,7 @@ Build the compiler:
|
||||
|
||||
#### Fibonacci numbers:
|
||||
|
||||
Test the compiler on [fib.hs](fib.hs):
|
||||
Test the compiler on [fib.hs](%%REPO_URL%%/2019/lynn/fib.hs):
|
||||
|
||||
``` <!---sh-->
|
||||
(./prog < fib.hs ; cat prog.c) > fib.c
|
||||
@@ -78,7 +78,8 @@ Test the compiler on [fib.hs](fib.hs):
|
||||
|
||||
Compiling the output produces a binary that prints the 30th Fibonacci number.
|
||||
|
||||
The file [ghcfib.hs](ghcfib.hs) includes [fib.hs](fib.hs) with some glue code,
|
||||
The file [ghcfib.hs](%%REPO_URL%%/2019/lynn/ghcfib.hs)
|
||||
includes [fib.hs](%%REPO_URL%%/2019/lynn/fib.hs) with some glue code,
|
||||
and shows GHC also accepts our subset of Haskell:
|
||||
|
||||
``` <!---sh-->
|
||||
@@ -89,7 +90,7 @@ and shows GHC also accepts our subset of Haskell:
|
||||
#### Self-hosting compiler:
|
||||
|
||||
To avoid spoiling this entry by revealing the original Haskell source, we
|
||||
instead provide [hint.hs](hint.hs), the output of a certain stage of the
|
||||
instead provide [hint.hs](%%REPO_URL%%/2019/lynn/hint.hs), the output of a certain stage of the
|
||||
compiler when run on itself. This intermediate output is hopefully difficult to
|
||||
understand, yet is accepted by our compiler:
|
||||
|
||||
@@ -102,7 +103,7 @@ understand, yet is accepted by our compiler:
|
||||
The output program behaves like the compiler itself.
|
||||
|
||||
Unlike the original source from which it is derived, GHC fails to compile
|
||||
[hint.hs](hint.hs). This is because values have been replaced with their [Scott
|
||||
[hint.hs](%%REPO_URL%%/2019/lynn/hint.hs). This is because values have been replaced with their [Scott
|
||||
encodings](https://en.wikipedia.org/wiki/Mogensen-Scott_encoding)
|
||||
by this stage, which messes up type-checks; we'd need `equirecursive` types for
|
||||
it to work.
|
||||
@@ -110,7 +111,7 @@ it to work.
|
||||
|
||||
#### Regexes:
|
||||
|
||||
The file [lol.hs](lol.hs) contains an adaptation of [Doug McIlroy's elegant code from
|
||||
The file [lol.hs](%%REPO_URL%%/2019/lynn/lol.hs) contains an adaptation of [Doug McIlroy's elegant code from
|
||||
"Enumerating the strings of regular
|
||||
languages"](https://www.cs.dartmouth.edu/~doug/nfa.pdf). We exercise it by
|
||||
showing the first entries of the length-ordered list of all strings consisting
|
||||
@@ -131,7 +132,7 @@ A GHC wrapper is provided:
|
||||
|
||||
### Strongly-connected components:
|
||||
|
||||
See [scc.hs](scc.hs) (and its GHC wrapper [ghcscc.hs](ghcscc.hs)) for an elegant
|
||||
See [scc.hs](%%REPO_URL%%/2019/lynn/scc.hs) (and its GHC wrapper [ghcscc.hs](%%REPO_URL%%/2019/lynn/ghcscc.hs)) for an elegant
|
||||
way to print the strongly-connected components of a graph in reverse topological
|
||||
order.
|
||||
|
||||
@@ -280,7 +281,7 @@ represent the integer `n` with a term equivalent to `Y(BT)n`; it works because
|
||||
* A sentinel in the heap often confused me, so ought to confuse others.
|
||||
|
||||
Other obfuscation techniques are better appreciated after decoding the
|
||||
compiler. See [hint.hs](hint.hs).
|
||||
compiler. See [hint.hs](%%REPO_URL%%/2019/lynn/hint.hs).
|
||||
|
||||
* Mercilessly point-free. Everything is a combinator.
|
||||
* Scott encoding. Everything is a combinator.
|
||||
|
||||
@@ -411,15 +411,16 @@ trace of those scary <code>unsafeThisAndThat</code> functions. All functions mus
|
||||
<pre><code> cc -o prog prog.c</code></pre>
|
||||
<h3 id="demos">Demos:</h3>
|
||||
<h4 id="fibonacci-numbers">Fibonacci numbers:</h4>
|
||||
<p>Test the compiler on <a href="fib.hs">fib.hs</a>:</p>
|
||||
<p>Test the compiler on <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/fib.hs">fib.hs</a>:</p>
|
||||
<pre><code> (./prog < fib.hs ; cat prog.c) > fib.c</code></pre>
|
||||
<p>Compiling the output produces a binary that prints the 30th Fibonacci number.</p>
|
||||
<p>The file <a href="ghcfib.hs">ghcfib.hs</a> includes <a href="fib.hs">fib.hs</a> with some glue code,
|
||||
<p>The file <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/ghcfib.hs">ghcfib.hs</a>
|
||||
includes <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/fib.hs">fib.hs</a> with some glue code,
|
||||
and shows GHC also accepts our subset of Haskell:</p>
|
||||
<pre><code> ghc ghcfib.hs</code></pre>
|
||||
<h4 id="self-hosting-compiler">Self-hosting compiler:</h4>
|
||||
<p>To avoid spoiling this entry by revealing the original Haskell source, we
|
||||
instead provide <a href="hint.hs">hint.hs</a>, the output of a certain stage of the
|
||||
instead provide <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/hint.hs">hint.hs</a>, the output of a certain stage of the
|
||||
compiler when run on itself. This intermediate output is hopefully difficult to
|
||||
understand, yet is accepted by our compiler:</p>
|
||||
<pre><code> (./prog < hint.hs ; cat prog.c) > hint.c
|
||||
@@ -427,12 +428,12 @@ understand, yet is accepted by our compiler:</p>
|
||||
./hint</code></pre>
|
||||
<p>The output program behaves like the compiler itself.</p>
|
||||
<p>Unlike the original source from which it is derived, GHC fails to compile
|
||||
<a href="hint.hs">hint.hs</a>. This is because values have been replaced with their <a href="https://en.wikipedia.org/wiki/Mogensen-Scott_encoding">Scott
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/hint.hs">hint.hs</a>. This is because values have been replaced with their <a href="https://en.wikipedia.org/wiki/Mogensen-Scott_encoding">Scott
|
||||
encodings</a>
|
||||
by this stage, which messes up type-checks; we’d need <code>equirecursive</code> types for
|
||||
it to work.</p>
|
||||
<h4 id="regexes">Regexes:</h4>
|
||||
<p>The file <a href="lol.hs">lol.hs</a> contains an adaptation of <a href="https://www.cs.dartmouth.edu/~doug/nfa.pdf">Doug McIlroy’s elegant code from
|
||||
<p>The file <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/lol.hs">lol.hs</a> contains an adaptation of <a href="https://www.cs.dartmouth.edu/~doug/nfa.pdf">Doug McIlroy’s elegant code from
|
||||
“Enumerating the strings of regular
|
||||
languages”</a>. We exercise it by
|
||||
showing the first entries of the length-ordered list of all strings consisting
|
||||
@@ -443,7 +444,7 @@ of the characters <code>a</code> and <code>b</code> that contain an even number
|
||||
<p>A GHC wrapper is provided:</p>
|
||||
<pre><code> ghc ghclol.hs</code></pre>
|
||||
<h3 id="strongly-connected-components">Strongly-connected components:</h3>
|
||||
<p>See <a href="scc.hs">scc.hs</a> (and its GHC wrapper <a href="ghcscc.hs">ghcscc.hs</a>) for an elegant
|
||||
<p>See <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/scc.hs">scc.hs</a> (and its GHC wrapper <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/ghcscc.hs">ghcscc.hs</a>) for an elegant
|
||||
way to print the strongly-connected components of a graph in reverse topological
|
||||
order.</p>
|
||||
<pre><code> (./prog < scc.hs ; cat prog.c) > scc.c</code></pre>
|
||||
@@ -547,7 +548,7 @@ represent the integer <code>n</code> with a term equivalent to <code>Y(BT)n</cod
|
||||
<li>A sentinel in the heap often confused me, so ought to confuse others.</li>
|
||||
</ul>
|
||||
<p>Other obfuscation techniques are better appreciated after decoding the
|
||||
compiler. See <a href="hint.hs">hint.hs</a>.</p>
|
||||
compiler. See <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/hint.hs">hint.hs</a>.</p>
|
||||
<ul>
|
||||
<li>Mercilessly point-free. Everything is a combinator.</li>
|
||||
<li>Scott encoding. Everything is a combinator.</li>
|
||||
|
||||
Reference in new issue
Block a user