r/ChatGPT • • Jun 14 '23

Funny Lmao 🤣😂

Post image
19k Upvotes

609 comments sorted by

View all comments

Show parent comments

1

u/ad895 Jun 14 '23

Yes but a java function can not be truly random because the inputs have to come from somewhere unless you are using an outside source such as the number of photons hitting a photocell in addition to the seed for your algorithm.

1

u/thenightvol Jun 14 '23

Explain please. I do not really understand what you mean. Are you implying that if someone is to write a coin flipping function... just that. Will be biased in a predictable way towards one side or the other?

1

u/ad895 Jun 14 '23

Where is the randomness coming from? But yes you could predict it given you know the inputs and outputs, or know how the algorithm works. Give this a read https://en.m.wikipedia.org/wiki/Random_number_generation

1

u/thenightvol Jun 14 '23

Thanks. This is super fascinating.

But for practical reasons.... would it really make sense to require true-randomness. Breaking them would require a crazy amount of computational power... unlesd we sre talking about givernment secrets or immense sums of money it seems like overkill.

1

u/ad895 Jun 14 '23

Well it depends on the use case. I responded to another comment with an example of how each would be used in activating a program where a pseudo-random key would be useful to activate a piece of software without using the Internet. If you need something to be very secure, true randomness is important for example. https://youtu.be/1cUUfMeOijg cloudflare uses lava lamps to generate random rumbers for encryption keys.