Live data from Hacker News

Doing Symbolic Math with SymPy

lwn.net

1–10 of 81 posts

Re: Doing Symbolic Math with SymPy

#2
SymPy is fantastic and impressive and I am a fan. It however does few things better than the program it is directly trying to compete with, namely Mathematica. This gives me scary flashbacks to the early 'Linux on the desktop' advocates, whose main argument was that it was all 'free' in every sense of the word. As we know now, that simply was not enough to switch the majority of users.

Do people see a space where SymPy can realistically flourish?

Re: Doing Symbolic Math with SymPy

#3

SymPy is fantastic and impressive and I am a fan. It however does few things better than the program it is directly trying to compete with, namely Mathematica. This gives me scary flashbacks to the early 'Linux on the desktop' advocates, whose main argument was that it was all 'free' in every sense of the word. As we know now, that simply was not enough to switch the majority of users. Do people see a space where Sym…

Maybe as a basis for something like an open source Photomath[1]. I noticed that kids use it a lot in my community. And it is not only to cheat at homeworks :)

[1] https://photomath.app/en/

Re: Doing Symbolic Math with SymPy

#4
Andes, a Python package for power system simulation, uses SymPy now. In previous versions, computing the derivatives for dynamic models was done using complex equations written out manually. SymPy greatly simplifies the process of adding custom device models, which power companies often wish to do.

https://andes.readthedocs.io/

Re: Doing Symbolic Math with SymPy

#5

SymPy is fantastic and impressive and I am a fan. It however does few things better than the program it is directly trying to compete with, namely Mathematica. This gives me scary flashbacks to the early 'Linux on the desktop' advocates, whose main argument was that it was all 'free' in every sense of the word. As we know now, that simply was not enough to switch the majority of users. Do people see a space where Sym…

Maxima plus Sage Math wrappers works more appropriately, I think. Though I would prefer a faster language than Python for such systems. Something like Sage but with Julia.

Re: Doing Symbolic Math with SymPy

#6

SymPy is fantastic and impressive and I am a fan. It however does few things better than the program it is directly trying to compete with, namely Mathematica. This gives me scary flashbacks to the early 'Linux on the desktop' advocates, whose main argument was that it was all 'free' in every sense of the word. As we know now, that simply was not enough to switch the majority of users. Do people see a space where Sym…

I think SymPy already flourishes in its space: it's a great tool for users who need some computer algebra functionality with the ability to glue that together with other code (thanks to Python). It's fine as long as you don't need high efficiency or specialized functionality.

Mathematica has no serious competition as a general-purpose symbolic system. I guess Maple is the closest runner-up, but it's more narrowly focused on computer algebra. Most people only need a fraction of Mathematica to get their work done, though.

Re: Doing Symbolic Math with SymPy

#7
post #5

SymPy is fantastic and impressive and I am a fan. It however does few things better than the program it is directly trying to compete with, namely Mathematica. This gives me scary flashbacks to the early 'Linux on the desktop' advocates, whose main argument was that it was all 'free' in every sense of the word. As we know now, that simply was not enough to switch the majority of users. Do people see a space where Sym…

Maxima plus Sage Math wrappers works more appropriately, I think. Though I would prefer a faster language than Python for such systems. Something like Sage but with Julia.

Nemo (http://nemocas.org/) and Oscar (https://oscar.computeralgebra.de/) are such projects. However, they are focused on algebra and have no support for expression manipulation, symbolic integration and the like.

Re: Doing Symbolic Math with SymPy

#8
SymPy's problem is that it is based on an object-oriented language. This results in SymPy (and friends) demanding that users abandon hundreds of years of math notation, to conform to the whims of a programming language.

In SymPy you do M.diagonalize(), which makes no sense. The matrix M does not have a property diagonalize. Rather, you should apply a choosen diagonalization algorithm like Diagonalize(M) to produce a new matrix.

Mathematica wins, and will continue to win, because the language is functional and conforms to how Mathematicians think, rather than how (EDIT: certain) programmers like to code.

Re: Doing Symbolic Math with SymPy

#9

SymPy's problem is that it is based on an object-oriented language. This results in SymPy (and friends) demanding that users abandon hundreds of years of math notation, to conform to the whims of a programming language. In SymPy you do M.diagonalize(), which makes no sense. The matrix M does not have a property diagonalize. Rather, you should apply a choosen diagonalization algorithm like Diagonalize(M) to produce a…

> Mathematica wins, and will continue to win, because the language is functional and conforms to how Mathematicians think, rather than how programmers like to code.

Or maybe Python "will win" because it conforms to how programmers think, rather than forcing them to think like mathematicians (also, why capitalize "mathematicians" in your sentence?), letting them get their shit done.

More importantly, "win" what exactly? It makes no sense to talk about "winning" if you don't even properly define a victory condition and context first.

Re: Doing Symbolic Math with SymPy

#10

SymPy's problem is that it is based on an object-oriented language. This results in SymPy (and friends) demanding that users abandon hundreds of years of math notation, to conform to the whims of a programming language. In SymPy you do M.diagonalize(), which makes no sense. The matrix M does not have a property diagonalize. Rather, you should apply a choosen diagonalization algorithm like Diagonalize(M) to produce a…

May be the way mathematicians notate is frankly ambiguous and confusing, and recent decades of programming experience have given good insight into more expressive methods of notation.
Post reply on HN