Alternatively, is there a way to force a re-evaluation of a single watch expression?
Say I have the following watch expression:
> Random.splitmix 123 '(Random.natIn 0 100)
When I run this, I might see a result like:
Now evaluating any watch expressions (lines starting with `>`)... Ctrl+C cancels.
5 | > Random.splitmix 123 '(Random.natIn 0 100)
⧩
56
Saving the file again will show the same result every time (it is cached).
I'm not sure if Random results should never be cached (maybe that's still good default behavior to save on computation time), but just wondering what the best workarounds are for this.
debug.clear-cache doesn't work either in this situation, since each time the RNG (Random.splitmix) starts over with the same seed.
Of course, we can manually change the random seed, but this also may not always be desired behavior (and a minor nitpick would be that it involves unnecessary keystrokes and creates additional caching - one cached result per seed, so you have to recall which seeds you already used).