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

Redo TraceEvaluation using a decorator... #1169

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rocky
Copy link
Member

@rocky rocky commented Nov 17, 2024

This also allows the external debugger to do a much better job of this. See this discussion for an example of using.

@rocky rocky force-pushed the redo-TraceEvaluation-with-hooks branch from a9e4f29 to c5fe121 Compare November 17, 2024 01:32
@rocky rocky marked this pull request as draft November 17, 2024 01:34
@rocky rocky requested a review from mmatera November 17, 2024 01:40
@rocky rocky force-pushed the redo-TraceEvaluation-with-hooks branch 2 times, most recently from 35a69ec to 90bc0eb Compare November 17, 2024 16:20
>> TraceEvaluation[(x + x)^2]
The 'ShowTimeBySteps' option prints the elapsed time before an evaluation occurs.

>> TraceEvaluation[(x + 1)^2]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this gives less verbose trace output since we don't have to look up x again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, using x + x is nicer in that it shows symbolic interpretation. So the example has been reinstated. Still I feel that TraceEvaluation is not as informative as it could be and it is showing useless information.

I mention some of this in https://github.com/Mathics3/mathics3-debugger/tree/TraceEvaluation-event-hooks?tab=readme-ov-file#improved-traceevaluation and at some point possibly the additional code that appears there may wind its way back to core. But I think that should happen only after we use this a bit and things and the desired behavior feels right.

@rocky rocky force-pushed the redo-TraceEvaluation-with-hooks branch from 3cb714a to 68b0109 Compare November 18, 2024 23:30
@rocky rocky marked this pull request as ready for review November 21, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant