From b7954a39a2c4903946da4a118c07f895958deb98 Mon Sep 17 00:00:00 2001
From: sforman
Thun can be extended by adding new definitions to the -defs.txt +defs.txt 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 of the function.
diff --git a/docs/html/index.html b/docs/html/index.html index 034ae78..916179a 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -20,26 +20,26 @@ 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 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 -started as a Python project called "Joypy", but after someone claimed that -name on PyPI before me I renamed it to Thun in honor of Manfred Von Thun. -Now there are interpreters implemented in several additional languages -(C, Nim, Prolog, Rust). +started as a Python project called "Joypy", but after someone claimed +that name on PyPI before me I renamed it to Thun in honor of Manfred Von +Thun. Now there are interpreters implemented in several additional +languages (C, Elm, Nim, OCaml, Prolog, and Scheme).Joy is:
-The best source (no pun intended) for learning about Joy is the -information made available at the -website of La Trobe University -| (mirror) -which contains source code for the original C interpreter, Joy language source code for various functions, -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 -interesting aspects. It's quite a treasure trove.
+The best source for learning about Joy is the information made available +at the website of La Trobe University +| (mirror) which +contains source code for the original C interpreter, Joy language source +code for various functions, 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 interesting aspects. It's quite a treasure +trove.
square_spiral [_p] [_then] [_else] ifte
+For more information see Square Spiral Example Joy Code.
+square_spiral [p] [then] [else] ifte
-_p [_p0] [_p1] and
-_p0 [abs] ii <=
-_p1 [<>] [pop !-] or
+p [p0] [p1] and
+p0 [abs] ii <=
+p1 [<>] [pop !-] or
-_then [ !-] [[++]] [[--]] ifte dip
-_else [pop !-] [--] [++] ifte
+then [ !-] [[++]] [[--]] ifte dip
+else [pop !-] [--] [++] ifte
-It might seem unreadable but with familiarity it becomes as legible as any other notation.
-Project Hosted on SourceHut
+It might seem unreadable but with familiarity it becomes as legible as
+any other notation.
+Project Hosted on Ariadne Systems
-- Source Repository
+
- Source Repository
(mirror)
-- Bug tracker
+
- Bug tracker
(old tracker)
- Forums
- Mailing list
Documentation
-This document describes Joy in a general way below, however most of the
-documentation is in the form of Jupyter Notebooks
+
The Thun specification document describes the Thun dialect,
+however most of the
+documentation is in the form of Jupyter Notebooks
that go into more detail.
-
-There's also a Function Reference that lists each
+
+There's also a Function Reference that lists each
function and combinator by name and gives a brief description. (It's
usually out of date, I'm working on it.)
-
-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
The original Joy has several datatypes (such as strings and sets)
but the Thun dialect currently only uses four: