[Haskell-cafe] Implementing Mathematica
jerzy.karczmarczuk at info.unicaen.fr
jerzy.karczmarczuk at info.unicaen.fr
Sat Jun 2 10:49:33 EDT 2007
Andrew Coppin responds to my rhetorical question :
>> Really, haven't heard about Maple???
> Last I heard, Maple is simply another fast number-chrunking engine.
Now, as a professional teacher, I should not get nervous too fast, but,
sorry to say, you become annoying with your *complete* lack of understanding
what is the situation in the domain which interests you. Stop "chrunking",
please. Maple, Axiom, Derive, etc. are *symbolic/algebraic* packages,
Number-crunching is NOT their main realm of activity, although some people
use them for numerics, in order not to be obliged to shift from one soft to
> Now Matlab I have heard of. (And I hate it with a passion.)
Hatred, as we all know, is something which will permit you to make
many friends and a lot of money. Good luck. But perhaps learn it first,
since I am ready to bet a good deal that you don't know why you hate it.
The matrix/vector-style, very compact notation is something which is quite
popular, perhaps a bit more than a bit similar functional map/zip style.
About other, free soft.
> Now this actually looks vaguely promising. (Rather confused at this point
> as to what the relationship between Axiom, Maxima, Reduce and Sage is...)
What is the relationship between various brands of cars, motorcycles, etc.??
Why people agree to buy all of them and not "just the best"? As Jacques
Carette said here, and others confirmed, for any reasonably mature product,
say, Maple / Mathematica, etc., you will find that in some respects it suits
you better than some others, and sometimes not, and either you choose the
best/least-bad, or you combine. Axiom (and MuPAD, and also the
semi-commercial, actively developed Australian package Magma!) are designed
towards a TYPED approach towards mathematical structures - something found
usually quite sexy by a typical Haskellian. Macsyma/Maxima, based originally
on Lisp was much more dynamic and amorphous, easier to use by newbies.
Maple is /par excellence/ procedural. Mathematica insists on rewriting.
Sage ... you mean: http://sage.scipy.org/sage/ David Joyner, William Stein
et al... , since Sage in the name of at least a dozen of different software
well, Sage is quite dynamic, but first of all, as compared to the Mathusalem
like Macsyma/Maxima, it is a baby! A baby with *all* its potentialities, and
all its weaknesses. Scriptable in Python, so accessible on many platforms,
and able to use the graphical support thereof, with the possibility to
plug-in - as the authors say - the GAP/Pari/GMP algorithms in order to
accelerate the low-level processing, etc., - well - *PERHAPS YOU* will tell
us what you can do with, that Haskell doesn't give you. (Unfortunately,
I couldn't test it thoroughly, since I have only 7 arms and 37 hours per
day, but the interactive tutorial is nice).
About other systems:
> I did indeed check that list a while back. I looked at a whole heap of
> systems listed, but... half of them didn't seem to exist any more, and the
> other half looked very clunky, had strange syntax, and only handled a few
> specific constructs.
The situation evolves, the Internet sites are, true, too often obsolete.
Instead of complaining, I test. From time to time you realize that most of
the brands of washing machines on the market known to you as a child aren't
there. Will you annoy us with the discovery of this highly non-trivial
issue? And, concerning your "strange syntax", I don't buy it at all.
> LOL! I did try to learn Prolog once... I never did understand how it was
> able to make impossible leaps of deduction like that. And yet, in other,
> similar cases, it couldn't figure out the result.
> Of course, now I know that the answer is a magic trick known as
> unification (although I still don't know much about that topic). Not
> really sure how a unifyer would help you manipulate symbolic
Magic trick?? But this is something basic. ALL comp. sci. students are
obliged to learn it, and learn also the clause reduction strategy known
as the resolution. It is intuitive and not complicated at all.
OK, from my personal perspective. I tried some time ago to offer to high-
school pupils a crash-course in Prolog, showing the non-deterministic
style of programming, and showing an example of a simple-minded simplifier
and symbolic differentiator. The unification was presented as a powerful
pattern-matcher, being able to instanciate logic variables, and test the
coherence within patterns sharing the same elements (which is not possible
in Haskell, and *much* less efficient than the Haskell pattern-matcher,
for formal reasons). It *WORKED*.
So, either you are 85 or more years old, or, you simply never tried to
use efficiently your very, very (physically) young brain.
A good deal of Prolog non-determinism can be efficiently and nicely
simulated in Haskell using the list Monad. Our 3-nd year CompSci students
are obliged to learn it. They survive it, so can you.
This is my last public answer along these lines. Have fun.
More information about the Haskell-Cafe