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

fix(random): use unifrom distribution to generate random number with modulo, shuffle arrays and extract subtable #1001

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matteo-cristino
Copy link
Collaborator

@matteo-cristino matteo-cristino commented Jan 10, 2025

unifrom distribution is obtained by using rejection sampling and reservoir sampling

Moreover deprecate statements:

  • create random object of '' bits
  • create random object of '' bytes
  • create array of '' random objects
  • create array of '' random objects of '' bits
  • create array of '' random objects of '' bytes
  • pick random object in ''
  • create random dictionary with '' random objects from ''

in favour of, respectively:

  • create random of '' bits
  • create random of '' bytes
  • create array of '' random
  • create array of '' random of '' bits
  • create array of '' random of '' bytes
  • create random pick from ''
  • create random table with '' random pick from ''

…modulo, shuffle arrays and extract subtable

unifrom distribution is obtained by using rejection sampling and reservoir sampling

Moreover deprecate statements:
* create random object of '' bits
* create random object of '' bytes
* create array of '' random objects
* create array of '' random objects of '' bits
* create array of '' random objects of '' bytes
* pick random object in ''
* create random dictionary with '' random objects from ''
in favour of, respectively:
* create random of '' bits
* create random of '' bytes
* create array of '' random
* create array of '' random of '' bits
* create array of '' random of '' bytes
* create random pick from ''
* create random table with '' random pick from ''
@matteo-cristino matteo-cristino marked this pull request as draft January 10, 2025 18:48
@matteo-cristino matteo-cristino linked an issue Jan 10, 2025 that may be closed by this pull request
@jaromil
Copy link
Member

jaromil commented Jan 12, 2025

right on! some notes:

  1. the term table is very ambiguous in last sentence
  2. the 'of' particle is ambiguous while loaded with meaning (quantity). i think we should use 'long' for array and 'size' for octet size
  3. considering 2. then the 'of' genitive particle could be tolerated and ignored by the parser (free to use)

@matteo-cristino
Copy link
Collaborator Author

  1. Since last statement can create both array and dictionsries based on what it has in input I was not able to found a better term to reflect that 🤔
  2. If I understood it coorectly would be like
When I create random '' bytes size
When I create array '' random long '' bits size

to me this format does not seems very correct grammatically speaking

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

Successfully merging this pull request may close these issues.

Random statements formats
2 participants