Skip to content

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

Open
@rocky

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions