-
Notifications
You must be signed in to change notification settings - Fork 91
Bring poly-cool into the kurbo repo #502
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
Conversation
Is this an absolute requirement or just a nice-to-have? |
|
Not an absolute requirement, but it brings edition 2024 and a couple of |
tomcur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool.
What's the crates.io process? I tried adding github:org:linebender as an owner but crates.io didn't like it. Should I just add the kurbo owners individually?
I believe the policy is that there are at least two crate owners.
Co-authored-by: Tom Churchman <[email protected]>
poly-cool/Cargo.toml
Outdated
| @@ -0,0 +1,44 @@ | |||
| [package] | |||
| name = "poly-cool" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame that this crate name is hyphenated, but obviously there's nothing to be done about that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could change it to polycool. Or something else, I'm not that attached to the name...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, what I mean is that poly-cool is already on crates.io under that name, which I didn't think we were proposing to not happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, and the existence of poly-cool on crates.io means that I can't rename to poly_cool. But I could rename to polycool if we really want to avoid hyphenated names. A rename would be pretty painless at this early point.
No documented process for cases where the version numbers diverge between the crates. That said, I think the move is for |
DJMcNab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have the context to review this as a library, but just some of the license details.
I do realise that the back-and-forth here is a massive pain.
DJMcNab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version of the licensing looks good. Sorry I don't have the context to actually review this code.
Thanks for not trying to migrate Kurbo to it in this PR!
Any objection to moving the workspace-wide CHANGELOG into kurbo/ then? That way I can add one to poly-cool and it will look nice and symmetric. |
tomcur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very useful, and though I've only coarsely checked the implementation (I don't currently have the time to dive into the background or the nitty-gritty math), the things I did check make sense. I'd be happy just approving it.
poly-cool/src/poly.rs
Outdated
| /// Returns the largest absolute value of any coefficient. | ||
| /// | ||
| /// Always returns a non-negative number, or NaN if some coefficient is NaN. | ||
| pub fn magnitude(&self) -> f64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've heard this called a "coefficient norm" instead (of which there are others...). I'm not sure whether there's fully standard terminology here. Perhaps for clarity we'd want to call this coefficient_magnitude or something (perhaps even with max_ prefix).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going more explicit, how do you feel about max_abs_coefficient? I think "abs" in this context is more widely used than "magnitude"
dominikh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this is good enough to merge and iterate on.
|
At office hours last week, the conclusion was that the kurbo changelog can stay at the top level, and poly-cool can have one in its subdirectory. I think that leaves the following questions:
|
|
The MSRV bump is fine; our 0.12 release was very recent, and 1.85 is already 6 months and 5 Rust releases old. From my perspective, it's fine to keep the hyphenated name for legacy reasons. That is, having two crates of identical names with the same functionality and publishers is not a good solution. And I think I'm the only one who has expressed against it. I agree with just landing this, and iterating once it's in tree. |
|
I would be in favour of renaming to remove the hyphen on the basis that "molecule" and "polycule" are both one word in english and also that typing module names without hyphens/underscores is easier. As long as the old crate points to the new one, I don't see any major problems with that. |
aeda970 to
6fe6727
Compare
|
Ok, I was convinced to go with |
This incorporates the fixes and changes made during the review of #502. It's a breaking change because of the `magnitude` -> `max_abs_coefficient` rename. Since polycool is versioned independently of kurbo, we need a release-tagging scheme that won't clash. I suggest `v0.4.0-polycool` (TODO: update the date before merging)
As discussed in the last office hours, this PR brings the
poly-coolcrate into thekurborepo in preparation for making it akurbodependency. This is almost a copy of the last poly-cool release version, except that I deleted some of the#[doc(hidden)]experiments.github:org:linebenderas an owner but crates.io didn't like it. Should I just add the kurbo owners individually?