From 75591f36bac3ce1d927ab730f43fde8153b6db4f Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Fri, 10 Feb 2023 08:09:31 -0800 Subject: [PATCH] minor cleanup --- docs/build_index.py | 4 ++-- docs/html/index.html | 3 ++- docs/reference/mkref/Makefile | 2 +- implementations/C/defs.txt | 2 +- implementations/C/notes | 29 +++++++++++++++++++++++++++++ 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/docs/build_index.py b/docs/build_index.py index fd1142e..33e3e7a 100644 --- a/docs/build_index.py +++ b/docs/build_index.py @@ -1,8 +1,8 @@ import sys import markdown -filename = '/usr/home/sforman/src/Joypy/README.md' -##filename = sys.argv[-1] +#filename = '/usr/home/sforman/src/Joypy/README.md' +filename = sys.argv[-1] with open(filename) as f: text = f.read() diff --git a/docs/html/index.html b/docs/html/index.html index 59d5da3..a17db58 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -112,6 +112,7 @@ Functions receive the current stack, expression, and dictionary and return the n

The dictionary associates symbols (strings) with Joy expressions that define the available functions of the Joy system. Together the stack, expression, and dictionary are the entire state of the Joy interpreter.

+

Interpreter

joy_interpreter_flowchart.svg

Stack / Quote / List / Sequence

When talking about Joy we use the terms "stack", "quote", "sequence", @@ -129,7 +130,7 @@ All these I call literals because their occurrence in code results in them being pushed onto the stack. But I also call [London Paris] a list. So, [dup *] is a quotation but not a list.

-

From ["A Conversation with Manfred von Thun" w/ Stevan Apter](http://archive.vector.org.uk/art10000350

+

From "A Conversation with Manfred von Thun" w/ Stevan Apter

Literals and Simple Functions

TODO

Combinators

diff --git a/docs/reference/mkref/Makefile b/docs/reference/mkref/Makefile index 2440529..b869f56 100644 --- a/docs/reference/mkref/Makefile +++ b/docs/reference/mkref/Makefile @@ -1,5 +1,5 @@ FUNCDOCS = $(wildcard ../*.md) -TITLE = --metadata title="Function Reference" +TITLE = --metadata title="Thun Function Reference" TOC = --toc --toc-depth=2 all: mov diff --git a/implementations/C/defs.txt b/implementations/C/defs.txt index 91d2fb4..373bf0b 100644 --- a/implementations/C/defs.txt +++ b/implementations/C/defs.txt @@ -68,7 +68,7 @@ popopd [popop] dip popopdd [popop] dipd product 1 swap [*] step quoted [unit] dip -range [0 <=] [1 - dup] anamorphism +range [0 <=] [-- dup] anamorphism range_to_zero unit [down_to_zero] infra reco rest cons reverse <{} shunt diff --git a/implementations/C/notes b/implementations/C/notes index 399eae7..c31683a 100644 --- a/implementations/C/notes +++ b/implementations/C/notes @@ -1,3 +1,32 @@ + + + >>> 23 * 12345.6789 + 283950.61470000003 + + joy? 23 123456789 * + 2839506147 + + joy? 10000 / + 283950 + +eh? + +See that "0000003" at the end of the float? +Floating point numbers /suck/, we only use them because +computers were small and slow. Now that they are large +(sixty-four bits per word!? Holy shit!) and fast, so +floating point is no longer necessary. + +(However, in practice, we will still be using it, because +it's been turd-polished to such a high sheen. GPUs are +monsters! But most of us have no use for supercomputers +outside of playing fancy games.) + +--------------------------------------- + + + + With a little bit of complexity we could improve efficiency (e.g. using VList instead of singly-linked list.) But I want to tackle efficiency by compilation, and write the compiler(s) in Prolog. I think that avoids