Skip to content

Conversation

@minad
Copy link
Contributor

@minad minad commented Aug 1, 2014

IRuby.display(...) ouputs directly. Mime type javascript is evaluated. You don't need to return a html object.

minad added 2 commits August 1, 2014 05:47
requires IRuby master for now
- This allows automatic plotting by just returning the Plot/Frame object
- Plot#show and Frame#show calls IRuby#display
@domitry
Copy link
Owner

domitry commented Aug 1, 2014

Hello. This looks great ! But is IRuby.javascript included in the version registered to RubyGems.org? That is a little concern for me because many people may install IRuby using gem install.

@minad
Copy link
Contributor Author

minad commented Aug 1, 2014

It will be released before you release nyaplot. People who install nyaplot from git can also install iruby from git.

If you want I can release sooner. However iruby master contains some code concerning IRuby.display which needs more testing before I release.

@domitry
Copy link
Owner

domitry commented Aug 1, 2014

People who install nyaplot from git can also install iruby from git.

Yes, that maybe true :)

GSoC term will be over on August 18th, and we will release nyaplot in a few weeks after that.
What do you think @pjotrp?

@minad
Copy link
Contributor Author

minad commented Aug 1, 2014

Just pull it. Trust me, I will release new IRuby soon enough :-)

@minad
Copy link
Contributor Author

minad commented Aug 1, 2014

I will release probably in a few hours...

@minad
Copy link
Contributor Author

minad commented Aug 1, 2014

released just now. please try it

@domitry
Copy link
Owner

domitry commented Aug 2, 2014

Hi, thank you for releasing soon! I tried this on my local environment, but I found one problem.

When I generated plots on the notebook it works good, but once I re-open notebook (closed the tab on my browser and re-opened it), those plots were not displayed unless re-executing ruby code.

So I think that we should embed the code for initializing to the notebook as the return value of init_iruby, but what do you think about it?

@minad
Copy link
Contributor Author

minad commented Aug 2, 2014

Yes, I confirmed the problem. I implemented a workaround: https://github.com/minad/iruby/commit/48357f470acf885e9e562e7200728db25578baf4

This pull request can stay as is.

@minad
Copy link
Contributor Author

minad commented Aug 2, 2014

For explanation:

Return values and outputs via puts/IRuby.display are treated equally. It is completly unnecessary to rely on return values.

The issue is a different one: The different treatment of application/javascript and text/html which is imho a stupid ipython behaviour. Therefore I created an issue there to see what the IPython devs have to say about it.

@domitry
Copy link
Owner

domitry commented Aug 9, 2014

Hello. I apologize for my delayed response.

I saw your discussion about this problem (ipython/ipython#6259) And I understood that the issue is caused by security feature of IPython and will be fixed by the next release of IPython3.

Your pull-req looks great and I would like to merge it sooner, but I think I should not merge it until this problem is solved.

I have not tried the patch you wrote before (https://github.com/minad/iruby/commit/48357f470acf885e9e562e7200728db25578baf4) but does it solve the issue completely?

Thank you.

@minad
Copy link
Contributor Author

minad commented Aug 11, 2014

Yes, the issue is solved. How can you judge when you don't try the patch? I also need your opinion on the IRuby patch and the feedback.

But at the same time you should not care about the responsibilities of IRuby. Just use the IRuby apis and IRuby will take care about things like #6259

@domitry
Copy link
Owner

domitry commented Aug 11, 2014

OK, I'll try the patch tomorrow and report it ;)

Yes, I'd like to contribute IRuby in some ways because Nyaplot is totally designed to work with it.

BTW one of users of nyaplot tried to install it to Mac OS X and sent a patch about IRuby installation to this repository. Is this sort of information profitable for IRuby itself?
https://github.com/domitry/nyaplot#mac-os-x

@minad
Copy link
Contributor Author

minad commented Aug 19, 2014

@domitry Any news?

@domitry
Copy link
Owner

domitry commented Aug 19, 2014

OK, it seems that this fix is completely working good. Could you apply this patch to the version registered to RubyGems.org?

@minad
Copy link
Contributor Author

minad commented Aug 19, 2014

v0.1.13

@domitry
Copy link
Owner

domitry commented Aug 19, 2014

Thanks! I'm checking it.

@domitry domitry merged commit 2c16e61 into domitry:master Aug 19, 2014
domitry added a commit that referenced this pull request Aug 19, 2014
@domitry
Copy link
Owner

domitry commented Aug 19, 2014

This pull-req was successfully merged. Thanks a lot for sending it and sorry for my delayed response.

I hope that nyaplot and IRuby will spread together!

@minad
Copy link
Contributor Author

minad commented Aug 19, 2014

Thank you 👍

Don't forget to update the docs

@domitry
Copy link
Owner

domitry commented Aug 19, 2014

done :)

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

Successfully merging this pull request may close these issues.

2 participants