Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

that's awesome, I wrote a Mathematica clone too! I think it's one of the most rewarding projects I've done.

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



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!


just sent u an email and yeah I ditched the m expr parser and just made the dumbest parser I could haha




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: