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

Rename flip by bernoulli #779

Open
ngeiswei opened this issue Oct 9, 2024 · 2 comments
Open

Rename flip by bernoulli #779

ngeiswei opened this issue Oct 9, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ngeiswei
Copy link
Contributor

ngeiswei commented Oct 9, 2024

I suggest to rename flip in the standard library by bernoulli.

I understand that flip is the name used in Church, however in Haskell flip is a combinator, see https://hackage.haskell.org/package/base-4.20.0.1/docs/Prelude.html#v:flip. Thus Haskell uses bernoulli, see https://hackage.haskell.org/package/mwc-random-0.15.1.0/docs/System-Random-MWC-Distributions.html#v:bernoulli, which I think is a great name for the job.

@ngeiswei ngeiswei added the enhancement New feature or request label Oct 9, 2024
@ngeiswei
Copy link
Contributor Author

ngeiswei commented Oct 9, 2024

Also, I think that function would be more useful if it takes a bias as parameter, as in Church and Haskell.

@Necr0x0Der
Copy link
Collaborator

This function was introduced mostly for testing automatic conversion of grounded atoms between Rust and Python. Apparently, we need to have a separate library for random functions, and I'd say that this library should provide not just random functions, but samplers supporting different sampling strategies. Thus, this implementation is temporary in any case. You can go ahead and rename it if you prefer, but please check if there are still tests with its use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants