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
Angles as dimensions #79
base: master
Are you sure you want to change the base?
Conversation
Thanks for your work here @dmcclean. I liked what I saw earlier but I'm super busy and on travel next week. I hope to take a closer look at this in early august. |
Oh, no problem, take your time. I'm still not 100% convinced this is a good idea, but at least this gives something to play with to find out. |
I'm off for another two weeks of travel on Saturday and won't have a chance to look at this and named-units-2. One big blocking item is that I have a new computer and haven't even found the time to install GHC yet! I'd be curious to know, when you have had time to play with either of these branches, what your experiences are, the impact to existing client code, etc. |
Have fun! I'm traveling myself, but only as far as western Pennsylvania. On
|
I made this comment on #46, but it applies in response to the explicitly-tracked 'Metricality' of 'UnitName's issue I discussed above, as it reduces the complexity somewhat and probably enough to make me lean in favor of keeping the tracking: Made a change (ec98de7) to remove existentials from the |
Hello! |
Hi @varosi, I wouldn't hold my breath depending on your definition of "near" future. I'm sorry to say that we haven't done anything about on this branch in the last 1.5 years and it will no longer merge cleanly. That being said I have an upcoming project it may be quite useful so I hope to get some real world experience with it soon. Depending on what you need we could consider other options such as releasing the functionality as a separate experimental package in the mean time. But with stack it is possible to depend on a specific git commit on github which may be sufficient for you? Perhaps you can clarify what is you main need? @dmcclean: Do you have a feel for the amount of effort involved in bringing this branch in line with master? A diff show a ton of changes but perhaps a lot of it is straight-forward/mechanical? |
I'm absolutely Okay to wait for new changes to enter in Hackage. It will
make my small project even more robust, because currently all types of
angles are Dimentionless.
Main need is to have angles correctly handled as other units.
2017-01-11 22:39 GMT+02:00 Björn Buckwalter <notifications@github.com>:
… Hi @varosi <https://github.com/varosi>,
I wouldn't hold my breath depending on your definition of "near" future.
I'm sorry to say that we haven't done anything about on this branch in the
last 1.5 years and it will no longer merge cleanly. That being said I have
an upcoming project it may be quite useful so I hope to get some real world
experience with it soon.
Depending on what you need we could consider other options such as
releasing the functionality as a separate experimental package in the mean
time. But with stack it is possible to depend on a specific git commit on
github which may be sufficient for you? Perhaps you can clarify what is you
main need?
@dmcclean <https://github.com/dmcclean>: Do you have a feel for the
amount of effort involved in bringing this branch in line with master? A
diff show a ton of changes but perhaps a lot of it is
straight-forward/mechanical?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFxXhur4eKPK_owfkh9TSSSwAqXcNPzOks5rRT4UgaJpZM4FbSjR>
.
|
I think it is all straightforward. Might or might not be easier to do by just redoing it on the new branch, I'm not sure, it depends how the auto-merge goes. Has the decision been made that this is the direction we want to go? I think that has been the holdup, not doing the work. Although I don't have much spare bandwidth right now, new job and new son, but if this is desired I will get it released by the end of the month. |
@varosi: I think one of the sticking points is what it means exactly to have angles correctly handled. See #72 (in particular the quotes in this comment). The current implementation handles angles “correctly” from the point of view of the SI. But yes, it would be very nice if we could treat @dmcclean: I don't think the decision has been made. I haven't had a chance to play with it at all. But if you feel confident that it is a clear win with limited drawbacks you can go ahead. Otherwise I propose that I gain some experience with it in my project this spring and then we make a call. In the meantime it would of course be good, but perhaps not mandatory, if we could merge/port the changes to the current master. I will do this if/when I find time but you are of course also welcome to have a go at it. Let me know if you start! |
I mean to differentiate Float, from Plane angle and from Solid angle. Those
to be three separate types similarly to velocity, time, etc.
What could be the cost? Will it be only compile-time?
2017-01-14 18:08 GMT+02:00 Björn Buckwalter <notifications@github.com>:
… @varosi <https://github.com/varosi>: I think one of the sticking points
is what it means exactly to have angles correctly handled. See #72
<#72> (in particular the
quotes in this comment
<#72 (comment)>).
The current implementation handles angles “correctly” from the point of
view of the SI. But yes, it would be very nice if we could treat
PlaneAngle as a separate dimension without too much cost in terms of
inconvenience and/or verbosity. We just want to be sure we understand the
cost before merging in master, which we can probably only be after putting
it to substantial use.
@dmcclean <https://github.com/dmcclean>: I don't think the decision has
been made. I haven't had a chance to play with it at all. But if you feel
confident that it is a clear win with limited drawbacks you can go ahead.
Otherwise I propose that I gain some experience with it in my project this
spring and then we make a call.
In the meantime it would of course be good, but perhaps not mandatory, if
we could merge/port the changes to the current master. I will do this
if/when I find time but you are of course also welcome to have a go at it.
Let me know if you start!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFxXhthVkowDCo-VzOsZhdPTDkAgelrDks5rSPMOgaJpZM4FbSjR>
.
|
There is a usability cost. For example, should dividing two The open question is if this usability cost (mainly by adding |
I don't think that dividing Lengths should result in a PlaneAngle - it's a
ratio (Dimensionless) and people could interpret that ratio in different
contexts. Elevation and Azimuth angles should be newtypes in my oppinion.
It's similar to using Lengths in different contexts.
2017-01-18 22:57 GMT+02:00 Björn Buckwalter <notifications@github.com>:
… There is a usability cost. For example, should dividing two Lengths
result in a Dimensionless or a PlaneAngle? If the Lengths are the
distance along a circle arc and the radius of the circle then is should
probably be a PlaneAngle, but if not it should probably be a Dimensionless.
The Lengths themselves do not carry enough information to decide this so
the user will have to be explicit about the expected type. In the SI where
PlaneAngle and Dimensionless are equivalent this is not a problem in
terms of the types (although still a problem for the user to make sure he
does not use them in inappropriate ways).
The open question is if this usability cost (mainly by addingremoveAngles
and coerceAngles functions if I recall correctly) is outweighed by the
benefits compared to other approaches (for example newtyping, which will
still be necessary if you want to distinguish between for example elevation
and azimuth angles).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFxXhgdCSpQSxG6gCmeYnVmURFDcmIqgks5rTnzGgaJpZM4FbSjR>
.
|
Resurrection? |
I would like to resurrect it. To me the critical issue is whether a |
I would also really like to see this resurrected as I have some good use cases to put it to the test (if I can find the time for them). I took a shot at aligning this branch with master a while back (last year?), but it wasn't as quick and easy as I had hoped (mostly due to not being sufficiently "fluent" in our current master) and I ran out of time. Regarding |
If you have time to paste the relevant parts that would be awesome. |
Here are the relevant parts of our conversation from 2015-09. I will forward the emails on the Brownstein paper (etc) to you as I don't want to paste the other correspondent's messages without his approval. @dmcclean (2015-09-09):
|
This is a sketch of the feature requested in #72.
It's offered for discussion purposes. Please do not merge without testing. It also requires better documentation before being merge-worthy.