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

Changes for imathics kernel #480

Merged
merged 8 commits into from
Aug 22, 2016
Merged

Changes for imathics kernel #480

merged 8 commits into from
Aug 22, 2016

Conversation

poke1024
Copy link
Contributor

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

@poke1024 poke1024 mentioned this pull request Aug 16, 2016
This was referenced Aug 17, 2016
@poke1024
Copy link
Contributor Author

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

@poke1024
Copy link
Contributor Author

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
@poke1024
Copy link
Contributor Author

Maybe the new JavaScript didn't get loaded properly.

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