[sage-devel] Re: sage notebook with many Jmol viewers

2011-04-01 Thread Jonathan
Dan,

I'm glad you like most of what has been done.  If you manage to get
anything to fail please report that as well.

As to the speed, there's not a lot we can do.  That is limited by how
fast information is passed from the server and how fast your computer
is.  Jmol is doing quite a bit of computation to produce the live
figures.  Because of JavaVM memory constraints within browsers things
do not work well if more than one applet is loading at once.  This
means that each applet has to finish loading before the next one can
start.

One thought is to make it clearer what is happening.  Would a pop-up
progress window indicating which applet is loading help with the way
it feels?  Long term, I will probably make it so that old pages load
with all the applets replaced by static images, but this requires
changes to the plot3d functions.  I was worrying about the interface
first.

Jonathan

On Mar 31, 8:44 pm, Dan Drake dr...@kaist.edu wrote:
 On Thu, 31 Mar 2011 at 06:08AM -0700, Jonathan wrote:
  If you want to see what is coming down the pike in the next few
  weeks,  take a look at the published samples on my test server:
  http:///141.233.197.45:.  I could really use some comments on how
  it works.

 I'm using Firefox 4.0 on Ubuntu 10.10 with the Sun/Oracle Java 
 andhttp://141.233.197.45:/home/pub/0/is working great. I really like
 the new controls -- putting it in a new window, changing the size,
 turning the spin on and off. The sleeping/interactive thing is also
 nice.

 The only slight problem is that it did take quite a long time for all
 the applets to load, but I suppose it's better to get things working
 first before we worry about speed.

 I tried the lots of applets worksheet, and tried to get every applet
 interactive and spinning. I see that some will automatically sleep,
 rather than have too many applets running. That's nice.

 Excellent work! Thanks so much for your efforts. Jmol is absolutely
 essential to me when I teach multivariable calc.

 Dan

 --
 ---  Dan Drake
 -  http://mathsci.kaist.ac.kr/~drake
 ---

  signature.asc
  1KViewDownload

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-04-01 Thread kcrisman

 One thought is to make it clearer what is happening.  Would a pop-up
 progress window indicating which applet is loading help with the way
 it feels?  Long term, I will probably make it so that old pages load

Yes.  But that can be added after this.  Let's make sure your valuable
improvements actually make it in before adding more stuff.

 with all the applets replaced by static images, but this requires
 changes to the plot3d functions.  I was worrying about the interface
 first.

Can you expand on this?  Do you mean that any given page would have a
static image, and it would only turn into an applet if one clicked on
it (or evaluated it)?  Or do you mean that only pages produced before
this change would do so, or ...?

- kcrisman

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-04-01 Thread Jonathan


On Apr 1, 1:49 pm, kcrisman kcris...@gmail.com wrote:

  with all the applets replaced by static images, but this requires
  changes to the plot3d functions.  I was worrying about the interface
  first.

 Can you expand on this?  Do you mean that any given page would have a
 static image, and it would only turn into an applet if one clicked on
 it (or evaluated it)?  Or do you mean that only pages produced before
 this change would do so, or ...?


What I'm thinking about is that when re-opening a worksheet the 3-D
plots would initially load as static images each with a Make
Interactive button.  This would increase load speed.  Then only the
plots the user wants to interact with would have to load applets.  I
think that when the output cell contents are created by an evaluate
call it should default to a live Jmol.  This will require some
reworking of how 3-D plots are generated.

Jonathan

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-04-01 Thread kcrisman


On Apr 1, 4:35 pm, Jonathan gu...@uwosh.edu wrote:
 On Apr 1, 1:49 pm, kcrisman kcris...@gmail.com wrote:

   with all the applets replaced by static images, but this requires
   changes to the plot3d functions.  I was worrying about the interface
   first.

  Can you expand on this?  Do you mean that any given page would have a
  static image, and it would only turn into an applet if one clicked on
  it (or evaluated it)?  Or do you mean that only pages produced before
  this change would do so, or ...?

 What I'm thinking about is that when re-opening a worksheet the 3-D
 plots would initially load as static images each with a Make
 Interactive button.  This would increase load speed.  Then only the
 plots the user wants to interact with would have to load applets.  I
 think that when the output cell contents are created by an evaluate
 call it should default to a live Jmol.  This will require some
 reworking of how 3-D plots are generated.

As you said.  But not a bad idea.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-04-01 Thread Jason Grout

On 4/1/11 1:18 PM, Jonathan wrote:

Dan,

I'm glad you like most of what has been done.  If you manage to get
anything to fail please report that as well.

As to the speed, there's not a lot we can do.  That is limited by how
fast information is passed from the server and how fast your computer
is.  Jmol is doing quite a bit of computation to produce the live
figures.  Because of JavaVM memory constraints within browsers things
do not work well if more than one applet is loading at once.  This
means that each applet has to finish loading before the next one can
start.

One thought is to make it clearer what is happening.  Would a pop-up
progress window indicating which applet is loading help with the way
it feels?


If we end up doing a pop-up progress window, how about instead a little 
spinning icon in the place of the jmol applet, like a typical circular 
thing chasing its tail, or a progress bar loader.  If it's in the place 
of the applets that haven't loaded yet, it's not intrusive on the 
experience, whereas a pop-up progress window I think intrudes too much 
on the user.


I agree that we should get something in that we've been testing a long 
time first, and then we can worry more about adding additional things on.


Thanks,

Jason

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-03-31 Thread Jonathan
Jon,

We are sorting this out.  Ticket #9238 is the one  you want.
The .spkg you used is out-of-date.  All the fixes are not in, but if
you follow the patching instructions on #9238 you should get something
that will work cleanly on MacOS + Chrome.  FF has been inconsistent,
so we are having trouble tracing the error and Safari appears to have
a memory leak (the latest patches have a clunky work-around for this).

If you want to see what is coming down the pike in the next few
weeks,  take a look at the published samples on my test server:
http:///141.233.197.45:.  I could really use some comments on how
it works.

Thanks,
Jonathan

On Mar 30, 12:02 am, jtyard jty...@gmail.com wrote:
 I am having issues with sage notebooks that contain more than five
 instances of the Jmol viewer.   In short, if I create a notebook with
 more than 5 Jmol viewers, save, then reload it, I get an unresponsive
 script error in Firefox, Safari and Chrome.  I've done some peeking
 around on the trac server and it seems that this is a well-documented
 problem for which a fix may exist, having to do with the tickets #9232
 and #9238.  So I apologize if this is not the correct place to ask
 about this, but I'm having trouble following what has been done on
 these tickets and, more importantly, what I would need to do in order
 to incorporate the fix to my sage distribution.  I'm running sage
 4.6.2 on osx 10.6.7, and I upgraded to
 Jmol_for_SageNoteBook-1.1.4.spkg so that I could use google Chrome.

 I'm sure that if I wait long enough this will all be incorporated into
 an upcoming release of sage, but I'd be very happy to resolve this
 issue asap so that I can use my notebooks without deleting all the 3d
 plots. I'm also more than happy to test the changes, but any pointer
 to how I can incorporate the new code would be helpful.

 Thanks,
 Jon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-03-31 Thread jtyard
Hi Jonathan,

Thanks for your reply.  I tried last night to figure out how to patch
my notebook, and I ended up giving up after several hours.  I also
couldn't find any documentation for hg_sagenb.apply.  After updating
jmol to 1.1.5, I tried to follow the directions at

http://www.sagemath.org/doc/developer/walk_through.html#reviewing-a-patch

only replacing hg_sage.apply with hg_sagenb.apply, but things seem not
to be as simple as described on that page.  Running the command on a
patch drops me into a vim editor that shows the text of the whole
patch.  Not knowing what to do, I press q and I am then asked to
enter a commit message.  No matter what I seem to do, when I try to
quit vim it warns me that there was no write since last change, and
if I quit with :q! then it seems I am back where I started.  It
doesn't help that I am next to clueless about vim, having been raised
on emacs, but I really am beyond confused about why I am being dropped
into the editor in the first place.

Any pointers you could give me to get the new notebook up and running
would be much appreciated.  I'll be more than happy to test it.

Thanks,
Jon

On Mar 31, 7:08 am, Jonathan gu...@uwosh.edu wrote:
 Jon,

 We are sorting this out.  Ticket #9238 is the one  you want.
 The .spkg you used is out-of-date.  All the fixes are not in, but if
 you follow the patching instructions on #9238 you should get something
 that will work cleanly on MacOS + Chrome.  FF has been inconsistent,
 so we are having trouble tracing the error and Safari appears to have
 a memory leak (the latest patches have a clunky work-around for this).

 If you want to see what is coming down the pike in the next few
 weeks,  take a look at the published samples on my test server:
 http:///141.233.197.45:.  I could really use some comments on how
 it works.

 Thanks,
 Jonathan

 On Mar 30, 12:02 am, jtyard jty...@gmail.com wrote:







  I am having issues with sage notebooks that contain more than five
  instances of the Jmol viewer.   In short, if I create a notebook with
  more than 5 Jmol viewers, save, then reload it, I get an unresponsive
  script error in Firefox, Safari and Chrome.  I've done some peeking
  around on the trac server and it seems that this is a well-documented
  problem for which a fix may exist, having to do with the tickets #9232
  and #9238.  So I apologize if this is not the correct place to ask
  about this, but I'm having trouble following what has been done on
  these tickets and, more importantly, what I would need to do in order
  to incorporate the fix to my sage distribution.  I'm running sage
  4.6.2 on osx 10.6.7, and I upgraded to
  Jmol_for_SageNoteBook-1.1.4.spkg so that I could use google Chrome.

  I'm sure that if I wait long enough this will all be incorporated into
  an upcoming release of sage, but I'd be very happy to resolve this
  issue asap so that I can use my notebooks without deleting all the 3d
  plots. I'm also more than happy to test the changes, but any pointer
  to how I can incorporate the new code would be helpful.

  Thanks,
  Jon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-03-31 Thread Jonathan
Your description sounds like you are doing a hg_sagenb.commit(), not a
hg_sagenb.apply(http://patchname.patch).  If  you just copy
the link to the listed patches as shown above they should work.
That's what I do.

Jonathan
P.S.  Great name!

On Mar 31, 11:32 am, jtyard jty...@gmail.com wrote:
 Hi Jonathan,

 Thanks for your reply.  I tried last night to figure out how to patch
 my notebook, and I ended up giving up after several hours.  I also
 couldn't find any documentation for hg_sagenb.apply.  After updating
 jmol to 1.1.5, I tried to follow the directions at

 http://www.sagemath.org/doc/developer/walk_through.html#reviewing-a-p...

 only replacing hg_sage.apply with hg_sagenb.apply, but things seem not
 to be as simple as described on that page.  Running the command on a
 patch drops me into a vim editor that shows the text of the whole
 patch.  Not knowing what to do, I press q and I am then asked to
 enter a commit message.  No matter what I seem to do, when I try to
 quit vim it warns me that there was no write since last change, and
 if I quit with :q! then it seems I am back where I started.  It
 doesn't help that I am next to clueless about vim, having been raised
 on emacs, but I really am beyond confused about why I am being dropped
 into the editor in the first place.

 Any pointers you could give me to get the new notebook up and running
 would be much appreciated.  I'll be more than happy to test it.

 Thanks,
 Jon

 On Mar 31, 7:08 am, Jonathan gu...@uwosh.edu wrote:

  Jon,

  We are sorting this out.  Ticket #9238 is the one  you want.
  The .spkg you used is out-of-date.  All the fixes are not in, but if
  you follow the patching instructions on #9238 you should get something
  that will work cleanly on MacOS + Chrome.  FF has been inconsistent,
  so we are having trouble tracing the error and Safari appears to have
  a memory leak (the latest patches have a clunky work-around for this).

  If you want to see what is coming down the pike in the next few
  weeks,  take a look at the published samples on my test server:
  http:///141.233.197.45:.  I could really use some comments on how
  it works.

  Thanks,
  Jonathan

  On Mar 30, 12:02 am, jtyard jty...@gmail.com wrote:

   I am having issues with sage notebooks that contain more than five
   instances of the Jmol viewer.   In short, if I create a notebook with
   more than 5 Jmol viewers, save, then reload it, I get an unresponsive
   script error in Firefox, Safari and Chrome.  I've done some peeking
   around on the trac server and it seems that this is a well-documented
   problem for which a fix may exist, having to do with the tickets #9232
   and #9238.  So I apologize if this is not the correct place to ask
   about this, but I'm having trouble following what has been done on
   these tickets and, more importantly, what I would need to do in order
   to incorporate the fix to my sage distribution.  I'm running sage
   4.6.2 on osx 10.6.7, and I upgraded to
   Jmol_for_SageNoteBook-1.1.4.spkg so that I could use google Chrome.

   I'm sure that if I wait long enough this will all be incorporated into
   an upcoming release of sage, but I'd be very happy to resolve this
   issue asap so that I can use my notebooks without deleting all the 3d
   plots. I'm also more than happy to test the changes, but any pointer
   to how I can incorporate the new code would be helpful.

   Thanks,
   Jon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: sage notebook with many Jmol viewers

2011-03-31 Thread Dr. David Kirkby

On 03/31/11 05:32 PM, jtyard wrote:

Hi Jonathan,

Thanks for your reply.  I tried last night to figure out how to patch
my notebook, and I ended up giving up after several hours.  I also
couldn't find any documentation for hg_sagenb.apply.  After updating
jmol to 1.1.5, I tried to follow the directions at

http://www.sagemath.org/doc/developer/walk_through.html#reviewing-a-patch

only replacing hg_sage.apply with hg_sagenb.apply, but things seem not
to be as simple as described on that page.  Running the command on a
patch drops me into a vim editor that shows the text of the whole
patch.  Not knowing what to do, I press q and I am then asked to
enter a commit message.  No matter what I seem to do, when I try to
quit vim it warns me that there was no write since last change, and
if I quit with :q! then it seems I am back where I started.  It
doesn't help that I am next to clueless about vim, having been raised
on emacs, but I really am beyond confused about why I am being dropped
into the editor in the first place.

Any pointers you could give me to get the new notebook up and running
would be much appreciated.  I'll be more than happy to test it.

Thanks,
Jon


If you make changes to the code and try to commit them, then you must give a 
message why. I must admit I can't see why that should be so with you applying a 
patch though.


I personally never use the hg commands in Sage, but use a version of hg on 
my system, so I can't really say too much about your issues.


If set this:

EDITOR=emacs
export EDITOR

then instead of firing up vim, you will get emacs. (I had the almost the 
opposite problem to you - my system kept firing up the GUI editor gedit, but I 
wanted vi!)


I believe there's a variable you can use that selects the editor for Mercurial 
(i.e. hg) only. I'm not sure what it is, but Google would find it. But I just 
use EDITOR as I use vi for everything anyway.


I must admit though, I'm still puzzled why you are asked to supply a commit 
message.


Dave

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: sage notebook with many Jmol viewers

2011-03-31 Thread jtyard
Thanks guys.  I was definitely using hg_sagenb.apply() and not
hg_sagenb.commit(), so I am not sure why it was asking me to commit.
The only difference from what you say Jonathan was that I was applying
the patches from a local directory and not an http:, so I doubt that
makes a difference.  I will play with it some more tonight and see if
I can get somewhere.

Jon

On Mar 31, 3:13 pm, Dr. David Kirkby david.kir...@onetel.net
wrote:
 On 03/31/11 05:32 PM, jtyard wrote:









  Hi Jonathan,

  Thanks for your reply.  I tried last night to figure out how to patch
  my notebook, and I ended up giving up after several hours.  I also
  couldn't find any documentation for hg_sagenb.apply.  After updating
  jmol to 1.1.5, I tried to follow the directions at

 http://www.sagemath.org/doc/developer/walk_through.html#reviewing-a-p...

  only replacing hg_sage.apply with hg_sagenb.apply, but things seem not
  to be as simple as described on that page.  Running the command on a
  patch drops me into a vim editor that shows the text of the whole
  patch.  Not knowing what to do, I press q and I am then asked to
  enter a commit message.  No matter what I seem to do, when I try to
  quit vim it warns me that there was no write since last change, and
  if I quit with :q! then it seems I am back where I started.  It
  doesn't help that I am next to clueless about vim, having been raised
  on emacs, but I really am beyond confused about why I am being dropped
  into the editor in the first place.

  Any pointers you could give me to get the new notebook up and running
  would be much appreciated.  I'll be more than happy to test it.

  Thanks,
  Jon

 If you make changes to the code and try to commit them, then you must give a
 message why. I must admit I can't see why that should be so with you applying 
 a
 patch though.

 I personally never use the hg commands in Sage, but use a version of hg on
 my system, so I can't really say too much about your issues.

 If set this:

 EDITOR=emacs
 export EDITOR

 then instead of firing up vim, you will get emacs. (I had the almost the
 opposite problem to you - my system kept firing up the GUI editor gedit, 
 but I
 wanted vi!)

 I believe there's a variable you can use that selects the editor for Mercurial
 (i.e. hg) only. I'm not sure what it is, but Google would find it. But I just
 use EDITOR as I use vi for everything anyway.

 I must admit though, I'm still puzzled why you are asked to supply a commit
 message.

 Dave

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: sage notebook with many Jmol viewers

2011-03-31 Thread Dan Drake
On Thu, 31 Mar 2011 at 06:08AM -0700, Jonathan wrote:
 If you want to see what is coming down the pike in the next few
 weeks,  take a look at the published samples on my test server:
 http:///141.233.197.45:.  I could really use some comments on how
 it works.

I'm using Firefox 4.0 on Ubuntu 10.10 with the Sun/Oracle Java and
http://141.233.197.45:/home/pub/0/ is working great. I really like
the new controls -- putting it in a new window, changing the size,
turning the spin on and off. The sleeping/interactive thing is also
nice.

The only slight problem is that it did take quite a long time for all
the applets to load, but I suppose it's better to get things working
first before we worry about speed.

I tried the lots of applets worksheet, and tried to get every applet
interactive and spinning. I see that some will automatically sleep,
rather than have too many applets running. That's nice.

Excellent work! Thanks so much for your efforts. Jmol is absolutely
essential to me when I teach multivariable calc.

Dan

--
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


[sage-devel] Re: sage notebook with many Jmol viewers

2011-03-31 Thread jtyard
So I just made a fresh build of sage and the patching went smoothly.
Not sure what was causing the problem.  So far, everything works
great!  I also noticed that it did seem to take a long time for the
applets to load, and somehow it seems that the image resolution is not
as good as it was before I did the update.  Presumably this is to save
memory, but it would be nice if this could be a global option somehow.

Thanks!
Jon

On Mar 31, 4:05 pm, jtyard jty...@gmail.com wrote:
 Thanks guys.  I was definitely using hg_sagenb.apply() and not
 hg_sagenb.commit(), so I am not sure why it was asking me to commit.
 The only difference from what you say Jonathan was that I was applying
 the patches from a local directory and not an http:, so I doubt that
 makes a difference.  I will play with it some more tonight and see if
 I can get somewhere.

 Jon

 On Mar 31, 3:13 pm, Dr. David Kirkby david.kir...@onetel.net
 wrote:







  On 03/31/11 05:32 PM, jtyard wrote:

   Hi Jonathan,

   Thanks for your reply.  I tried last night to figure out how to patch
   my notebook, and I ended up giving up after several hours.  I also
   couldn't find any documentation for hg_sagenb.apply.  After updating
   jmol to 1.1.5, I tried to follow the directions at

  http://www.sagemath.org/doc/developer/walk_through.html#reviewing-a-p...

   only replacing hg_sage.apply with hg_sagenb.apply, but things seem not
   to be as simple as described on that page.  Running the command on a
   patch drops me into a vim editor that shows the text of the whole
   patch.  Not knowing what to do, I press q and I am then asked to
   enter a commit message.  No matter what I seem to do, when I try to
   quit vim it warns me that there was no write since last change, and
   if I quit with :q! then it seems I am back where I started.  It
   doesn't help that I am next to clueless about vim, having been raised
   on emacs, but I really am beyond confused about why I am being dropped
   into the editor in the first place.

   Any pointers you could give me to get the new notebook up and running
   would be much appreciated.  I'll be more than happy to test it.

   Thanks,
   Jon

  If you make changes to the code and try to commit them, then you must give a
  message why. I must admit I can't see why that should be so with you 
  applying a
  patch though.

  I personally never use the hg commands in Sage, but use a version of hg 
  on
  my system, so I can't really say too much about your issues.

  If set this:

  EDITOR=emacs
  export EDITOR

  then instead of firing up vim, you will get emacs. (I had the almost the
  opposite problem to you - my system kept firing up the GUI editor gedit, 
  but I
  wanted vi!)

  I believe there's a variable you can use that selects the editor for 
  Mercurial
  (i.e. hg) only. I'm not sure what it is, but Google would find it. But I 
  just
  use EDITOR as I use vi for everything anyway.

  I must admit though, I'm still puzzled why you are asked to supply a commit
  message.

  Dave

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org