Ask HN: I've never met someone who uses Mathematica, I imagine its users are even rarer outside the academic circles. I've met many who use Matlab, R, Python, Excel, etc. 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?
Mathematica 14
31–40 of 154 posts
Re: Mathematica 14
#32[stub for offtopicness]
> It’s only recently that I’ve begun to properly internalize just how broad the implications of having a computational language really are—even though, ironically, I’ve spent much of my life engaged precisely in the consuming task of building the world’s only large-scale computational language. 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.
Re: Mathematica 14
#33This is by far the most detailed announcement I have ever seen.
This man needs to learn to edit himself.
Re: Mathematica 14
#34Ask HN: I've never met someone who uses Mathematica, I imagine its users are even rarer outside the academic circles. I've met many who use Matlab, R, Python, Excel, etc. 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?
AFAIK physicists use it very heavily, but I barely know any mathematicians use it. To me this is a great tool for people who use Math heavily as a tool but not study Math itself. 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 ha…
Mathematicians probably have trust issues and use tools with a code base that is 3 orders of magnitude smaller.
Re: Mathematica 14
#35Ask HN: I've never met someone who uses Mathematica, I imagine its users are even rarer outside the academic circles. I've met many who use Matlab, R, Python, Excel, etc. 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?
Re: Mathematica 14
#36Earlier quoted context omitted.
Symbolic computation. Yeah, I guess you can do it in SymPy, but it's more painful. It's a really pleasant environment for certain type of work. The only thing missing is better type systems.
How does it compare to Lisp for symbolic programming?
Re: Mathematica 14
#37Earlier quoted context omitted.
Symbolic computation. Yeah, I guess you can do it in SymPy, but it's more painful. It's a really pleasant environment for certain type of work. The only thing missing is better type systems.
How does it compare to Lisp for symbolic programming?
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.
Re: Mathematica 14
#38Ask HN: I've never met someone who uses Mathematica, I imagine its users are even rarer outside the academic circles. I've met many who use Matlab, R, Python, Excel, etc. 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?
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.
Re: Mathematica 14
#39Ask HN: I've never met someone who uses Mathematica, I imagine its users are even rarer outside the academic circles. I've met many who use Matlab, R, Python, Excel, etc. 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 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.
Re: Mathematica 14
#40Earlier quoted context omitted.
How does it compare to Lisp for symbolic programming?
Lisp is at its core an evaluator for expressions. The routine for that is called EVAL. 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 hav…
> > (- (* 5 a) (* 2 a))
> The CAS would answer with:
> (* 2 a)
Not sure I'd want to use such a CAS. Hint: 5-2 != 2. ;-)