Skip to content

Changes for imathics kernel#480

Merged
sn6uv merged 8 commits intomasterfrom
unknown repository
Aug 22, 2016
Merged

Changes for imathics kernel#480
sn6uv merged 8 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Aug 12, 2016

I strongly suggest we merge the changes necessary to run Mathics as an imathics kernel into master. The current imathics branch is outdated and it's a pain to keep it updated. This is a proposal to add all necessary changes to master.

I've tested this with the experimental version in mathics/IMathics#11 under Jupyter 5.

@sn6uv
Copy link
Member

sn6uv commented Aug 12, 2016

Great idea

@ghost ghost force-pushed the imathics-new branch from 777a27a to 0cab7ea Compare August 15, 2016 11:50
@ghost ghost mentioned this pull request Aug 16, 2016
This was referenced Aug 17, 2016
@ghost
Copy link
Author

ghost commented Aug 18, 2016

Done.

Basically two changes:

(1) the callbacks in Evaluation are now gathered in a single class Output
(2) all image outputs (i.e. svgs, imgs) now output mglyphs

(2) has the advantage of working with Jupyter without additional JavaScript transformations. On the other hand, in order to not break any behaviours in the classic Mathics web frontend, I added JS code to convert mglyph to svg or img, so that there's really no change for the frontend JS logic.

I'm not sure about the max_allowed_packet size, which was changed in the imathics branch. Is it something that should always be unlimited for Jupyter kernels?

@sn6uv
Copy link
Member

sn6uv commented Aug 18, 2016

I was running into trouble with the max_allowed_packet_size when working with large images. I don't remember exactly what it was sorry.

@sn6uv
Copy link
Member

sn6uv commented Aug 18, 2016

This is breaking plots on Firefox for me:
2016-08-19-084948_2560x1440_scrot

Firefox left and Chromium right

@ghost
Copy link
Author

ghost commented Aug 21, 2016

I cannot reproduce this using Firefox 48.0.1 under OS X; I added a svg.setAttribute('data-info', 'generated through convertMathGlyphs()'); in web/media/js/mathics.js:convertMathGlyphs() to make sure I really tested the code, but it ends up in my Firefox (see attached image) and it works. Which OS/Firefox versions are you using? Any extensions? JavaScript is enabled?
firefox

@sn6uv
Copy link
Member

sn6uv commented Aug 22, 2016

Cleared my cache and it seems to be fixed now. Not sure what the problem was, half of the SVG wasn't present in the HTML document.

@sn6uv sn6uv merged commit faf14d7 into mathics:master Aug 22, 2016
@ghost
Copy link
Author

ghost commented Aug 23, 2016

Maybe the new JavaScript didn't get loaded properly.

@ghost ghost mentioned this pull request Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments