moodymudskipper / nakedpipe

Pipe Into a Sequence of Calls Without Repeating the Pipe Symbol.
69 stars 7 forks source link

Backup pipe? Recover pipe? #16

Closed moodymudskipper closed 4 years ago

moodymudskipper commented 4 years ago

A backup pipe would save every step in a global variable .npbkp which would be a list of intermediate outputs and all the info on stack and error if an error happens.

A recover pipe would be a bit like options(error = "recover") but would open the pipe debugger at the critical step. Not sure exactly how it would work.

No strong opinion as to how to name them. Maybe %bkp.% and %rcvr.%, or %S.% and %R.%

Not sure about the need yet, any peeker has ideas or opinions I ll listen!

moodymudskipper commented 4 years ago

Backup is good when your pipe steps are one off analysis with steps that take a bit of time, only the last call is backed up, so it doesn't matter if the call is buried in a nested function call.

There might be a good case for having a global option to backup all calls, following the assumption that general packages shouldn't use pipes other than %.% (maybe not reasonable) OR making sure only calls not located in pkged functions are relevant.

Recover pipe offers a great opportunity to browse at a level that makes sense, (and from there we can debug deeper if desired). It could also be applied on all pipes using a global option.

Now I wonder if new pipes are a good idea, maybe these options are enough?

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.