design icon indicating copy to clipboard operation
design copied to clipboard

Avoiding temporal dependence

Open hadley opened this issue 5 years ago • 4 comments

(notes extracted out of spooky action)

I think this is where poor process leaks into artefacts. By constantly running different scripts or chunks in a long-running shared R process, you create wormholes that are not explicit any where in the code.

when running several scripts or knitting several Rmds, each should get its own fresh process they should not be communicating with each other in the global workspace they should not commuunicating at all or it should be in some very obvious way, probably through the file system and perhaps a choreographing tool like make or drake And so working in projects, restarting often, etc. are a method of constantly checking for these unplanned communication channels and eradicating them.

hadley avatar Feb 26 '19 14:02 hadley

As an outside consumer of this work, it would be particularly interesting to read about functions or features you recommend using to support these practices. I would have liked to use .rs.api.restartSession() as an example of the kind of feature I mean, but this function does not (yet) support a "clean" restart in the way I think you mean it.

ppanko avatar Mar 05 '19 22:03 ppanko

I don't think you can program your way out of this — it's a higher level workflow. But I can't yet articulate exactly what I mean by that or why it's true 😄

hadley avatar Mar 05 '19 23:03 hadley

  • https://www.youtube.com/watch?v=aqAUmgE3WyM
  • "breaking the fourth wall"

hadley avatar Mar 06 '19 18:03 hadley

Long-running SO thread of people wanting to be able to do this: Quit and restart a clean R session from within R?

jennybc avatar Mar 06 '19 19:03 jennybc