201 points · by yurivish · 2y ago · 144 comments
It’s something special. Maybe a bit of a relic in its distribution (not open source, not that SaaSy), but it’s so well thought out.
To sum up, it's a great tool, but you'll need to invest considerable time to master it. Then there's the risk that this time could be wasted due to its expense.
Any applied mathematician working with decibels (as in acoustics, electronics, optics, ...), for example.
I really don't know anyone but statisticians who do that. Everyone in my department (mathematics) and ever I've ever worked with has always used just "ln" for the natural logarithm. Why wouldn't you, it's one less character?
[1] https://codegolf.stackexchange.com/questions/71631/upgoat-or...
That the symbolic nature of the program carries past the pure mathematics is one of the most useful things about it.
He writes a lot about himself in every article and makes claims that others find excessive. Commenters get triggered by this and post about how annoying it is. These reactions are just as predictable and just as fixated on Wolfram himself as he is, and in that sense are guilty of the same thing. This repetitive dynamic is what I mean by Wolfram Derangement Syndrome. It has been tedious—and therefore off topic—for many years. Here are a few past explanations in case helpful:
https://news.ycombinator.com/item?id=10978871 (Jan 2016)
https://news.ycombinator.com/item?id=10723588 (Dec 2015)
https://news.ycombinator.com/item?id=20071283 (June 2019)
There's often a lot that's interesting and thoughtful in Wolfram's pieces, stuff that's worth discussing on HN, so this is really a test for the community: can we mask out the predictable bits and focus on the interesting ones?
A few years ago, we added a guideline to https://news.ycombinator.com/newsguidelines.html to cover cases like this: "Please don't pick the most provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead."
I agree with the gist of your position, but the wording here is inflammatory (suggesting people are “triggered” rather than justifiably angry) and are obsessing over a man when in my experience his history of similar behavior goes back far longer and is exaggerated a lot more by his much stronger influence than the average hn commenter. I agree that it’s not interesting discussion, but people are largely trying to practice skepticism with a man who makes very exciting claims and sometimes isn’t being entirely honest about those claims or where they originated.
Basically, there is missing context that hn comments aren’t capturing that can help to understand this resentment towards him and your post here seems to be ignoring some of that context and equating the two sides when there is a large power disparity between them.
Edit: Also the choice to coin this phrase as a “derangement” feels inflammatory as well.
This man needs to learn to edit himself.
For me it’s such a shame as I would definitely use it much more often if the language and environment were closer to a typical coding workflow. It’s just such a hassle to have to use a standalone desktop engine, a weird editor, and a quirky language [at least at first] with few 3rd party libraries.
If you're using it, what are you using it for exactly? In what way is it irreplaceable by other tools out there, if at all?
I started using Mathematica in middle school and continued from there. My initial use case was simply double-checking I did my math homework correctly. A lot of Solve, DSolve, FindInstance, Reduce, FullSimplify, etc. I did a lot of plotting to visualize things: not just plotting functions of one variable, but parametric curves, inequalities, functions of multiple variables. When I studied linear algebra, I implemented Gaussian elimination myself as a learning exercise and I was very proud of it: the nice thing was that although the algorithm worked on matrices containing known numbers, it automatically worked for matrices containing unknowns thanks to its symbolic computation. When I studied basic image processing tasks like edge detection or the like, it was again of great help. When I got into personal investing, I did yet more calculations using the FinancialData function to retrieve financial time series and backtested many kinds of portfolio. When I got into trading options, it was of tremendous help to learn options from first principles, starting from the log-normal distributions, implementing Black–Scholes modeling, and then implemented the option greeks (delta, gamma, theta, etc) from scratch. Even as a regular software engineer, when I needed to work on algorithms, Mathematica is great help when I needed to do complexities analysis more sophisticated than interview-level big-O notations. I even used it as a SAT solver in a pinch, or a linear programming solver, when I knew there are other tools, but they won't be as nice as Mathematica or have higher learning curves than Mathematica's builtin documentation.
I am a PhD student in theoretical physics and almost everyone in our field has no choice but to use it (I do know one or two people that use maple, but the overwhelming majority chooses mathematica).
Despite its elegant design, many people hate it with a passion, as it has grown to be a huge bloated mess that takes forever to run. Also, due to the closed source nature, it is very hard to debug when something goes wrong. For example, it is quite often for the basic functions like `Simplify` and `Integrate` to get stuck running forever, but there is no way to keep track of the internal transformations that mathematica is doing, since everything is sealed up.
Based on my understanding of how expression evaluation works, the slightly more revealing statements would be "it is a lot of lisp macros" and "everything is an s-expression". Which means, a big mess. Let me expand:
As a functional programmer, "everything is an expression" sounds comforting, and I would expect there are clear transformation rules on how expressions are evaluated (and, maaybe, type signatures).
Instead, what you get is, "you can throw in some random form of expressions into this function, and it will do something with them". As in, it takes an AST input, and transforms them in some loosely specified way. There doesn't seem to be a type system, so you don't have types to guide you, rather you likely need to figure what kind of expressions work with which functions.
Now, if I'm wrong about this, and the functions behave consistently in what they take and how they transform it, then I'm more than open to be corrected. It is just that my high expectations (based on marketing of the lang) and the subsequent realization left me a bit bitter.
So I personally think it is perhaps not productive to think about type systems and type signatures when working with Mathematica. But you can definitively think in terms of transformation rules. And Mathematica either documents these rules or makes these rules intuitive.
f[x_Integer] := ...
will define a rule for f[] that only matches expressions where the argument to f[] has the head "Integer". It is even possible to use arbitrary predicates: vec3Q[v_] := VectorQ[v, NumberQ]&&Length[v]==3
f[v_?vec3Q] := ...
This lets you sort-of have type-checking. This is entirely opt-in, so you have to be somewhat rigorous about its use or it does not do any good. Also, in practice if any invocation of f[] does not have arguments which match the types for which you have defined it, the expression just remains unevaluated, which can create a mess (but maybe less of a mess than evaluating the function on input of the wrong form). The performance impact (particularly of the predicate version) is also non-zero, but my experience is that the biggest performance limitations come from trying to keep your machine from grinding to a halt when a runaway expression applied to the wrong thing explodes in complexity and eats all of your RAM... and this helps avoid that.While I have found this to be very helpful for writing and debugging hairy expressions, I used Mathematica for years before I even knew this was a thing. In reality almost no one does this, certainly not with any consistency, and the situation is as bad as you fear it would be.
Lisp-style macros are actually difficult to write because of the infinite evaluation of the language. I was able to write a quasiquote package for myself to help with that that though.
I do like that the lispy language itself closely mirrors math expressions, and it is consistently accessible throughout the user interface. For example, the mathematica notebook frontend (IDE) is simply some `MakeBoxes[]` of the expressions, which are all valid mathematica code themselves. I tried sympy a while ago, which I believe took an object-oriented approach, and it was very clumsy when compared to mathematica.
Still, I would not recommend using mathematica for general programming, precisely because of the mentioned shortcomings. By default, it is also impure and not lazy (eager eval, although it can be forced to be lazy on a case by case basis using `Hold` or `Unevaluated`).
I got my theoretical physics Ph.D. in 1987. I’ve never met anyone who uses Mathematica, except to try it out a bit out of curiosity. Perhaps you’re referring to a particular research group?
Starting as an undergrad, I extensively used mathematica to help or double check homework problems, plotting functions etc. For more "numerical" type of work, we extensively used matlab, so typically we used mathematica for more symbolical type problems. Later on, when working in physics, I often used mathematica, again mostly for doing things like symbolical integration, or things like quickly calculating symbolical gradients that I could copy-paste into some numerical software etc.
I no longer work in academia so I don't have access to a mathematica license, but similar free tools are Sympy, Maxima, which are good for basic stuff but in my experience are not nearly as good as Mathematica for more complicated stuff. Or just the online wolframalpha.
For example, my house experienced some flooding last year after exceptionally heavy rainfall. But how exceptional was it, really? I pulled out Mathematica and in a few minutes I had an interactive chart showing historical rainfall stats for my city over different time periods. The charting, interactivity, and weather APIs were all just built in.
I had a hunch that Ironman triathlon was advertising their races as having cooler weather than they actually do. Turns out I was right -- here's my [slowtwitch post](https://forum.slowtwitch.com/forum/Slowtwitch_Forums_C1/Tria...), and the [associated code](https://gist.github.com/latkin/470a2f06056ee0a8e3f4da837af10...).
I use it for symbolic calculation, solve differential equations, and many complicated integrals, and its visualizaion build upon those with easy parametrize support is very nice. Starting from my ungrad sophomore year as physics major, we have courses require us to finish some homeworks with Mathematica.
I can hardly find any other tool to replace mathematica in terms of symbolic calculation and doing complicated integrals (there is a joke by calling mathematica "large-scale integral table")
Mathematicians probably have trust issues and use tools with a code base that is 3 orders of magnitude smaller.
Its biggest flaw is how much it wants to act as a black box, which means when something goes wrong, or isn't exactly what you want, you spend more time trying to fix it than solving the original problem.
It's a powerful tool with a steep learning curve - hopefully the LLM assistant will help with this.
If the cost of that is shining Stephen Wolfram's dome, well, what can you do.
Other times I use it as a replacement for a calculator app, which feels exactly like cracking a walnut with a 500-ton industrial press.
It does have some reasonably unique capabilities that I did use more heavily in the past. E.g.:
- Simplifying the vector/matrix mathematics used in 3D graphics. It can eliminate redundant expressions, which is especially useful when you know that some of the inputs are constants such as 0 or 1.
- Non-linear curve fitting. If you have some complicated mathematical model you want to fit to noisy data, Mathematica will "just do it". With every other tool out there, this is... sss... hard.
- It missed the AI boat, but it has mostly caught up and could now be a viable alternative to the Python-based AI ecosystem, especially for certain areas of research.
- Complicated plotting requirements where I just can't be bothered spinning up some dedicated log analytics "tool" or subscribing to a "cloud service" and learning an entire query language just to draw a 3D histogram or whatever.
It has some strengths, but since its syntax highlighting is coupled to the kernel state it didn't have an undo function for the longest time. Also as big vim fan it's disappointing to not being able to use your favorite editor.
Edit: The github page for EIN says that development has stopped. Despite this, I was able to edit a notebook with only minor inconveniences very recently.
I was working on mathematical models (large scale optimization). These are usually solved numerically, and in numerical mathematics, how you write an equation matters tremendously (for instance, the equality x/y = z is much worse than x = y * z for solvers especially if y is a variable that can take on 0 as a value because during iteration this might create a lot of NaNs in your Jacobian or Hessian matrices).
I was using symbolic math to find better (but mathematically equivalent) ways to pose equations that would be numerically expedient. One example is using Groebner bases to do the equivalent of Gaussian elimination on a system of polynomial, which produces a row-echelon form and has many nice properties.
Nevertheless, I assume LLM enabled translators will improve rapidly, and that a product like Mathematica could be very well suited for translating from a prototype to a robust implementation for e.g. HPC.
It's unusual in the quant world though. I think they had hired a bunch of PhDs who had spent too much time in academia.
It's generally pretty nice for any sort of mathematical programming, from designing control systems to statistics to simple graphing. It's also a pretty good language for basic scripting and data manipulation. Most of the mathematical work on my blog is done in Mathematica.
[1] https://wxmaxima-developers.github.io/wxmaxima/download.html
It's a really pleasant environment for certain type of work.
The only thing missing is better type systems.
Mathematica is a computer algebra system at its core and is a rule-based rewrite system for expressions.
An example in Lisp notation:
In a computer algebra system (CAS) one may enter 5a - 2a
> (- (* 5 a) (* 2 a))
The CAS would answer with: (* 3 a)
It has used rules to simplify the expression and uses some default form. It could have printed a + a + a or 3 * a. It sees that it can't further simplify it, because a has no value and thus returns this simplified expression as it is.In Lisp things are differently. It takes an expression and tries to compute a value:
> (- (* 5 a) (* 2 a))
The result in Lisp is "Error: unbound variable a". It can't compute a value, because during evaluation it sees that the variable a has no value. Evaluation of the unbound variable a is an error.Now you could write an expression simplifier in Lisp: let's call it simplify. Lisp has a quote operator, which returns the embedded thing as it is -> it is not evaluated. We can embed an expression inside quote and thus call simplify with that unevaluated expression as an argument.
> (simplify (quote (- (* 5 a) (* 2 a))))
The result then could be (* 3 a)
One then could write a input loop in Lisp (loop (print (simplify (read)))
which then would not be a read-eval-print-loop, but a read-simplify-print-loop. (defun read-simplify-print-loop ()
(loop (print (simplify (read))))
This interactive loop would read expressions and print simplified expressions...Actually something like that has been done with computer algebra systems written in Lisp, like Macsyma/Maxima and Reduce. But they also then switched to infix syntax for input/output to make it easier for humans to enter mathematical expressions.
Peter Norvig gave in his book "Paradigms of AI Programming, Case Studies in Common Lisp" extensive examples how to implement such a thing in Lisp:
https://github.com/norvig/paip-lisp/blob/main/docs/chapter8....
and
https://github.com/norvig/paip-lisp/blob/main/docs/chapter15...
The advantage of the Mathematica language compared to Lisp is that it can compute with expressions via rules out of the box. Additionally Mathematica is so much more than that: it is an environment, a collection of mathematical knowledge, a cloud service, a specific product on can buy/rent, ...
The drawback is that the semantics are murky and Mathematica is a two-language system: the fast internal code (and much of the environment) is written in C++ and the expressive language is on top.
Lisp OTOH is often much more efficiently compiled with clear(er) semantics.
We've had some bad results taking that approach recently - which we really should have anticipated, with millenia-old stories warning us about it. For one thing, megalomaniacs tend to be frauds (perhaps because, to be a megalomaniac, it's necessary to lie to yourself); maybe Mathematica will turn out to be the FTX, or Tesla auto-pilot, or ..., of mathematical software/languages.
No way - how could that happen? All those people at Mathematica would just go along with it, right? There's no evidence! It would be too brazen!
Eeeh. Scott Aaronson review [0] and Cosma Shali's review [1] of NKS kinds of points to this direction, so he may well be a fraud. The plagiarism case regarding rule 110 (and attempts to hide this through NDA and lawsuits [2]) doesn't do him any favors, either. Indeed maybe the biggest problem of Wolfram isn't the megalomany per se, but the total unwillingness to give credit to others and cite their damn papers. Wolfram simply isn't in the business of sharing his bibliography, which is problematic for a scientist.
However, the newer Wolfram Physics [3] [4] looks so damn promising that I'm willing to entertain possible quackery. I mean it surely has many ideas regarding how a digital universe would look like; he may be all wrong in the details but his ideas look important contributions to me. I sometimes think what's like to be at the frontier of science; today we take relativity (for example) for granted but there was a time when it was up in the air. When I read Wolfram's stuff stuff I just think this could very well be true, and while there's absolutely no evidence for it the conjectures all make sense.
[0] https://arxiv.org/abs/quant-ph/0206089
[1] http://bactra.org/reviews/wolfram/
[2] https://news.ycombinator.com/item?id=13961947
[3] https://www.wolframphysics.org/
[4] https://writings.stephenwolfram.com/2020/04/finally-we-may-h...
You can install Mathematica at any time. It produces graphical output. You can see for yourself what it does, and what it does not do.
If Wolfram were making claims about a future unreleased version of Mathematica, sure, I would absolutely weigh his ego against those claims. But they are largely irrelevant when it comes to a currently existing and available product. If he were to claim that Mathematica 14 cures cancer, that would deserve eyerolls but it wouldn't tarnish the quality of the software.
I'm struggling to believe that Wolfram's hubris is anything like that of Trump or Musk or SBF etc. Wolfram seems like a genuinely smart person who knows he's smart, but is probably too aware of it. But he's not done anything majorly bad - and arguably has done good in creating tools for scientists and engineers. I think we need to give him a break. I certainly think that the perennial discussion of his ego is tiresome and distracting.
It's not that you can't do it with other software, Mathematica just has all of it included by default, with very comprehensive documentation. And a slick UI.
Sure you can probably do most of it in python, but you'll find yourself chasing some obscure modules to get some things working. Even just to get arbitrary precision calculations for just about everything, for example. And don't forget the importance of a documentation that explains every option with examples (barring some obscure stuff, which can be quite annoying if you encounter it).
Since it's all integrated Mathematica allows you to go from calculating Sin[2] to arbitrary precision, to calculating the derivative of Sin[2x], to showing the first 10 terms of its Taylor series. All using the same sine function.
This does have some downsides. For one it's a pretty heavy program to run. And because they want to include everything they need to be quite opinionated about certain things. There are multiple ways to define fractional derivatives for instance, since they include a function for it they must have picked one of them. And then there are the name clashes, I once had to laugh quite loudly when I tried "Rotate[{0,1}, 45deg]" and got back an image of {0,1} at a 45 degree angle.
It is an impressive piece of engineering. Which could have had much more of an impact if it was a bit more open, but oh well...
I’m just sad that I don’t have access anymore after college, being too cheap to pay for a license.
- Specially, the language supports symbolic computation natively. In a lot of software, you have to declare symbols as symbolic variables before using them. In Mathematica, you don't have to deal with this nonsense.
- A library of both symbolic and numerical algorithms that is far far far better than any other library out there. Especially its outstanding how much symbolic computation algorithms are built in. Fairly fast numerical algorithms as well. Best of all, Mathematica guesses the best algorithm to use in a particular situation with frightening accuracy.
- A lot of Maths is just built in. Example: A number of common Groups are just there for you to immediately start playing with.
Exemplar of humility.
Saying that as someone who’s consistently surprised by just how big his ego seems to be, getting bigger each year, didn’t think it’s possible.
The Ratatouille critic put this well - "We risk very little, yet enjoy a position over those who offer up their work and their selves to our judgement. We thrive on negative criticism, which is fun to write and to read."
It’s a shame that the only person it seems has get the zen of Mathematica is Stephen Wolfram himself.
Everyone else needs to deal with stuff like '#1 + #2 & @@@ # &/ @'.
But like all software it involves tradeoffs. Fanatics of any technology or idea are never the easiest people to reason with.
I am in awe of what Wolfram achieved with Mathematica. And also the size of their ego.
Yet many of those that complain about Wolfram, will idolatrate Steve Jobs, and they aren't (weren't) that different in praising themselves.
At some level this reminds one of the idea of universal computation (and my Principle of Computational Equivalence), but, as I’ll discuss later...
And his "Principle of Computational Equivalence" is [2] "There are various ways to state the Principle of Computational Equivalence, but probably the most general is just to say that almost all processes which are not obviously simple can be viewed as computations of equivalent sophistication."
Which a cynic might say is mighty convenient, because this is non-specific enough that you can apply it to basically anything and say you invented it and/or it's equivalent to something you invented and if it doesn't quite fit, you can use the "various ways to state" clause to weasel-word your way into something which does.I find Stephen Wolfram frustrating for this reason. Benoit Mandelbrot is another guy who constantly seems to claim he invented everything, eg the Efficient Markets Hypothesis (which Mandelbrot basically claims he invented because he gave Eugene Fama some advice about the price process for stocks when Fama was a PhD student even though Fama/French was after that and Mandelbrot's idea of the price process for stocks is very obviously and demonstrably wrong if you know about market microstructure and/or look at trade marketdata[3]).
[1] https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-...
[2] https://www.wolframscience.com/nks/p716--outline-of-the-prin...
[3] At a microstructure level price movements are made up of individual trades which jump around wildly with gaps in both the time and price dimension, and it has a base level beyond which you can't "zoom in" any more- it isn't some kind of fractal scaling in time and/or volatility which is what Mandelbrot wants it to be.
So, sure, you are smart and clever, but no.
Just look the other way and try to learn something from him.
With all the things he has accomplished and his competence across different fields, I don’t mind him being arrogant sometimes. He is working in the area of fundamentals of science, so of course there will be bold claims made - anyone can judge for themself if they hold water.
Science in institutions is often stuck in its entrenched paths and few people dare (or cannot afford) to step outside and try new things, especially across different fields. I believe people like Wolfram, who have earned the knowledge and experience to be able to make a serious attempt on advancing science in new and different ways, are a very valuable resource for humanity, even if they may not succeed.
For me it was trying to pass his employees work as if it were his own, through NDAs and lawsuits, like happened in this case:
https://en.m.wikipedia.org/wiki/Rule_110 https://www.complex-systems.com/abstracts/v15_i01_a01/
We only know this case because the employee fought back. Makes one wonder how many similar cases happened but never surfaced.