Skip to content

Breakthrough random number generation using a race condition

License

Notifications You must be signed in to change notification settings

DvorakDwarf/RaceNG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RaceNG

Revolutionary, innovative, groundbreaking random number generator using race conditions written in Rust. I wrote this in like an hour because I thought it would be funny (it was). I should not need to tell you this is not a reliable source of RNG you should depend on. If you do end up using it for smthn, please DM me on discord, I want to know.

I even published to crates.io, which was suprisingly easy

How 2 use

  1. cargo add RaceNG
  2. let result = RaceNG::race(x, y)
  3. PROFIT

Sample output:
image

Explanation 4 nerds

A race condition occurs when 2 or more threads are trying to use the same variable.

Both threads try to set the variable to a certain value, but due to computer jank, they go about it at different speeds. This means that the value of the shared variable is undefined at a given time. If you print the variable it is basically random.

About

Breakthrough random number generation using a race condition

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages