Ask Your Question
3

Is sage supported with javascript?

asked 13 years ago

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?

Preview: (hide)

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 ( 13 years ago )

1 Answer

Sort by » oldest newest most voted
3

answered 13 years ago

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.

Preview: (hide)
link

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 ( 13 years ago )

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

kcrisman gravatar imagekcrisman ( 13 years ago )

@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 ( 13 years ago )

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 ( 13 years ago )

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: 13 years ago

Seen: 1,247 times

Last updated: Feb 19 '12