Fix up some links.

This commit is contained in:
sforman 2023-11-13 14:58:42 -08:00
parent acb9f83c86
commit c4cdbb0ef3
4 changed files with 82 additions and 128 deletions

View File

@ -22,7 +22,7 @@ Joy is:
* [Stack-based](https://en.wikipedia.org/wiki/Stack-oriented_programming_language) * [Stack-based](https://en.wikipedia.org/wiki/Stack-oriented_programming_language)
* [Concatinative](https://en.wikipedia.org/wiki/Concatenative_programming_language) * [Concatinative](https://en.wikipedia.org/wiki/Concatenative_programming_language)
(See also [concatenative.org](http://www.concatenative.org/wiki/view/Concatenative%20language)) (See also [concatenative.org](http://www.concatenative.org/wiki/view/Concatenative%20language))
* [Categorical](https://joypy.osdn.io/notebooks/Categorical.html) * [Categorical](https://ariadne.systems/pub/~sforman/Thun/notebooks/Categorical.html)
The best source for learning about Joy is the information made available The best source for learning about Joy is the information made available
at the [website of La Trobe University](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language) at the [website of La Trobe University](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language)
@ -45,7 +45,7 @@ Here is an example of Joy code. This function `square_spiral` accepts
two integers and increments or decrements one of them such that the new two integers and increments or decrements one of them such that the new
pair of numbers is the next coordinate pair in a square spiral (like the pair of numbers is the next coordinate pair in a square spiral (like the
kind used to construct an [Ulam Spiral](https://en.wikipedia.org/wiki/Ulam_spiral)). kind used to construct an [Ulam Spiral](https://en.wikipedia.org/wiki/Ulam_spiral)).
For more information see [Square Spiral Example Joy Code](https://joypy.osdn.io/notebooks/Square_Spiral.html). For more information see [Square Spiral Example Joy Code](https://ariadne.systems/pub/~sforman/Thun/notebooks/Square_Spiral.html).
square_spiral [p] [then] [else] ifte square_spiral [p] [then] [else] ifte
@ -74,10 +74,10 @@ any other notation.
The `Thun.md` document describes the Thun dialect. Most of the rest of The `Thun.md` document describes the Thun dialect. Most of the rest of
documentation is in the form of documentation is in the form of
[Jupyter Notebooks](https://joypy.osdn.io/notebooks/index.html) [Jupyter Notebooks](https://ariadne.systems/pub/~sforman/Thun/notebooks/index.html)
that go into more detail. that go into more detail.
**[Jupyter Notebooks](https://joypy.osdn.io/notebooks/index.html)** **[Jupyter Notebooks](https://ariadne.systems/pub/~sforman/Thun/notebooks/index.html)**
I had a Joy kernel for the Jupyter Notebook system, but I can no longer I had a Joy kernel for the Jupyter Notebook system, but I can no longer
figure out how to use it, so I'm rewriting the notebooks by hand. figure out how to use it, so I'm rewriting the notebooks by hand.
@ -92,6 +92,13 @@ There is more in the `docs` directory but it's kind of a mess right now
(Aug 2023). (Aug 2023).
### Building the Docs
Run `make` in the `docs` directory. (This is a lie, it's more complex than
that. Really you need to run (GNU) make in the `docs/notebooks` and
`docs/reference` dirs first, _then_ run `make` in the `docs` directory.)
## Directory structure ## Directory structure
Thun Thun

View File

@ -3,8 +3,8 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Thun Notebooks</title> <title>Thun Notebooks</title>
<link rel="stylesheet" href="/css/font/fonts.css"> <link rel="stylesheet" href="css/font/fonts.css">
<link rel="stylesheet" href="/css/site.css"> <link rel="stylesheet" href="css/site.css">
</head> </head>
<body> <body>
<h1>Thun Notebooks</h1> <h1>Thun Notebooks</h1>
@ -12,42 +12,42 @@
<p>Various Jupyter notebooks, some more polished than others, a few incomplete. <p>Various Jupyter notebooks, some more polished than others, a few incomplete.
I'm in the process of rewriting them.</p> I'm in the process of rewriting them.</p>
<ul> <ul>
<li><a href="/notebooks/0._This_Implementation_of_Joy_in_Python.html">0. This Implementation of Joy in Python</a></li> <li><a href="notebooks/0._This_Implementation_of_Joy_in_Python.html">0. This Implementation of Joy in Python</a></li>
<li><a href="/notebooks/1._Basic_Use_of_Joy_in_a_Notebook.html">1. Basic Use of Joy in a Notebook</a></li> <li><a href="notebooks/1._Basic_Use_of_Joy_in_a_Notebook.html">1. Basic Use of Joy in a Notebook</a></li>
<li><a href="/notebooks/2._Library_Examples.html">2. Library Examples</a></li> <li><a href="notebooks/2._Library_Examples.html">2. Library Examples</a></li>
<li><a href="/notebooks/3._Developing_a_Program.html">3. Developing a Program</a></li> <li><a href="notebooks/3._Developing_a_Program.html">3. Developing a Program</a></li>
<li><a href="/notebooks/Developing_a_Program.html">Developing a Program</a></li> <li><a href="notebooks/Developing_a_Program.html">Developing a Program</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_1st.html">Advent of Code 2017 December 1st</a></li> <li><a href="notebooks/Advent_of_Code_2017_December_1st.html">Advent of Code 2017 December 1st</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_2nd.html">Advent of Code 2017 December 2nd</a></li> <li><a href="notebooks/Advent_of_Code_2017_December_2nd.html">Advent of Code 2017 December 2nd</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_3rd.html">Advent of Code 2017 December 3rd</a></li> <li><a href="notebooks/Advent_of_Code_2017_December_3rd.html">Advent of Code 2017 December 3rd</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_4th.html">Advent of Code 2017 December 4th</a></li> <li><a href="notebooks/Advent_of_Code_2017_December_4th.html">Advent of Code 2017 December 4th</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_5th.html">Advent of Code 2017 December 5th</a></li> <li><a href="notebooks/Advent_of_Code_2017_December_5th.html">Advent of Code 2017 December 5th</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_6th.html">Advent of Code 2017 December 6th</a></li> <li><a href="notebooks/Advent_of_Code_2017_December_6th.html">Advent of Code 2017 December 6th</a></li>
<li><a href="/notebooks/BigInts.html">BigNums</a></li> <li><a href="notebooks/BigInts.html">BigNums</a></li>
<li><a href="/notebooks/Compiling_Joy.html">Compiling Joy</a></li> <li><a href="notebooks/Compiling_Joy.html">Compiling Joy</a></li>
<li><a href="/notebooks/Correcet_Programming.html">Correcet Programming</a></li> <li><a href="notebooks/Correcet_Programming.html">Correcet Programming</a></li>
<li><a href="/notebooks/Derivatives_of_Regular_Expressions.html">Derivatives of Regular Expressions</a></li> <li><a href="notebooks/Derivatives_of_Regular_Expressions.html">Derivatives of Regular Expressions</a></li>
<li><a href="/notebooks/Generator_Programs.html">Generator Programs</a></li> <li><a href="notebooks/Generator_Programs.html">Generator Programs</a></li>
<li><a href="/notebooks/Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.html">Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators</a></li> <li><a href="notebooks/Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.html">Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators</a></li>
<li><a href="/notebooks/Intro-to-Joy.html">Intro-to-Joy</a></li> <li><a href="notebooks/Intro-to-Joy.html">Intro-to-Joy</a></li>
<li><a href="/notebooks/Joy-in-Jupyter.html">Joy-in-Jupyter</a></li> <li><a href="notebooks/Joy-in-Jupyter.html">Joy-in-Jupyter</a></li>
<li><a href="/notebooks/Multiples-of-3-and-5.html">Multiples-of-3-and-5</a></li> <li><a href="notebooks/Multiples-of-3-and-5.html">Multiples-of-3-and-5</a></li>
<li><a href="/notebooks/NeoAero.html">NeoAero</a></li> <li><a href="notebooks/NeoAero.html">NeoAero</a></li>
<li><a href="/notebooks/Newton-Raphson.html">Newton-Raphson</a></li> <li><a href="notebooks/Newton-Raphson.html">Newton-Raphson</a></li>
<li><a href="/notebooks/Ordered_Binary_Trees.html">Ordered Binary Trees</a></li> <li><a href="notebooks/Ordered_Binary_Trees.html">Ordered Binary Trees</a></li>
<li><a href="/notebooks/Quadratic.html">Quadratic</a></li> <li><a href="notebooks/Quadratic.html">Quadratic</a></li>
<li><a href="/notebooks/Recursion_Combinators.html">Recursion Combinators</a></li> <li><a href="notebooks/Recursion_Combinators.html">Recursion Combinators</a></li>
<li><a href="/notebooks/Remove-Function.html">Remove-Function</a></li> <li><a href="notebooks/Remove-Function.html">Remove-Function</a></li>
<li><a href="/notebooks/Replacing.html">Replacing</a></li> <li><a href="notebooks/Replacing.html">Replacing</a></li>
<li><a href="/notebooks/Square_Spiral.html">Square Spiral</a></li> <li><a href="notebooks/Square_Spiral.html">Square Spiral</a></li>
<li><a href="/notebooks/The_Four_Operations.html">The Four Operations</a></li> <li><a href="notebooks/The_Four_Operations.html">The Four Operations</a></li>
<li><a href="/notebooks/Trees.html">Trees</a></li> <li><a href="notebooks/Trees.html">Trees</a></li>
<li><a href="/notebooks/Treestep.html">Treestep</a></li> <li><a href="notebooks/Treestep.html">Treestep</a></li>
<li><a href="/notebooks/TypeChecking.html">TypeChecking</a></li> <li><a href="notebooks/TypeChecking.html">TypeChecking</a></li>
<li><a href="/notebooks/Types.html">Types</a></li> <li><a href="notebooks/Types.html">Types</a></li>
<li><a href="/notebooks/Zipper.html">Zipper</a></li> <li><a href="notebooks/Zipper.html">Zipper</a></li>
<li><a href="/notebooks/fun_with_scan.html">fun with scan</a></li> <li><a href="notebooks/fun_with_scan.html">fun with scan</a></li>
<li><a href="/notebooks/with_sympy.html">with sympy</a></li> <li><a href="notebooks/with_sympy.html">with sympy</a></li>
</ul> </ul>
</body> </body>
</html> </html>

View File

@ -150,7 +150,7 @@ of these:
### Definitions ### Definitions
Thun can be extended by adding new definitions to the Thun can be extended by adding new definitions to the
[defs.txt](https://git.sr.ht/~sforman/Thun/tree/trunk/item/implementations/defs.txt) [defs.txt](https://ariadne.systems/gogs/sforman/Thun/src/trunk/implementations/defs.txt)
file and rebuilding the binaries. Each line in the file is a definition file and rebuilding the binaries. Each line in the file is a definition
consisting of the new symbol name followed by an expression for the body consisting of the new symbol name followed by an expression for the body
of the function. of the function.

View File

@ -11,10 +11,10 @@ programming language created by Manfred von Thun that is easy to use and
understand and has many other nice properties. **Thun** is a dialect of 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 Joy that attempts to stay very close to the spirit of Joy but does not
precisely match the behaviour of the original version written in C. It precisely match the behaviour of the original version written in C. It
started as a Python project called "Joypy", but after someone claimed that started as a Python project called "Joypy", but after someone claimed
name on PyPI before me I renamed it to Thun in honor of Manfred Von Thun. that name on PyPI before me I renamed it to Thun in honor of Manfred Von
Now there are interpreters implemented in several additional languages Thun. Now there are interpreters implemented in several additional
(C, Nim, Prolog, Rust). languages (C, Elm, Nim, OCaml, Prolog, and Scheme).
Joy is: Joy is:
@ -22,16 +22,16 @@ Joy is:
* [Stack-based](https://en.wikipedia.org/wiki/Stack-oriented_programming_language) * [Stack-based](https://en.wikipedia.org/wiki/Stack-oriented_programming_language)
* [Concatinative](https://en.wikipedia.org/wiki/Concatenative_programming_language) * [Concatinative](https://en.wikipedia.org/wiki/Concatenative_programming_language)
(See also [concatenative.org](http://www.concatenative.org/wiki/view/Concatenative%20language)) (See also [concatenative.org](http://www.concatenative.org/wiki/view/Concatenative%20language))
* [Categorical](https://joypy.osdn.io/notebooks/Categorical.html) * [Categorical](notebooks/Categorical.html)
The best source (no pun intended) for learning about Joy is the The best source for learning about Joy is the information made available
information made available at the at the [website of La Trobe University](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language)
[website of La Trobe University](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language) | [(mirror)](https://www.kevinalbrecht.com/code/joy-mirror/) which
| [(mirror)](https://www.kevinalbrecht.com/code/joy-mirror/) contains source code for the original C interpreter, Joy language source
which contains source code for the original C interpreter, Joy language source code for various functions, code for various functions, and a great deal of fascinating material
and a great deal of fascinating material mostly written by Von Thun on mostly written by Von Thun on Joy and its deeper facets as well as how to
Joy and its deeper facets as well as how to program in it and several program in it and several interesting aspects. It's quite a treasure
interesting aspects. It's quite a treasure trove. 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)
@ -45,25 +45,26 @@ Here is an example of Joy code. This function `square_spiral` accepts
two integers and increments or decrements one of them such that the new two integers and increments or decrements one of them such that the new
pair of numbers is the next coordinate pair in a square spiral (like the pair of numbers is the next coordinate pair in a square spiral (like the
kind used to construct an [Ulam Spiral](https://en.wikipedia.org/wiki/Ulam_spiral)). kind used to construct an [Ulam Spiral](https://en.wikipedia.org/wiki/Ulam_spiral)).
For more information see [Square Spiral Example Joy Code](/notebooks/Square_Spiral.html). For more information see [Square Spiral Example Joy Code](notebooks/Square_Spiral.html).
square_spiral [_p] [_then] [_else] ifte square_spiral [p] [then] [else] ifte
_p [_p0] [_p1] and p [p0] [p1] and
_p0 [abs] ii <= p0 [abs] ii <=
_p1 [<>] [pop !-] or p1 [<>] [pop !-] or
_then [ !-] [[++]] [[--]] ifte dip then [ !-] [[++]] [[--]] ifte dip
_else [pop !-] [--] [++] ifte else [pop !-] [--] [++] ifte
It might seem unreadable but with familiarity it becomes as legible as any other notation. It might seem unreadable but with familiarity it becomes as legible as
any other notation.
## Project Hosted on [SourceHut](https://git.sr.ht/~sforman/Thun) ## Project Hosted on [Ariadne Systems](https://ariadne.systems/gogs/sforman/Thun)
* [Source Repository](https://git.sr.ht/~sforman/Thun) * [Source Repository](https://ariadne.systems/gogs/sforman/Thun)
([mirror](https://github.com/calroc/Thun)) ([mirror](https://github.com/calroc/Thun))
* [Bug tracker](https://todo.sr.ht/~sforman/thun-der) * [Bug tracker](https://ariadne.systems/gogs/sforman/Thun/issues)
([old tracker](https://osdn.net/projects/joypy/ticket/)) ([old tracker](https://osdn.net/projects/joypy/ticket/))
* [Forums](https://osdn.net/projects/joypy/forums/) * [Forums](https://osdn.net/projects/joypy/forums/)
* [Mailing list](https://osdn.net/projects/joypy/lists/) * [Mailing list](https://osdn.net/projects/joypy/lists/)
@ -71,73 +72,19 @@ It might seem unreadable but with familiarity it becomes as legible as any other
## Documentation ## Documentation
This document describes Joy in a general way below, however most of the
documentation is in the form of [Jupyter Notebooks](/notebooks/index.html) The [Thun specification](Thun.html) document describes the Thun dialect,
however most of the
documentation is in the form of [Jupyter Notebooks](notebooks/index.html)
that go into more detail. that go into more detail.
**[Jupyter Notebooks](/notebooks/index.html)** **[Jupyter Notebooks](notebooks/index.html)**
There's also a [Function Reference](/FuncRef.html) that lists each There's also a [Function Reference](FuncRef.html) that lists each
function and combinator by name and gives a brief description. (It's function and combinator by name and gives a brief description. (It's
usually out of date, I'm working on it.) usually out of date, I'm working on it.)
**[Function Reference](/FuncRef.html)** **[Function Reference](FuncRef.html)**
### Building the Docs
Run `make` in the `docs` directory. (This is a lie, it's more complex than
that. Really you need to run (GNU) make in the `docs/notebooks` and
`docs/reference` dirs first, _then_ run `make` in the `docs` directory.)
## Directory structure
Thun
|-- LICENSE - GPLv3
|-- README.md - this file
|
|-- archive
| |-- Joy-Programming.zip
| `-- README
|
|-- docs
| |-- dep-graphs - Generated dependency graphs.
| |-- html - Generated HTML docs.
| |-- notebooks - Jupyter Notebooks and supporting modules
| `-- reference - Docs for each function.
|
|-- implementations
| |-- defs.txt - common Joy definitions for all interpreters
| |-- C - interpreter
| |-- GNUProlog - interpreter
| | type inference
| | work-in-progress compiler
| |
| |-- Nim - interpreter
| |-- Ocaml - work-in-progress interpreter
| `-- Python - interpreter
|
`-- joy_code - Source code written in Joy.
`-- bigints
`-- bigints.joy
## Installation
Clone the repo and follow the instructions in the individual
`implementations` directories. There isn't really any installation. You
can put the binaries in your ``PATH``.
(I had the Python package set up to upload to PyPI as "Thun", but the
whole Python distribution story seems unsettled at the moment (2023) so
I've gone back to the *old ways*: there is a single script ``joy.py``
that gets modified (``defs.txt`` is inserted) to create a ``joy`` script
that uses the "shebang" trick to pretend to be a binary. In other words,
run ``make`` and put the resulting ``joy`` script in your PATH, if that's
what you want to do. In a year or two the Python folks will have sorted
things out and we can go back to ``pip install Thun`` or whatever.)
## Basics of Joy ## Basics of Joy