-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
refactor Base.GMP.MPZ.import! to be consistent with Base.GMP.MPZ.export! #56903
base: master
Are you sure you want to change the base?
Conversation
rename Base.GMP.MPZ.export! "dynamic" variable from `a` to `x`, since it is more in line with comment on L141 in base/gmp.jl add tests, that numbers and vectors can be exported and imported correctly and composed import and export is identity
Thanks! AFAICT, This invokes pkgeval: @nanosoldier |
Oh, I wanted to run some kind of grep at least, if it is used somewhere, but I forgot. Sorry. However, this functionality is very handy for "interpreting memory as number". I am not sure if there is more use cases. However it would be nice for any serious RSA implementation (and ElGamal at least I think, possibly more cryptographic schemes), which needs to interpret memory as a number to sign it or encrypt/decrypt it. I would like to see movement in the opposite direction and would like to see more support for this. Otherwise, some iteration based construction for this use case would be needed, unless some Julia native BigInt type is present in Base. I also think, any big number serialization/deserialization would benefit from this. However, I can implement any proposed changes or feel free to close this, if it is not desired change |
No uses outside of Base according to https://juliahub.com/ui/Search?type=symbols&q=import! |
The package evaluation job you requested has completed - possible new issues were detected. |
Generally, I lean toward avoiding new public API unless there is a very compelling case. The fact that nobody has used this internal function all this time makes me doubt that it is valuable commonly enough to warrant including in the public API. For those reasons, I prefer deleting That said, it would be nice to hear other folks' opinions on whether we should keep/publicize/remove Let's talk about it at the next triage meeting Thursday at 1:15 ET. |
Triage talked about this and considered weather we want to provide a user facing wrapper of MPZ or if we just want to keep these internal and use only what we need to implement For |
Ok, fair. It makes sense since there is still much in MPZ that would be cool to have in Julia but does not have bindings. So, lets rebase it and keep only the test and argument rename? |
It would also be good to move the definition of |
rename Base.GMP.MPZ.export! "dynamic" variable from
a
tox
, since it is more in line with comment on L141 in base/gmp.jljulia/base/gmp.jl
Lines 141 to 146 in cab11bb
add tests, that numbers and vectors can be exported and imported correctly and composed import and export is identity