JuliaRandom / RandomNumbers.jl

Random Number Generators for the Julia Language.
https://juliarandom.github.io/RandomNumbers.jl/stable
Other
97 stars 23 forks source link

Move Random123 to a separate package? #53

Closed ChrisRackauckas closed 5 years ago

ChrisRackauckas commented 5 years ago

This library seems to be pure Julia except for Random123. I would like to see it end up as pure Julia because that makes it much easier to install and transfer in some ways. Then on the page for them you can just say that using Random123 needs to be done. I don't think that would hurt because they don't seem to perform that well, so adding the binary dependency for what is not likely to be used is likely not a good decision now that this is past research and in use.

sunoru commented 5 years ago

I don't think the binary dependency would hurt either. Actually only the two RNGs depending on the AES-NI intrinsics need that dependency but not the others in Random123, and if the cpp files cannot be compiled, it's still OK to use the rest of this package without error. Making Random123 unique is weird..

ChrisRackauckas commented 5 years ago

It can be difficult to install in settings without internet access because binaries are architecture-specific. You can't just copy-paste them everywhere like Julia code. For this reason, we are looking to make DifferentialEquations.jl binary-free by next year, and there's two binaries left: Sundials.jl and RandomNumbers.jl. Sundials.jl is necessary until we make the BDF methods. RandomNumbers.jl's binaries do not seem necessary since we just use the Xoroshiro128Star default. I was hoping that there was a simple solution to a binary-free RandomNumbers.jl that doesn't involve accepting errors at build time.

What we can do is pull the Xoroshiro128 code out to a separate repo on our own, and maintain it to keep up to date with RandomNumbers.jl. That would be fine with me, but I just wanted to know if this is the right course of action.

sunoru commented 5 years ago

OK. Actually, I just realized the binary dependency can be rewritten in pure Julia by directly using the intrinsics via llvmcall. I'll have a try. If it is not convenient and stable then I'll create a separate package.

sunoru commented 5 years ago

Ah, forget it. There are still many functions are depending on the platform or environment. I'll just make another package.

sunoru commented 5 years ago

Random123.jl is now registered, and RandomNumbers.jl does not have any binary dependencies from v1.1.0. https://github.com/JuliaLang/METADATA.jl/pull/21439