Conversation
and some other small tweaks
… possible fail in os.getlogin()
…syforxmlgraphics
…tant-method-option
…tant-method-option
|
|
Should we be able to write a test that alters |
@rocky, please look at test/test_custom_boxconstruct.py to see some very basic tests. If there are no extra thoughts, observations, or complaints, I would like to merge this during the weekend to finish implementing the pymathics-matplotlib and pymathics-asy. |
|
|
||
|
|
||
| class InstancableBuiltin(Builtin): | ||
| class InstanceableBuiltin(Builtin): |
There was a problem hiding this comment.
This name feels a bit weird to me. In a PR off of this I might have changed the name. I don't remember. Right now I can't come up with another name.
There was a problem hiding this comment.
Ok. I can't come up with another name and it problably isn't that important either.
Sorry for the delay - thanks for your patience.
Will do with pleasure, but I don't I'll have time to look at before the weekend. |
In this PR, I propose some changes in the way that the underlining MakeBoxes mechanism works. In Mathics 1.1 (and the current master branch) there are BoxConstruct classes, hard-linked to the interpreter, that defines how (the
FullFormof ) an expression is translated to a set of rules to build the output, that can be processed by the front-end.In WMA, the interpreter is designed in a way that MakeBoxes can be redefined to adapt the output to different front-ends.
With the proposed changes, the behavior of MakeBoxes in Mathics would be closer to the WMA, as described in Wolfram Reference: Textual Input and Output
This would allow for example, to overload the MakeBoxes for different classes of expressions (Graphics, Strings, etc) by the Pymathics mechanism, in a way that different front-ends build and render boxes in the most suitable way, according to the capabilities of the interface.
This will help also to make a transparent interface for the Matplotlib pymathics package.