RE: https://floss.social/@alcinnz/117480851431357123
Spec for a JiT backend to Alonzo:
* Algebraic data types a.k.a. tagged unions, with pattern-matching
* Pure functions which can be called.
* Arbitrary-precision positive ints.
* Fully immutable data.
* Exceptions, to report memory-allocation failures.
The point is to deliver something much faster than what I'll be writing in pure Lua. So performance isn't a reason not to use Alonzo!
Possibilities for auto-optimizing Alonzo code should theoretically be exceptionally straightforward & flexible.
If anyone wants to help with my "Alonzo" visual functional programming language...
I'll welcome contributions to the core, or if you want to tackle more tangential we don't need to coordinate as much on...
How about a Lua CRDT library? Pure-Lua implementation would aid porting.
Or a functional JIT (which could eventually run Alonzo programs) would be neat! Ensuring speed is less of a reason to switch to a "real" programming language.
As Alonzo comes together I'll ask for more.
Some more points here:
1. You wouldn't need to worry about implementing Haskell-like "type classes", my editor will lower those.
2. All loops will be (possibly abstracted) recursion, so you'll probably want to implement tail-recursion.
3. No analysis would be needed to get SSA, a control-flow tree, etc. This is why I say it should be relatively easy to auto-optimize!
4. I'm not settled on a file format, that'll need to wait until I've chosen/implemented a CRDT.
2/1 Truly fin!