There are two aspects to mathematica. There's the core language and there is the library of functions made available to the user. The library is many lifetimes of work so don't even think about doing more than a fraction of a percent of it on your own! The core language is more straightforward but it still has a fairly sophisticated backtracking pattern matcher. To get the core language working you need to implement at least some algebra - for example the pattern matcher understands commutativity, associativity and the notion of an identity for a binary function.
Many years ago I implemented a useful subset of the core language myself using C and stack based continuation abuse for the backtracking. (Good enough to be able to type in lots of standard integrals from Abramowitz and Stegun and combine them with the all the standard high school techniques for integration.) It took several months of hacking in my spare time to get it working (back in the days when I had a lot of spare time). I expect that in Haskell it would be much easier, especially using a suitable non-determinism monad for the pattern matching. The pattern matcher was probably the largest component of the work. Haskell has some great features that Mathematica doesn't and it'd be nice to see those features in an algebra package. In particular: lazy evaluation and static types. I'd probably also want dependent types. Aldor/Axiom does the types part already. -- Dan On 5/11/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
Hi folks. How difficult would it be to implement Mathematica in Haskell? I mean, I really like Mathematica, but it costs over £2,000. I can't really afford to pay that much for something that's only really a "toy". (It's not like a *need* it for anything, I just like playing with it.) _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
