Live data from Hacker News

SymPy makes math fun again

wordsandbuttons.online

81–90 of 96 posts

Re: SymPy makes math fun again

#81

Earlier quoted context omitted.

As someone who does research with computer algebra systems (mainly Wolfram Mathematica) many hours a day, I think that SymPy is still far behind Mathematica. The fundamental design of Mathematica based on replacement rules and a style of functional programming is quite difficult to beat in terms of ease of use. A few weeks ago I gave SymPy another try, and tried to implement a nested sum of the type 1 <= a_1 < ... <…

Do you have some reference on how to use the rewrite rules? I've meant to use them a few times but I've never seen a good tutorial or textbook.

I found the books by David B. Wagner and Roman Maeder (who designed the language,btw) to be incredibly helpful.

Re: SymPy makes math fun again

#82

I like sagemath. They have integration with sympy, and they also have many features making python simpler when you want to do mathematical things. There's latex display feature when in notebook. It looks good, can even have symbolical matrices and display them as you would've expected. It's on par with Wolfram notebook, but you get to program in python instead of some propietary language. If you got some really long…

As someone who does research with computer algebra systems (mainly Wolfram Mathematica) many hours a day, I think that SymPy is still far behind Mathematica. The fundamental design of Mathematica based on replacement rules and a style of functional programming is quite difficult to beat in terms of ease of use. A few weeks ago I gave SymPy another try, and tried to implement a nested sum of the type 1 <= a_1 < ... <…

> As someone who does research […] mainly Wolfram Mathematica […] it took me ages to figure out how to implement this in SymPy, whereas I in Mathematica I can write this in a minute.

Hardly surprising, is it? As someone with more experience in Python, it would likely be the opposite for me.

Re: SymPy makes math fun again

#83

I like sagemath. They have integration with sympy, and they also have many features making python simpler when you want to do mathematical things. There's latex display feature when in notebook. It looks good, can even have symbolical matrices and display them as you would've expected. It's on par with Wolfram notebook, but you get to program in python instead of some propietary language. If you got some really long…

As someone who does research with computer algebra systems (mainly Wolfram Mathematica) many hours a day, I think that SymPy is still far behind Mathematica. The fundamental design of Mathematica based on replacement rules and a style of functional programming is quite difficult to beat in terms of ease of use. A few weeks ago I gave SymPy another try, and tried to implement a nested sum of the type 1 <= a_1 < ... <…

Do you have an opinion about Maxima or wxMaxima?

Re: SymPy makes math fun again

#86
post #21
post #12

Nice article. I totally agree about SymPy making math fun. I used Mathematica a lot in college, but stopped once it wasn’t free to me anymore. Here’s a blog post I made recently showing some fun SymPy calculations. https://www.swied.com/posts/make-a-ringtone-sound/make-a-rin...

I do wonder how many have just never been exposed to Mathematica and Matlab. I don't think they were perfect, by any measure; but a lot of the things people find amazing about modern open source tooling were near table stakes for advanced tooling decades ago.

No disagreement. I'm sure many of those modern Python based tools started out with someone looking over at the commercial packages and saying, "why can't we have those things too?" Or, they were dabbling with expanding the functionality of Python as a toy project, and it snowballed.

I think the free-ness of Python is a really big deal, because free means you use it for everything, and you use it for things that you expect to share. I don't know the present license terms of those programs, but it used to be that unless you worked for a really enlightened organization, if you had a seat of Mathematica, it meant you had exactly one seat, probably on the computer in your office, possibly the only seat in your department. If you also had computers in the lab, at home, etc., those computers were running something else, such as Python.

If Python ever got good enough at something previously reserved for commercial software, even without being comprehensive at that thing, it triggered a decision on whether it was worth the headache of maintaining the commercial license and being chained down to a single computer.

I don't do large math projects, and have been satisfied with Maxima. Where I'm beginning to use SymPy is to contain the derivations for formulas within the same Python code that uses those formulas. Mainly it's a readability and documentation play.

Re: SymPy makes math fun again

#88

Hello, OP here. I wrote a whole book around the idea that mathematics is understanding first and symbolic computation second. In Geometry for Programmers, SymPy does the grind for you in every chapter (except chapter 2). Initially, I was even going to omit all the math notation altogether and turn all the formulas into Python snippets. But several reviewers said that this is too much, so now there are formulas you ca…

Sympy is a sufficiently advanced technology, indistinguishable from magic. If you love python and are interested in math, give it a try and you will be astonished of what it can do.

Re: SymPy makes math fun again

#89
My main problem with SymPy is that I don't know where its community is! Maxima has a mailing list that is a really lovely place and an IRC channel that is (halfway between dead and) alive... what are the good places to ask questions about Sympy? Stackoverflow? Matrix? I just discovered that it has a group in Google Groups - that, ta-da! even has a recent message about the Gitter channel:

https://groups.google.com/g/sympy/c/jisKFe_xsd0

"From what I've seen, for a while, it's mostly just been people asking questions, but no one has been on there who is actually able to answer them."

Re: SymPy makes math fun again

#90

I like sagemath. They have integration with sympy, and they also have many features making python simpler when you want to do mathematical things. There's latex display feature when in notebook. It looks good, can even have symbolical matrices and display them as you would've expected. It's on par with Wolfram notebook, but you get to program in python instead of some propietary language. If you got some really long…

As someone who does research with computer algebra systems (mainly Wolfram Mathematica) many hours a day, I think that SymPy is still far behind Mathematica. The fundamental design of Mathematica based on replacement rules and a style of functional programming is quite difficult to beat in terms of ease of use. A few weeks ago I gave SymPy another try, and tried to implement a nested sum of the type 1 <= a_1 < ... <…

You are replying to somebody talking about sage (rather than sympy), which in many fields (not all) is very far ahead of Mathematica. I do quite like the programming language of Mathematica, but an advantage of sage (and of sympy) is that you have the whole python standard library at your disposal. For your example you could e.g. use itertools.product.
Post reply on HN