minor cleanup
This commit is contained in:
parent
acfa19239e
commit
75591f36ba
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ Functions receive the current stack, expression, and dictionary and return the n
|
|||
<p>The <strong>dictionary</strong> 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.</p>
|
||||
<h3>Interpreter</h3>
|
||||
<p><img alt="joy_interpreter_flowchart.svg" src="/joy_interpreter_flowchart.svg"></p>
|
||||
<h3>Stack / Quote / List / Sequence</h3>
|
||||
<p>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.</p>
|
||||
</blockquote>
|
||||
<p>From ["A Conversation with Manfred von Thun" w/ Stevan Apter](http://archive.vector.org.uk/art10000350</p>
|
||||
<p>From <a href="http://archive.vector.org.uk/art10000350">"A Conversation with Manfred von Thun" w/ Stevan Apter</a></p>
|
||||
<h3>Literals and Simple Functions</h3>
|
||||
<p>TODO</p>
|
||||
<h3>Combinators</h3>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue