Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jneem
Copy link
Member

@jneem jneem commented Sep 6, 2025

As discussed in the last office hours, this PR brings the poly-cool crate into the kurbo repo in preparation for making it a kurbo dependency. This is almost a copy of the last poly-cool release version, except that I deleted some of the #[doc(hidden)] experiments.

  • I bumped the MSRV to 1.85 because that's poly-cool's MSRV and I think it makes sense just to have one (plus, that's how the CI is set up).
  • Do we have a process for managing changelogs in a multi-crate repo? I looked in linebender/xilem for an example, but I couldn't find a changelog...
  • 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?

@dfrg
Copy link
Contributor

dfrg commented Sep 8, 2025

I bumped the MSRV to 1.85 because that's poly-cool's MSRV and I think it makes sense just to have one (plus, that's how the CI is set up).

Is this an absolute requirement or just a nice-to-have?

@jneem
Copy link
Member Author

jneem commented Sep 8, 2025

Not an absolute requirement, but it brings edition 2024 and a couple of f64 methods in core (which mean a little less polyfilling when building with no_std)

Copy link
Member

@tomcur tomcur left a 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.

@@ -0,0 +1,44 @@
[package]
name = "poly-cool"
Copy link
Member

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...

Copy link
Member Author

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...

Copy link
Member

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

Copy link
Member Author

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.

@xStrom
Copy link
Member

xStrom commented Sep 11, 2025

Do we have a process for managing changelogs in a multi-crate repo? I looked in linebender/xilem for an example, but I couldn't find a changelog...

No documented process for cases where the version numbers diverge between the crates. That said, I think the move is for poly-cool to just have its own CHANGELOG.md in its own directory.

Copy link
Member

@DJMcNab DJMcNab left a 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.

Copy link
Member

@DJMcNab DJMcNab left a 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!

@jneem
Copy link
Member Author

jneem commented Sep 12, 2025

That said, I think the move is for poly-cool to just have its own CHANGELOG.md in its own directory.

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.

Copy link
Member

@tomcur tomcur left a 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.

Comment on lines 70 to 73
/// 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 {
Copy link
Member

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).

Copy link
Member Author

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"

Copy link
Contributor

@dominikh dominikh left a 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.

@jneem
Copy link
Member Author

jneem commented Sep 24, 2025

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:

  • How big of a deal is the MSRV bump? (@dfrg)
  • The hyphenated name is inconsistent with other linebender crates. Should we rename to fix it?

@DJMcNab
Copy link
Member

DJMcNab commented Sep 24, 2025

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.

@nicoburns
Copy link

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.

@jneem jneem force-pushed the bring-in-poly-cool branch from aeda970 to 6fe6727 Compare October 9, 2025 03:04
@jneem
Copy link
Member Author

jneem commented Oct 18, 2025

Ok, I was convinced to go with polycool. It's an easy thing to change now, and would be more difficult later. I've re-published the latest poly-cool release as polycool on crates.io, and Tom and Chad have accepted ownership (I picked them because they were the first two to comment on this PR. If anyone else wants it, let me know.)

@jneem jneem added this pull request to the merge queue Oct 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 18, 2025
@jneem jneem added this pull request to the merge queue Oct 18, 2025
Merged via the queue into linebender:main with commit 0786080 Oct 18, 2025
15 checks passed
@jneem jneem deleted the bring-in-poly-cool branch October 18, 2025 22:15
@jneem jneem mentioned this pull request Oct 19, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 23, 2025
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants