4 ms·
Kudos to Wolfram for this. I do wonder how much pressure they're feeling from the likes of IPython these days and if that was a motivating factor. The other p
by fidotron 13y ago
Kudos to Wolfram for this.
I do wonder how much pressure they're feeling from the likes of IPython these days and if that was a motivating factor.
The other part is I don't think I've met a regular Mathematica user that actually likes it, so this may turn out to be a bad idea!
- tomrod 13y agoI think SageMath might be closer in spirit to Mathematica, but SageMath uses IPython a bit under the hood.
- baldfat 13y agoWhat does "SageMath uses IPython a bit under the hood" ???? To Quote Sage's home page: "Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface." Sage is based on Python and so it is not a bit it is the whole thing.
- tomrod 13y agoPython, yes. IPython, I'm not sure the extent which it's used.
- williamstein 13y agoThe interactive command line shell of Sage is IPython.
- mbq 13y agoStudent versions of Mathematica are also pretty cheap; that's rather just a vendor lock-in attempt (;
- jwr 13y agoMathematica to me is like Perl. You don't necessarily like it, but it is often the tool that gets the job done in a minimum amount of time, with spectacular results.
- nswanberg 13y agoIPython is great system for interactive programming, especially for someone who is familiar with Python and is able to find a complete distribution or able to set up all the details about their distribution (e.g. avoid problems like https://news.ycombinator.com/item?id=6725597 https://news.ycombinator.com/item?id=6725597), or someone who requires free-as-in-speech software. I don't use either IPython or Mathematica much, but I would understand preferring Mathematica over IPython given the choice. Aside from being younger, IPython is made of a combination of systems without a strong conceptual glue tying them together. Mathematica is made of a combination of systems too (kernel written in C, various external libraries in C, Lucene search engine, etc), but the components are tied together using what I guess is now called the Wolfram language, where everything, from computations to settings to notebooks themselves, is specified in Wolfram language expressions. If you view an IPython file in a text editor you see JSON, which is different than the language used to compute. If you open a Mathematica notebook in a text editor you see a nested set of Wolfram language expressions. Mathematica grew up around that idea. As a further small example, compare the prompts to the two systems: IPython In [1]: 1+2 Out[1]: 3 vs Mathematica In[1]:= 1+2 Out[1]= 3 In IPython, the array brackets are just a sort of notation--the assignment isn't syntactially correct Python. But in Mathematica, you can view that prompt as assigning the value of an In list at index 1 the expression "1+2". That sort of consistency holds through the entire system in a way that IPython can't match.
- doctoboggan 13y agoI am not sure if you are aware of this, but you can access the history of IPython inputs and outputs through the two arrays `In` and `Out`. This prompt is precisely indicating this.
- nswanberg 13y agoThank you for pointing that out. I meant to show that while they both store their inputs and outputs in array-like structures, Mathematica does it in a way that is valid in its own syntax, and IPython does not. In Mathematica "In[1]:= 1+2" is a syntactially valid expression (though the literal In symbol is protected), so you could do the following: In[1]:= in[1]:= 1+2 and the interpreter would evaluate it (though the values of In[1] and in[1] would be different). But even with all of the symbols defined, this is not valid Python (according to https://www.pythonanywhere.com/try-ipython/ https://www.pythonanywhere.com/try-ipython/): In [1]: in=[] In [2]: in[0]:1+2 File "<ipython-input-2-b9cd4c9ee15d>", line 1 in[0]:1+2 ^ SyntaxError: invalid syntax The fact that this trivial expression is valid in Mathematica and not in IPython by itself says nothing about the relative merits of each system. IPython could be modified to use another notation for the input/output arrays, and Mathematica would work just as well if it were changed to use some syntactically incorrect notation. But what I was attempting to show is an example of how consistent Mathematica is.
- cschmidt 13y agoI've used Mathematica for 24 years now, and I quite like it. It was especially helpful when I was in school, for working on my homework. The fact that it could do symbolic calculus, and do algebra without making any mistakes helped a ton. These sorts of problems.... In[1]:= D[x^2 Sin[x], x] Out[1]= x^2 Cos[x] + 2 x Sin[x] In[8]:= Integrate[Sin[x], {x, 0, c}] Out[8]= 1 - Cos[c] In[10]:= Solve[{x + 23 y + x^2 == 46, x - y == 234}, {x, y}] Out[10]= {{x -> 2 (-6 - Sqrt[1393]), y -> 2 (-123 - Sqrt[1393])}, {x -> 2 (-6 + Sqrt[1393]), y -> 2 (-123 + Sqrt[1393])}} I love ipython as well, but it can't do that sort of thing.
- baldfat 13y agoYou can with Sage: http://ask.sagemath.org/question/3142/is-it-possible-to-run-a-sage-in-ipython-notebook http://ask.sagemath.org/question/3142/is-it-possible-to-run-...
- ris 13y ago> I love ipython as well, but it can't do that sort of thing. I love the amount of investigation people put into this sort of thing before making blanket statements like this. >>> diff ( x**2 * sin ( x ) , x ) 2 x *cos(x) + 2*x*sin(x) >>> integrate ( sin ( x ) , ( x , 0 , c ) ) -cos(c) + 1 >>> solve ( [ Eq ( x + 23 * y + x**2 , 46 ) , Eq ( x - y , 234 ) ] ) ______ ______ [{x: -12 + 2*\/ 1393 , y: -246 + 2*\/ 1393 }, ______ ______ {x: - 2*\/ 1393 - 12, y: -246 - 2*\/ 1393 }] Try it for yourself: http://live.sympy.org/ http://live.sympy.org/ I am no sympy expert at all - I figured it all out in the time since I read your comment. But of course I'm sure you love ipython as well. (edit - fixed copy&pasting stupidness)
- cschmidt 13y agoThanks for pointing out sympy, I hadn't heard of it. I'm not sure why you're being sarcastic, I basically write python code full time. I'm quite familar with it, so I felt qualified to comment without doing any 'investigation'. I use ipython with the normal numpy/matplotlib/scipy numerical approach. You knew something I didn't, congratulations.