Live data from Hacker News

NoiseLang: Where N = 5 is a Dirac delta

manualmeida.dev

41–50 of 57 posts

Re: NoiseLang: Where N = 5 is a Dirac delta

#41
post #28

Earlier quoted context omitted.

People do this kind of computation using numpy all the time. If you weren’t developing a new language with a new syntax, there really isn’t much of a library to write. At that point it’s just using numpy.

the language can do a lot of very expressive things, every language feature works in your favor too, but agree with you, i would not use my own language for anything production. like this: D ~ unif_int(1, 6); Print("P(rolled a 6 | rolled > 3) =", P(D == 6 | D > 3)); or: loss ~ unif(0, 1000); claim = if loss > 200 { loss - 200 } else { 0 }; p = P(claim > 0); Print("P(insurer pays a claim) =", p) notice that "claim" is…

Yeah sure this is how numpy people would do it:

    N = 10**6
    D = np.random.randint(1, 6, N)
    print("P(rolled a 6 | rolled > 3) =", ((D == 6) | (D > 3)).mean())

    loss = np.random.uniform(0, 1000, N)
    claim = np.where(loss > 200, loss - 200, 0)
    p = (claim > 0).mean()
    print("P(insurer pays a claim) =", p)
It’s concise enough that people generally wouldn’t bother writing a library. Unless they really want their custom syntax, then perhaps they write a parser.

Re: NoiseLang: Where N = 5 is a Dirac delta

#42
I didn’t really see loops being handled here. As far as I understand, the biggest technical difficulty with this kind of probabilistic programming language is handling loops, including infinite loops and almost surely terminating loops.

I did a bit of research earlier in my life[0] to study the handling of loops and without using Monte Carlo simulation. The result was actually workable if incredibly resource intensive to the point of being impractical. If I had chosen to do it again, I might’ve accepted using Monte Carlo simulations while still supporting loops.

[0]: https://github.com/kccqzy/probabilistic-program-inference/bl... Shameless self promotion I know! I put quite a bit of effort into that README and the code.

Re: NoiseLang: Where N = 5 is a Dirac delta

#43

Earlier quoted context omitted.

Claude Max Plan honestly is kind of endless, I have a old game written in MRC Objectice-C that i am porting to something more modern, and still within the limits of the flat subscription... not sure for how long this will last

so 200$

yes! amortized among many other thing though

Re: NoiseLang: Where N = 5 is a Dirac delta

#44

Does it still count as a Dirac delta when it’s a discrete distribution? (The distributions in TFA are not continuous - they are things like a roll of 1d6 etc)

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.

Re: NoiseLang: Where N = 5 is a Dirac delta

#45
post #23

Interestingly, shading languages started out like this - way before consumer GPUs. I remember encountering this idea written in a book written by Ed Catmull of Pixar fame (can't find the title sorry, but it was written in the 80s), but generally comes from signal processing as a way of avoiding aliasing artifacts.. The core idea is to make programming, which is a discrete and discontinuous domain, into a well-behaved…

note that similar concepts appear in mathematics. Generally the term for it is a "mollified" function. applied to the step function, you would get a smooth cutoff function https://en.wikipedia.org/wiki/Mollifier#Smooth_cutoff_functi... this is also related somewhat to the notion of differentiable programming. RELU is (roughly) the same as x * step(x). In differentiable programming one can replace it with smooth appro…

Secret data flow should be directly controlled by programming language features. It's ugly that people are resorting to wrestling the compiler using such distant means as purity, applied in roundabout way.

Re: NoiseLang: Where N = 5 is a Dirac delta

#46
post #35

Earlier quoted context omitted.

I know haha I wanted to be transparent about this, I have been coding since 9 years old, 32 years old now. I have nothing to prove other than it would have been impossible for me find time to complete this project without help, also a Toy language. Not trying to replace anything people use today :) it's a cute project

Yeah. :) Since the advent of AI I have been delighted by the number of old project ideas I've been able to execute. There are just too many ideas to implement them all by yourself - but AIs don't seem to mind in the least. It's a brave new world.

the feeling of accomplishment is lower though

Re: NoiseLang: Where N = 5 is a Dirac delta

#47
post #35

Earlier quoted context omitted.

Yeah. :) Since the advent of AI I have been delighted by the number of old project ideas I've been able to execute. There are just too many ideas to implement them all by yourself - but AIs don't seem to mind in the least. It's a brave new world.

the feeling of accomplishment is lower though

Is it? I've always felt that the idea is worth more than the implementation. Implementation is tedious and not really genius.

Regardless, I'm just happy to have these things at my disposal now. I don't need to be the one writing the code.

I don't need to make the wings to enjoy flying.

Re: NoiseLang: Where N = 5 is a Dirac delta

#48

I started this about 9 years ago and never finished it. The idea comes from a course in my telecom degree called "Señales Aleatorias y Ruido" (Random Signals and Noise), I spent so many evenings writing probability by hand, and every time I wanted to check a result with a computer it was a ton of boilerplate. The engine is Rust, the JIT is built on Cranelift, there is also a WASM backend so everything runs in the bro…

[dead]

Re: NoiseLang: Where N = 5 is a Dirac delta

#49

I started this about 9 years ago and never finished it. The idea comes from a course in my telecom degree called "Señales Aleatorias y Ruido" (Random Signals and Noise), I spent so many evenings writing probability by hand, and every time I wanted to check a result with a computer it was a ton of boilerplate. The engine is Rust, the JIT is built on Cranelift, there is also a WASM backend so everything runs in the bro…

30 years ago when i worked as a quant, i always wanted something like this. i love it.

Re: NoiseLang: Where N = 5 is a Dirac delta

#50

I started this about 9 years ago and never finished it. The idea comes from a course in my telecom degree called "Señales Aleatorias y Ruido" (Random Signals and Noise), I spent so many evenings writing probability by hand, and every time I wanted to check a result with a computer it was a ton of boilerplate. The engine is Rust, the JIT is built on Cranelift, there is also a WASM backend so everything runs in the bro…

Beautiful
Post reply on HN