Hacker News new | ask | show | jobs
by anandijain 631 days ago
that's awesome! I wrote a Mathematica like cas about a year ago and it was definitely one of the most rewarding projects I've worked on.

I didn't get to look too deep into the source. Do symbols in openbirch self evaluate like in Mathematica?

1 comments

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

Great yeah, that's awesome. Here's the code to cas3.rs https://github.com/anandijain/cas3.rs

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