[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-16 Thread Chris Chiasson

One last thing, I wanted to say that my earlier Mathematica comments
do not (usually) apply when dealing with the individual developers,
who are (usually) very helpful, especially on MathGroup. The thing I
am complaining about is the overall process of reporting and fixing
problems.

On Sep 14, 5:50 pm, Chris Chiasson [EMAIL PROTECTED] wrote:
 ... wait until you actually start pushing Mathematica, it gets
 sluggish on you, produces wrong results and/or crashes, and you
 receive apathy and blame dodging instead of tech support and bug
 fixing.

 On Sep 14, 3:31 pm, Hamptonio [EMAIL PROTECTED] wrote:

  Recently I started using Mathematica 6 in the computer labs of some
  courses I teach, and I cannot help but be impressed.  The new dynamic
  commands such as Manipulate are very impressive, and are perfect for
  teaching.  Before seeing how powerful it is, I had hoped to switch
  from using mathematica to sage in the fall of 2008.  But now I am not
  sure I can justisfy that switch or convince my colleagues it would
  make sense.  (As an aside: assume for the sake of argument that my
  department gets mathematica for free, which is true in a certain
  bureaucratic sense).

  For some sense of what mathematica can now do, check 
  out:http://www.wolfram.com/products/mathematica/newin6/content/DynamicInt
  I actually think its more impressive in person.

  While I would like to help remedy the gap between sage and mathematica/
  matlab in this respect, I am not sure how it would be done.  I am
  learning a little about wxPython, but I don't think that would work
  through the notebook at all, unless a program was created on the
  server for download and byte-compilation by the client.  Does anyone
  have any ideas? If javascript is a possibility, can someone recommend
  a good reference for learning to use it for such complicated
  purposes?  Or is java an option?

  -Marshall


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-15 Thread Hamptonio

Yes, thanks, that example looks like it will help me a lot.

Btw, before reading William's instructions, I ran it without the -
python option and it seemed fine.  Does the -python option just turn
off the preparser?

Cheers,
Marshall

On Sep 14, 7:52 pm, William Stein [EMAIL PROTECTED] wrote:
 On 9/14/07, alex clemesha [EMAIL PROTECTED] wrote:

  I just posted a cleaned-up example of AJAX-twisted.web2-SAGE here:

 http://sage.math.washington.edu/home/agc/simple_ajax_twisted_sage.py

  just getting your hands dirty by messing with examples is best, then
  go to the books / google and learn about the details of the code.

  The script above pretty much gives you the simplest possible example
  of how to combine the technologies that make up the SAGE notebook.
  There is a tiny README at the top of the file.

 Thanks!  Great simple example.

 For the total newbie, the way to use it is to download
   simple_ajax_twisted_sage.py
 to a file on your computer, then type
 sage -python simple_ajax_twisted_sage.py
 and follow the directions, i.e. open your browser to localhost:8000.

 Make sure you aren't already running a sage notebook on that
 port.

 I'll put this in the SAGE_ROOT/examples directory so it comes with
 future versions of SAGE.

 William


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-15 Thread Ted Kosan

Marshall wrote:

 Recently I started using Mathematica 6 in the computer labs of some
 courses I teach, and I cannot help but be impressed.  The new dynamic
 commands such as Manipulate are very impressive, and are perfect for
 teaching.

I looked at Mathematica's new manipulate command and I am now
wondering if it calculates the rendering data on-the-fly when the
sliders are moved or does it precalculate the rendering data and then
the sliders are used to navigate through this data?

Ted

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-15 Thread Hamptonio

My impression is that recalculates on the fly, but until you stop
(moving a slider for example) it tries to do quick-and-dirty
computations and rendering.  This is pretty clear if you manipulate a
3D graph of a function f(x,y,a) with a the parameter - it doesn't even
draw the mesh until you let go of the slider.

-MH

On Sep 15, 10:51 am, Ted Kosan [EMAIL PROTECTED] wrote:
 Marshall wrote:
  Recently I started using Mathematica 6 in the computer labs of some
  courses I teach, and I cannot help but be impressed.  The new dynamic
  commands such as Manipulate are very impressive, and are perfect for
  teaching.

 I looked at Mathematica's new manipulate command and I am now
 wondering if it calculates the rendering data on-the-fly when the
 sliders are moved or does it precalculate the rendering data and then
 the sliders are used to navigate through this data?

 Ted


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Robert Bradshaw

On Sep 14, 2007, at 1:46 PM, William Stein wrote:

 On 9/14/07, Hamptonio [EMAIL PROTECTED] wrote:
 Recently I started using Mathematica 6 in the computer labs of some
 courses I teach, and I cannot help but be impressed.  The new dynamic
 commands such as Manipulate are very impressive, and are perfect for
 teaching.  Before seeing how powerful it is, I had hoped to switch
 from using mathematica to sage in the fall of 2008.  But now I am not
 sure I can justisfy that switch or convince my colleagues it would
 make sense.  (As an aside: assume for the sake of argument that my
 department gets mathematica for free, which is true in a certain
 bureaucratic sense).

 For some sense of what mathematica can now do, check out:
 http://www.wolfram.com/products/mathematica/newin6/content/ 
 DynamicInteractivity/.
 I actually think its more impressive in person.

 While I would like to help remedy the gap between sage and  
 mathematica/
 matlab in this respect, I am not sure how it would be done.  I am
 learning a little about wxPython, but I don't think that would work
 through the notebook at all, unless a program was created on the
 server for download and byte-compilation by the client.  Does anyone
 have any ideas? If javascript is a possibility, can someone recommend
 a good reference for learning to use it for such complicated
 purposes?  Or is java an option?

 Isn't this exactly the sort of thing that javascript/AJAX is good  
 at doing?
 When you move an html control the server is contacted for the updated
 output and it is displayed (by directly manipulating the DOM).  I'm  
 sure
 it won't be as snappy as a purely local GUI (e.g., Mathematica),  
 but it
 will work from anywhere over a web browser, which counts for a lot
 these days.

 I've had some discussions with people about implementing things like
 this (mostly with Robert Miller), but nobody has actually done it for
 SAGE yet.   Our complete rewrite of the notebook to use Twisted
 as the underlying server technology I think makes doing something
 like this easier.

That is really cool!

Generating, serving, and displaying pngs via javascript would be  
really hard to do fast enough to make it smooth.

{{{
%time
for n in range(10):
 plot(x^n).show()
}}}
CPU time: 2.44 s,  Wall time: 2.93 s

A rough estimate of 4 frames/sec... maybe it's possible.

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread William Stein

On 9/14/07, Hamptonio [EMAIL PROTECTED] wrote:
 Recently I started using Mathematica 6 in the computer labs of some
 courses I teach, and I cannot help but be impressed.  The new dynamic
 commands such as Manipulate are very impressive, and are perfect for
 teaching.  Before seeing how powerful it is, I had hoped to switch
 from using mathematica to sage in the fall of 2008.  But now I am not
 sure I can justisfy that switch or convince my colleagues it would
 make sense.  (As an aside: assume for the sake of argument that my
 department gets mathematica for free, which is true in a certain
 bureaucratic sense).

 For some sense of what mathematica can now do, check out:
 http://www.wolfram.com/products/mathematica/newin6/content/DynamicInteractivity/.
 I actually think its more impressive in person.

 While I would like to help remedy the gap between sage and mathematica/
 matlab in this respect, I am not sure how it would be done.  I am
 learning a little about wxPython, but I don't think that would work
 through the notebook at all, unless a program was created on the
 server for download and byte-compilation by the client.  Does anyone
 have any ideas? If javascript is a possibility, can someone recommend
 a good reference for learning to use it for such complicated
 purposes?  Or is java an option?

Isn't this exactly the sort of thing that javascript/AJAX is good at doing?
When you move an html control the server is contacted for the updated
output and it is displayed (by directly manipulating the DOM).  I'm sure
it won't be as snappy as a purely local GUI (e.g., Mathematica), but it
will work from anywhere over a web browser, which counts for a lot
these days.

I've had some discussions with people about implementing things like
this (mostly with Robert Miller), but nobody has actually done it for
SAGE yet.   Our complete rewrite of the notebook to use Twisted
as the underlying server technology I think makes doing something
like this easier.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Robert Bradshaw

On Sep 14, 2007, at 1:46 PM, William Stein wrote:

 On 9/14/07, Hamptonio [EMAIL PROTECTED] wrote:
 Recently I started using Mathematica 6 in the computer labs of some
 courses I teach, and I cannot help but be impressed.  The new dynamic
 commands such as Manipulate are very impressive, and are perfect for
 teaching.  Before seeing how powerful it is, I had hoped to switch
 from using mathematica to sage in the fall of 2008.  But now I am not
 sure I can justisfy that switch or convince my colleagues it would
 make sense.  (As an aside: assume for the sake of argument that my
 department gets mathematica for free, which is true in a certain
 bureaucratic sense).

 For some sense of what mathematica can now do, check out:
 http://www.wolfram.com/products/mathematica/newin6/content/ 
 DynamicInteractivity/.
 I actually think its more impressive in person.

 While I would like to help remedy the gap between sage and  
 mathematica/
 matlab in this respect, I am not sure how it would be done.  I am
 learning a little about wxPython, but I don't think that would work
 through the notebook at all, unless a program was created on the
 server for download and byte-compilation by the client.  Does anyone
 have any ideas? If javascript is a possibility, can someone recommend
 a good reference for learning to use it for such complicated
 purposes?  Or is java an option?

 Isn't this exactly the sort of thing that javascript/AJAX is good  
 at doing?
 When you move an html control the server is contacted for the updated
 output and it is displayed (by directly manipulating the DOM).  I'm  
 sure
 it won't be as snappy as a purely local GUI (e.g., Mathematica),  
 but it
 will work from anywhere over a web browser, which counts for a lot
 these days.

 I've had some discussions with people about implementing things like
 this (mostly with Robert Miller), but nobody has actually done it for
 SAGE yet.   Our complete rewrite of the notebook to use Twisted
 as the underlying server technology I think makes doing something
 like this easier.

  -- William

 

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Fernando Perez

On 9/14/07, Hamptonio [EMAIL PROTECTED] wrote:

 Recently I started using Mathematica 6 in the computer labs of some
 courses I teach, and I cannot help but be impressed.  The new dynamic
 commands such as Manipulate are very impressive, and are perfect for
 teaching.  Before seeing how powerful it is, I had hoped to switch
 from using mathematica to sage in the fall of 2008.  But now I am not
 sure I can justisfy that switch or convince my colleagues it would
 make sense.  (As an aside: assume for the sake of argument that my
 department gets mathematica for free, which is true in a certain
 bureaucratic sense).

 For some sense of what mathematica can now do, check out:
 http://www.wolfram.com/products/mathematica/newin6/content/DynamicInteractivity/.
 I actually think its more impressive in person.

Good timing.  Just yesterday I sent this to enthought-dev:

https://mail.enthought.com/pipermail/enthought-dev/2007-September/009023.html

Traits/TraitsUI is currently the closest python-side technology to
mathematica 6's stuff.  In certain ways it's more generic, in others
not, and Mathematica's implementation is impressively elegant.  I'd
also love to have this...

For more on traits:

http://code.enthought.com/traits/

This is a very nice mini-tutorial geared towards experimental scientists:

http://www.gael-varoquaux.info/computers/traits_tutorial/index.html


A word of caution: today, playing with Manipulate[], I found a truly
serious bug.  On Linux at least (all I have tested on, Ubuntu Feisty),
if you leave a window that has Manipulate[] widgets open for a few
hours and go do something else, at some point those widgets go dead.
The notebook remains alive, you can run new code, etc.  But both
existing Manipulate widgets and new ones you make become 100%
unresponsive to mouse input to drag their controls.

Something to be aware of before using this in front of an audience.  I
hope they'll fix it soon.

Cheers,

f

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Hamptonio

 Isn't this exactly the sort of thing that javascript/AJAX is good at doing?
 When you move an html control the server is contacted for the updated
 output and it is displayed (by directly manipulating the DOM).  I'm sure
 it won't be as snappy as a purely local GUI (e.g., Mathematica), but it
 will work from anywhere over a web browser, which counts for a lot
 these days.

Well that's why I asked, I am ignorant about javascript/AJAX.  Can you
suggest a good reference?


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Chris Chiasson

... wait until you actually start pushing Mathematica, it gets
sluggish on you, produces wrong results and/or crashes, and you
receive apathy and blame dodging instead of tech support and bug
fixing.

On Sep 14, 3:31 pm, Hamptonio [EMAIL PROTECTED] wrote:
 Recently I started using Mathematica 6 in the computer labs of some
 courses I teach, and I cannot help but be impressed.  The new dynamic
 commands such as Manipulate are very impressive, and are perfect for
 teaching.  Before seeing how powerful it is, I had hoped to switch
 from using mathematica to sage in the fall of 2008.  But now I am not
 sure I can justisfy that switch or convince my colleagues it would
 make sense.  (As an aside: assume for the sake of argument that my
 department gets mathematica for free, which is true in a certain
 bureaucratic sense).

 For some sense of what mathematica can now do, check 
 out:http://www.wolfram.com/products/mathematica/newin6/content/DynamicInt
 I actually think its more impressive in person.

 While I would like to help remedy the gap between sage and mathematica/
 matlab in this respect, I am not sure how it would be done.  I am
 learning a little about wxPython, but I don't think that would work
 through the notebook at all, unless a program was created on the
 server for download and byte-compilation by the client.  Does anyone
 have any ideas? If javascript is a possibility, can someone recommend
 a good reference for learning to use it for such complicated
 purposes?  Or is java an option?

 -Marshall


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Hamptonio

Yeah, I have used mathematica for 17 years and I've pushed it very
hard at times.  6.0 seems much buggier than previous releases, but
they added and rewrote so much that I am not that surprised.  I still
think its an amazing accomplishment, and for illustrating basic ideas
in calculus I don't think anything matches it.

I have submitted bugs to mathematica and gotten no response, so I know
what you mean there as well.

But I am committed to using and improving sage over the long haul,
don't get me wrong.  I think the superiority of the development model
will win on most fronts eventually.

Cheers,
Marshall

On Sep 14, 5:50 pm, Chris Chiasson [EMAIL PROTECTED] wrote:
 ... wait until you actually start pushing Mathematica, it gets
 sluggish on you, produces wrong results and/or crashes, and you
 receive apathy and blame dodging instead of tech support and bug
 fixing.

 On Sep 14, 3:31 pm, Hamptonio [EMAIL PROTECTED] wrote:

  Recently I started using Mathematica 6 in the computer labs of some
  courses I teach, and I cannot help but be impressed.  The new dynamic
  commands such as Manipulate are very impressive, and are perfect for
  teaching.  Before seeing how powerful it is, I had hoped to switch
  from using mathematica to sage in the fall of 2008.  But now I am not
  sure I can justisfy that switch or convince my colleagues it would
  make sense.  (As an aside: assume for the sake of argument that my
  department gets mathematica for free, which is true in a certain
  bureaucratic sense).

  For some sense of what mathematica can now do, check 
  out:http://www.wolfram.com/products/mathematica/newin6/content/DynamicInt
  I actually think its more impressive in person.

  While I would like to help remedy the gap between sage and mathematica/
  matlab in this respect, I am not sure how it would be done.  I am
  learning a little about wxPython, but I don't think that would work
  through the notebook at all, unless a program was created on the
  server for download and byte-compilation by the client.  Does anyone
  have any ideas? If javascript is a possibility, can someone recommend
  a good reference for learning to use it for such complicated
  purposes?  Or is java an option?

  -Marshall


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Chris Chiasson

Also, for the benefit of the students you may possibly be
indoctrinating:

Please realize that WRI's marketing materials (aka documentation -
lol) make it seem like MMA can do anything (and so they might attempt
to use MMA in all their later courses - like me - which may not be
wise).

You could do much worse than teaching them SAGE, because then they
would learn the Python language and its libraries, which wouldn't be a
bad thing at all.

On Sep 14, 6:11 pm, Hamptonio [EMAIL PROTECTED] wrote:
 Yeah, I have used mathematica for 17 years and I've pushed it very
 hard at times.  6.0 seems much buggier than previous releases, but
 they added and rewrote so much that I am not that surprised.  I still
 think its an amazing accomplishment, and for illustrating basic ideas
 in calculus I don't think anything matches it.

 I have submitted bugs to mathematica and gotten no response, so I know
 what you mean there as well.

 But I am committed to using and improving sage over the long haul,
 don't get me wrong.  I think the superiority of the development model
 will win on most fronts eventually.

 Cheers,
 Marshall

 On Sep 14, 5:50 pm, Chris Chiasson [EMAIL PROTECTED] wrote:

  ... wait until you actually start pushing Mathematica, it gets
  sluggish on you, produces wrong results and/or crashes, and you
  receive apathy and blame dodging instead of tech support and bug
  fixing.

  On Sep 14, 3:31 pm, Hamptonio [EMAIL PROTECTED] wrote:

   Recently I started using Mathematica 6 in the computer labs of some
   courses I teach, and I cannot help but be impressed.  The new dynamic
   commands such as Manipulate are very impressive, and are perfect for
   teaching.  Before seeing how powerful it is, I had hoped to switch
   from using mathematica to sage in the fall of 2008.  But now I am not
   sure I can justisfy that switch or convince my colleagues it would
   make sense.  (As an aside: assume for the sake of argument that my
   department gets mathematica for free, which is true in a certain
   bureaucratic sense).

   For some sense of what mathematica can now do, check 
   out:http://www.wolfram.com/products/mathematica/newin6/content/DynamicInt
   I actually think its more impressive in person.

   While I would like to help remedy the gap between sage and mathematica/
   matlab in this respect, I am not sure how it would be done.  I am
   learning a little about wxPython, but I don't think that would work
   through the notebook at all, unless a program was created on the
   server for download and byte-compilation by the client.  Does anyone
   have any ideas? If javascript is a possibility, can someone recommend
   a good reference for learning to use it for such complicated
   purposes?  Or is java an option?

   -Marshall


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread alex clemesha
On 9/14/07, William Stein [EMAIL PROTECTED] wrote:


 On 9/14/07, Hamptonio [EMAIL PROTECTED] wrote:
 \  Isn't this exactly the sort of thing that javascript/AJAX is good at
 doing?
   When you move an html control the server is contacted for the updated
   output and it is displayed (by directly manipulating the DOM).  I'm
 sure
   it won't be as snappy as a purely local GUI (e.g., Mathematica), but
 it
   will work from anywhere over a web browser, which counts for a lot
   these days.
 
  Well that's why I asked, I am ignorant about javascript/AJAX.  Can you
  suggest a good reference?

 No, unfortunately I can't, but hopefully someone else can. There are
 a lot of bookstores in Barnes and Noble about AJAX.  It's also how
 programs
 like Google Maps, etc., work.

 It took me quite a while to get my head around AJAX programing.  Basically
 Alex Clemesha and Tom Boothby made a bunch of self-contained examples
 and gave some takes, and after a while I just got it.   That was a while
 ago and there are probably good books now.


I just posted a cleaned-up example of AJAX-twisted.web2-SAGE here:

http://sage.math.washington.edu/home/agc/simple_ajax_twisted_sage.py

just getting your hands dirty by messing with examples is best, then
go to the books / google and learn about the details of the code.

The script above pretty much gives you the simplest possible example
of how to combine the technologies that make up the SAGE notebook.
There is a tiny README at the top of the file.

Good luck with it.

Alex


William

 -- William

 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread Ondrej Certik


 I just posted a cleaned-up example of AJAX-twisted.web2-SAGE here:

 http://sage.math.washington.edu/home/agc/simple_ajax_twisted_sage.py

 just getting your hands dirty by messing with examples is best, then
 go to the books / google and learn about the details of the code.

 The script above pretty much gives you the simplest possible example
 of how to combine the technologies that make up the SAGE notebook.
 There is a tiny README at the top of the file.


Does anyone of you tried AJAX from pypy?

http://play1.codespeak.net/

You can write all of your code in Python (resp RPython) and you don't
have to mess up with javascript. Some of the demos look cool, but I
haven't seen much activity on pypy since March, I hope it's not dead.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread alex clemesha
On 9/14/07, Ondrej Certik [EMAIL PROTECTED] wrote:


 
  I just posted a cleaned-up example of AJAX-twisted.web2-SAGE here:
 
  http://sage.math.washington.edu/home/agc/simple_ajax_twisted_sage.py
 
  just getting your hands dirty by messing with examples is best, then
  go to the books / google and learn about the details of the code.
 
  The script above pretty much gives you the simplest possible example
  of how to combine the technologies that make up the SAGE notebook.
  There is a tiny README at the top of the file.


 Does anyone of you tried AJAX from pypy?

 http://play1.codespeak.net/

 You can write all of your code in Python (resp RPython) and you don't
 have to mess up with javascript. Some of the demos look cool, but I
 haven't seen much activity on pypy since March, I hope it's not dead.


I have not seen this before, but from a quick glance is looks like
it is like GWT (Google web toolkit), where you write code in Java
and it converts it to Javascript.   I'm slightly dubious that that is
a good way of going about producing Javascript ... but who knows.

Instead I think it is much better to use a good javascript library,
like the excellent Mochikit library (mochikit.com).  Once you have
sufficient understanding of how to produce AJAX apps, then you
begin to realize the pain (DOM and Event issues, etc)
of making those apps work in all the main browsers ...
this is where a javascript library comes in.

The example I posted above is just for getting your head around
what is means to do 'AJAX'.  (with twisted.web2 and SAGE
thrown in for good measure ;)

Alex






Ondrej

 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Interactive cells, GUIs, javascript, ...

2007-09-14 Thread William Stein

On 9/14/07, alex clemesha [EMAIL PROTECTED] wrote:
 I just posted a cleaned-up example of AJAX-twisted.web2-SAGE here:

 http://sage.math.washington.edu/home/agc/simple_ajax_twisted_sage.py

 just getting your hands dirty by messing with examples is best, then
 go to the books / google and learn about the details of the code.

 The script above pretty much gives you the simplest possible example
 of how to combine the technologies that make up the SAGE notebook.
 There is a tiny README at the top of the file.


Thanks!  Great simple example.

For the total newbie, the way to use it is to download
  simple_ajax_twisted_sage.py
to a file on your computer, then type
sage -python simple_ajax_twisted_sage.py
and follow the directions, i.e. open your browser to localhost:8000.

Make sure you aren't already running a sage notebook on that
port.

I'll put this in the SAGE_ROOT/examples directory so it comes with
future versions of SAGE.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---