[Haskell] 2-D Plots, graphical representation of massive data
Bjorn Lisper
lisper at it.kth.se
Fri Aug 27 05:57:51 EDT 2004
Jerzy Karczmarczuk:
>Jacques Carette wrote:
>
>> John Meacham <john at repetae.net> wrote:
>>
>>> What would be cooler (IMHO) would be brining all of matlabs
>>> functionality into haskell via haskell libraries so one may use 'ghci'
>>> sort of as one uses matlab, but with the advantages haskell brings.
>>
>>
>> One could create Haskell libraries that are matlab-like, but most of
>> the advantages of haskell (ie stong typing) are not realizable in
>> Haskell. To express even the most basic of matrix datatypes and
>> operations requires dependent types.
>
>I did not understand what is not realizable where...
>
>I wonder what for do you need those dependent types.
>Matlab is quite orthodox, its main flexibility comes from the dynamical
>typing, resolution
>of the dimensions at the run-time, etc. The Numerical Python gives a
>good share of Matlab
>functionalities.
>Now, overloading arith operations for some bulk data (lists, lists of
>lists, arrays, etc.) casting
>them to some "matrix" general types, should not be impossible without
>dependent types.
>Hm. I will not bet my head, but, please, *provide an example* of such
>situation.
I think Jacques possibly means the ability to do static checking of matrix
and vector extents, to make sure that you don't try to perform operations
like matrix-vector multiply on operands whose extents do not match. If you
want to have this ability on your language, then you will have to restrict
the way you are allowed to construct array bounds so the equations that
arise can be solved. Possibly a dependent type system can be helpful for
this.
Björn Lisper
More information about the Haskell
mailing list