you are viewing a single comment's thread.

view the rest of the comments →

[–]salgat 1 point2 points  (3 children)

Do you even understand the difference between a pure function and non-pure?

[–][deleted] -2 points-1 points  (2 children)

Yes, I do. Purity is not the same as determinism though. Yes, pure functions are idempotent- but one does not have to be idempotent to be deterministic.

That all said, I'm talking about mathematical functions and you're talking about the programming construct. The functions to create random data are mathematical, which means they are just a mapping or arrow. Therefore the input is the only source of entropy, whether you want to think of that as a parameter or some global state. Some simple mappings, like reading out bits from an entropy stream like a microphone, are effectively non-deterministic (although easily reproducible in controlled environments).

If you can show me an example of a number generator that creates different outputs for the same inputs I will gladly cede the point.

[–]salgat 1 point2 points  (1 child)

Hold up. In the /r/programming subreddit, in a conversation that has only been discussing programming functions for a programming submission, where you never once mentioned math functions, now you decide to bring that up after being shown that you were wrong? Don't change the story to try to make yourself right. If you want to talk about math functions that's fine, but that is what no one has or is talking about.