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

Rewrite Trace* routines in a way that is accessible and printable inside Mathics3 #1241

Open
rocky opened this issue Dec 22, 2024 · 0 comments

Comments

@rocky
Copy link
Member

rocky commented Dec 22, 2024

Currently, the Trace* routines (TraceBuitins, TraceEvaluation, Stacktrace) use Python print() to report information.

This means that the information is hidden from some front-ends like Django and Jupyter-based front ends. It also means that the information is not accessible from inside Mathics3.

These routines should be written to return a list of information (same as WMA Trace routines work). Other builtin functions should be additional PrintXXX routines which format and print this inside Mathics3. See for example how Python's routines work for gathering exception and traceback information while there are other routines for printing that information.

There is an underlying principle that a person should be able to write profilers and debuggers in pure Mathics3 code. Of course the underlying gather of data needs to be done in Python, but all the information it gathers should be accessible in Mathics3.

@rocky rocky mentioned this issue Dec 24, 2024
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

No branches or pull requests

1 participant