I don't know of anyone trying to get SymPy to run there, but there are 
Skulpt [1] and Brython [2], which implement Python on top of Javascript. 
Pyjs [3] translates Python to Javascript.
There are also approaches using PyPy, see for instance [4].

I have no Idea how much work it is to run SymPy on top of any of these, but 
given how it was for Jython and PyPy, I would be surprised if it worked out 
of the box. 

Vinzent


[1] http://www.skulpt.org/
[2] http://www.brython.info/
[3] http://pyjs.org/
[4] https://www.rfk.id.au/blog/entry/pypy-js-first-steps/

On Wednesday, November 13, 2013 1:45:04 PM UTC-5, Aaron Meurer wrote:
>
> Unless there is a *complete* Python to Javascript converter, or a 
> *full* Python interpreter in JS (I know of neither, but I don't do 
> much with Javascript), I wouldn't hold out much hope. I put "complete" 
> and "full" in stars, because SymPy really uses every corner of the 
> Python language. Anything that only handles a subset probably won't be 
> able to handle the everything that SymPy uses. 
>
> That isn't to say it isn't possible, though. Is there some object 
> oriented stack built on top of Javascript, preferably one similar to 
> Python? If so, you may be able to convert the basic core concepts from 
> SymPy. Also take a look at https://github.com/certik/sympyx and 
> https://github.com/certik/csympy to see what more stripped down 
> versions of the core might look like.  Beyond that, the more 
> algorithms you need, the more work that's cut out for you. Building a 
> CAS is hard work. There's a reason there aren't too many of them. 
>
> Aaron Meurer 
>
> On Wed, Nov 13, 2013 at 11:10 AM, Buck Shlegeris 
> <[email protected]<javascript:>> 
> wrote: 
> > So how much effort and time do you think it would take to make this 
> > conversion work? I'd really like to use SymPy for a JS project -- 
> currently, 
> > there's no Javascript CAS worth the name. If a few hours would possibly 
> be 
> > able to get this to work, my team would have a go. 
> > 
> > Buck 
> > 
> > 
> > On Monday, May 13, 2013 5:16:00 AM UTC-7, dennis wrote: 
> >> 
> >> I am sorry, I do not have the original / converted source code anymore. 
> >> 
> >> On Monday, May 13, 2013 1:55:35 PM UTC+2, Antony Shaleynikov wrote: 
> >>> 
> >>> Dennis, is it possible to take a look at the result you get? 
> >>> I'm pretty interested in SymPy running at browser as well. 
> >>> 
> >>> Antony 
> >>> 
> >>> воскресенье, 12 мая 2013 г., 19:21:12 UTC+3 пользователь dennis 
> написал: 
> >>>> 
> >>>> Hi James 
> >>>> 
> >>>> I did succeed in converting sympy to javascript. I ended up having 
> some 
> >>>> of the sympy core converted and loaded in the browser without syntax 
> errors, 
> >>>> but it did not work properly. 
> >>>> 
> >>>> On Friday, May 10, 2013 11:05:51 AM UTC+2, James wrote: 
> >>>>> 
> >>>>> Hi Dennis 
> >>>>> 
> >>>>> Sorry to revive an old thread, but I am also looking into compiling 
> >>>>> sympy to javascript (also only the basic math) -  did you have 
> success? 
> >>>>> 
> >>>>> 
> >>>>> On Saturday, September 24, 2011 4:48:57 PM UTC+3, dennis wrote: 
> >>>>>> 
> >>>>>> You are right, I don't need to convert the whole project. What I 
> need 
> >>>>>> for my current project is some school math 
> (deriving/integrating/solving 
> >>>>>> functions like "x^2", "x^3-3x+2", "sin(x)", "log(x)" etc.). I don't 
> need 
> >>>>>> most of the other code e.g. plotting. 
> >>>>>> 
> >>>>>> So before refactoring the code I should probably check which 
> modules I 
> >>>>>> need to convert. 
> >>>>>> 
> >>>>>> I forked sympy at github (I hope that I have done that right, I 
> have 
> >>>>>> never worked with it before...) and created a branch sympy2js where 
> I sorted 
> >>>>>> out some modules like plotting/benchmark. 
> >>>>>> 
> >>>>>> Then I created a file runmin.py which contains: 
> >>>>>> 
> >>>>>> from sympy.core.symbol import Symbol 
> >>>>>> print Symbol('x') 
> >>>>>> 
> >>>>>> So I now want to sort out all modules that are not needed for this 
> >>>>>> simple code and then try to refactor only the needed modules. 
> >>>>>> 
> >>>>>> But when I for example delete the tensors folder I get some errors 
> >>>>>> because it is included in many other modules. How should I find out 
> which 
> >>>>>> modules I can delete and which not? Do you have a list of the 
> minimum 
> >>>>>> required modules? 
> >>>>>> 
> >>>>>> I don't think that eval() is supported by pyjamas. For example 
> "print 
> >>>>>> eval('4*4')" compiles fine but gives an error at runtime in the 
> browser. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sympy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > To post to this group, send email to [email protected]<javascript:>. 
>
> > Visit this group at http://groups.google.com/group/sympy. 
> > 
> > For more options, visit https://groups.google.com/groups/opt_out. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to