Live data from Hacker News

Why Wolfram Mathematica did not use Lisp (2002)

ymeme.com

51–60 of 145 posts

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

#52
post #17

Wolfram has always seemed to me to have the biggest case of "Not Invented Here" syndrome I've ever heard of. I mean, not only did he have to make his new language, new search engine, etc. He even tried to make a new kind of science... If that's not extreme NIH, I don't know what is.

Agreed. I remember first reading an overview of Lisp [1], and my reaction was, "Ah, okay, just like they do in Mathematica ... ah, right, just like how Mathematica does that. Huh -- he must have done it in Lisp then."

After that, I didn't even suspect it didn't use Lisp until today.

[1] I think in Hofstadter's Metamagical Themas

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

#53

Isn't Mathematica very Lispy? It looks like R-expressions.

The syntax looks a lot like M-expressions, but the evaluator is about as far from a normal Lisp as you can get.

Mathematica uses a fixed-point evaluator; that is, expressions continue evaluating until they reach some stable state. Every common Lisp I've seen will only evaluate once unless you explicitly code for it.

While this evaluation behavior is very useful for mathematics, I find that it makes Mathematica a poor general-purpose programming language. It's pretty easy to wind up with confusing evaluation behavior, and controlling evaluation in Mathematica is a very complicated topic. There are myriad language constructs used to do so: Unevaluated, Hold, HoldForm, HoldAllComplete, other Hold*; see http://stackoverflow.com/questions/1616592/mathematica-uneva... and http://library.wolfram.com/infocenter/Conferences/377/ for more information.

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

#54
post #19

Earlier quoted context omitted.

And with good cause, I think. Mathematica syntax (both the verbose form and with the various syntactical sugar) is immensely more readable to the average person than Lisp. Of course, this could have been done on top of Lisp anyways (and wouldn't that be nice?)

Surprise, Macsyma, which is written in Lisp has that syntax. Macsyma is the earlier computer algebra system, which Kent Pitman mentioned in that post. He also mentions that Wolfram knew Macsyma. Example: applysymmetry(exp,opdum,symtype):=block( [getdum:get(opdum,symtype),piece,inflag:true,partswitch:true], if getdum=false then return(exp), subst(lambda([[arglist]], apply('aplsym1,append(getdum,[arglist,opdum]))), opd…

And this is an entirely normal usage of lisp: define a domain specific language (DSL) on top of the lisp, to manipulate the natural objects of the domain in a natural way.

I've always thought Mathematica would have been a better system build on top of a "real" lisp, and would have got there faster. I've never heard any of Wolframs statements about the parallels that have made me question that, but I could be missing something.

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

#56

Seems like a good example of technical people placing too much importance on a technical decision. It seems clear Lisp would have been a perfectly fine choice, as would a number of other languages. It also seems unlikely the world (or even Mathematica) would be dramatically different for it. I wish more "X is better than Y because of Z" discussions would admit aesthetics were an important factor. Instead we end up wi…

Wolfram's decision at worst did not impede the development of a tremendously successful software product. At best it enabled it. Mathematica is 27 years old. It predates the i486 which was the first mass market CPU with an FPU. In the early 1980's betting on Lisp was betting on Lisp machines and workstation class hardware. The first version of Mathematica ran on M68000 Macintosh machines. It's hard to imagine overcoming the pain that something slower than C would have inflicted on users.

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

#57
post #41

Earlier quoted context omitted.

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.

Except Lisps that are intended for numerical work, like MACLISP on PDP-10s at the time, did have arrays. And as noted, MACLISP was around then faster than DEC's FORTRAN (an issue DEC fixed not too much later). Lispers aren't stupid, which should be distinguished from how easy it is make a simple Lisp. Making a performant one takes effort on the scale of making any similar language implication good and fast.

I never said that Lisp didn't have arrays. I said that representing a matrix as a list of lists would not perform well.

What I meant to be saying is that Wolfram plausibly may have looked at a bad data representation for matrices on Lisp, and concluded that Lisp was inherently 100x as slow.

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

#58
post #7

Isn't Mathematica very Lispy? It looks like R-expressions.

Well M-expressions to be more precise. Actually if you ask some they'll tell you that Mathematica is the only Lisp that implemented them.

> Well M-expressions to be more precise.

M-expressions is what I meant, I think I misremembered the name.

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

#60
post #20

Earlier quoted context omitted.

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 wonder if he would have the balls to say that if Feynman was still around?

For what it's worth, Feynman was on Wolfram's dissertation committee

http://thesis.library.caltech.edu/2597/

Post reply on HN