null-a
null-a
We rely on Node's [custom inspect method](https://nodejs.org/dist/latest-v10.x/docs/api/util.html#util_custom_inspection_functions_on_objects) mechanism to pretty print distributions, but it looks like this stopped working since around Node v12. The most noticeable effect of this is...
This was [reported](https://groups.google.com/forum/#!topic/webppl-dev/pVi--qNv2VE) on the mailing list. I suspect this happens because the parser is doing something like the following: Both `var` and `let` are represented as similar "variable declaration"...
[`expectation`](https://github.com/probmods/webppl/blob/9e4d473f51d67d860284c4a9b1b9226b7af978ab/src/header.wppl#L136) assumes that its argument's support is over JS numbers. We might consider generalising this to also support tensors. (via this [mailing list thread](https://groups.google.com/forum/#!topic/webppl-dev/Q_dC6j8MeNk).)
At present: `Enumerate(function() { flip(0.5) ? -Infinity : Infinity }).support(); === [ -Infinity ]` Rather than `[ -Infinity, Infinity]`. This happens because in building the histogram `JSON.stringify(Infinity) === JSON.stringify(-Infinity) ===...
Since #905 was merged, we are storing the score of each individual choice/sample as part of the trace. (See [here](https://github.com/probmods/webppl/blob/9e4d473f51d67d860284c4a9b1b9226b7af978ab/src/trace.js#L72).) It looks like we can re-use these (rather than re-scoring)...
Making the whole thing available makes it very easy for new users to shoot themselves in the foot. We might avoid this by only exposing the bits that work. We'd...
The problem reported in #898 suggests that transforming (CPS?) large array and/or object literals is filling the stack.
Functions such as `parseInt` are useful in WebPPL but tricky to call. We could shadow these with WebPPL functions that either delegate to the JS function, or generate an error...