Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hoist workflows into ggtrace_ functions #67

Closed
yjunechoe opened this issue Feb 1, 2022 · 1 comment
Closed

hoist workflows into ggtrace_ functions #67

yjunechoe opened this issue Feb 1, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@yjunechoe
Copy link
Owner

yjunechoe commented Feb 1, 2022

Part of experimenting with turning some ggtrace functionality into a 1-off function that takes plot as arg

ggtrace_inspect
ggtrace_capture
ggtrace_modify

sometimes returns evaluated expr, sometimes returns the gtable, etc. Depends on if things are done for expr itself or its side effect

@yjunechoe yjunechoe added enhancement New feature or request questioning labels Feb 1, 2022
@yjunechoe yjunechoe added this to the v0.5 milestone Feb 3, 2022
@yjunechoe
Copy link
Owner Author

yjunechoe commented Feb 3, 2022

Could themselves be a family of functions:

  • ggtrace_inspect_n() to return how many times the method was called (just return ._counter_)
  • ggtrace_inspect_which() to return idx where the method was called (i.e., return counter when cond is met)
  • ggtrace_inspect_vars() to safely return values of objects from execution env at different steps
  • ggtrace_inspect_return() for inspecting return value of execution env
  • ggtrace_capture_fn() for capturing method at execution as a pre-filled function
  • ggtrace_capture_env() for capturing method's execution environment
  • ggtrace_capture_frames() for capturing the call/frame stack from the execution env (nope let's keep frame stack stuff under the hood - advanced users can hack this on their own)
  • ggtrace_highjack_args() for modifying arguments passed to a method
  • ggtrace_highajck_binding/s()? for modifying variables in the execution env at different steps, given a named list of exprs (too complicated without making tracer a closure - encourage usage of with_ggtrace)
  • ggtrace_highjack_fn() to replace method body with a supplied function that's called with the arguments instead (nope lets just encourage making new ggprotos instead)
  • ggtrace_highjack_return() for modifying return value of execution env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant