Skip to content

Add optional quantum random number generator #21

Description

@saranvdev

There are some sites with api for getting quantum random numbers, I think it'd be nice to have:
https://qrng.anu.edu.au/API/api-demo.php

They're producing random numbers by reading void fluctuations or something like this.
Anyway, these are 100% random numbers.
Some online RPG sites are already using quantum numbers.

The only problem that I can think of, this feature will need internet connection.

Activity

  1. calebj commented on Nov 9, 2018

    @calebj
    Collaborator

    We could do this by optionally depending on quantumrandom, I think.

    Implementing a subclass of random.Random based on that package isn't within the scope of python-dice, but I can PR it to quantumrandom and add an option to supply a custom Random instance. That would also allow users to roll dice using random.SystemRandom if they want.

  2. calebj commented on Nov 9, 2018

    @calebj
    Collaborator

    I've implemented a version of Random that uses quantumrandom with caching, but I'd like to add background thread fetching before posting it.

  3. calebj commented on Nov 9, 2018

    @calebj
    Collaborator

    I've posted the interface here. I'll work on the dice lib modification next.

  4. calebj commented on Nov 10, 2018

    @calebj
    Collaborator

    PR'd the quantumrandom change as lmacken/quantumrandom#22, and you can specify the random engine used by python-dice as of v2.4.0, which is live on PyPI now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions