How many programming languages are you able to write a random number generator in?

How many programming languages are you able to write a random number generator in?

Attached: F5I3OT8FIHVKBQT.MEDIUM.jpg (494x489, 83K)

how do i write a random number generator

print('23')

Only works once sorry

You can't generate random numbers with a program.

Do some math or some shit with the current system time. It's only pseudorandom as you use a seed, so far we have nothing truly "random"

Multiply your local whether degree by the wind direction by the current number of planes flying on radar, but the current location of the spacestation by a randomly generated number from the internet

Absolutely don't do this if you're using random numbers for security/cryptography

How many programming languages which were generated from a random programming language generator are you able to write a random programming language generator in?

this, even just a simple weather monitoring setup located on your roof can reliably provide truly random numbers

Just use atmospheric noise like everyone else

What's the alternative

>cant produce his own entropy
fucking brainlet

>entropy
What is that? In layman's terms

your mom

Wrong, because then it's theoretically possible to predict the numbers.

You don't technically create a random number. You create a seed based on the current system time in milliseconds and from that seed you generate a so-called "Random Number". The number isn't technically random but it is pretty good nonetheless.

You can stop a XTAL with a push button. Assuming you measure the random number beginning at a timescale less than 10 milliseconds (i.e. quicker than the brain can make you physically do something), you can treat that as a source of entropy.

any language that i can copy code from stackoverflow

and what can you write yourself?

any language that i can quickly google syntax and necessary libraries

In other words, stuff you're too unintelligent to write yourself without help.

1. Generate a small "truly" random number, using available environmental noise/entropy.
2. Use that small number as input to a CSPRNG (cryptographically secure pseudorandom number generator)
3. Have the CSPRNG generate additional random values.

Step 3 is much, much faster than Step 1.

If you're doing this on Linux, reading from /dev/urandom will handle every for you.

>climb on ur roof
>hold a lighter to ur sensor
>randint() == 0xFFFFFFFF
Hmm

>without help
I said syntax and libraries. How exactly am I supposed to write something in a language I've never used? Trial and error? You could do that, but it would be stupid and inefficient.
If you know how a random number generator works, the only thing stopping you from writing it in any language is your knowledge of that particular language. Computer science is not tied to any one language.
Honestly, if isn't your answer, you can't call yourself a programmer.

out of curiousity, what does /dev/urandom use for environmental noise/entropy? does it not work if your computer has no sensing peripherals?

how wrong can a post be? click this link and find out!

not with local weather monitoring if no one knows where the server is
just don't do what the other retard suggested (using publicly available data)

>if

pseud: the post

You don't use the entropy directly silly goose

There is none
The universe is entirely deterministic and all these pseudorandom basedboys are just chickens without theirs heads

dd if=/dev/random of=/mnt/random.txt

just host the server from a raspberry pi inserted in your anus and mount the weather-monitoring apparatus as a cock-ring on your penis
then book a flight and get lost in India
that way no one with any technological knowledge will know where the server is

>unironically being a materialist
lmoa @ ur gayboy life

Assuming long is 64 bits and initialized to something other than 0.
long seed[2];
long rand() {
long a = seed[0];
long b = seed[1];
long r = a + b;
b ^= a;
seed[0] = (a > 40) ^ b ^ (b 27);
return r;
}

>If you know how a random number generator works, the only thing stopping you from writing it in any language is your knowledge of that particular language
Refer to the question in the OP.

even funnier than 24
based

>1*(current year+1)-1
>not live streaming a wall of lava lamps for your PRNG seed

Attached: 1489128479008.jpg (480x318, 24K)

I bet none of you can write a good one in oberon.

>I don't know the difference between random and pseudorandom

You can only write pseudo random. There is usually an uniform generator in languages, you can either convert that to another exotic distribution, you can chain different methods using one pseudo random number as a seed eh other method and using conditionals depending on the value of the generated number or create your own generator based on different ones. Lastly, as suggested, measure shit and use that as an input.

It is really limited on how much you know the language, as other anons pointed out, but also by how much you know how to generate pseudo random numbers.

I think you were thinking of /dev/random? and not urandom

kbm input for example (or atleast opening it up and mashing the keyboard makes it generate stuff)

No but using meta stability in gates are very close. I know that Intel has used this

What about cosmic background radiation?

>intel
>random
hahahahaha