[Haskell-cafe] matrix computations based on the GSL
lemming at henning-thielemann.de
Wed Jun 29 17:39:11 EDT 2005
On Wed, 29 Jun 2005, Jacques Carette wrote:
> In fact, type classes in Haskell is a *great* way to do just that!
I agree. I'm also aware of that I mean different objects when I write
uniformly '1'. But I know that they are somehow different. I'm also ok
with not writing a conversion from say the integer 1 to the fraction 1/1,
but I know that there had to be one. We should be aware of such
abbreviations before adding them to a programming language.
> This is called operator overloading. It is completely harmless because
> you can tell the two * apart from their type signatures. It is a
> complete and total waste of time to use two different symbols to mean
> the same thing.
But the multiplication in A*x already needs multi-parameter type classes.
Btw. A function in prefix notation for matrix vector multiplication would
also stress the role of a matrix as linear mapping. This is because this
function would just map the matrix to the linear mapping it represents.
Matrix.mulVec :: Matrix -> (Vector -> Vector)
> Abstract Algebra is the branch of mathematics where you want to
> abstract out the *unimportant* details.
But typically they don't say 'identical' if they mean 'isomorphic'.
> Note that the one giant try at a statically typed mathematics system
> (Axiom w/ programming language Aldor) never caught on,
You mean I should have a closer look on it?
> >If translating all of existing idioms is your goal, then this is certainly
> >the only design. But adapting the sloppy (not really convenient)
> >mathematical notation is not a good design guideline.
> I should know better than to get into a discussion like this with
> someone who believes they singlehandedly know better than tens of
> thousands of mathematicians...
Millions of people believe that it makes no sense to work with infinite
dimensional spaces ... The next argument, please. :-)
I learned from "History of mathematical notation" by Florian Cajori that
defending _the_ mathematical notation is useless because there is not the
one notation. There are so much more notations than we know of. Notations
were chosen because of typographical issues, because there was no notation
for a specific operation before and so on. But there was never a
mathematician who designed a consistent notation from scratch, there was
no commitee to setup a standard, mathematical notation was always a
patchwork from very different sources. It looks like too many cooks spoil
More information about the Haskell-Cafe