Skip to content
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

feat: upstream definition of Vector from Batteries #6197

Merged
merged 6 commits into from
Nov 24, 2024
Merged

feat: upstream definition of Vector from Batteries #6197

merged 6 commits into from
Nov 24, 2024

Conversation

kim-em
Copy link
Collaborator

@kim-em kim-em commented Nov 24, 2024

This PR upstreams the definition of Vector from Batteries, along with the basic functions.

@kim-em kim-em added the changelog-library Library label Nov 24, 2024
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Nov 24, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Nov 24, 2024

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 4e885be96d82c522af4acb9ce9afe77e5aea7feb --onto ba3f2b3ecf8967410f3498e2835b883601f03967. (2024-11-24 10:14:20)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 4e885be96d82c522af4acb9ce9afe77e5aea7feb --onto 884a9ea2ff70bb4d0c6da4a1c23ffc26c3a974ee. (2024-11-24 22:58:11)

@tydeu
Copy link
Member

tydeu commented Nov 24, 2024

Out of curiosity, is the plan to eventually have a native implementation of Vector (since it can be more efficiently represented than an Array)?

@kim-em kim-em disabled auto-merge November 24, 2024 22:02
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 24, 2024 23:00 Inactive
@kim-em kim-em added this pull request to the merge queue Nov 24, 2024
Merged via the queue into master with commit c3948cb Nov 24, 2024
15 checks passed
@nomeata
Copy link
Collaborator

nomeata commented Nov 25, 2024

Out of curiosity, is the plan to eventually have a native implementation of Vector (since it can be more efficiently represented than an Array)?

Can it? You still need the length information at runtime for things like compactification

@digama0
Copy link
Collaborator

digama0 commented Nov 25, 2024

Indeed. You need the capacity at runtime for GC to work correctly, although you could drop the length field at the cost of making push a major performance footgun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants