On 4/10/14, 18:49, Jason Suagee wrote:
Sorry to take so long to post back. I have been going to conferences and
haven't had much time to work on anything the past 2 weeks.
Jason Grout recommended that we use the widget/comm idea from ipython to
facilitate the communication between the front end and backend of the
knot editor. He said that what was done in the past for the graph editor
was a kludge (for non-native english speakers this is an expression for
something which is kind of hacked together). I don't know if this is the
direction that you would want to go? I could replicate the kludge idea
or try this new method using the ipython notebook interface (or maybe
the qtconsole, which I have not tried yet).
I have experimented some with the ipython notebook interface for sage
(sage -ipython notebook). I can load some javascript into an output
frame and get it to be evaluated, although I cannot as yet figure out
how to sync what is going on in the output frame with the python
backend. (That would be where the widget idea comes in I suppose.)
Yes, that's correct.
I have a question: My version of sage uses ipython 0.13, whereas ipython
is now up to version 2.0, I think. Does the current source for sage use
any version of ipython >= 1.0. There are no available examples that I
could find of the use of widgets in ipython ver. < 1.0, and the module
structure of ipython has changed from ver. < 1.0 to >= 1.0. The change
in module structure is making experimentation more difficult.
We recently upgraded to IPython 1.2.1
(http://trac.sagemath.org/ticket/14713). You'd have to run a dev
version of Sage to get that.
I don't think it'd be very hard at all to upgrade to IPython 2.0 (which
is what you need for widgets). I'm running it on the Sage cell server
right now with (I think) no changes to Sage.
I have to be honest, I feel like a fish out of water dealing with this
part of the project. I can handle the algorithmic parts fine but this
part of dealing with the backend/frontend communication might turn out
to be pretty difficult. I have an associate/friend who is used to
programming in javascript (among other things), and he offered to give
me some pointers and provide a little help along the way. So I wouldn't
totally be on my own.
Right now we have at least three different ways for web interfaces to
communicate with Sage backends:
* sage notebook (e.g., *.sagenb.org): I don't know anyone actively
working on this. This is the hack I mentioned above.
* sage cell server: we piggy-backed on the IPython infrastructure and
messaging/widget system. I think it's a nice design and lends itself to
clear, simple communication.
* sage cloud: William's the one to talk about this...
* well, really I guess there's a fourth, and that is with standard
interacts.
Going forward, I'd say that one possible good route would be to get the
IPython widget/comm message system working in the cloud sage worksheets
(or a close approximation thereof) and use that. If that layer is
compatible with IPython, then the same widget will work from the IPython
notebook and the cell server too.
Thanks,
Jason
--
You received this message because you are subscribed to the Google Groups
"sage-gsoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-gsoc.
For more options, visit https://groups.google.com/d/optout.