Live data from Hacker News

Why Wolfram Mathematica did not use Lisp (2002)

ymeme.com

31–40 of 145 posts

Re: Why Wolfram Mathematica did not use Lisp (2002)

#31
post #20
post #13

"I wonder which will become self-aware first -- Wolfram Alpha, or Stephen Wolfram."

I once went to a talk by Wolfram to an audience of academics which he finished by saying that if he managed to find the theory of everything (which he seemed to think was a possibility), he probably wouldn't bother telling people, since theoretical physicists wouldn't understand it.

I think Stephen may be confusing communication with understanding. True genius inspiration can be hard or even impossible to communicate as languages are an imperfect representation of what happens in our minds, especially the "genius mind."

Not that it excuses his sentiment at all. Seemingly too arrogant to take the time to contemplate himself in an honest light.

Re: Why Wolfram Mathematica did not use Lisp (2002)

#34

I wonder if Wolfram's 100-times-slower reference point was based on a very particular comparison. Suppose you benchmarked a numerical algorithm that dealt with a lot of matrix-vector operations. And suppose you compared, on the one hand, a C or Fortran implementation that used arrays and native machine finite-precision numbers, against a Lisp implementation that used lists and the sort of "exact" arithmetic described…

Either that, or a rough estimation of the problems he expected to face moving forward -- this is a decades-old company, an amazing outlier in this industry -- made him think this would always be a relevant bottleneck.

We're able to use higher-level languages because they've developed the trick of identifying inner loops and hard coding them in C (this is how we get Torch and train big-ass neural networks in Lua).

Re: Why Wolfram Mathematica did not use Lisp (2002)

#35

I always just assumed it was mostly because of the desire to have a proprietary system he could generate revenue out of, instead of wading into GPL-esque territory that tends to go along with LISP. It's also one of the main reasons I have been using Octave and Python/Anaconda.

It was first released a year before the GPL.

One thing I'm sure was very significant was an IP fight with his institution, Caltech, which prompted him resigning in 1983, the same year RMS gave up on Lisp Machines and started the GNU project.

Re: Why Wolfram Mathematica did not use Lisp (2002)

#36

I wonder if Wolfram's 100-times-slower reference point was based on a very particular comparison. Suppose you benchmarked a numerical algorithm that dealt with a lot of matrix-vector operations. And suppose you compared, on the one hand, a C or Fortran implementation that used arrays and native machine finite-precision numbers, against a Lisp implementation that used lists and the sort of "exact" arithmetic described…

I could also see a matrix representation as lists of lists, and when you do anything you're always consing, and replacing elements of lists, and walking lists to get to elements. Compare that to a C-style 2D array of float or double, and Lisp looks horrible - plausibly 100x as bad, and worse as the size of the matrix increases.

Of course, the problem with that is the Lisp data representation used, not Lisp itself.

Re: Why Wolfram Mathematica did not use Lisp (2002)

#37

What language features distinguish Mathematica from lisp? Are we just talking about the m-expression syntax, or are there more fundamental differences?

Mathematica's evaluator is based much more on term rewriting and defaulting free variables as symbol objects. Lisp requires everything to be much more explicit (which has many pros and a few cons).

Re: Why Wolfram Mathematica did not use Lisp (2002)

#38

This might be obvious to many, but the language of Mathematica has better support for ("abstract") currying than Lisp, something like A[B, C][X, Y][Z] does not straightforwardly translate into an S-Expression but is potentially convenient for symbolic algebra. I believe that I read this emphasis on currying in one of Wolfram's own accounts on how Mathematica came to be. It is probably also important that the internal…

It translates very directly.

(((A B C) X Y) Z)

We could clean up this syntax and write a macro. Let's call that M. Then one could write

(M A (B C) (X Y) (Z))

The definition of M is quite simple.

Secondly, Lisp only uses lists for the representation of most of its source code. Actual computational data structures of course need not be lists. Mathematical expressions need not be represented as lists in Lisp.

Re: Why Wolfram Mathematica did not use Lisp (2002)

#39

What language features distinguish Mathematica from lisp? Are we just talking about the m-expression syntax, or are there more fundamental differences?

Here's what Wolfram wrote about Mathematica vs lisp in the first Mathematica book: http://reference.wolfram.com/legacy/v1/contents/4.2.7.pdf

I don't know enough about lisp implementations to know if these differences still hold, but they still hold for Clojure and ClojureScript, for example. Though some people have done some experimentation like https://github.com/kovasb/combinator

In the email under discussion though Wolfram was beginning work on SMP, which preceded Mathematica by about 6 years and influenced the design of Mathematica both in what to do and what not to do: http://blog.stephenwolfram.com/2013/06/there-was-a-time-befo...

Post reply on HN