Comment by manucorporat

3 hours ago

Yes, a Dirac delta is just "all the weight on one point", and that works fine on a die.

For the scope of the language it never even comes up, because Noise is a simulator, it does not evaluate densities, it draws samples.

The point is that every value goes through the same operators. Add them, compare them, pass them to a function, put one in the condition of an if. You can even use a random variable to define another random variable:

bias ~ unif(0, 1) flips ~[10] bernoulli(bias) // bernoulli just took a distribution where a number normally goes.

and in if-stataments:

DistributionC = if DistributionA < DistributionB { 0 } else { 1 }

But you right, dirac only applies to continuous functions, in Noise is only refers to the dirac measure. I found this article a fun/nerd to make my point that everything "acts" as a distribution from the DX perspective, but under the hood 5 is just 5.

And a constant collapses back to a plain integer in the graph anyway, so 5 costs nothing.

I like the “everything is a distribution” approach a lot[1]. Looks great. I’m looking forward to actually having a chance to mess around with it.

[1] And feels philosophically like the unification in the underlying maths between discrete and continuous probability that you get when you apply measure theory