Very cool! Pattern matcher isn't very advanced, I only spent maybe two days on it. Only supports Blank, Pattern, and PatternTest. (Also doesn't handle Flat, so for example in Mathematica `Times[x_, y_]` will match `Times[a, b, c]`, but it currently doesn't in ts-wolfram.)
I'm new to Mathematica, so didn't know about `Condition` (thanks for mentioning it)
It was a little hard to get going, the parsing stage usually stops me because I never learned a good parser generator well enough to just start writing code. But once I got ts-parsec working, the rest was fairly easy. I think I got `D` to work within like two days. Was also very surprised how much you can do with so little!
Shoot me an email at coffeemug@gmail.com, let's chat more!
Currently you can define some functions which will be autorun on expressions. So if you for example write an expression by itself, like `d/dx x^2` it will automatically call a "main" function, which among other things handles differentiation. So it will be evaluated to 2*x.
I would love to see your mathmatica like CAS. I'm still kind of new to this field of CS :D
Edit: I actually rewrote it to https://github.com/anandijain/cas8.rs to have Exprs be reference counted (makes it much faster), but all of the documentation is on the first link
A bit unrelated but you posted oeis so hoping you know.
In the article they mention there are 17 trillion possible 5-2 turing machines. I tried finding the sequence for this but couldn't.
While the official formula [1] is (4(n+1))^(2n)
, if one ignores the symbol written and head movement for transitions to halt, then this becomes (4n+1)^(2n), which is ~ 17 trillion for n=5.
The amazing thing is how Mathematica starts working with just a few simple ideas, evaluator, backtracking pattern matcher, and a REPL.
were you able to implement Condition? how advanced is the pattern matcher? I got stuck after doing Blank BlankSequence and BlankNullSequence
https://github.com/anandijain/cas3.rs https://github.com/anandijain/cas8.rs