https://github.com/dvorakdwarf/raceng
Breakthrough random number generation using a race condition
https://github.com/dvorakdwarf/raceng
joke library rng rust
Last synced: 4 months ago
JSON representation
Breakthrough random number generation using a race condition
- Host: GitHub
- URL: https://github.com/dvorakdwarf/raceng
- Owner: DvorakDwarf
- License: mit
- Created: 2023-04-08T04:28:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-09T17:46:35.000Z (over 2 years ago)
- Last Synced: 2025-04-11T18:04:27.579Z (6 months ago)
- Topics: joke, library, rng, rust
- Language: Rust
- Homepage:
- Size: 11.7 KB
- Stars: 35
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](https://crates.io/crates/RaceNG), which was suprisingly easy
How 2 use
-------------
1. `cargo add RaceNG`
2. `let result = RaceNG::race(x, y)`
3. PROFITSample output: \
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.