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
506b40bba4
min and max
2023-10-09 13:04:16 -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
0e380b7748
Div, mod handle zero.
2023-09-23 21:20:37 -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
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
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
sforman
6674fdffb6
Better exceptions.
2023-08-28 20:46:19 -07:00
sforman
a107e1df6c
Rebuilt C interpreter.
2023-08-21 09:53:24 -07:00
sforman
8dfcbca2a8
README for Chicken Scheme.
2023-08-20 10:24:29 -07:00
sforman
5edf0797b4
sort
2023-08-18 17:09:08 -07:00
sforman
20b517f083
Figlet headings.
2023-08-18 16:59:32 -07:00
sforman
307a421fab
Add definition for xor.
2023-08-16 10:05:30 -07:00
sforman
60bddcc70e
cleanup
2023-08-13 08:49:20 -07:00
sforman
9f78b6d8fd
Messing around with type inference.
...
What if we insist that both branches of a branch have compatible types?
For one thing `[+] [* +] branch` leads to a circular term which, when
printed, goes into a loop: "int,int,int,...". Hmm...
2023-08-12 16:45:59 -07:00
sforman
48e443c5c7
for-each
2023-08-12 14:09:44 -07:00
sforman
596a7a21eb
A crude main loop.
...
I know there are better ways to do this, but I don't know what they are
yet. Maybe a "do" loop? Anyway, this works, although it doesn't catch
errors yet.
2023-08-12 13:03:42 -07:00
sforman
8bbbd2a4a4
Update defs.scm
2023-08-12 08:26:59 -07:00
sforman
00f4bfcacd
Math ops, definitions for left- and right-shift.
2023-08-12 08:04:21 -07:00
sforman
99f01bec1f
mul div mod add sub in Nim
2023-08-12 07:54:33 -07:00
sforman
f45c739fad
first rest
2023-08-11 23:02:46 -07:00
sforman
1a37a8e81c
concat cons comparison
2023-08-11 22:48:25 -07:00
sforman
8df8634e39
loop
2023-08-11 21:27:41 -07:00
sforman
172407fef1
branch and refactor simple functions.
...
The refactor should be a macro but I don't know how to write those yet
(apparently there are different macros systems... ooo la la!)
2023-08-11 21:15:26 -07:00
sforman
4d6d66e391
dip
2023-08-11 20:49:24 -07:00
sforman
c3e6c1be90
i
2023-08-11 20:45:25 -07:00
sforman
ae7d854330
swap
2023-08-11 20:38:01 -07:00
sforman
9fbb7c05c3
pop
2023-08-11 20:34:40 -07:00