[Haskell-cafe] Re: Go Haskell! -> array libraries

Don Stewart dons at galois.com
Fri Nov 28 18:57:25 EST 2008


claus.reinke:
> >But I don't want Perl, I want a well designed language and well
> >designed libraries.
> >I think it's find to let libraries proliferate, but at some point you
> >also need to step back and abstract.
> >
> > -- Lennart
> 
> Especially so if the free marketeers claim there is something 
> fundamentally wrong with the standard libraries and language, as in 
> the case of arrays. When someone did that nice little survey of the 
> last bunch of array libraries (Bulat, I think? now in the wiki book), 
> I was hoping there would be a grand unification soon. Instead, it 
> seems that those who have worked most with Haskell arrays 
> recently have simply abandoned all of the standard array libraries. 


I don't think Bulat uploaded his libraries to hackage in the end. And if
it's not on hackage, then no one will use it, so it may as well not
exist.

  
> Okay, why not, if there are good reasons. But can't you document 
> those reasons, for each of your alternative proposals, so that people 
> have some basis on which to choose (other than who has the loudest 
> market voice;-)? And would it be difficult for you all to agree on a 
> standard API, to make switching between the alternatives easy (if
> it is indeed impossible to unify their advantages in a single library,
> the reasons for which should also be documented somewhere)?
> And what is wrong about Simon's suggestion, to use the standard 
> array lib APIs on top of your implementations?


Nothing. This would be great. Who's volunteering to write the code?
The new 'list-like' fusible array libraries are still in alpha, anyway.


> Not that I see Haskell' coming soon, but I'd certainly not want it
> to continue standardising a kind of array that appears to have no 
> backing among the Haskell array user/library author community. Nor 
> would I like something as central as arrays to remain outside the 
> standard, where it won't remain stable enough for Haskell 
> programmers to rely on in the long run.


Hence the Haskell Platform. To provide the stability that people rely on
in the long run. Haskell' is not the process by which new libraries will
be standardised -- there's simply too many libraries being produced.

The platform let's us:

 * Take libraries out of the standardisation process.
 * Let developers develop in competition, and converge on agreed designs.
 * Let users decide what to use, rather than waste time standardising
   things when the developer community has already moved on.
 * And then publish a list of blessed code.

Since arrays are just another (non-obvious) data structure, there's a
huge design space:

 * flat and/or nested arrays?
 * strict or lazy or eager?
 * callable from C or Fortran?
 * mutable/immutable
 * polymorphic in what dimensions?
 * mmap-able?
 * read / write API, or list-like API?

We've not yet found the perfect implementation, but we're learning a lot.

And since it is not yet clear what the optimal solution looks like, I
say let the developers keep hacking for a while, until we get an idea of
what works. 

And by all means, if someone thinks they know what the best API is, step
up and show us the implementation!

-- Don


More information about the Haskell-Cafe mailing list