Bumped version to 0.2.0; docs edits.
I've added cond and cmp to the library so that should bump the minor version no. I think.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Overview: module code — Thun 0.1.1 documentation</title>
|
||||
<title>Overview: module code — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>joy.joy — Thun 0.1.1 documentation</title>
|
||||
<title>joy.joy — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>joy.library — Thun 0.1.1 documentation</title>
|
||||
<title>joy.library — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
|
||||
@@ -1173,6 +1173,43 @@
|
||||
<span class="k">return</span> <span class="n">stack</span><span class="p">,</span> <span class="n">expression</span><span class="p">,</span> <span class="n">dictionary</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="cond"><a class="viewcode-back" href="../../library.html#joy.library.cond">[docs]</a><span class="nd">@inscribe</span>
|
||||
<span class="nd">@FunctionWrapper</span>
|
||||
<span class="k">def</span> <span class="nf">cond</span><span class="p">(</span><span class="n">stack</span><span class="p">,</span> <span class="n">expression</span><span class="p">,</span> <span class="n">dictionary</span><span class="p">):</span>
|
||||
<span class="sd">'''</span>
|
||||
<span class="sd"> like a case statement; works by rewriting into a chain of ifte.</span>
|
||||
|
||||
<span class="sd"> [..[[Bi] Ti]..[D]] -> ...</span>
|
||||
|
||||
|
||||
<span class="sd"> [[[B0] T0] [[B1] T1] [D]] cond</span>
|
||||
<span class="sd"> -----------------------------------------</span>
|
||||
<span class="sd"> [B0] [T0] [[B1] [T1] [D] ifte] ifte</span>
|
||||
|
||||
<span class="sd"> '''</span>
|
||||
<span class="n">conditions</span><span class="p">,</span> <span class="n">stack</span> <span class="o">=</span> <span class="n">stack</span>
|
||||
<span class="k">if</span> <span class="n">conditions</span><span class="p">:</span>
|
||||
<span class="n">expression</span> <span class="o">=</span> <span class="n">_cond</span><span class="p">(</span><span class="n">conditions</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="c1"># Attempt to preload the args to first ifte.</span>
|
||||
<span class="p">(</span><span class="n">P</span><span class="p">,</span> <span class="p">(</span><span class="n">T</span><span class="p">,</span> <span class="p">(</span><span class="n">E</span><span class="p">,</span> <span class="n">expression</span><span class="p">)))</span> <span class="o">=</span> <span class="n">expression</span>
|
||||
<span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span>
|
||||
<span class="c1"># If, for any reason, the argument to cond should happen to contain</span>
|
||||
<span class="c1"># only the default clause then this optimization will fail.</span>
|
||||
<span class="k">pass</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">stack</span> <span class="o">=</span> <span class="p">(</span><span class="n">E</span><span class="p">,</span> <span class="p">(</span><span class="n">T</span><span class="p">,</span> <span class="p">(</span><span class="n">P</span><span class="p">,</span> <span class="n">stack</span><span class="p">)))</span>
|
||||
<span class="k">return</span> <span class="n">stack</span><span class="p">,</span> <span class="n">expression</span><span class="p">,</span> <span class="n">dictionary</span></div>
|
||||
|
||||
|
||||
<span class="k">def</span> <span class="nf">_cond</span><span class="p">(</span><span class="n">conditions</span><span class="p">,</span> <span class="n">expression</span><span class="p">):</span>
|
||||
<span class="p">(</span><span class="n">clause</span><span class="p">,</span> <span class="n">rest</span><span class="p">)</span> <span class="o">=</span> <span class="n">conditions</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">rest</span><span class="p">:</span> <span class="c1"># clause is [D]</span>
|
||||
<span class="k">return</span> <span class="n">clause</span>
|
||||
<span class="n">P</span><span class="p">,</span> <span class="n">T</span> <span class="o">=</span> <span class="n">clause</span>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="n">P</span><span class="p">,</span> <span class="p">(</span><span class="n">T</span><span class="p">,</span> <span class="p">(</span><span class="n">_cond</span><span class="p">(</span><span class="n">rest</span><span class="p">,</span> <span class="p">()),</span> <span class="p">(</span><span class="n">S_ifte</span><span class="p">,</span> <span class="n">expression</span><span class="p">))))</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="dip"><a class="viewcode-back" href="../../library.html#joy.library.dip">[docs]</a><span class="nd">@inscribe</span>
|
||||
<span class="nd">@FunctionWrapper</span>
|
||||
<span class="k">def</span> <span class="nf">dip</span><span class="p">(</span><span class="n">stack</span><span class="p">,</span> <span class="n">expression</span><span class="p">,</span> <span class="n">dictionary</span><span class="p">):</span>
|
||||
@@ -1393,6 +1430,30 @@
|
||||
<span class="k">return</span> <span class="n">stack</span><span class="p">,</span> <span class="n">expression</span><span class="p">,</span> <span class="n">dictionary</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="cmp_"><a class="viewcode-back" href="../../library.html#joy.library.cmp_">[docs]</a><span class="nd">@inscribe</span>
|
||||
<span class="nd">@FunctionWrapper</span>
|
||||
<span class="k">def</span> <span class="nf">cmp_</span><span class="p">(</span><span class="n">stack</span><span class="p">,</span> <span class="n">expression</span><span class="p">,</span> <span class="n">dictionary</span><span class="p">):</span>
|
||||
<span class="sd">'''</span>
|
||||
<span class="sd"> cmp takes two values and three quoted programs on the stack and runs</span>
|
||||
<span class="sd"> one of the three depending on the results of comparing the two values:</span>
|
||||
|
||||
<span class="sd"> a b [G] [E] [L] cmp</span>
|
||||
<span class="sd"> ------------------------- a > b</span>
|
||||
<span class="sd"> G</span>
|
||||
|
||||
<span class="sd"> a b [G] [E] [L] cmp</span>
|
||||
<span class="sd"> ------------------------- a = b</span>
|
||||
<span class="sd"> E</span>
|
||||
|
||||
<span class="sd"> a b [G] [E] [L] cmp</span>
|
||||
<span class="sd"> ------------------------- a < b</span>
|
||||
<span class="sd"> L</span>
|
||||
<span class="sd"> '''</span>
|
||||
<span class="n">L</span><span class="p">,</span> <span class="p">(</span><span class="n">E</span><span class="p">,</span> <span class="p">(</span><span class="n">G</span><span class="p">,</span> <span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">stack</span><span class="p">))))</span> <span class="o">=</span> <span class="n">stack</span>
|
||||
<span class="n">expression</span> <span class="o">=</span> <span class="n">pushback</span><span class="p">(</span><span class="n">G</span> <span class="k">if</span> <span class="n">a</span> <span class="o">></span> <span class="n">b</span> <span class="k">else</span> <span class="n">L</span> <span class="k">if</span> <span class="n">a</span> <span class="o"><</span> <span class="n">b</span> <span class="k">else</span> <span class="n">E</span><span class="p">,</span> <span class="n">expression</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">stack</span><span class="p">,</span> <span class="n">expression</span><span class="p">,</span> <span class="n">dictionary</span></div>
|
||||
|
||||
|
||||
<span class="c1">#def nullary(S, expression, dictionary):</span>
|
||||
<span class="c1"># '''</span>
|
||||
<span class="c1"># Run the program on TOS and return its first result without consuming</span>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>joy.parser — Thun 0.1.1 documentation</title>
|
||||
<title>joy.parser — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>joy.utils.pretty_print — Thun 0.1.1 documentation</title>
|
||||
<title>joy.utils.pretty_print — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../../../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>joy.utils.stack — Thun 0.1.1 documentation</title>
|
||||
<title>joy.utils.stack — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../../../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '0.1.1',
|
||||
VERSION: '0.2.0',
|
||||
LANGUAGE: 'None',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Index — Thun 0.1.1 documentation</title>
|
||||
<title>Index — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
@@ -99,10 +99,14 @@
|
||||
<li><a href="library.html#joy.library.choice">choice() (in module joy.library)</a>
|
||||
</li>
|
||||
<li><a href="library.html#joy.library.clear">clear() (in module joy.library)</a>
|
||||
</li>
|
||||
<li><a href="library.html#joy.library.cmp_">cmp_() (in module joy.library)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="library.html#joy.library.concat">concat() (in module joy.library)</a>
|
||||
</li>
|
||||
<li><a href="library.html#joy.library.cond">cond() (in module joy.library)</a>
|
||||
</li>
|
||||
<li><a href="library.html#joy.library.cons">cons() (in module joy.library)</a>
|
||||
</li>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Thun 0.1.1 Documentation — Thun 0.1.1 documentation</title>
|
||||
<title>Thun 0.2.0 Documentation — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="thun-release-documentation">
|
||||
<h1>Thun 0.1.1 Documentation<a class="headerlink" href="#thun-release-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<h1>Thun 0.2.0 Documentation<a class="headerlink" href="#thun-release-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Thun is dialect of Joy written in Python 2.</p>
|
||||
<p><a class="reference external" href="https://en.wikipedia.org/wiki/Joy_(programming_language)">Joy</a> is a programming language created by Manfred von Thun that is easy to
|
||||
use and understand and has many other nice properties. This Python
|
||||
@@ -133,7 +133,8 @@ interesting aspects. It’s quite a treasure trove.</p>
|
||||
<li class="toctree-l1"><a class="reference internal" href="notebooks/index.html">Essays about Programming in Joy</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/Developing.html">Developing a Program in Joy</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/Replacing.html">Replacing Functions in the Dictionary</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/Trees.html">Treating Trees</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/Newton-Raphson.html">Newton’s method</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/Quadratic.html">Quadratic formula</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="notebooks/NoUpdates.html">No Updates</a></li>
|
||||
@@ -161,7 +162,7 @@ interesting aspects. It’s quite a treasure trove.</p>
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="#">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Thun 0.1.1 Documentation</a><ul>
|
||||
<li><a class="reference internal" href="#">Thun 0.2.0 Documentation</a><ul>
|
||||
<li><a class="reference internal" href="#quick-start">Quick Start</a></li>
|
||||
<li><a class="reference internal" href="#project-hosted-on-osdn">Project Hosted on OSDN</a></li>
|
||||
<li><a class="reference internal" href="#information-on-the-joy-language">Information on the Joy language</a></li>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Joy Interpreter — Thun 0.1.1 documentation</title>
|
||||
<title>Joy Interpreter — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Functions Grouped by, er, Function with Examples — Thun 0.1.1 documentation</title>
|
||||
<title>Functions Grouped by, er, Function with Examples — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Function Reference — Thun 0.1.1 documentation</title>
|
||||
<title>Function Reference — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
@@ -193,12 +193,48 @@ Boolean value (so empty string, zero, etc. are counted as false, etc.)</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="joy.library.cmp_">
|
||||
<code class="descclassname">joy.library.</code><code class="descname">cmp_</code><span class="sig-paren">(</span><em>stack</em>, <em>expression</em>, <em>dictionary</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/joy/library.html#cmp_"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#joy.library.cmp_" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>cmp takes two values and three quoted programs on the stack and runs
|
||||
one of the three depending on the results of comparing the two values:</p>
|
||||
<blockquote>
|
||||
<div><blockquote>
|
||||
<div>a b [G] [E] [L] cmp</div></blockquote>
|
||||
<dl class="docutils">
|
||||
<dt>————————- a > b</dt>
|
||||
<dd><blockquote class="first">
|
||||
<div>G</div></blockquote>
|
||||
<p class="last">a b [G] [E] [L] cmp</p>
|
||||
</dd>
|
||||
<dt>————————- a = b</dt>
|
||||
<dd><blockquote class="first">
|
||||
<div>E</div></blockquote>
|
||||
<p class="last">a b [G] [E] [L] cmp</p>
|
||||
</dd>
|
||||
<dt>————————- a < b</dt>
|
||||
<dd>L</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="joy.library.concat">
|
||||
<code class="descclassname">joy.library.</code><code class="descname">concat</code><span class="sig-paren">(</span><em>stack</em>, <em>expression</em>, <em>dictionary</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/joy/library.html#concat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#joy.library.concat" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Concatinate the two lists on the top of the stack.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="joy.library.cond">
|
||||
<code class="descclassname">joy.library.</code><code class="descname">cond</code><span class="sig-paren">(</span><em>stack</em>, <em>expression</em>, <em>dictionary</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/joy/library.html#cond"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#joy.library.cond" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>like a case statement; works by rewriting into a chain of ifte.</p>
|
||||
<p>[..[[Bi] Ti]..[D]] -> …</p>
|
||||
<blockquote>
|
||||
<div>[[[B0] T0] [[B1] T1] [D]] cond</div></blockquote>
|
||||
<blockquote>
|
||||
<div>[B0] [T0] [[B1] [T1] [D] ifte] ifte</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="joy.library.cons">
|
||||
<code class="descclassname">joy.library.</code><code class="descname">cons</code><span class="sig-paren">(</span><em>stack</em>, <em>expression</em>, <em>dictionary</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/joy/library.html#cons"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#joy.library.cons" title="Permalink to this definition">¶</a></dt>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Advent of Code 2017 — Thun 0.1.1 documentation</title>
|
||||
<title>Advent of Code 2017 — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Advent of Code 2017 — Thun 0.1.1 documentation</title>
|
||||
<title>Advent of Code 2017 — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Advent of Code 2017 — Thun 0.1.1 documentation</title>
|
||||
<title>Advent of Code 2017 — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Advent of Code 2017 — Thun 0.1.1 documentation</title>
|
||||
<title>Advent of Code 2017 — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Advent of Code 2017 — Thun 0.1.1 documentation</title>
|
||||
<title>Advent of Code 2017 — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Advent of Code 2017 — Thun 0.1.1 documentation</title>
|
||||
<title>Advent of Code 2017 — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Categorical Programming — Thun 0.1.1 documentation</title>
|
||||
<title>Categorical Programming — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
@@ -39,7 +39,7 @@
|
||||
<p>In <a class="reference external" href="http://conal.net/papers/compiling-to-categories/">Compiling to categories</a> Conal Elliott give a taste of what this might mean.</p>
|
||||
<blockquote>
|
||||
<div>It is well-known that the simply typed lambda-calculus is modeled by any cartesian closed category (CCC). This correspondence suggests giving typed functional programs a variety of interpretations, each corresponding to a different category. A convenient way to realize this idea is as a collection of meaning-preserving transformations added to an existing compiler, such as GHC for Haskell. This paper describes such an implementation and demonstrates its use for a variety of interpretations including hardware circuits, automatic differentiation, incremental computation, and interval analysis. Each such interpretation is a category easily defined in Haskell (outside of the compiler). The general technique appears to provide a compelling alternative to deeply embedded domain-specific languages.</div></blockquote>
|
||||
<p>What he’s doing is translating labda forms into a kind of “point-free” style that is very close to Joy code (although more verbose) and then showing how to instantiate that code over different categories to get several different kinds of program out of the same code.</p>
|
||||
<p>What he’s doing is translating lambda forms into a kind of “point-free” style that is very close to Joy code (although more verbose) and then showing how to instantiate that code over different categories to get several different kinds of program out of the same code.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Developing a Program in Joy — Thun 0.1.1 documentation</title>
|
||||
<title>Developing a Program in Joy — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Using x to Generate Values — Thun 0.1.1 documentation</title>
|
||||
<title>Using x to Generate Values — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Hylomorphism — Thun 0.1.1 documentation</title>
|
||||
<title>Hylomorphism — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Thun: Joy in Python — Thun 0.1.1 documentation</title>
|
||||
<title>Thun: Joy in Python — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
@@ -17,7 +17,7 @@
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Joy Interpreter" href="../joy.html" />
|
||||
<link rel="prev" title="Thun 0.1.1 Documentation" href="../index.html" />
|
||||
<link rel="prev" title="Thun 0.2.0 Documentation" href="../index.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
@@ -326,7 +326,7 @@ developing structured processes.</p>
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li>Previous: <a href="../index.html" title="previous chapter">Thun 0.1.1 Documentation</a></li>
|
||||
<li>Previous: <a href="../index.html" title="previous chapter">Thun 0.2.0 Documentation</a></li>
|
||||
<li>Next: <a href="../joy.html" title="next chapter">Joy Interpreter</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Newton’s method — Thun 0.1.1 documentation</title>
|
||||
<title>Newton’s method — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>No Updates — Thun 0.1.1 documentation</title>
|
||||
<title>No Updates — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Quadratic formula — Thun 0.1.1 documentation</title>
|
||||
<title>Quadratic formula — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Treating Trees — Thun 0.1.1 documentation</title>
|
||||
<title>Treating Trees — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Preamble — Thun 0.1.1 documentation</title>
|
||||
<title>Preamble — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Essays about Programming in Joy — Thun 0.1.1 documentation</title>
|
||||
<title>Essays about Programming in Joy — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="../_static/documentation_options.js"></script>
|
||||
@@ -50,18 +50,27 @@
|
||||
<li class="toctree-l2"><a class="reference internal" href="Replacing.html#a-shorter-trace">A shorter trace</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Trees.html">Treating Trees</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#a-function-to-traverse-a-btree">A Function to Traverse a BTree</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#adding-nodes-to-the-btree">Adding Nodes to the BTree</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#interlude-the-cmp-combinator">Interlude: The <code class="docutils literal notranslate"><span class="pre">cmp</span></code> combinator</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#interlude-factoring-and-naming">Interlude: Factoring and Naming</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#a-version-of-btree-iter-that-does-in-order-traversal">A Version of <code class="docutils literal notranslate"><span class="pre">BTree-iter</span></code> that does In-Order Traversal</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#getting-values-by-key">Getting values by key</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#todo-btree-delete">TODO: BTree-delete</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#tree-with-node-and-list-of-trees">Tree with node and list of trees.</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#miscellaneous-crap">Miscellaneous Crap</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#a-general-form-for-trees">A General Form for Trees</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Trees.html#automatically-deriving-the-recursion-combinator-for-a-data-type">Automatically deriving the recursion combinator for a data type?</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Ordered_Binary_Trees.html">Treating Trees I: Ordered Binary Trees</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#adding-nodes-to-the-tree">Adding Nodes to the Tree</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#interlude-cmp-combinator">Interlude: <code class="docutils literal notranslate"><span class="pre">cmp</span></code> combinator</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#a-function-to-traverse-this-structure">A Function to Traverse this Structure</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#interlude-a-set-like-datastructure">Interlude: A Set-like Datastructure</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#a-version-of-tree-iter-that-does-in-order-traversal">A Version of <code class="docutils literal notranslate"><span class="pre">Tree-iter</span></code> that does In-Order Traversal</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#getting-values-by-key">Getting values by key</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#tree-delete">Tree-delete</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Ordered_Binary_Trees.html#appendix-the-source-code">Appendix: The source code.</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Treestep.html">Treating Trees II: <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#derive-the-recursive-function">Derive the recursive function.</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#extract-the-givens-to-parameterize-the-program">Extract the givens to parameterize the program.</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#define-treestep">Define <code class="docutils literal notranslate"><span class="pre">treestep</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#examples">Examples</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#redefining-the-ordered-binary-tree-in-terms-of-treestep">Redefining the Ordered Binary Tree in terms of <code class="docutils literal notranslate"><span class="pre">treestep</span></code>.</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#with-treegrind">With <code class="docutils literal notranslate"><span class="pre">treegrind</span></code>?</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#treegrind-with-step"><code class="docutils literal notranslate"><span class="pre">treegrind</span></code> with <code class="docutils literal notranslate"><span class="pre">step</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#do-we-have-the-flexibility-to-reimplement-tree-get">Do we have the flexibility to reimplement <code class="docutils literal notranslate"><span class="pre">Tree-get</span></code>?</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Treestep.html#putting-it-together">Putting it together</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Newton-Raphson.html">Newton’s method</a><ul>
|
||||
|
||||
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Parsing Text into Joy Expressions — Thun 0.1.1 documentation</title>
|
||||
<title>Parsing Text into Joy Expressions — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Tracing Joy Execution — Thun 0.1.1 documentation</title>
|
||||
<title>Tracing Joy Execution — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Python Module Index — Thun 0.1.1 documentation</title>
|
||||
<title>Python Module Index — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Search — Thun 0.1.1 documentation</title>
|
||||
<title>Search — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Stack or Quote or Sequence or List… — Thun 0.1.1 documentation</title>
|
||||
<title>Stack or Quote or Sequence or List… — Thun 0.2.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript" src="_static/documentation_options.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user