-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port the Rationals from the PowerPack #154
Comments
Interesting... I think this implies merging PowerPack into FSharpx? Or am I reading too much into it? I'm not saying it's a bad thing, just trying to figure out the implications. |
See the discussion on the F# open source group,
Don Syme wrote a suggestion for which functionality to move into fsharpx. For "math" stuff he said: FSharpx is not the natural home for a math library for F# and it's best not to confuse things and start down that direction. Instead organize that as a separate community project and keep the purpose of FSharpx clear. Much of the other math functionality has already been taken forward at http://mathprovider.codeplex.com/ and there is also Math.NET. |
I think the point is - if you're going to merge this code anywhere, then it should either be a new "F# math" project or be merged into Math.NET, which is the de-facto open source math library for .NET. It has a module specifically for F# support. |
The design of Math.NET is very different from the PowerPack math code. Personally, I prefer the matrix classes on Power Pack rather than the ones on Math.NET. It would probably make sense to either have a FSharpx.Math package, or create a new repository FMath or FsMath for it, as there is value there that isn't replaced by Math.NET |
I'd really encourage FSharpx not to go down this route. Math.NET looks like a better basis for open-source math programming on with F# on .NET than anything that FSharpx is going to produce. Do not make FSharpx a kitchen-sink for random bits of math functionality that don't add up to a convincing whole - if you do it will repeat the mistake we made with the power pack itself. Indeed, I recommend you just don't get into the "math library" game at all. Focusing on core functional programming, functional collecctions, async, networking and type providers seems like a good remit for FSharpx. I think extending to math would be a bridge to far. For the power pack Matrix/Vector types - as I understand it, Math.NET now allows the use of storage containers that use different matrix representations and storage (including native) as long as a basic set of operations (including some linear algebra) are defined on the storage. This may be a better route for progressing the power-pack matrix types - move them into the F# wrapper in Math.NET and hook them into the rest of the Math.NET functionality. If necessary, also wrap some other Math.NET functionality in F# window dressing. Note we use Math.NET in Try F# 3,0, e.g. see here http://preview.tryfsharp.org/Courses?ID=4. |
Ok, putting math in FSharpx is probably not a good idea, but it would also be a shame if the existing work on powerpack math just dies. It would be nice to migrate it to a repository on github so it can be mantained by the community. Some things like defining pointwise operators can't be done on Math.Net because it's implemented in C# and operators can't be added on type extensions. Math.Net also doesn't have rational numbers. |
Sorry, ignore my last comment, powerpack is already on github.com/fsharp/powerpack |
I used the Matrix type from the Powerpack a while back and it was of better performance than one of the commercial offerings, so there is good stuff in there! |
Apart from having a clear cohesive separation between libraries, the math.net guys have excellent ressources. Another reason to integrate smoothly with them and not bastardize fsharpx |
(FWIW "math.net" came up as a link in my email but is a spam site - the link is http://numerics.mathdotnet.com/ for those who need it) |
I opened an issue in the mathnet-numerics project (mathnet/mathnet-numerics#60) so moving the discussion over to this project. |
If you follow my advice about "no math", then just remove the monad instance for BigRational :) |
I'm thinking of submiting a pull request to Math.Net to add the BigRational & Complex from PowerPack and DistributionMonad from FSharpx, but I'd like to hear @forki opinion first, I don't want to delete his work just like that |
Another option is to include BigRational and the DistributionMonad but immediately mark them [<Obsolete>]. |
Sent pull request 172 |
You can move the DistributionMonad over. I'm ok with that. |
We should port the Rationals to FSharpx.
It seems the PowerPack development has stopped.
@mausch what do you think?
The text was updated successfully, but these errors were encountered: