13 ms·
Why Wolfram Mathematica did not use Lisp (2002)
- TazeTSchnitzel 11y agoIsn't Mathematica very Lispy? It looks like R-expressions.
- carlob 11y agoWell M-expressions to be more precise. Actually if you ask some they'll tell you that Mathematica is the only Lisp that implemented them.
- ska 11y agoOr M-LISP. Or Logo for that matter (loosely).
- carlob 11y agoYeah, I don't really believe the claim that it's the only one, it's probably fair to say it's the most widely used though.
- ben11kehoe 11y agoAnd 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?)
- lispm 11y agoSurprise, 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]))), opdum,exp))$ If you know Lisp, you will recognize typical constructs like IF, RETURN, SUBST, LAMBDA, APPLY, APPEND, ...
- ska 11y agoAnd 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.
- ben11kehoe 11y agoThis still seems more limited than the Mathematica syntax, which includes postfix operators, for example. I also appreciate that parentheses are used only for grouping, not for function calling and such. I'm not saying this couldn't have been done with Macsyma or on top of Lisp more generally (indeed, that would be nice), or that Mathematica wasn't influenced by Macsyma; I'm saying that purely for syntax, I think Mathematica ended up with a better, more extensive, and easier-to-use system than pretty much any other language.
- lispm 11y agoMacsyma also has postfix operators.
- TazeTSchnitzel 11y ago> Well M-expressions to be more precise. M-expressions is what I meant, I think I misremembered the name.
- fanf2 11y agoDylan is a lisp with readable syntax.
- phs2501 11y agoThe 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-unevaluated-vs-defer-vs-hold-vs-holdform-vs-holdallcomplete-vs-etc http://stackoverflow.com/questions/1616592/mathematica-uneva... and http://library.wolfram.com/infocenter/Conferences/377/ http://library.wolfram.com/infocenter/Conferences/377/ for more information.
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]
- jgrahamc 11y agoRandom Wolfram story, was at lunch yesterday at my old college and respected computer scientist who originally interviewed me. He told me that he first showed Wolfram a computer. This guy was a friend of Wolfram's mother who asked for help because 8 year old Stephen was "bored with dinosaurs" and wanted something else to think about.
- AceJohnny2 11y agoHow did the respected computer scientist feel about having unleashed Stephen Wolfram upon the computing world? :)
- DonHopkins 11y agoWell at least he diverted him away from dinosaurs, otherwise Jurassic Park might have been a documentary!
- anthony_d 11y agoSeems 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 with convoluted justifications that just annoy everyone (Lisp is slow, C is fast, C++ is complicated)
- ska 11y agoTo me it sounds more like NIH syndrome. Wolfram was young, smart, cocky, and didn't really know much about computation when he started - but was convinced he could do a better job if he started from scratch.
- gh02t 11y ago> Wolfram was young, smart, cocky He remains two of those things to this day. I have no doubt Wolfram is legitimately a genius (despite his arrogance and tendency to take credit for other people's inventions) and I adore Mathematica as it is, but I can't help but wonder how much better it would be if Wolfram's personality was less... abrasive.
- ska 11y agoI've never met him but have read some of his stuff over the years and talked to a few people who have (met him). He strikes me a clearly very smart, just not as smart as he thinks he is (not uncommon, but more rare at his level of talent I think). An aside: For what it's worth, I find the "genius" label problematic in general, not just for him. I think it's a concept that probably has useful application, but to < 1% of the people to whom it's applied. His abilities as a technical writer are middling, unfortunately, and at some point being able to communicate your ideas is almost as important as the ideas. I too wonder how much further Mathematica could have got if he hadn't pushed away a number of clearly talented people.
- jmount 11y agoAnother possible reason would be: Macsyma was already in LISP.
- agumonkey 11y agoMarket differentiation is a powerful reason.
- deleted 11y ago[deleted]
- karcass 11y ago"I wonder which will become self-aware first -- Wolfram Alpha, or Stephen Wolfram."
- mayoff 11y agoAttributed to Casey Muratori by http://chrishecker.com/Kurt_G%C3%B6del_is_Laughing_His_Ass_Off_Right_Now http://chrishecker.com/Kurt_G%C3%B6del_is_Laughing_His_Ass_O... - “Does anyone want to bet as to which will gain self-awareness first: Wolfram Alpha or Wolfram, Stephen?”
- DonHopkins 11y agoThe Donald Trump of the computer industry.
- tfgg 11y agoI 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.
- rndn 11y agoI'm not sure I get it. Is that a dig at how computationalism is met with skepticism among theoretical physicists?
- s_kilk 11y agoMore likely a dig at Wolframs gargantuan ego.
- thanatropism 11y agoBut isn't this the ultimate point of "science studies" (broadly put) since the days of Kuhn, Lakatos, Latour and so on? I mean, Wolfram's bizarre confirmation bias about discrete automata is (apparently) apparent to the computer-y people because we've seen discrete automata and have goofed with all sorts of complexity-generating simple formalisms (L-systems, genetic algorithms, ...) that are impressive for giggles (and some industrial applications) but don't amount to a kind of Kurzweilian Transcendence. ... but we're not all mathy enough to pick apart what string/brane theorists or even orthodox quantum gravitationists are doing and say with (possibly misguided) confidence that it's no hope for a theory of everything. The people who do are continental philosophers who tend to get laughed out of the room, often because they have silly overarching theories (Zizek has a couple of points about quantum physics, but then, he thinks psychoanalysis explains human history) that must be relentlessly mocked.
- adwf 11y agoWolfram 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.
- e40 11y agoRelated to this: I was at UC Berkeley in the early 80's (and did the port of Vaxima (the VAX version of Macsyma, running on Franz Lisp) to the Motorola 68000). There was definitely a rivalry between UCB and Caltech in the symbolic algebra area, and I think the "100x slower" was just an excuse to do it differently. I don't think he would have wanted to appear to be following anyone at UCB.
- coldtea 11y ago>If that's not extreme NIH, I don't know what is. Worked well for him though...
- adwf 11y agoAbsolutely; I'm not knocking his achievements. It's a rare intelligence who can work through NIH and succeed so well.
- SilasX 11y agoAgreed. 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
- mseebach 11y agoWell, when "not invented here" is accompanied by "not invented anywhere else, either", we usually just call it "invented".
- arca_vorago 11y agoI 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.
- pjmlp 11y agoMost proper Lisps are all proprietary, what GPL scheme? None of the GPL Lisps compare to what is offered by the likes of Allegro Common Lisp and similar environments.
- arca_vorago 11y agoDidn't realize, the only LISP I regularly interact with is emacs lisp...
- krick 11y ago> None of the GPL Lisps compare to what is offered by the likes of Allegro Common Lisp and similar environments. Care to elaborate?
- pjmlp 11y agoAllegro Common Lisp, Franz Lisp provide IDE tooling reminiscent of the Lisp Machines. With visual debuggers, graphical REPL, hypertext documentation triggered from the REPL, libraries to integrate with the OS.... Additionally their optimising compilers are quite good.
- hga 11y agoIt 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.
- orbifold 11y agoThis 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 data structure used by Mathematica is not a list, I think the support for "level specs" points at how internally the data is most likely represented, although I'm not sure.
- reikonomusha 11y agoIt 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.
- carlob 11y agoI'm not sure they are quite equivalent, the semantics of pattern matching tend to be different: in lisps lists are always a kind of binary tree so (list 1 2 3) is really (1 . (2 . (3 . nil))), this has a consequence for unification in that (list 1 2 3) will match (x y) as 1 and (list 2 3). In Mathematica on the other hand lists tend to be flatter if you will, and there is this concept of Sequence which I sometimes find problematic.
- codeflo 11y agoI don't think that's true: (x y) is (x . (y . nil)) and shouldn't match (1 . (2 . (3 . nil))), because nil would have to match (3 . nil).
- fnordsensei 11y agoIn Clojure, (-> A [B C] [X Y] [Z])
- dmlorenzetti 11y agoI 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 in the usenet post. This would not, of course, be a good comparison between the languages, but it might well give you a 100x speed difference. Taking Pitman's story at face value, it sounds like Wolfram wasn't very sophisticated about these things, and wasn't open to listening to explications. So he might have extrapolated a single dumb benchmark into a universal truth. At the same time, it sounds like Pitman tried to convince Wolfram to represent floats as the ratio of two bignums, "with lots of other hidden bits to assure that any decimalization had enough bits to be precise." I can understand Wolfram not particularly wanting to taste any of that pie. I have worked with a simulation platform that uses paired BigNums just for time values (other values in the simulation use regular double-precision variables), and it was a big drain on simulation speed.
- thanatropism 11y agoEither 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).
- AnimalMuppet 11y agoI 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.
- 11y ago
- thanatropism 11y agoMathematica is an interesting case study for a general-purpose software package that happens to be more feature-full and functional -- not just "more convenient" or "better UX" -- than any open-source counterparts. I tend to use some proprietary scientific software, but a lot of it is because academia already has already invested in codebases for, say, Stata, GAMS, Matlab and so on. But Matlab is two steps removed from raw Fortran; and what sets it apart from the many identical-syntax clones are a few narrowly-oriented toolsets aimed at some kinds of engineers. Mathematica is the only one I buy versions for my home computer. It's very, very good.
- cwyers 11y ago> Mathematica is an interesting case study for a general-purpose software package that happens to be more feature-full and functional -- not just "more convenient" or "better UX" -- than any open-source counterparts. Isn't the world littered with such examples? Office is more feature-full than OpenOffice, Photoshop is more feature-full than GIMP, Illustrator is more feature-full than Inkscape, InDesign is more feature-full than Scribus, Avid|Final Cut|Premiere is more feature-full than any open-source NLE.
- thanatropism 11y agoOpenOffice is "good enough"; where Word isn't an option, it does the job. GIMP isn't even trying; it's not in the same market as Photoshop or casual image editing, which is well served by web apps these days. (One wonders what it is for; padding developer CVs, possibly) Finally, nonlinear video editing hardly qualifies for "general purpose" -- and is there anything worth mentioning as for open source offerings? Mathematica, on the other hand, is squarely in the terrain usually covered by open source.
- jwmerrill 11y agoWhat language features distinguish Mathematica from lisp? Are we just talking about the m-expression syntax, or are there more fundamental differences?
- reikonomusha 11y agoMathematica'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).
- fnordsensei 11y agoUnless you write a DSL that evaluates in the manner you want.
- nswanberg 11y agoHere's what Wolfram wrote about Mathematica vs lisp in the first Mathematica book: http://reference.wolfram.com/legacy/v1/contents/4.2.7.pdf 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 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-before-mathematica/ http://blog.stephenwolfram.com/2013/06/there-was-a-time-befo...
- hga 11y agoThing is, you wouldn't develop a system like Mathematica without writing those sorts of things on top of your Lisp implementation. As MACSYMA, the first of these programs did, which he used prior to starting on SMP, even using a similar syntax per this comment https://news.ycombinator.com/item?id=9798643 https://news.ycombinator.com/item?id=9798643
- laichzeit0 11y agoWolfram is extremely cocky for a bald man.
- castis 11y agoI'll bite. What does hair (or lack thereof) have to do with anything?
- mikerichards 11y agoFor some reason, that's actually a pretty funny troll. He should've added on to it though. "If he's so smart, he would've found the cure for baldness already".
- nicarus1984 11y agoGrass doesn't grow on a busy street...
- DonHopkins 11y agoParts of him are actually quite hairy. But fortunately, just like his theory of everything, he's doesn't bother telling people, since doctors wouldn't understand it. [1] [1] https://news.ycombinator.com/item?id=9798776 https://news.ycombinator.com/item?id=9798776
- davesque 11y agoWell, it's not entirely surprising to hear an anecdote about a young (19 year old), brilliant programmer arrogantly dismissing legitimate possibilities.
- danbmil99 11y agoTL; DR: Stephen Wolfram has high self-regard
- mikerichards 11y agoThe only reason I still subscribe to c.l.l is for awesome stories like this
- micro_cam 11y agoWolfram has said fellow student Rob Pike (who went on to co create go etc) convinced him to use C though i've never seen the reasons enumerated. So while he certainly comes off as arrogant and certainly reinvented a lot of stuff it isn't like he didn't listen to anyone...
- gclaramunt 11y agoI think is obvious that Wolfram won't use anything that he can't take full credit...
- chaostheory 11y agosay what you will about Wolfram, but he took a risk, got things done, and shipped something people wanted
- jakejake 11y agoThis quote struck me "I'm pretty sure his response was that what tools others chose to use or not use was not his concern" On the one hand I feel a conflict of wanting to use every new, shiny tool. But a dose of this attitude would help me get a lot more work done.
- tzs 11y agoI think the author is misremembering Wolfram's claims. I recall attending the first open demo of SMP, where Wolfram (and I think co-author Chris Cole) were demoing it in a large Caltech lecture hall. Here's what I recall. They had tried to use Macsyma for their physics work, and found experimentally that it was too slow on what they considered to be "medium" problems, and could not handle "large" problems at all. They were trying to do things that were pushing the limits, and pushing them hard, of what could be done on the hardware of the day [1]. They showed some benchmarks comparing SMP to Macsyma using the kind of problems that had arisen in their physics research. For "small" problems, SMP was a bit faster. Maybe 2 or 3 times or so faster. For "medium" problems, it was 100 times faster. And it could do "large" problems. I don't think I ever heard Wolfram say anything about Lisp being 100 times slower than C in general. I only heard claims like that when he was talking specifically about building systems like SMP, and was comparing basing such systems on top of a general purpose high level language (Lisp) vs. basing them on something built and optimized specifically to support a system like SMP. [1] The SMP work was done on CITHEP's (Caltech High Energy Physics) VAX 11/780. I was an undergrad at Caltech at the time, working part time at CITHEP as a system programmer and admin, so knew many people involved in SMP development and got to watch it as it progressed, and then was put into production by working physicists.
- akssri 11y agoWhat exactly were these 'problems' ?
- orbifold 11y agoIn high energy physics people compute scattering amplitudes, the goal is to estimate how many events of a particular kind a detector in a collider experiment will see at various energies. The predominant tool for doing that is to calculate contributions from so called Feynman diagrams, each diagram is a graphical representation of some fairly complicated integral, the integrant is some rational function of the particle momenta. The nominator has to be simplified by manipulating spinor identities and in the case of for example QCD one has to work out color factors. Just a few years before people were computing 1000s of those diagrams by hand for Quantum electro dynamics, often while cross checking each others results. For non-abelian Yang-Mills Theory (t'Hooft Veltman had published their landmark paper in 1972) this is more or less infeasible beyond first order. The number of diagrams that have to be evaluated quickly explodes beyond the first order and in the case of QCD already at two loops would require herculean efforts to do by hand. In fact Schoonschip was one of the first computer algebra systems and developed for just this reason. Beyond that areas like Supersymmetry and certain parts of General Relativity would be very painful to work in, if everything had to be done by hand.
- waynecochran 11y agoIf he had used Lisp how would he have ported it to so many machines? I programmed in Common Lisp quite a bit in grad school and I liked it, but it was always on a specific platform. I would use Lisp even now, but I'll often use C/C++ just because I know I can get it to work most everywhere.
- _ph_ 11y agoSBCL runs pretty much everywhere: http://sbcl.org/platform-table.html http://sbcl.org/platform-table.html
- rjsw 11y agoIt didn't when Mathematica was being developed. CMUCL on i386 wasn't released until 1996. Kyoto Common Lisp was available in the late 80s and was fairly portable since it compiles to C.
- pvg 11y agoWolfram himself has a far more detailed write-up on the development of SMP and Mathematica. http://blog.stephenwolfram.com/2013/06/there-was-a-time-before-mathematica/ http://blog.stephenwolfram.com/2013/06/there-was-a-time-befo... It might be biased or self-serving but it's more interesting than an offhand USENET recollection about a brilliant and arrogant young man.
- AceJohnny2 11y agoPeople's experience with Stephen Wolfram is that he is very biased and self-serving, hence the popularity of an anecdote from an external source.
- chrisbennet 11y ago"During the dinner discussion leading up to this definition the foreword to one of the Mathematica books was mentioned, where Stephen Wolfram (in third person) wrote "Stephen Wolfram is the creator of Mathematica and is widely regarded as the most important innovator in scientific and technical computing today." In honour of this self-assessment I suggest we call the unit of ego the Wolfram." - "Monumental egos" blog post by Anders Sandberg http://www.aleph.se/andart/archives/2009/04/monumental_egos.html http://www.aleph.se/andart/archives/2009/04/monumental_egos....
- munificent 11y agoWhat's the conversion factor between Wolfram's and nanodijkstras[1]? This would be a great question to answer using Wolfram Alpha, since it does have nanodijkstras[2] and Wolfram[3]. Alas, the conversion is beyond it[4]. [1]: https://www.youtube.com/watch?v=Xoyw8LHGtzk https://www.youtube.com/watch?v=Xoyw8LHGtzk [2]: http://www.wolframalpha.com/input/?i=nanodijkstra http://www.wolframalpha.com/input/?i=nanodijkstra [3]: http://www.wolframalpha.com/input/?i=wolfram http://www.wolframalpha.com/input/?i=wolfram [4]: http://www.wolframalpha.com/input/?i=wolfram+to+nanodijkstra http://www.wolframalpha.com/input/?i=wolfram+to+nanodijkstra
- DonHopkins 11y agoMaybe KMP should have recycled Jerry Pournelle's account for a certain bright 19-year-old, instead... ;) http://www.stormtiger.org/bob/humor/pournell/story.html http://www.stormtiger.org/bob/humor/pournell/story.html "Personally, I'd just turn off his account. It's not like it's the first time, and he not only flaunts his use of our machines but stabs us in the back with grumblings about why he doesn't like this or that program of ours when he gets a chance. (Am thinking particularly of an article he wrote which condemned Lisp for reasons amounting to little more than his ignorance, but which cited Teach-Lisp in a not-friendly light... The man has learned nothing from his presence on MC and sets a bad example of what people might potentially accomplish there. I'd rather recycle his account for some bright 12-yr-old...)" -KMP
- hga 11y agoHe'd already used Macsyma on MIT-MC, had written his own SMP, left Caltech due to IP issues WRT SMP, and was in 1985 working on cellular automata at the IAS while no doubt arranging for SMP Mark II, AKA Mathematica which he started the next year.... Interestingly, Pournelle was the kind of guy who could exercise Macsyma, or at least his first computer program solved a system of 60 or so linear equations on a IBM 650, an "affordable" machine back in the '50s that used a magnetic drum for its main memory.
- DonHopkins 11y agoYeah, with turists like Jerry Pournelle, who needs Stephen Wolfram? "Mr. Pournelle bids me tell you that if you intended to annoy him, you have succeeded, and that his next column in BYTE will have a lot to say about the ARPANET...." "One thing that is known about ARPA: you can be heaved off it for supporting the policies of the Department of Defense. Of course that was intended to anger me. If you have an ARPA account, please tell CSTACY that he was successful; now let us see if my Pentagon friends can upset him. Or perhaps some reporter friends. Or both., Or even the House Armed Services Committee."
- hga 11y agoChris was really, really stupid to purge JERRYP for badthink; if Jerry had been intent on revenge vs. reform, he could have done a lot of damage to certain parties, although not of course the Internet itself, which that year was starting to be substantially extended by the NSFNet.