-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Feature Request] Consolidate bin()
and hex()
implementations
#2730
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
mojo-repo
Tag all issues with this label
Comments
bgreni
added
enhancement
New feature or request
mojo-repo
Tag all issues with this label
labels
May 18, 2024
Can I work on this? |
Apologies for not opening a draft sooner but I've just put up a PR for it #2790 |
modularbot
pushed a commit
that referenced
this issue
May 31, 2024
…#40690) [External] [stdlib] Consolidate bin and hex internal implementation Fixes #2730 - Utilize `_format_int` for for both `bin` and `hex` - Support `SIMD` and `Indexer` types for `hex` - Move implementations into `format_int` module --------- Co-authored-by: bgreni <42788181+bgreni@users.noreply.github.com> Co-authored-by: Rob Parolin <rparolin@modular.com> Closes #2790 MODULAR_ORIG_COMMIT_REV_ID: 0d5c716cb884468c8d3d49ac585115c39f131880
modularbot
pushed a commit
that referenced
this issue
Jun 6, 2024
[External] [stdlib] Add oct function Add the `oct` builtin function to get the octal representation of integers. Follow up from #2730 --------- Co-authored-by: bgreni <42788181+bgreni@users.noreply.github.com> Co-authored-by: Connor Gray <code@connorgray.com> Closes #2914 MODULAR_ORIG_COMMIT_REV_ID: 79696c73dd4e9ea617fe3ea970e95fb37b6035f7
modularbot
pushed a commit
that referenced
this issue
Jun 7, 2024
…#40690) [External] [stdlib] Consolidate bin and hex internal implementation Fixes #2730 - Utilize `_format_int` for for both `bin` and `hex` - Support `SIMD` and `Indexer` types for `hex` - Move implementations into `format_int` module --------- Co-authored-by: bgreni <42788181+bgreni@users.noreply.github.com> Co-authored-by: Rob Parolin <rparolin@modular.com> Closes #2790 MODULAR_ORIG_COMMIT_REV_ID: 0d5c716cb884468c8d3d49ac585115c39f131880
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
mojo-repo
Tag all issues with this label
Review Mojo's priorities
What is your request?
Immediately upon completing #2603 I realized
hex.mojo
already contains a general implementation for such things. These should be consolidated into a single implementation that accepts any size ofSIMD
orIndexer
type. Having done this it would be trivial to addoct
as well.What is your motivation for this change?
Reduce code duplication.
Any other details?
No response
The text was updated successfully, but these errors were encountered: