On Tue, Aug 9, 2011 at 1:01 AM, Jeff Pickhardt <pickha...@gmail.com> wrote:
> Hey guys,
> I was reading the recent thread between Aaron and Sam, and noticed Aaron
> asked a question about why you'd want to implement a parser for SymPy.  This
> is something I've thought about a lot, since I built two projects that
> implement parsers for calculating languages (calculize.com and encalc.com --
> Encalc uses SymPy, in fact).

Cool.  I didn't know about that.  Why do you convert all numbers to floats btw?

What CAS does calculize.com use?

> I'm thinking of starting a new project,
> tentatively called SymPyScript, that would implement a parser from a new
> language "SymPyScript" to Python + SymPy + perhaps other libraries.
> What's the benefit?  Well, for example, what if you could write this:
>     (3x^2 + ln(x))'
> ...and it'd compile to this:
>     x = Symbol("x")
>     diff(3 * x**2 + ln(x), x)
> Or this:
>     x^2 - 2x === 3
> ...and it'd compile to this:
>     x = Symbol("x")
>     solve(x**2 - 3*x - 2, x)
> Or more complicated things I haven't yet thought of.
> Wouldn't that be cool?  I think so.  It'd be nice to have for a
> workbook-style REPL.  Just some food for thought, to get people thinking
> about new ideas.
> - Jeff
>

This would indeed be useful.  Ideally, we would have a parser that is
like WolframAlpha and able to take in any (reasonable) mathematical
expression and be able to parse it.  We do have a SymPy version of
WolframAlpha at http://gamma.sympy.org/ but so far you have to enter
expressions in exactly SymPy syntax.

We already have parsers for Maxima and Mathematica in sympy/parsers/,
but they aren't very good, and aren't used by default by anything.
And they should be rewritten to use the new parser.

Also, apparently WolframAlpha can parse LaTeX, which is awesome,
because mathematicians already know this syntax, and you can do things
like just copy and paste an equation from a paper you are writing.
That would be awesome if we could do this with SymPy.  See
http://code.google.com/p/sympy/issues/detail?id=2319.

Aaron Meurer

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to