Minor cleanup.
This commit is contained in:
parent
51b32bbc0a
commit
4330c26cef
27
README.md
27
README.md
|
|
@ -6,9 +6,10 @@ Version 0.5.0
|
||||||
|
|
||||||
> Simple pleasures are the best.
|
> Simple pleasures are the best.
|
||||||
|
|
||||||
Joy is a programming language created by Manfred von Thun that is easy to
|
[Joy](https://en.wikipedia.org/wiki/Joy_%28programming_language%29)
|
||||||
use and understand and has many other nice properties. This project
|
is a programming language created by Manfred von Thun that is easy to
|
||||||
implements interpreters for a dialect that attempts to stay very close to
|
use and understand and has many other nice properties.
|
||||||
|
**Thun** is a dialect of Joy that attempts to stay very close to
|
||||||
the spirit of Joy but does not precisely match the behaviour of the
|
the spirit of Joy but does not precisely match the behaviour of the
|
||||||
original version written in C.
|
original version written in C.
|
||||||
|
|
||||||
|
|
@ -28,25 +29,23 @@ and a great deal of fascinating material mostly written by Von Thun on
|
||||||
Joy and its deeper facets as well as how to program in it and several
|
Joy and its deeper facets as well as how to program in it and several
|
||||||
interesting aspects. It's quite a treasure trove.
|
interesting aspects. It's quite a treasure trove.
|
||||||
|
|
||||||
[Wikipedia entry for Joy](https://en.wikipedia.org/wiki/Joy_%28programming_language%29)
|
* [Wikipedia entry for Joy](https://en.wikipedia.org/wiki/Joy_%28programming_language%29)
|
||||||
|
* [Homepage at La Trobe University](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language)
|
||||||
[Homepage at La Trobe University](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language)
|
* [The original Thun/Joypy site](https://web.archive.org/web/20220411010035/https://joypy.osdn.io/)
|
||||||
|
|
||||||
[The original Thun/Joypy site](https://web.archive.org/web/20220411010035/https://joypy.osdn.io/)
|
|
||||||
|
|
||||||
|
|
||||||
## Example Code
|
## Example Code
|
||||||
|
|
||||||
Here is an example of Joy code:
|
Here is an example of Joy code:
|
||||||
|
|
||||||
square_spiral ≡ [_p] [_then] [_else] ifte
|
square_spiral [_p] [_then] [_else] ifte
|
||||||
|
|
||||||
_p ≡ [_p0] [_p1] &&
|
_p [_p0] [_p1] &&
|
||||||
_p0 ≡ [abs] ii <=
|
_p0 [abs] ii <=
|
||||||
_p1 ≡ [<>] [pop !-] ||
|
_p1 [<>] [pop !-] ||
|
||||||
|
|
||||||
_then ≡ [ !-] [[++]] [[--]] ifte dip
|
_then [ !-] [[++]] [[--]] ifte dip
|
||||||
_else ≡ [pop !-] [--] [++] ifte
|
_else [pop !-] [--] [++] ifte
|
||||||
|
|
||||||
It might seem unreadable but with a little familiarity it becomes just as legible as any other notation.
|
It might seem unreadable but with a little familiarity it becomes just as legible as any other notation.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,10 @@
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>Simple pleasures are the best.</p>
|
<p>Simple pleasures are the best.</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<p>Joy is a programming language created by Manfred von Thun that is easy to
|
<p><a href="https://en.wikipedia.org/wiki/Joy_%28programming_language%29">Joy</a>
|
||||||
use and understand and has many other nice properties. This project
|
is a programming language created by Manfred von Thun that is easy to
|
||||||
implements interpreters for a dialect that attempts to stay very close to
|
use and understand and has many other nice properties.
|
||||||
|
<strong>Thun</strong> is a dialect of Joy that attempts to stay very close to
|
||||||
the spirit of Joy but does not precisely match the behaviour of the
|
the spirit of Joy but does not precisely match the behaviour of the
|
||||||
original version written in C.</p>
|
original version written in C.</p>
|
||||||
<p>Joy is:</p>
|
<p>Joy is:</p>
|
||||||
|
|
@ -32,19 +33,21 @@ which contains source code for the original C interpreter, Joy language source c
|
||||||
and a great deal of fascinating material mostly written by Von Thun on
|
and a great deal of fascinating material mostly written by Von Thun on
|
||||||
Joy and its deeper facets as well as how to program in it and several
|
Joy and its deeper facets as well as how to program in it and several
|
||||||
interesting aspects. It's quite a treasure trove.</p>
|
interesting aspects. It's quite a treasure trove.</p>
|
||||||
<p><a href="https://en.wikipedia.org/wiki/Joy_%28programming_language%29">Wikipedia entry for Joy</a></p>
|
<ul>
|
||||||
<p><a href="http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language">Homepage at La Trobe University</a></p>
|
<li><a href="https://en.wikipedia.org/wiki/Joy_%28programming_language%29">Wikipedia entry for Joy</a></li>
|
||||||
<p><a href="https://web.archive.org/web/20220411010035/https://joypy.osdn.io/">The original Thun/Joypy site</a></p>
|
<li><a href="http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language">Homepage at La Trobe University</a></li>
|
||||||
|
<li><a href="https://web.archive.org/web/20220411010035/https://joypy.osdn.io/">The original Thun/Joypy site</a></li>
|
||||||
|
</ul>
|
||||||
<h2>Example Code</h2>
|
<h2>Example Code</h2>
|
||||||
<p>Here is an example of Joy code:</p>
|
<p>Here is an example of Joy code:</p>
|
||||||
<pre><code>square_spiral ≡ [_p] [_then] [_else] ifte
|
<pre><code>square_spiral [_p] [_then] [_else] ifte
|
||||||
|
|
||||||
_p ≡ [_p0] [_p1] &&
|
_p [_p0] [_p1] &&
|
||||||
_p0 ≡ [abs] ii <=
|
_p0 [abs] ii <=
|
||||||
_p1 ≡ [<>] [pop !-] ||
|
_p1 [<>] [pop !-] ||
|
||||||
|
|
||||||
_then ≡ [ !-] [[++]] [[--]] ifte dip
|
_then [ !-] [[++]] [[--]] ifte dip
|
||||||
_else ≡ [pop !-] [--] [++] ifte
|
_else [pop !-] [--] [++] ifte
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>It might seem unreadable but with a little familiarity it becomes just as legible as any other notation.</p>
|
<p>It might seem unreadable but with a little familiarity it becomes just as legible as any other notation.</p>
|
||||||
<p>This function accepts two integers on the stack and increments or
|
<p>This function accepts two integers on the stack and increments or
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue