[sage-support] Re: Minimal notebook - just 1 cell

2009-02-02 Thread William Stein

On Mon, Feb 2, 2009 at 12:31 PM, Nathan Carter  wrote:
>
>
>> > It would be nice if @interactdemonstrations and cells (both read-only
>> > and read-write) could be added to blog entries.
>>
>> Indeed, exactly.
>
> Although this definitely sounds cool, I'm wondering what features
> already exist that are not this fancy.  Here's the limit of my
> knowledge on how to share Sage interactive demonstrations, and I'd be
> very happy if someone who knew more could enlighten me about the state
> of the art in this area:
>
> If I want to share an interactive demonstration I made with Sage, I
> need to publish it on a Sage server to which my target audience has
> accounts.  Then they need to view the worksheet (which will not show
> them any @interactively computed stuff), click "Edit a copy" (which
> will then show the @interactively computed stuff), and then play
> around with my demo.
>
> Am I right?

Yes.

> If so, this seems a little roundabout.  That is,
> @interact seems like a public relations dream come true for Sage (like
> the Wolfram Demonstrations Project is for Mathematica), but if it's
> this tricky to share the @interactive stuff you make, that's a big
> missed opportunity.  The ideal is to be able to give users a link to
> the interactive play space (minimizing the barrier between the user
> and the product).
>
> I realize that, in the OSS community, when suggestions arrive, a
> common (and appropriate) answer is, "Good idea! Please build it and
> send us a patch!"  So forgive me for making the suggestions while I'm
> involved in other OSS projects that prevent me from contributing here
> as well.  But I'm actually hoping that the response I'll get here is
> someone's pointing out to me that I'm wrong about the state of the
> art, and that something better is actually already possible, and I
> just didn't know how.

No, you're right about the current state.

>
> If it's not, then I ask:
>  - Would it be hard to segregate out a special place on sagenb.org (or
> anywhere) for officially published demos (rather than one huge publish
> zone)?

That would be possible.  I hope somebody considers doing something
like that, i.e., adding some improved way to organized published
worksheets to the notebook (this should be a general feature available
in all sage notebook servers).

>  - Would it be hard to make it so that interactive worksheets are
> actually interactive even if they're only being viewed (not edited)?

Yes, that would be difficult, but not impossible.  I hope somebody
implements it.  Doing that was one of the goals of a Google Summer of
Code project last year, but the student ran out of time, and ended up
focusing on other aspects of the notebook (which *did* turn out very
well).

> These two things together would make it possible for the Sage
> community to have something to compete with the Wolfram Demonstrations
> Project, which many educators are getting quite excited about, and for
> good reason.  Except you wouldn't need to download and install a
> "player" to use the Sage version, and you could contribute to it for
> free.

By "compete with" I assume you mean "be better than in some specific
way".   We could indeed do better than running a Wolfram
demonstration; right now doing so from scratch is also fairly
roundabout: using a Wolfram demonstration requires downloading the
player, downloading the demonstration, then running the demonstration
in the player.  Downloading the player requires (1) registering with
Mathematica (you fill out a form here:
http://www.wolfram.com/products/player/download.cgi), (2) solve a math
problem to prove you're not a 'bot, (3) read and agree to a 3-page
license agreement (of course nobody reads those), and (4) download a
106MB file.
I'm in my office at UW and that 106MB download right now takes over 20 minutes.

Having interacts that don't require logins or anything is obviously
something everybody wants.   I hope somebody implements it.

William

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



[sage-support] Re: Minimal notebook - just 1 cell

2009-02-02 Thread Nathan Carter


> > It would be nice if @interactdemonstrations and cells (both read-only
> > and read-write) could be added to blog entries.
>
> Indeed, exactly.

Although this definitely sounds cool, I'm wondering what features
already exist that are not this fancy.  Here's the limit of my
knowledge on how to share Sage interactive demonstrations, and I'd be
very happy if someone who knew more could enlighten me about the state
of the art in this area:

If I want to share an interactive demonstration I made with Sage, I
need to publish it on a Sage server to which my target audience has
accounts.  Then they need to view the worksheet (which will not show
them any @interactively computed stuff), click "Edit a copy" (which
will then show the @interactively computed stuff), and then play
around with my demo.

Am I right?  If so, this seems a little roundabout.  That is,
@interact seems like a public relations dream come true for Sage (like
the Wolfram Demonstrations Project is for Mathematica), but if it's
this tricky to share the @interactive stuff you make, that's a big
missed opportunity.  The ideal is to be able to give users a link to
the interactive play space (minimizing the barrier between the user
and the product).

I realize that, in the OSS community, when suggestions arrive, a
common (and appropriate) answer is, "Good idea! Please build it and
send us a patch!"  So forgive me for making the suggestions while I'm
involved in other OSS projects that prevent me from contributing here
as well.  But I'm actually hoping that the response I'll get here is
someone's pointing out to me that I'm wrong about the state of the
art, and that something better is actually already possible, and I
just didn't know how.

If it's not, then I ask:
 - Would it be hard to segregate out a special place on sagenb.org (or
anywhere) for officially published demos (rather than one huge publish
zone)?
 - Would it be hard to make it so that interactive worksheets are
actually interactive even if they're only being viewed (not edited)?
These two things together would make it possible for the Sage
community to have something to compete with the Wolfram Demonstrations
Project, which many educators are getting quite excited about, and for
good reason.  Except you wouldn't need to download and install a
"player" to use the Sage version, and you could contribute to it for
free.

Nathan


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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-20 Thread Skylar

> http://zine.pocoo.org/

Thanks for the tip.  This is not so different than the homemade blog/
CMS's that I have been crafting with Django, certainly embedding Sage
would work in essentially the same way.

> It would be nice if @interact demonstrations and cells (both read-only
> and read-write) could be added to blog entries.

Indeed, exactly.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-20 Thread Skylar

> Just out of curiosity, what do you think of this:
>
>http://magma.maths.usyd.edu.au/calc/
>
> It wrote it years ago (before Sage), but could do a Sage version that
> would be included standard in sage.

Yes, something like that is relatively close to what I am thinking.
But, without autocomplete and docstring/code access I would need to
run to the web/bookstore to figure out how to do anything.  That is
one thing about a notebook's cell that I would really love to
preserve, tab-completion and the ? for docstring and ?? for code.  Add
the jMOL and jsMath typesetting... these are things about the notebook
that I absolutely love and would really struggle to replicate.  I am
getting close to the effect I want by just gerrymandering the .css.  I
can {display: none} most of the page and get just a worksheet with an
iframe (I know, ugh, iframes..).  However, I think that if someone
wanted to be malicious they could firebug the html and manually
navigate and have access to the notebook (I don't want people to need
to createUser/login or anything like that so I have basically crippled
all of the security).  It would certainly be better if the extra html
was not served.

Why would someone want to hack a little guy with a little server
trying to make some mathEd software?

> If nothing else, it is a really good idea, and I think something like
> it would be useful.  Thanks for suggesting it.

Thanks for the time and acknowledgment; that means a lot to me.  I
still have a lot of learning to plow through but I hope to devote time
and resources to the sage project where I can in the future.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-20 Thread Skylar

On Jan 19, 11:42 pm, "Timothy Clemans" 
wrote:
> Is this similar to making it easy to post @interact demonstrations on
> webpages including a blog?

I'm not entirely sure what posting an @interact demonstration is.
But, you sound like you might be in the neighborhood of my little
idea.  Ideally it would be as easy to embed as sage cell in webpage as
it is to embed a youtube video + you could say whether or not users
can edit and reevaluate or you could just 'publish' that one cell.
Just some thoughts.

It would be fantastic to be able to add a sage cell or four to your
blog in a couple of minutes and might even catch on and build the user-
base + make it easy for me to build sage tutorials for the less
experienced ;).

sos
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Tim Lahey


On Jan 19, 2009, at 11:42 PM, Timothy Clemans wrote:

>
> Is this similar to making it easy to post @interact demonstrations on
> webpages including a blog?

Well, there is a new Python blog engine being done by some of the
same people who did Sphinx.

http://zine.pocoo.org/

It would be nice if @interact demonstrations and cells (both read-only
and read-write) could be added to blog entries.

Cheers,

Tim.


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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Timothy Clemans

Is this similar to making it easy to post @interact demonstrations on
webpages including a blog?

On Mon, Jan 19, 2009 at 11:39 PM, William Stein  wrote:
>
> On Mon, Jan 19, 2009 at 8:32 PM, Skylar  wrote:
>>
>> Well, I am certainly no javascript master.  I think maybe the best
>> that I can do is to understand the simple server and build from there.
>>
>> Maybe I can do it in some number of months half-time.  It would be a
>> useful adaptation to introduce kids to sage that don't necessarily
>> need to be managing whole worksheets much less whole notebooks.
>
> If nothing else, it is a really good idea, and I think something like
> it would be useful.  Thanks for suggesting it.
>
> Just out of curiosity, what do you think of this:
>
>   http://magma.maths.usyd.edu.au/calc/
>
> It wrote it years ago (before Sage), but could do a Sage version that
> would be included standard in sage.
>
>
>>
>> sos
>>
>> On Jan 19, 10:39 pm, William Stein  wrote:
>>> On Mon, Jan 19, 2009 at 5:05 PM, Robert Bradshaw
>>>
>>>  wrote:
>>>
>>> > On Jan 19, 2009, at 4:39 PM, Skylar wrote:
>>>
>>> >> I was rather hoping to keep all of the great js/css and everything
>>> >> having to do with the cell like the tab completion and the way that
>>> >> the input and output are handled - all are fantastic in the notebook.
>>> >> I was just hoping that I could send a single cell the way that it is
>>> >> displayed and functioning in the full notebook to an address/port.  I
>>> >> am not sure that using the simple server would be the best way to
>>> >> accomplish this.
>>>
>>> > You're right--it would probably would be easier to try and modify the
>>> > notebook to get this effect. The simple API was more designed to be a
>>> > "back end" interface.
>>>
>>> You will probably have to copy out a bunch of javascript from
>>>
>>>  SAGE_ROOT/devel/sage/sage/server/notebook/js.py
>>>
>>> in some clever way into your webpage.  Then probably use
>>> the simple API as the backend to actually do the work.
>>>
>>> To do this right would probably require some serious refactoring
>>> of js.py, and at least understanding that javascript code.  I'm sure
>>> it could be done and that I could do it.  I would estimate it would
>>> take me a week of fulltime work to do this right.  (I'm probably not
>>> going to do this; I'm just sharing some thoughts.)
>>>
>>>  -- William
>> >
>>
>
>
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washington
> http://wstein.org
>
> >
>

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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread William Stein

On Mon, Jan 19, 2009 at 8:32 PM, Skylar  wrote:
>
> Well, I am certainly no javascript master.  I think maybe the best
> that I can do is to understand the simple server and build from there.
>
> Maybe I can do it in some number of months half-time.  It would be a
> useful adaptation to introduce kids to sage that don't necessarily
> need to be managing whole worksheets much less whole notebooks.

If nothing else, it is a really good idea, and I think something like
it would be useful.  Thanks for suggesting it.

Just out of curiosity, what do you think of this:

   http://magma.maths.usyd.edu.au/calc/

It wrote it years ago (before Sage), but could do a Sage version that
would be included standard in sage.


>
> sos
>
> On Jan 19, 10:39 pm, William Stein  wrote:
>> On Mon, Jan 19, 2009 at 5:05 PM, Robert Bradshaw
>>
>>  wrote:
>>
>> > On Jan 19, 2009, at 4:39 PM, Skylar wrote:
>>
>> >> I was rather hoping to keep all of the great js/css and everything
>> >> having to do with the cell like the tab completion and the way that
>> >> the input and output are handled - all are fantastic in the notebook.
>> >> I was just hoping that I could send a single cell the way that it is
>> >> displayed and functioning in the full notebook to an address/port.  I
>> >> am not sure that using the simple server would be the best way to
>> >> accomplish this.
>>
>> > You're right--it would probably would be easier to try and modify the
>> > notebook to get this effect. The simple API was more designed to be a
>> > "back end" interface.
>>
>> You will probably have to copy out a bunch of javascript from
>>
>>  SAGE_ROOT/devel/sage/sage/server/notebook/js.py
>>
>> in some clever way into your webpage.  Then probably use
>> the simple API as the backend to actually do the work.
>>
>> To do this right would probably require some serious refactoring
>> of js.py, and at least understanding that javascript code.  I'm sure
>> it could be done and that I could do it.  I would estimate it would
>> take me a week of fulltime work to do this right.  (I'm probably not
>> going to do this; I'm just sharing some thoughts.)
>>
>>  -- William
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Skylar

Well, I am certainly no javascript master.  I think maybe the best
that I can do is to understand the simple server and build from there.

Maybe I can do it in some number of months half-time.  It would be a
useful adaptation to introduce kids to sage that don't necessarily
need to be managing whole worksheets much less whole notebooks.

sos

On Jan 19, 10:39 pm, William Stein  wrote:
> On Mon, Jan 19, 2009 at 5:05 PM, Robert Bradshaw
>
>  wrote:
>
> > On Jan 19, 2009, at 4:39 PM, Skylar wrote:
>
> >> I was rather hoping to keep all of the great js/css and everything
> >> having to do with the cell like the tab completion and the way that
> >> the input and output are handled - all are fantastic in the notebook.
> >> I was just hoping that I could send a single cell the way that it is
> >> displayed and functioning in the full notebook to an address/port.  I
> >> am not sure that using the simple server would be the best way to
> >> accomplish this.
>
> > You're right--it would probably would be easier to try and modify the
> > notebook to get this effect. The simple API was more designed to be a
> > "back end" interface.
>
> You will probably have to copy out a bunch of javascript from
>
>  SAGE_ROOT/devel/sage/sage/server/notebook/js.py
>
> in some clever way into your webpage.  Then probably use
> the simple API as the backend to actually do the work.
>
> To do this right would probably require some serious refactoring
> of js.py, and at least understanding that javascript code.  I'm sure
> it could be done and that I could do it.  I would estimate it would
> take me a week of fulltime work to do this right.  (I'm probably not
> going to do this; I'm just sharing some thoughts.)
>
>  -- William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread William Stein

On Mon, Jan 19, 2009 at 5:05 PM, Robert Bradshaw
 wrote:
>
> On Jan 19, 2009, at 4:39 PM, Skylar wrote:
>
>> I was rather hoping to keep all of the great js/css and everything
>> having to do with the cell like the tab completion and the way that
>> the input and output are handled - all are fantastic in the notebook.
>> I was just hoping that I could send a single cell the way that it is
>> displayed and functioning in the full notebook to an address/port.  I
>> am not sure that using the simple server would be the best way to
>> accomplish this.
>
> You're right--it would probably would be easier to try and modify the
> notebook to get this effect. The simple API was more designed to be a
> "back end" interface.

You will probably have to copy out a bunch of javascript from

 SAGE_ROOT/devel/sage/sage/server/notebook/js.py

in some clever way into your webpage.  Then probably use
the simple API as the backend to actually do the work.

To do this right would probably require some serious refactoring
of js.py, and at least understanding that javascript code.  I'm sure
it could be done and that I could do it.  I would estimate it would
take me a week of fulltime work to do this right.  (I'm probably not
going to do this; I'm just sharing some thoughts.)

 -- William

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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Robert Bradshaw

On Jan 19, 2009, at 4:39 PM, Skylar wrote:

> I was rather hoping to keep all of the great js/css and everything
> having to do with the cell like the tab completion and the way that
> the input and output are handled - all are fantastic in the notebook.
> I was just hoping that I could send a single cell the way that it is
> displayed and functioning in the full notebook to an address/port.  I
> am not sure that using the simple server would be the best way to
> accomplish this.

You're right--it would probably would be easier to try and modify the  
notebook to get this effect. The simple API was more designed to be a  
"back end" interface.

- Robert


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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Robert Bradshaw

On Jan 19, 2009, at 4:27 PM, Skylar wrote:

> Yes, I am starting to understand how I can use that.  What are the
> sleep(0.5), sleep(1)'s there for?  I know that they delay execution.
> I don't know exactly what that means and why it would be useful in the
> code in that docstring.

The sleeps are there just to give the server (which runs in a  
different thread in the background) time to start up.

- Robert



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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Skylar

I was rather hoping to keep all of the great js/css and everything
having to do with the cell like the tab completion and the way that
the input and output are handled - all are fantastic in the notebook.
I was just hoping that I could send a single cell the way that it is
displayed and functioning in the full notebook to an address/port.  I
am not sure that using the simple server would be the best way to
accomplish this.

> Yes, use the simple api that was designed. See the doctstring at the  
> top ofhttp://hg.sagemath.org/sage-main/file/b0aa7ef45b3c/sage/server/
> simple/twist.py
>
> - Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Skylar

Yes, I am starting to understand how I can use that.  What are the
sleep(0.5), sleep(1)'s there for?  I know that they delay execution.
I don't know exactly what that means and why it would be useful in the
code in that docstring.

On Jan 19, 5:52 pm, Robert Bradshaw 
wrote:

>
> Yes, use the simple api that was designed. See the doctstring at the  
> top ofhttp://hg.sagemath.org/sage-main/file/b0aa7ef45b3c/sage/server/
> simple/twist.py

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



[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Robert Bradshaw

On Jan 19, 2009, at 1:34 PM, Skylar wrote:

>
> Hello,
>
> I have been annoying the good folks of #sage-devel hoping to hack
> together a way to make notebook() run but be able to retrieve just 1
> cell of a worksheet for insertion into another webpage.  Does anyone
> have a quick hack that I can use here?

Yes, use the simple api that was designed. See the doctstring at the  
top of http://hg.sagemath.org/sage-main/file/b0aa7ef45b3c/sage/server/ 
simple/twist.py

- Robert


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