Closed bkaestner closed 9 years ago
Hi Benjamin, thank you for all these observations; yes, it's still a bit of a playground because I'm not sure myself of a number of things, e.g. an effective way to represent mutable vectors, however the hierarchy of files is already more or less defined.
After figuring out the interface to Vec
and Mat
data (see e.g. vecGetArray
and vecRestoreArray
in InlineC.hs and PutGet.hs) (I think I'll take inspiration from HNetCDF ) I'll remove all the old code and add at least the modules' intention.
Regarding your third point, you can already use it interactively from within GHCi; however the inline-c authors warn us about an incompatibility with cabal-repl; haven't had the time to properly investigate it. Marco
e.g. an effective way to represent mutable vectors
I guess you want to represent the foreign vectors from PETSc (Vec
and Mat
), otherwise an interface close to Data.Vector.Unboxed.Mutable
or Data.Vector.Storable.Mutable
comes to mind.
Regarding your third point, you can already use it interactively from within GHCi;
This was more or less meant for the the fourth point, e.g. together with cabal sandbox
and cabal install
and examples in /example
:
$ cabal sandbox init
$ cabal install
...
$ cabal repl
ghci> :l examples/SVD.hs
showSVD $ toMat [[1,2,3],[4,5,6],[7,8,9]]
Also, I'm currently on Windows only, so I couldn't try it yet :(.
First of all, thanks for writing this bindings. That's kind of the project I always wanted to start, but never had the time. However, there are some things I'm wary of.
There's little documentation. This will be fixed over time, I guess. However, given that it's not really clear what all those
t*
inTestMain
actually test, one has to carefully read all code (and be very familiar with PETSc).The files feel like a playground. There are several lines of code commented out. There's no explanation why they're commented out. Future tests? Future functionality? Or current defunct tests due to missing functionality?
The structure isn't clear. Why is there an example
main
inTaoBlackScholes
? Why are there severalTestMain
files? Why is there anInternal2
? Where isInternal1
? Was this pre-VC? Does this conclude that a contributor should write anInternal3
?Those problems (will) make it hard to contribute to the project. I suggest the following steps:
git-tag
before committing changes)./example
and/tests
. They aren't part of the bindings.This steps can be done in any order and should make it easier to find contributors.