What is Wolfram Language (mathematica)'s influence on Julia?


#1

I read on wikipedia that Julia was influenced by Mathematica. I have never used mathematica so am wondering which part of it influenced Julia? For example I know the list comprehension from Python influenced Julia.


#2

Defining a function for multiple types is very similar to Mathematica’s defining of functions for multiple patterns. (Mathematica’s dispatch is much more powerful, but also much slower.)

The postfix notation

-2 |> abs

is similar (and I believe inspired by) Mathematica’s

-2 // Abs 

#3

Thought |> was borrowed from F#


#4

I think you will find that CLOS predates that by (literally) decades, and is much more similar to Julia. In fact, one can argue that Julia’s multimethods is CLOS

  1. without the frills that even expert Common Lispers use rarely (eg method combinations),
  2. without the specializations that would make optimization difficult (eg EQL, but we get Val instead),
  3. parametric types thrown in (arguably the most powerful feature of Julia).

#5

Mathematica was very much inspired by LISP. But LISP was never really used in scientific computing.


#6

True. I guess the influence of Mathematica is the fact that functional programming can be used for data science.


#7

That may be, but my point was that Julia’s multimethods are much closer to CLOS than Mathematica (or anything else, with the possible exception of Dylan). So I am not convinced that they were inspired by Mathematica. Of course, only the core team can say for sure what inspired them for a particular language feature.

What I find great about Mathematica is its plotting system. Hope we will get there one day. But unfortunately plotting is not a single feature one can just adapt to a language, it is a product of a lot of hard work.


#8

You are wrong, REDUCE, a general purpose software for scientific computing that predates pretty much all others is implemented on LISP, and it turns out that it and Maxima (also a LISP scientific software) are what Mathematica was actually inspired by (if you do your research there is a source where it is mentioned). Mathematica is essentially a type of LISP too, technically. Also, LISP was used at NASA for a long time.

So lisp was indeed the basis for many different scientific computing softwares.

Note: last night I released v0.2.1 of Reduce.jl, you can do some fun stuff using it in Julia.


#9

Let’s just cut to the chase: every single thing you can possibly imagine in computing was invented by John von Neumann before 1953, first implemented at Bell Labs using LISP and UNIX before 1972 and used in a video game by David Braben or John Carmack before 1994. :laughing:


#10

Well… I suspect Fortran, IBM & John Backus might have contributed some stuff too :wink:


#11

Well, before that you had Charles Babbage and Konrad Zuse, also Alan Turing. Before that there were armies of human computers.

Actually, Let me take you back to the 6th century BCE, when the Indian scholar Panini invented computer science, thousands of years before electronics were invented :exploding_head:

Pāṇini’s grammar is the world’s first formal system, developed well before the 19th century innovations of Gottlob Frege and the subsequent development of mathematical logic. In designing his grammar, Pāṇini used the method of “auxiliary symbols”, in which new affixes are designated to mark syntactic categories and the control of grammatical derivations. This technique, rediscovered by the logician Emil Post, became a standard method in the design of computer programming languages.[66] Sanskritists now accept that Pāṇini’s linguistic apparatus is well-described as an “applied” Post system. Considerable evidence shows ancient mastery of context-sensitive grammars, and a general ability to solve many complex problems. Frits Staal has written that “Panini is the Indian Euclid.”

Pāṇini’s theory of morphological analysis was more advanced than any equivalent Western theory before the 20th century.[15] His treatise is generative and descriptive, and has been compared to the Turing machine wherein the logical structure of any computing device has been reduced to its essentials using an idealized mathematical model.[1]


#12

Mathematica and CLOS are contemporaneous (Mathematica was launched in 1988, CLOS standardisation effort started in 1986 and finished in 1990). Even considering the predecessors of CLOS you get only one extra decade, not several.


#13

It wasn’t really. People keep adding influences in the wikipedia page and they just get added back even if you delete them. I pared the list down at one point, but people seem to want to claim anything and everything is an influence – even languages that I’m pretty sure none Jeff, Viral and I have never programmed in, like Fortran and Lua. At least I have used Mathematica extensively, but it’s still not a particularly big influence on Julia.


#14

Note that the Julia manual is partly responsible for this, since it says:

To achieve this, Julia builds upon the lineage of mathematical programming languages, but also borrows much from popular dynamic languages, including Lisp, Perl, Python, Lua, and Ruby.

And the why we created Julia article mentions Mathematica.


#15

After pondering Panini and his recursive linguistic grammar some more, and thinking of the fact some have also proposed the use of Julia as a “specification language”, I think what makes Julia stand out is that it is a great universal language that has the potential and ability to easily and precisely express algorithms. The high-level abstraction layer combined with the low-level efficient compilation also happens to make it as a very computationally useful language at the same time.

Perhaps, the influence that Mathematica may have indirectly or subconsiously had on the development of the Julia langauge could have been through its hertiage from Lisp. Considering Mathematica may implicitly belong to that pool of languages you may also call Lisp, it just might not be a direct inheritance relation from Mathematica to Julia, but could be onnected via the Lisp inheritance.


#16

“Connected” is pretty meaningless in this context, replacing a directed graph (influence) with an undirected one.


#17

My intention was not to change it from a directed graph to an undirected
graph, but to indicate that digraph is rooted at Lisp, with Julia and
Mathematica being on separate branches from that root.

Just an idea.


#18

Yeah, fair enough, and I did add Lua to that list. Although in the original wording it was clearer that it was by inclusion in the set of dynamic languages, rather than as a direct influence. Similarities between Fortran and Julia are striking, but they’re all result of multiple indirect influences and convergent evolution. Similarly Fortress and Julia have a lot in common, but it was definitely not an influence, even indirectly.