149 points · by RafelMri · 4y ago · 185 comments
It really is an astounding system. If you enjoy functional programming, the language is super expressive and productive. The integrated libraries are fantastic -- especially if you want to chain together different knowledge domains through a consistent interface and syntax. You can get the entire Wolfram Alpha knowledgebase and curated datasets to use in your programs immediately.
The front-end is just lightyears in front of Jupyter notebooks in just about every conceivable way.
This isn't to hide that there are some frustrating things about the language (like, machine learning development has just stopped dead after a couple of really great years of feature dev...why?) and, especially, the organisation and some of its personalities. But the product -- it really should get a lot more kudos and wow factor based on real accomplishments and features that are live, in the real world.
I love Wolfram stuff.
As a proprietary language and kernel, it can never compete long-term with open source alternatives.
It's one thing to have a proprietary product, but for decades now proprietary languages have been a no-go for practically everyone. Even formerly closed languages have been opened sourced, such as Java and C#.
There is no other use for Wolfram Language scripts outside of Mathematica, which comes with a "license server". That's... a dead end.
Can I publish Wolfram code in Docker Hub and expect it to work (legally)? No.
Can I throw some Wolfram code into an Azure Function and have it compute something for me on demand? Nope.
Can I embed Wolfram code into a C# app, publish it on GitHub, and have other people be able to use it without forking out $thousands for a Mathematica license? Nope!
And on and on...
Python, Julia, and Jupyter notebooks will simply wipe out all usage of Mathematica outside of a few esoteric fields. As you said, they're all markedly inferior in almost every way, except for one critical one: they're open and extensible.
You mentioned AI/ML having stopped dead in Mathematica. I noticed that too. I wanted to test some GPU-hosted ML stuff recently that's not the standard Pytorch/Tensorflow type of thing, checked Mathematica, gave up, and I'm now using Julia.
If Mathematica was more open, there would be no "dead end" there, I could simply extend it. Or more importantly, other people would have already.
The guy who was in charge of negotiating software licenses for the university said that it was a chicken and egg problem. Mathematica wasn't very available because it was expensive, Wolfram wasn't easy to negotiate with.
With people not learning Mathematica there never developed a demand for it - and because you couldn't expect to get your hands on a license it wasn't worth the investment both in time and money to learn mathematica, or worse yet, to make yourself dependent on it for getting work done.
Mathematica has always been a lovely product. But it has also always been impractical due to its pricing and restrictions. Whether you are in academia, a working professional or just a hobbyist. Which has made it a very niche piece of software. For 30+ years.
There is no reason to believe this will change. And that's fine. It is their software and they can do whatever they want with it. But it also means it is largely irrelevant software for most people, including the scientific community. That isn't a disparaging remark, it is an accurate representation of reality.
The hobbyist license is less than $200 per year. What kind of pricing would make it practical for you?
[Edit: The student license (non-expiring) was $139 twenty years ago, $176 today. That may be "expensive" but many textbooks cost more than that.]
Yes. They call it Wolfram Engine
>Can I publish Wolfram code in Docker Hub and expect it to work (legally)? No.
Yes, they call it Wolfram Application Server (does require a license)
>Can I throw some Wolfram code into an Azure Function and have it compute something for me on demand? Nope.
Yes: https://reference.wolfram.com/language/ref/RemoteBatchSubmit...
Contrast with gcc.
Until there is an open source software that can match the raw symbolic power combined with the huge libraries nothing can touch it for a lot of people.
same deal with solvers more generally. the coin-or stuff (e.g. Cbc) is slow and buggy, Cplex and Gurobi are far better but very expensive. where are the PhDs in this field? what are they building?
It would be insane value for everyone if the symbolic niche could also be covered by a general purpose language...
I haven't worked with Mathematica in years, though, so this is mostly speculation: how strictly do they maintain backward compatibility?
That said, I'm still a Mathematica person at heart.
I genuinely hope that Octave can take off and trade blows with MATLAB face to face, but not sure if that will ever happen simply because of the amount of money MathWorks is pumping into developing toolboxes.
No, its usage is just declining slower in those areas because ppl don't want unnecessary change introducing unnecessary defects, esp since safety and reliability matters a lot for some equipments, and also engineers spend time on smth else than learning new languages and frameworks.
In 20 years Matlab will be as legacy as Fortran is now, still some left but mostly forgone.
I'd wager that most of Mathematica's usage today, and in the past has been for those esoteric fields.
MATLAB always had higher market share for numerical work.
Mathematica's strength is in pure math. And nothing out there comes even close - not even SageMath. I wouldn't be surprised if all the pure math open source developers who are also math experts out there are fewer in number than those who contribute to Mathematica. You need detailed expertise in a math discipline. William Stein - founder of SageMath, wrote once on how impossibly difficult it is to get grants to support SageMath - most of them go to Mathematica or MATLAB. So if a math faculty member wants the extra income from grants, he/she is going to write a proposal targeting Mathematica, not SageMath.
Of course, once Stephen Wolfram dies, I don't know if Mathematica will continue to survive. But as long as he's alive, no open source pure math SW will overtake it.
What "open source alternatives"? There aren't any at this level of polish and maturity...
Meanwhile, whatever the "dustbin of history" does, we can continue keep using Mathematica just fine, for 20+ years, and 20+ more...
If their influence on that is their only contribution to the world, which it is not, then they have made their mark.
Since finishing up in university, I have sorely missed my free access to a fast and ergonomic symbolic equation solver. Sympy is an unsatisfactory substitute.
People have been saying this about Windows for the last 35 years.
Real time bare metal implementations, GUI tooling, 3rd party GUI components ecosystem, data analysis of runtimes in productions without code changes, architecture modeling tools on the IDEs,...
Yup, and all that's needed for the floodgates to open is for someone to write some sort of converter.
And no, "just run pip ..." will not work - who worked on these facilities probably knows how some of the smartest people in the world could be extremely dumb with the tech stuff.
Regarding Wolfram Language, at the beginning (when it was just a "Mathematica"), I hated it as I came from the C/C++ world. But after I embraced lisp et al., I found Wolfram Language very expressive and easier to grasp than before. Moreover, if I'm not mistaken, Wolfram Language is the only widespread implementation of M-expressions [1], the original form of LISP how John McCarthy wanted it to look.
> The front-end is just lightyears in front of Jupyter notebooks in just about every conceivable way.
Absolutely :)
I'm with you 100% here, but I'm also 100% with sibling jiggawatts.
To me, Mathematica is a computation environment that conveys a Lisp Machine feeling of "the machine and I are working on this problem".
You know, that "assembling things live in the sky" Lisp feeling (Yegge's phrase, not mine).
The only other computation environment that is right there en par in flexibility and conveyance of the same trippy feeling is, of course, Emacs.
The company can still make money from academic and professional licensing and support contracts, and everyone else gets to have access to an awesome thinking tool as a matter of fact.
They've already gone that direction a bit with the Raspberry release, what's left now is just the final push.
So, if Stephen Wolfram ever reads this:
Open source Mathematica and it will have a chance at immortality.
Just like Lisp and just like Emacs, and the people will rejoice.
Disclaimer: I started with Mathematica 4.0 at age 14 (a pirate copy too, sorry!), turned on by that marvellous column in Quantum. But I was put off precisely due to the proprietary nature, and switched to C and Lisp. Consequently I became a CS guy rather than a Physics guy, because C and Lisp were accessible early on, while Mathematica wasn't (legitimately).
Agreed. That's the main thing that tends to get lost when people make comparisons between MATLAB and Mathematica. Mathematica is conceptually elegant and often just a joy to work with as an intellectual tool. Its core problem is just that it isn't more widely available. MATLAB on the other hand is just an inelegant, obvious implementation of a numerical environment. Its strength is just the variety of toolkits you can license, but once your domains get equivalent open source toolkits, there's no reason not to bail on MATLAB.
>I started with Mathematica 4.0 at age 14 (a pirate copy too, sorry!)
The nice thing these days is that the full version of Mathematica is available for free on the Raspberry Pi. Wolfram deserves some kudos for that.
I feel like the other drug dealers in history might be offended at not getting at least some credit here for inventing this method.
Do you know Pharo? The experience you describe is also typical in the Smalltalk family. See https://pharo.org/
Got a source on that? It sounds intriguing.
which column?
From https://reference.wolfram.com/language/guide/SummaryOfNewFea...
New in machine learning in 13.1 ...
ContentDetectorFunction (updated) — support for Information DimensionReducerFunction(updated) ▪ FeatureExtractorFunction(updated) FindClusters (updated) — support for fixed number of clusters and UpTo ClusterClassify(updated) ▪ ClusteringComponents(updated) Interpretable Machine Learning FeatureValueImpactPlot — plots the impact of a feature on a model result FeatureImpactPlot — plots the impact of each feature together CumulativeFeatureImpactPlot — plots the cumulative impact of each feature FeatureValueDependencyPlot — plots the result dependency on a feature value Network Layers » ReplicateLayer (updated) — support for integer arrays RandomArrayLayer (updated) — support for more statistical distribution AttentionLayer (updated) — support for dropout and local masking ElementwiseLayer (updated) — new activations "Mish" and "GELU" ThreadingLayer(updated) ▪ FunctionLayer(updated) Network Training » NetTrain (updated), LossFunction (updated) — support for multi-output and nonscalar loss Encoders & Decoders » "Image" (updated) — resampling and padding support "Class" (updated) — support for top-k and top-p sampling (nucleus sampling) Formats "ONNX" (updated) — export support for net operators
I would say in 2018-2019 the ML / Deep learning stack was actually very impressive compared with what was available in FOSS. Now -- it's languishing. Badly.
> The front-end is just lightyears in front of Jupyter notebooks in just about every conceivable way.
I had the opposite experience, but it's a very broad statement and I suspect we took different interpretations of "front-end"
A few pain points for me:
- No Markdown support. Yes, there's rich input, but I find it more natural to write prose in a markup language rather than with a rich editor.
- Single "kernel" support. This isn't a criticism of Mathematica per-se: it doesn't care about other languages. But, it's nice to be able to use Jupyter Notebooks with C++, Python, etc.
- Limited UX w.r.t layout. JupyterLab lets me pin outputs, split the view, run a terminal alongside my notebook etc.
- Restricted ecosystem. This is a big one - it's not trivial to write an extension for Mathematica to extend its UX / rich output mechanism. With Jupyter, this is fairly trivial.
Don't get me wrong, they're different tools, and that's why I'm reluctant to engage with "X is better than Y" discussions. Mathematica is vastly unsuited to the kind of analysis / work that I do, whilst I'm sure the same is true of those who swear by Mathematica.
Interesting that both are commercial languages.
There's basically zero widely used programming languages that are not open-source, get to grips with this ffs. Esp. since Wolfram strives to be somewhat-general-purpose in a way (it's not smth like eg. K who's niche anyway) and having an open-source version is crucial in this segment.
Hire some ppl (sales, mgmt, product etc.) who know how to make money from open-source (get some from RedHat, IBM etc.) and make this technology accessible to not have all this effort practically wasted, eg. I'd love to use Wolfram instead of Python, but non-opensource is just a no-go for any foundational technology (language, framework, server).
Wasted as in providing a continuously improved product to the thousands of paying customers that fund this effort?
Mathematica is a very niche product. It isn't even very relevant in academia or in engineering. But it could have been if Wolfram hadn't hobbled it with unproductive restrictions. It could have had an audience of millions, and that audience would have brought it more value than a single company is capable of creating through a community.
Just look at Python. It is just a language. And a not particularly good one at that. ALL of its value comes from the community. Compared to Python, Mathematica isn't even a rounding error in terms of value created.
Imagine if Mathematica had been at the core of the last 15 years of data science, machine learning and whatnot? Imagine if the work and the value that went into the Python ecosystem had instead gone into Mathematica. Imagine if even just one of the many things Mathematica can potentially do well had become the go-to way for doing things.
But it didn't. Because Mathematica is fundamentally incompatible with the way communities work.
If Mathematica had been open-sourced twenty years ago it wouldn't have taken the place of Python. It probably would be even more niche today - and worse.
Excel deserves to have the label of programming language even if it shuns that label due to it's target audience.
This also made the area palatable for other commercial competitors to enter the space - Google-sheets drive A TON of enterprise org work nowadays.
You could say that open-source alternatives immensely popularized spreadsheets and resulted in the very nice ecosystem we have now.
Sure, heave finance user stick to MS Excell because MS is pressured to cater very well to their needs, else they will move away to other free or paid alternatives.
Also, there's a reason why multi-dimensional spreadheets are not more popular despite solving so many problems of regular spreadheets: all are proprietary and very different one from another - you probably pick smth like Quantrix (https://quantrix.com/products/quantrix-modeler/), and you'd get insane prices and 100% lock-in... better stick to Excell and/or its open-source and/or free alternatives despite being a worse tool :)
- Is "Wolfram Language" the language used in Mathematica notebooks? Or is Mathematica a separate language, implemented using Wolfram Language? What does Mathematica add to Wolfram Language?
- I assume the Mathematica language is interpreted (not compiled) so it can be used in interactive notebooks. Any info about what its interpreter is like? I'm guessing it is compiled to byte code prior to being interpreted?
- How are symbolic expressions represented? Are symbolic expressions a distinct data type? Can you write a function that takes a symbolic expression and computes the derivative (I'm sure such a function is built in, but does the language let you implement a thing like this yourself?)
- Is there any kind of static typing, or is everything dynamically typed?
2: It is usually interpreted but can be compiled. If you RTFA there’s plenty of information about new compiler functions.
3: All expressions in Mathematica have the same form. For example 1+2 is just shorthand for Add[1, 2]. Think of them as M-expressions from LISP (kind of). These can be evaluated or manipulated. Symbolic expressions are not fundamentally different from other types of expressions. Indeed everything is a “symbolic expression”.
4: Wolfram Language/Mathematica goes to great lengths to hide this from you. Indeed again if RTFA you’d have read mentions of this with reference to interfacing with C code.
The symbolic evaluation is pretty novel. I assume it's not _just_ an AST. What do those structures look like?
What is the scoping? It feels like the emphasis is on global variables everywhere, but is it more subtle than that?
Are the data structures what we expect? Just in this post, Threaded implies some abstractions there. I would assume that some kind of "deferred" values are pretty typical throughout, is there a formal notion of that? A lot of it is deliberately hidden in the language, but I assume you can write code that handles that stuff directly.
Speaking of derivatives, I assume you can indicate how to take the derivative of new kinds of functions. How does that work? Generic functions, object oriented, ad hoc registries, or something else?
Data structures: you have special syntax for lists and "associations" (dictionaries/maps/hashtables). Those are immutable objects, but in at least some cases the implementation has an optimization where it'll directly mutate the object if there is only one reference to it. There are other data structures with no special syntax in the language, for example numeric and sparse arrays. A number of mutable data structures have also been recently introduced: https://reference.wolfram.com/language/guide/DataStructures....
One thing that you might expect to be a special data structure but actually isn't are "pure functions" (anonymous functions). There are actually just the unevaluated expression, so you could programmatically inspect the body if you so wanted to.
Deferred values: You can apply the HoldFirst/HoldRest/HoldAll/HoldAllComplete attributes so during evaluation they receive the corresponding arguments unevaluated. You might think this would make metaprogramming be easy, but it's actually tricky because of the "infinite evaluation" (it keeps evaluating until a fixed point is reached) of the language.
Derivatives: It's a term rewriting language, so you just provide the rewrite rules like you would with any other user function. f /: D[f[x_]] := x^2 will define the derivative of f(x) to be x^2, and associates that definition with f so that rule won't have to be checked for all usages of D (this also saves you from having to unprotect D to add the rule).
Mathematica is the Wolfram Language plus a user interface similar to the Symbolics Dynamic Listener that acted as your command line front end. Jupyter Notebooks are quite similar since the idea of a scientist’s or engineer’s notebook where content is “live” is a pretty common one.
Mathematica is the star of the show. Its a large collection of specialty libraries and tools, with (mostly) very nice documentation, that all interoperate together well.
You can literally take a screenshot of something on your computer and copy paste it into a Mathematica function for image recognition or whatever and it will take it. It's a lot like a lisp machine in some ways. You can do advanced symbolic calculus, optimization, ML, 3D visualizations, audio processing, geographic visualizations, it has an import function that can handle practically anything, connect to databases...etc etc, all in a consistent way. Worth a look.
Also nitpick but you can run Wolfram code without Mathematica directly using the Wolfram Engine.
Correct me if I’m wrong but it held that this specific case was fair use, not that structure, function name, etc are not copyrightable. While it does give a huge precedent case, code in itself is still under copyright by default.
But IANAL.
(I am a lawyer, but not your lawyer. Not legal advice, etc.)
Hard to rationalize "unprecedented" with a lack of a Git-repo link for scientific software.
In R, packages are developed by separate authors. Similar functions don't have similar interfaces. There's no unity of style.
In Mathematica, much more careful thought was given to everything, including at a very basic level: names of functions.
Now I'm a big fan of the Tidyverse, and the fact that such a post-hoc language cleanup was possible (and done) is amazing... but the fact that it was necessary [1] is not.
[1] Really not intending flame-bait. This is an opinion that many people disagree with. Perhaps like systemd. It isn't the substance of this comment, it's just the context for my remarks.
I'm sure Mathematica could be great too, but I'm not sure how big of a community it has.
I’m going to be honest, even RStudio sucks compared to PyCharm. Like really sucks. I almost believe people who love RStudio have never used a better IDE or don’t have serious software development backgrounds to know that it sucks.
For data science, R is probably better, just because of the wide range of common and niche statistics software.