upvote
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.

reply
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

reply
Some people would call it a Kronecker delta instead, but imo they are exactly the same concept. The Kronecker delta is the indicator for a single value, like 1_{x=0}, while the Dirac delta is the indicator for a single 'dx' partition, divided by the width of the partition: δ(x) = 1_{0 in (x, x+dx)}/|dx| which is why integrating it ∫ δ(x) dx = ∫ 1_{0 in (x, x+dx)}/|dx| = ±1 (depending on the orientation of the integral). The Kronecker can sorta be viewed as the same thing but with dx=1, although that is kinda silly because usually you would intentionally evaluate it on a discrete measure anyway.
reply
deleted
reply