4 ms·
Sage is something I keep meaning to learn. Every time I've tried it though, it just didn't feel as polished and integrated as Mathematica.
by messe 8y ago
Sage is something I keep meaning to learn.
Every time I've tried it though, it just didn't feel as polished and integrated as Mathematica.
- sdenton4 8y agoUnfortunately, the Mathematica language is a 'write-only' language; reading and debugging code months after use is... difficult. And that means it's hard to build up libraries which depend on libraries. The Sage community is great, and pushes a lot of code for research problems; things that are technically possible in Mathematica, which someone might work up into a notebook at some point, with a lot of effort, grow into reliable libraries in Sage.
- sampo 8y agoIt is true that stuff like (to take a random example) Total@Map[Function[{L}, Min @@ Table[dist[func[Array[c[#, k]&, n]]][L], {k, m}]], dd] is normal and common in Mathematica code. Like with Perl, the culture has started from small scripts making heavy use of shorthands provided by the language, and slowly evolved to writing larger codebases. Some of this can, on an individual level, be fixed by adopting a clearer coding style. But like Perl 5, the language kind of lures you to use the shorthands a lot.
- gh02t 8y agoIt's also cultural- line breaks, indentations, and parenthesis help a lot to make Mathematica more readable, but there's a strong tendency to do things in one liners like you show. Even the official docs are like this. I think even then it can have some readability problems, but it would certainly improve things quite a bit if the community would use a better style.
- shawn 8y agoThis isn’t true. It depends how you write your Mathematica. If you define modules, it’s nearly the same as as a scripting language.
- slx26 8y agoI used Sage a couple years ago for a cryptography course. I share your opinion, many times Sage was confusing or even frustrating. But I'd still say it's a great project, very capable, and... Mathematica is really expensive. Sage being open source and free is a real asset. This said, I don't think you should "learn" much Sage. At least if you know Python already. Just search for what you need when you need it, write the script you want... and that's it. Unless you are using it daily, at least.
- abdullahkhalids 8y agoI am unfortunately forced to use Mathematica because my scientific collaborators do so. While I have become very proficient at it, I don't like the interface or the language very much. Its a functional language put into an interface suitable for iterative programming. Loading external libraries is very non-intuitive, and just being able to separate a single program over many files that you can simultaneously edit is hard. I am looking forward to the day I can switch to Sage and return to coding in emacs.
- noobermin 8y agoI got my PhD in computational plasma physics in a group that heavily used matlab. I'm lucky enough that my advisor was okay with me using numpy and friends instead as long as my plots and figures looked okay. Today, I run a one-man show for my post-doc doing simulations for an experimental group, so I thankfully get to continue this mode of work. And thank god I didn't have to face losing the ability to run my scripts after leaving the university (this happened to a couple of fellow graduates I know!) and today, when I want to run something on the supercomputer, I just run it; I don't have to worry about how many licenses are still on the license server or whatever the fuck. I get how Matlab is a thing and people like it, but potentially having analysis delayed because of lack of licenses seems somewhere between primitive and barbaric in 2018.
- 3rdAccount 8y agoI used Matlab in undergrad and Python a lot in industry. I got a Mathematica license recently being impressed with the documentation and the sheer breadth of stuff built into the language in a consistent manner. I ran into an issue when I found out that my license could only have 4 kernels activated at a time. I was able to close out the old sessions with the task manager, but I almost (exaggeration) punched my computer when the message popped up about licensing. Wtf? How much did I pay for this? Maybe I'll just stick with Python & Julia for what I need. I just traded one frustration for another.
- a-dub 8y agoFair, but it would be really interesting to pit an avid MATLAB person against an avid numerical Python person in a data analysis race. I've found that you can generally do most things you can do with MATLAB in Python, but the experience in MATLAB is buttery smooth while the experience with numerical Python is clunky and obnoxious (whether it be all the useless textual noise in the code itself, the inferior quality of the plotting and visualization capabilities or the fact the Python scientific computing library ecosystem is so disjoint (this thing can handle pandas frames, this other thing needs numpy vectors, this other thing expects Python lists, whatever). I had high hopes for Julia, I have a test for it. How annoying is it to plot(sin(0:0.01:6*pi)) out of the box? For the extreme challenge question, how annoying is it to also open a new plot window and plot(cos(0:0.01:6:pi)) alongside it. I want to be able to pan around and inspect these complicated functions. So far, it has not yet passed the qualifiers.
- ur-whale 8y agoMathematica has lots of drawbacks, chief among which : if you write Mathematica code, you're building on top of an expensive, closed-source bunch of opaque algorithm that are neither guaranteed to be correct (can't see what they do) nor to continue behaving the way they did when you wrote your code (you're at the mercy of Wolfram changing what the code does). As far as I'm concerned, this essentially precludes doing anything publishable using Mathematica.
- noobermin 8y agoYou can say that, but I know lot of scientists and mathematicians who extensively use Mathematica in their research.
- 3rdAccount 8y agoDon't other languages cause issues as well? If you wrote your python code in 2.7, it probably won't run in 3.6 without some modifications. Although, with Python everything is free and you can work anywhere without your boss needing to buy a license.
- dbdjfjrjvebd 8y agoThe main point is auditability. Closed source libraries can have errors that can't be audited by the scientific community.
- 3rdAccount 8y agoThat I would agree with. I probably won't peek under the hood and fix any bugs with numpy, but someone else probably will.
- 3rdAccount 8y agoKip Thorne (pretty famous physicist) uses Mathematica for his work almost exclusively if i understand an interview they did with him correctly.