[Numeric] Numeric Digest, Vol 8, Issue 1

Marco Zocca zocca.marco at gmail.com
Sat Dec 16 13:08:43 UTC 2017


Very interesting!

  This is a great foundation for higher-level libraries. I also very
much appreciate the use of bare FFI calls as a way of future-proofing
this library, since the various binding DSLs are quite impervious to
Haskell newcomers.

Would you see `vector` as more fitting than `CArray` ?

Also, I'm guessing that the original comments would help bring up to
speed other developers on the internals.

Last thing, would you be interested in jointly developing bindings to
the sparse netlib functionality ( http://www.netlib.org/sparse/) ?

Thanks,
Marco



> I have just uploaded these packages:
>
> https://hackage.haskell.org/package/netlib-ffi-0.0
> https://hackage.haskell.org/package/netlib-carray-0.0
> https://hackage.haskell.org/package/blas-ffi-0.0
> https://hackage.haskell.org/package/blas-carray-0.0
> https://hackage.haskell.org/package/lapack-ffi-0.0
> https://hackage.haskell.org/package/lapack-carray-0.0
> https://hackage.haskell.org/package/lapack-ffi-tools-0.0
>
> The netlib packages provide definitions used by the other packages. The
> "ffi" packages provide foreign imports of all functions from the
> corresponding netlib package. The "carray" packages contain mid-level
> functions that use CArrays for vectors and matrices and try to get input
> and output values right according to the FORTRAN comments. CArrays might
> not be really appropriate since we always use zero-based arrays but this
> cannot be expressed in the type. A zero-based variant of CArrays might be
> better in the future. I use closed-world classes for generalizing
> functions that are generalizable. This way, I can add "methods" without
> extending the class.
>
> The packages use very basic techniques. No C code, no HSC, no C2HS, no
> template Haskell, only plain Haskell 2010 with ForeignFunctionInterface.
>
> I still have no good idea how to cope with Characters. They are used like
> enumeration elements, thus the enumerations deserve custom newtype
> wrappers. But not all enumeration elements are allowed everywhere. I am
> also uncertain whether to use these wrappers already in the "ffi" packages
> or only in "carray".
>
> I have also not included the FORTRAN comments in the Haskell packages. I
> have only included links to online docs where available.
>


More information about the Numeric mailing list