-
Notifications
You must be signed in to change notification settings - Fork 27
automatically call init_iruby #8
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
Conversation
requires IRuby master for now
- This allows automatic plotting by just returning the Plot/Frame object - Plot#show and Frame#show calls IRuby#display
|
Hello. This looks great ! But is |
|
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. |
Yes, that maybe true :) GSoC term will be over on August 18th, and we will release nyaplot in a few weeks after that. |
|
Just pull it. Trust me, I will release new IRuby soon enough :-) |
|
I will release probably in a few hours... |
|
released just now. please try it |
|
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 |
|
Yes, I confirmed the problem. I implemented a workaround: https://github.com/minad/iruby/commit/48357f470acf885e9e562e7200728db25578baf4 This pull request can stay as is. |
|
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. |
|
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. |
|
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 |
|
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? |
|
@domitry Any news? |
|
OK, it seems that this fix is completely working good. Could you apply this patch to the version registered to RubyGems.org? |
|
v0.1.13 |
|
Thanks! I'm checking it. |
|
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! |
|
Thank you 👍 Don't forget to update the docs |
|
done :) |
IRuby.display(...) ouputs directly. Mime type javascript is evaluated. You don't need to return a html object.