-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
base: master
Are you sure you want to change the base?
Conversation
a9e4f29
to
c5fe121
Compare
35a69ec
to
90bc0eb
Compare
mathics/builtin/trace.py
Outdated
>> TraceEvaluation[(x + x)^2] | ||
The 'ShowTimeBySteps' option prints the elapsed time before an evaluation occurs. | ||
|
||
>> TraceEvaluation[(x + 1)^2] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This also allows the external debugger to do a much better job of this
3cb714a
to
68b0109
Compare
This also allows the external debugger to do a much better job of this. See this discussion for an example of using.