Closed mhtess closed 8 years ago
Andreas suggested using the node function(s) try ... finally ...
in our rwebppl binary. Whatever comes after finally will be done, even if try fails. So we will try to run webppl (via main()
) and whatever happens, it will write a file webppl-done
. We can then check for the existence of that file to know when to stop rwebppl
Currently, rwebppl waits until either stderr or stdout files exist and have content. One problem with this is that in node,
console.warn()
writes to stderr, and so a warning in WebPPL will be interpreted as an error (which causes rwebppl to stop).For example: A program that throws a
beta sample overflow
warning message to the console then kills the webppl call inside R. My hunch is that rwebppl is interpreting the warning as an error.Note: Initialization warnings are printed using
console.log()
and hence, are correctly interpreted as warnings.reports after a thousand or so iterations
which causes the webppl call to quit inside of R.