> Is there a guide for a casual user to provide you with the code so that triangle could be a new component of the library ?
I
don't think such a guide exists. (And sadly I don't have the spare
capacity to write such a thing at the moment.) There are a few pointers
here [1], but I suspect they won't help much without already knowing
something about WebPPL internals. I might be able to help you work on a
pull request to add this if you're interested, but be aware that fully
implementing a new distribution is perhaps a little more involved than
one might expect. For example, we have to at least think about if/how
variational inference should be performed for the new distribution.
Perhaps take a look at [2], in which a contributor added the student's t
distribution, for a sense of this.
And don't forget, you might
not necessarily have to add triangular as a primitive, you might be able
to define it in WebPPL itself by building on the uniform distribution.
(Similar to the inverse Gamma example we chatted about recently.)
[1]
https://github.com/probmods/webppl/issues/910#issuecomment-426926853[2]
https://github.com/probmods/webppl/issues/929