sforman
b116c2c98b
A start on error reporting.
...
I outfitted `rest` with some error reporting and tried out exception
handling. So far so good.
One issue is that the dictionary is not a persistent datastructure, so
if there was an "inscribe" command (it's not yet implemented for this
Scheme implementation) that might be slightly problematical. (If an
error were to occur in an evaluation that had already entered new
definitions into the dict then those definitions would "survive" into
the rest of the REPL session (or whatever.))
I'll look into persistent dict for Scheme.
2023-10-20 11:42:50 -07:00
sforman
d0623508bd
Use Scheme symbols for Thun symbols.
...
It seems more elegant that way, but I haven't tested it to find out if
it has better performance or memory usage (yet.)
2023-10-19 20:54:11 -07:00
sforman
7f5c1d3086
Symbols for symbols.
...
This shouldn't work yet, because the parser makes Lisp symbols out of
the Thun symbols, but the match expr still has strings. In the REPL
this fails, but in the compiled Joy binary it doesn't fail, the
interpreter interprets just fine.
2023-10-15 11:41:44 -07:00
sforman
68a85c915a
add defs for select and small; cleaner joy-func.
2023-10-13 07:42:22 -07:00
sforman
205086714d
A little more match.
2023-10-11 20:36:01 -07:00
sforman
c4d80f6c4e
Use match a little more.
2023-10-11 20:13:02 -07:00
sforman
93556efeeb
Use match instead of cond.
2023-10-11 20:01:35 -07:00
sforman
8e15a657ed
Minor indentation change, a typo.
2023-10-10 12:12:07 -07:00
sforman
4df31667b6
Remove global stack, dict.
...
Pass them through the recursive loop instead.
2023-10-10 11:16:30 -07:00
sforman
937f6bfce5
Put a bang on add-def.
2023-10-10 10:45:00 -07:00
sforman
a7c206745a
Some edits.
2023-10-10 10:08:17 -07:00
sforman
506b40bba4
min and max
2023-10-09 13:04:16 -07:00
sforman
32d772e8b0
Some edits to some notebooks.
2023-10-09 12:48:14 -07:00
sforman
356f67dd7d
Run MAKE.
2023-10-09 11:50:37 -07:00
sforman
da0e1e685e
Derive `zip`.
2023-10-09 11:45:28 -07:00
sforman
787dc6a7b3
Nerd Sniped
2023-10-09 11:44:13 -07:00
sforman
04d3e96a99
Great progress!
2023-10-08 20:17:02 -07:00
sforman
eb665f2b50
More work on Ref doc, & stuff.
2023-10-08 17:58:22 -07:00
sforman
d833f1a3e9
Implement `bool` and trace for Scheme.
2023-10-08 17:57:05 -07:00
sforman
4821ea0ee2
Take the right number of things off of the stack.
2023-10-08 13:08:34 -07:00
sforman
bcf6abc50d
Nerd sniped by a silly function.
2023-10-07 15:25:38 -07:00
sforman
7314d2177c
Minor edits; rebuild docs.
2023-10-04 09:58:02 -07:00
sforman
69f32424a6
Print out wobbly words.
...
That have definition but no ref doc, or ref docs but no defs.
2023-10-04 08:28:53 -07:00
sforman
8c6d3dcff8
Use slightly smaller font files.
2023-10-03 20:19:31 -07:00
sforman
d798339f86
Minor edits.
2023-10-03 20:17:04 -07:00
sforman
7ccfba86fd
Tidy?
2023-10-01 12:48:25 -07:00
sforman
8661373435
A little more work on the ref doc.
2023-10-01 09:21:16 -07:00
sforman
d723724193
Mark combinators.
2023-09-30 14:41:39 -07:00
sforman
902a9f62af
Build the ref doc.
2023-09-30 14:25:12 -07:00
sforman
52e831a137
Put interpreter on pages.
2023-09-29 15:25:49 -07:00
sforman
c3054377a6
Give it it's own CSS file.
...
It's good enough for now.
2023-09-28 18:37:01 -07:00
sforman
aeb1eee646
remove the individual md ref files
2023-09-28 11:53:34 -07:00
sforman
fa4771fea7
Minor edits.
2023-09-28 11:36:19 -07:00
sforman
0e380b7748
Div, mod handle zero.
2023-09-23 21:20:37 -07:00
sforman
f2f1932876
Typo.
2023-09-23 10:59:38 -07:00
sforman
20b5f05d29
Elm reformatting and demo HTML page.
2023-09-23 09:37:43 -07:00
sforman
16cc0e5769
Change definition of uncons.
2023-09-18 11:26:50 -07:00
sforman
ecc2e442fb
Use blob URL.
2023-09-06 18:26:52 -07:00
sforman
463ed04e05
Add grammar image.
...
Made with https://jacquev6.github.io/DrawGrammar/
2023-09-06 18:24:27 -07:00
sforman
68488cc9d2
Elm version using BigNums.
...
This went pretty smoothly, I just followed the compiler errors after
substituting Integer for Int in the type definition.
The only tricky thing is that the div and mod functions for Integer
return Maybe Integer rather than just Integer, so I need to wrap those
or something? (For now I just put in add to get it to compile.)
Oh, and "not equal" is not correct? The compiler didn't complain.
2023-09-02 11:30:18 -07:00
sforman
10c1d6ccde
Let's use bignums.
2023-09-02 11:11:42 -07:00
sforman
4f27f3305f
Don't use andThen.
...
It's less clear than spelling it all out.
2023-09-02 09:44:57 -07:00
sforman
b65e948cce
Chaining with andThen works but is ugly.
...
It's lees clear to me what's going on, and I wrote it.
2023-09-02 09:38:15 -07:00
sforman
ee7c1cec99
I think Scheme?
2023-08-31 10:42:29 -07:00
sforman
e956e177f6
Rebuilt C.
2023-08-30 19:57:57 -07:00
sforman
18adfa2205
Compiling Thun to Python.
...
Not all of the words that compiled with the old defs.txt compiled with
the latest, so we're keeping the old one in here until I can trace down
the issues.
2023-08-30 18:54:49 -07:00
sforman
9c4ecb085b
pow
2023-08-30 18:52:26 -07:00
sforman
35097d90a9
Update Nim defs.txt.
2023-08-30 18:46:51 -07:00
sforman
47275cf1f1
Simple linear power function.
2023-08-30 18:44:55 -07:00
sforman
fb8faf917d
THe old compiler-to-Python.
2023-08-30 16:57:48 -07:00