Commit Graph

7 Commits

Author SHA1 Message Date
ec443899c3 Builtins start with exclamation point 2023-11-02 16:36:43 +01:00
1a13c79ee4 Fix go mod import path 2023-10-28 09:53:37 +02:00
21c91731e9 Rename Operation to Function, plus some cleanup 2023-10-16 18:20:01 +02:00
Brian Picciano
2be865181d Complete refactor vm to not be as stupid
This commit is the result of many days of picking vm apart and putting
it back together again. The result is an implementation which separates
compile and runtime into separate steps, and which functions (more)
correctly in the face of recursion.

Pretty much all aspects of vm have been modified or deleted, so it's not
even really worth it to describe specific changes. Just pretend this is
the original implementaiton and the old one was never done.
2022-03-31 09:27:52 -06:00
Brian Picciano
ebf57591a8 Got basic demo working, ran go fmt 2021-12-30 15:29:38 -07:00
Brian Picciano
6257495fe4 Implement all builtins required to get fib working
Getting `recur` to work required adding an Operation argument to a bunch
of places in a really hacky way. I don't like it at all, but I'm also
kind of out of mental energy to figure it out properly. The fibonacci
demo in the README _works_, at least, though I don't think it's actually
tail recursive.
2021-12-30 15:10:25 -07:00
Brian Picciano
6040abc836 Implementation of a super basic vm
The vm does what it needs to do (evaluate the result of passing an input
to an operatio, where the input and the operation themselves may have
sub-inputs/operations to evaluate), with many caveats/misgivings.
2021-12-29 10:43:08 -07:00