Ask Your Question
3

Is sage supported with javascript?

asked 2012-02-19 08:12:08 -0500

anonymous user

Anonymous

If I am converting Python code to JavaScript, will it preserve the Sage functions and stuff? If so, which conversion tool is best?

Perhaps a better question: More generally, what do people think is the best way to implement Python code w/ Sage on a website?

edit retag flag offensive close merge delete

Comments

What functions do you use in Sage? I'm no Sage expert, but as far as I know, Sage pulls from lots of different libraries.

SirFibonacci gravatar imageSirFibonacci ( 2012-02-19 10:53:18 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2012-02-19 16:57:03 -0500

Alex Kramer gravatar image

If what you want to do is 'embed' Sage-specific Python code on a website, execute that code, and have the output of that code displayed, the Sage Cell Server (demo at aleph.sagemath.org) exists for just this purpose. The current repository is located at github.com/sagemath/sagecell/ and instructions for embedding into arbitrary HTML files are located at github.com/sagemath/sagecell/blob/master/doc/embedding.rst. The example at the very bottom of that page is probably the easiest way to get started.

edit flag offensive delete link more

Comments

That is nice, but wish it was some what simpler. It would be nice if there was a simple way of embedding a sage cell in webpage just for sage marketing purpose.

Shashank gravatar imageShashank ( 2012-02-19 17:58:16 -0500 )edit

@Alex - I think you can do what Shashank wants as well with this, right?

kcrisman gravatar imagekcrisman ( 2012-02-20 05:52:44 -0500 )edit

@Shashank - how much simpler are you wanting? You copy and paste several lines from the example page and that's it to embed a Sage compute box into a webpage.

Jason Grout gravatar imageJason Grout ( 2012-02-20 16:00:11 -0500 )edit

I am sorry. I just realised that I can use the aleph server on my webpage. It took me less than a minute to do it. I made that comment thinking that a sage server has to be setup on my apache server to embed a sage cell.

Shashank gravatar imageShashank ( 2012-02-25 12:52:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-02-19 08:12:08 -0500

Seen: 458 times

Last updated: Feb 19 '12