Comment

Comment by manucorporat

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 also a random variable! result of a if expression

parent manucorporat 3 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton