On Dec 7, 2007 11:53 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
>
> Ted Kosan wrote:
> > I have been working on ways to make SAGE as easy to use as possible
> > for beginners because I am interested in encouraging high school
> > students to use SAGE.  The approach I have been working on recently is
> > to embed a scientific calculator into the notebook that SAGE newbies
> > should be able to start using immediately with zero SAGE training.
> >
> > The calculator is still at an early stage of development, but there is
> > enough running that people can start playing with it.  Here is a
> > screenshot:
> >
> > http://sage.math.washington.edu/home/tkosan/misc/mathrider_applet.png
> >
> > And if people want to play with it, just open a worksheet in FireFox
> > and evaluate the following text in a cell:
> >
> > html('<applet id="mathrider" code="org.mathrider.MathRider.class"
> > width="800" height="650"
> > codebase="http://sage.math.washington.edu/home/tkosan/mathrider/";
> > archive="mathrider.jar" MAYSCRIPT></applet>')
> >
> > At this point it only works in FireFox but hopefully it will
> > eventually work in IE too.
> >
> > The Calculator, 2D plotter, and 3D plotter are not talking to the SAGE
> > server yet, but the text areas in the Cell tab are.  Type something
> > simple like "m = 7" into the Send text area and press <shift><enter>.
> > The code will be sent to the SAGE server for evaluation and a response
> > will be printed in the Receive text are.  If one then goes to an empty
> > cell in the notebook and enters "print m", 7 will be printed.
> >
> > At this point I am still trying to get my mind around the details of
> > the communications between the notebook and the server and I will
> > probably be asking questions about the communications protocol in the
> > near future.
>
> Ted, I think this is fantastic.
>
> (Alex, William, or anyone else: I'd love to hear any corrections or
> insights you may have about what I've said below.)
>
> It looks like you're using the trick of asking Sage to evaluate some
> text using cell id -1.  This is a hack right now, as cell ids are
> supposed to be nonnegative numbers.  Currently, though, the output
> directories are created and the right .py file is created and sent to
> SAGE.  Problems can crop up if you happen to have two requests going to
> Sage simultaneously (one request overwrites the other since they're both
> for cell -1).  Also, Sage complains that cell -1 wasn't defined before
> sending the text to it.  I think there may be other places in the code
> where the id is assumed to be nonnegative.
>
> That said, Sage actually does send back correct a response (if the cell
> hasn't been overwritten on a race condition).
>
> Here are two ideas to deal with the issue:
>
> 1. Have a namespace associated with each cell.  Each namespace would
> correspond to a directory in the notebook directory, so that the cells
> in namespace "calculator" would be stored in "calculator/code/" and
> "calculator/data" directories.  This would allow Ted to have his own
> private cell id space so that he can create virtually a notebook inside
> of the notebook, storing students' calculations in sort of a history
> interface.
>
> 2. Have a flag saying that the cell is a "virtual" cell and is sort of a
> one-off calculation.  Any non-text results of the calculation are thrown
> away.  I would find this useful in interactive widgets, where I just
> want to set the value of some variables based on some user interactions.
>   I don't care about the non-text input and I don't want to keep track
> of cell ids.  I just want to have Sage do a short calculation that
> affects the state of Sage and check the return value to see if there was
> an error.
>
>
> Also, it would be nice to allow for requests to be prioritized, so that,
> for example, Ted's calculator requests would always be queued right up,
> while some other calculations would have to wait their turn (and
> possibly be pushed back).
>

All I have to say is that these are both (1) excellent ideas and (2) probably
not difficult for me to implement.

Also, Nils idea to have an option to show how scientific calculator code is
translated to Sage is great!

Finally, it would be really cool to have similar scientific calculators, but for
special subject areas, e.g., graph theory, combinatorics, elliptic curves, etc.
These would rock.

 -- 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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to