cartazio / numbers

Other
29 stars 13 forks source link

Miscellaneous improvements #10

Open pthariensflame opened 10 years ago

pthariensflame commented 10 years ago
DanBurton commented 10 years ago

Thanks for the pull request! I'm going to put my critical cap on, challenge a few of these design decisions, and ask some more people to review these changes.

DanBurton commented 10 years ago

I've started a discussion on Reddit.

http://www.reddit.com/r/haskell/comments/1whu8s/request_for_review_numbers/

cartazio commented 10 years ago

i'd advocate log-domain rather than log-float if you really wanted to add log domain floats. (which i don't really see being used, its just picked up because it has a partial-ord class, which i'd be inclined to be against. Unless you're saying its the canonical choice of hypothetical partial ord class)

likewise, i'm not sure if you gain much by adding a partialOrd type class, a simple partialCompare function for intervals would be just fine!

removing the "slightly illegal" instances, like Ord, while "valid", we have to accept that base has "slightly illegal" instances too,

cartazio commented 10 years ago

in case its not clear, I really don't like log-float, i like log-domain is a better lib :)

cartazio commented 10 years ago

just to be clear: i do favor improving numbers, but if we're going to deal with illegal instances, we should work on a whole new number prelude! Working around the flaws in the stand number prelude in a localized way just won't buy you that much.

pthariensflame commented 10 years ago

I don't think just a partialCompare function would cut it. I think a full PartialOrd type class is absolutely necessary; I don't really care where it comes from, but I would rather use an existing one than add yet another copy to numbers. If you can find a package other than logfloat that implements a full PartialOrd type class, I would be happy to take a look at it.

DanBurton commented 10 years ago

@cartazio, regarding "we should work on a whole new number prelude!", that's been done numerous times (pun intended), and I don't think that's really what this library is for. As I understand it, the main purpose for this library is for use with lambdabot, to facilitate quick-n-dirty numeric stuff on top of the functionality Prelude provides. It may be true that "working around the flaws in the stand number prelude in a localized way just won't buy you that much," but that's pretty much what this library does, and I'm not inclined to radically alter it.

cartazio commented 10 years ago

@DanBurton agreed :)

DanBurton commented 10 years ago

@pthariensflame upon reflection, I don't like adding a dependency and pulling in the PartialOrdering class. It's obscure, and I don't think anybody will use it. (Do you have a use case for using this instance?)

So I'm inclined to mostly reject this pull request. There are, however, a couple things I'd like to bring in:

I like adding encodeFloat and decodeFloat for Dif. I think we should instead implement decodeFloat in a way consistent with the rest of the code:

decodeFloat = decodeFloat . val

It gives an answer of questionable meaningfulness for derivitives, but this is no different from a lot of those other instance methods.

I like the show/read changes.

I like ispan, but not ival'.

I like the Eq change, I think interval identity should be defined as equality of the endpoints of the interval, and anything else should be "not equal".

I don't like the current Ord instance, but I think it should stay. It just needs to be documented.

pthariensflame commented 10 years ago

@DanBurton Alright; feel free to just copy what you want from this and leave the reas. :)

DanBurton commented 10 years ago

I'm transferring ownership of the repository to to @jwiegley, so I'll just leave this PR open and let him decide how to handle it.

jwiegley commented 7 years ago

I've been too far removed from this project for too long, and I'm ready to give this up to the next maintainer, who can make a decision on this issue. @cartazio Are you up for that? Or @DanBurton do you want to take it back? I didn't end up using it as much as I had intended, and now my focus is elsewhere, and not on Haskell numerics.

cartazio commented 7 years ago

Happy to help. I've had some slow motion collabs in the math spheres. I will admit I've not been in the loop on the numbers package activity lately but can start taking an active poke at it mid / late Jan or early feb. have enough on the queue for next few weeks

On Fri, Jan 6, 2017 at 2:35 AM John Wiegley notifications@github.com wrote:

I've been too far removed from this project for too long, and I'm ready to give this up to the next maintainer, who can make a decision on this issue. @cartazio https://github.com/cartazio Are you up for that? Or @DanBurton https://github.com/DanBurton do you want to take it back? I didn't end up using it as much as I had intended, and now my focus is elsewhere, and not on Haskell numerics.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jwiegley/numbers/pull/10#issuecomment-270848643, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAQwtGgRzOPN9-9c8Zk9ZslcOjIUwvgks5rPe7bgaJpZM4BdYVK .

jwiegley commented 2 years ago

Is there anyone who would like to maintain this package, and to have this GitHub repository transferred over to them?

cartazio commented 2 years ago

i thought i had done a bunch a few years ago, let me double check if i have that branch somewhere just in case i didn't release it

cartazio commented 2 years ago

yup, looks like I had a bunch started, happy to take over or if theres someone who's keen to do a more energetic maintainership, that'd be great too

jwiegley commented 2 years ago

@cartazio Great, if you can drop your cartazio/numbers repository I'll do the transfer!

cartazio commented 2 years ago

i'm a little headless chicken the next few days, i'll make sure i have a calendar reminder to do it this weekend :)

cartazio commented 2 years ago

I'll email/message you or this thread in the next week or so once i've done that, juggling some personal matters this month

jwiegley commented 2 years ago

@cartazio OK, just to add a little fire, I will close this PR next month if no further activity occurs. :) Trying to get my account to PR inbox zero.

cartazio commented 2 years ago

rename done :)

jwiegley commented 2 years ago

Thanks! But GitHub is saying:

cartazio already has a repository in the jwiegley/numbers network

cartazio commented 2 years ago

oh, i'll fix that

cartazio commented 2 years ago

fixed!

jwiegley commented 2 years ago

@cartazio You should have the invite to transfer now...

cartazio commented 1 year ago

reviewing this PR now, sorry for the terrible latency