sforman
8f3a4f3f07
Minor cleanup.
2023-10-24 09:49:42 -07:00
sforman
961d84173f
Rearrange parser code.
...
It fits on a page now and reads well top-to-bottom.
2023-10-24 09:47:15 -07:00
sforman
4bb47c6b15
Fold in expect-right-bracket-lookahead
2023-10-23 22:50:57 -07:00
sforman
735ee73515
Remake C version.
2023-10-23 22:50:44 -07:00
sforman
a6be85c869
Remove underscores from example names.
...
Just for visual effect in the doc.
2023-10-23 16:06:35 -07:00
sforman
26725cefd8
Parse errors.
...
Convert error to abort to get the messages picked up by the exception
handler.
2023-10-21 20:05:11 -07:00
sforman
0a135e0f38
Runtime type checking for bool.
...
I think I'm going to retire bool in favor of e.g. 0= and null.
Booleans are already Boolean, of course, and symbols should not be
expected to have a valid interpretation in a Boolean context (I think?)
2023-10-21 19:25:14 -07:00
sforman
bd55214a52
Runtime type checking for rest of core; inscribe.
2023-10-21 19:13:59 -07:00
sforman
3c1d5ac361
joy-dup
2023-10-21 12:40:30 -07:00
sforman
35a122b2ba
Runtime type checking for comparison ops.
...
Because we're using Scheme Booleans for Thun Booleans there's no need to
make a special function for these, we can reuse the one for math ops.
2023-10-21 12:17:21 -07:00
sforman
6bd9249f83
Runtime type checking for math ops.
2023-10-21 12:11:06 -07:00
sforman
d76c23dce2
joy-first
2023-10-21 11:10:36 -07:00
sforman
8bb8953816
pop-any and pop-list.
...
Runtime type-checking.
2023-10-21 11:08:01 -07:00
sforman
3e72ce494a
minor edits
2023-10-20 22:16:21 -07:00
sforman
0fcd217f2c
A little BTree.
...
Persistent (immutable) datastructure.
2023-10-20 19:36:41 -07:00
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