Launching Version 13.0 of Wolfram Language and Mathematica
writings.stephenwolfram.com
writings.stephenwolfram.com
Two things, though. Firstly, they are very stubborn on condoning a community to coalesce around the language other than through 'official' Wolfram channels. This comes from the big man himself, no doubt. As much as they want to drive adoption by coming up with (what they think are) "cool" sounding initiatives, they will never get devs to break from their core workflows and tools to do things the Wolfram way. There is no first-class support for daily-driver editing (vscode, emacs etc etc) for large-scale projects (other than an ancient eclipse package). Brenton Bostick at Wolfram has done some truly first class work in closing this gap though.
Secondly, this is the first major release that is a bit 'ho-hum' for a while. And it's reflective of the fact that whatever Stephen's pet interests are at a particular point in time will get attention in a release. For example, V11 was huge on Machine Learning and AI...now it barely gets a mention or extra development. Because SW is so focused on his Physics Project, this will likley be the case for a while.
To anyone thinking about using the language -- dive in. It's brilliant and expressive and fun. It's satisfying. You can do cool stuff. It just becomes very difficult when you want to scale it.
Anyone from WRI reading this: please, please, please let the community develop organically and support the toolchain everyone has wanted for so long. Or don't. But you need us more than we need you. Oh, and simplify the product line -- what a nightmare for newcomers to navigate. :-)
EDIT: One common exception to this principle is the use of proprietary C or Fortran compilers for high performance.
The blog post was probably literally written in and hosted entirely on open source software which were highly innovative at their earlier stages and continue to be highly innovative. This is a very self-serving presentation of an idea. Also, I officially dislike the word innovation.
Why don't you answer the question?
And I’ve enjoyed your wonderful post, thank you. HN can be truly amazing. I know, I know, upvotes are for that… ‘Tis the season, or something.
There's so much to it that it's easy to get lost. I don't even care for the "deep math" parts of it, it has _so many_ APIs for real-world data that "plain old exploration" is super-fun with it.
It'll also be great for anyone looking for "creative coding" (typically Processing.js etc is used for this), since the Graphics abilities are so quick and easy.
It has "a different shape" w.r.t. the languages and tools that are commonly used for programming, but it is a beast.
Highly recommend to anyone curious.
Also, https://www.wolfram.com/language/elementary-introduction/2nd... (free to read online, though I read it on paper) was helpful to me, browse through it to get a feel for what it's like to use it.
Having used Mathematica quite a bit for doing symbolic computation, my opinion on it is pretty much opposite to yours. While the extensive standard library is certainly nice, I think that the programming language used to access it is one of the worst programming languages in the world - certainly the worst I have ever used. I have never seen any other programming language where the basic scoping and evaluation rules are so badly designed and error-prone as in Mathematica.
This leads to a dynamic where anyone without the CS background to recognize the foot-gun and the discipline to disarm it winds up with awful spaghetti code and the all-to-familiar consequences: a big blob of unmaintainable mystery code that becomes more and more difficult to modify until all project time is spent merely keeping it working rather than improving upon it.
We might laugh about this kind of newbie mistake here on HN, but even extremely intelligent people can't be experts at everything and the sheer number of physicist-hours and mathematician-hours I've seen needlessly flushed down this particular toilet is really quite unfortunate.
Each run of some specific code is “ouch, we must try and see when we have the time to understand how it works and how each error is handled.” Just because it is soooo difficult to properly write a module.
This isn't the language though. A runtime in Mathematica is called a kernel. By default, Mathematica uses one. I think base licenses allow you to run two simultaneous runtimes and you can buy more. When you start a new window you have to pick the kernel, it doesn't launch its own like Jupyter would do.
This is an annoyance with Mathematica: it's proprietary software so it's in a world of license servers, license keys, artificial limits and paid upgrades.
f[x]
and the function `f` is not defined, Mathematica will not give me an error but instead just assume that I meant to create a symbolic expression. If you know some Lisp, just imagine that everything came with an implicit `quote` which would automatically get invoked whenever a unbound variable or function would we encountered.That issue alone has caused me so many errors simply from mistyping some function or variable name. For simple expressions, such bugs are pretty obvious to spot but if the same occurs deep inside a chain of function calls, this often lead to completely wrong results because the bug got masked by some other manipulations I did on the result of the function call.
Of course, there are tons of hacks and ad-hoc workarounds in Mathematica to get around this (imho fundamentally broken) behaviour to the tune of "just stick another `Evaluate` here" or "just change the function definition from `g[x_]` to `g[x_?NumericQ]` to call the function only when the argument is numeric and otherwise leave it unevaluated".
The situation with the scoping rules is not much better. Consider for instance the following code:
y = 1;
expression = Module[{y},1+y]; (* Module creates a new scope in which y is unbound *)
Can you guess what happens if I print out `expression` now? Print[expression]
1+y$4066
Yes, Mathematica has just renamed our variable. If now we wanted to set `y` in our expression to some concrete value, of course the obvious thing to try doesn't work, but just gives me some bullshit: Print[ReplaceAll[expression, y->10]]
10+y$4066
These are all only some simple examples of why doing any kind of metaprogramming in Mathematica just sucks.I've dreamed about creating a language like this, but had to give up because it makes diagnostics impossible in case o typos and things like that..
My best bet now is to have some quote syntax to make a symbol stand for an abstract symbol, like
1 + x -- this sums 1 with x, and errors if x is unbound
1 + 'x -- this is an abstract expression, doesn't care if x is bound or not
Like lisp, except with some first class support to things like derive(1 + 'x, 'x), and, well, every operator needs to respect quoted symbols.. even if + were a user-defined operator or function, 1 + 'x needs to return (the AST) 1 + 'x. I suppose this is the same as Mathematica, except that Mathematica doesn't need quoting
I claim any semantics which resulted in `11` would be extremely confusing, because it would imply the following also resulting in `11`, which is obvious nonsense:
y = 10;
Module[{y}, 1+y]> y = 10; > Module[{y}, 1+y]
Yes that is precisely the point: because of Mathematicas weird evaluation model, you cannot have ordinary lexical scope as in every other programming language, but the only sensible thing to do is to rename variables under the hood. It is then very easy to leak those renamed variables accidentally in the global scope where you cannot do anything useful with them, because the symbols `y` in the global scope and in the subscope are different.
Another point that the example was meant to illustrate is that once you assign some value to a variable, you can no longer do symbolic manipulation with it (note that in the example, we have replaced 1 by 10 in the end).
y = 1;
expression = Block[{y},1+y];
Print[expression]
2
There are also the 'formal' symbols, e.g. https://reference.wolfram.com/language/ref/character/FormalY... if you want a symbol that will never be assigned a value but can still be substituted using ReplaceAll etc.
Anyway, to solve your first problem, add the definition f[_]:= Throw["Your error message here"}
To solve your second problem, use Block instead of Module (though in your simple example given here the solution is to just use neither).
EDIT: A thought that comes to my mind is that Jetbrains products are similarly placed in pricing. But YoY costs actually go down. Furthermore, you are allowed to retain the last subscribed version which you paid in full. You can use the same license on all your machines/VMs. This is not the case with Wolfram products. The pricing stays the same if you want the point updates to be fetched. You cannot use the product if your subscription ends and individual licenses are limited to 1 (or 2?) machines. This does hurt!
However for control system design or digital signal processing I think matlab is superior to both, I also think the matlab IDE is severely underated.
These are just from my experiences, I’m sure each of these languages have other applications where they are superior to the other too.
I also speak with privilege as someone who has access to all these packages for free so..
...depending what you want to do. Anything symbolic is probably not a great fit for Matlab.
Mathematica has a LOT more integrated into the base product. Matlab requires a toolbox for nearly everything and many toolboxes cost more than a Mathematica license. I enjoy Mathematica, but find Matlab to be inferior to Python development and very expensive.
They're all priced the same for home use.
1. (Older artucle) https://forums.raspberrypi.com/viewtopic.php?t=248423
2. (Newer article in JP but web translation works decent): https://decafish.blog.ss-blog.jp/2020-07-19
So I guess... for hobbyists, it just depends on your hobby.
Datasets have grown in size exponentially. You deal with images which are no longer few kilobytes. Window managers in the GUI have to paint over a much larger display area even if you consider whitespace. To do a hobby project like for e.g build a toy spam-filter or a toy classifier, the prompt to execution takes over 6 minutes on a really tiny model. I don't see why this hobby project angle seems viable either. Hence, why I said its unusable practically.
It can be used as Jupyter kernel: https://github.com/WolframResearch/WolframLanguageForJupyter
You can buy a perpetual home non-commercial license for $365.
That quickly turns out to be even more expensive than the subscription if you realistically want to develop something on that platform (for e.g a data analytics course, mapping overlays, queries - pretty much anything standard which one needs to teach or demonstrate to students. It isn't even a power-usecase)
PS: I made that mistake with v11.3. Abandoned it later.
I may be wrong. Might be worthwhile to check!
Indeed, the post essentially brags about how big it is:
> In Version 1.0 there were a total of 554 functions altogether. Yet between Version 12.0 and Version 13.0 we’ve now added a total of 635 new functions (in addition to the 702 functions that have been updated and upgraded).
With these batteries-included languages, mastery of the language really requires mastery of the library.
But what he's missing in his points is that Mathematica is led by a company! They get to design it, they get to organize it, so they have full control of it still. Look at Terraform: it's horrible usability-wise and has tons of limitations. If it was open source, it would have had auto-import from day one, adding a version or depends_on to modules would've happened from day one, and something like CDK probably would have already been built in, so Pulumi probably wouldn't exist either. But since Hashicorp controls it, it only works the way they want, in spite of open source.
As long as Stephen's company is developing Mathematica, they can maintain full control (of their distribution of it), and it's extremely unlikely for any fork to be successful.
I also wonder (could download the trial version and find out) how Mathematica would be for things like hardware testing and lab automation. That's more of a side issue than directly related to the points of the blog post.
But you're probably right about trying to fork Mathematica. Python may owe its success to forking ideas from Mathematica, Matlab, etc., without vying head to head with the mother ship.
Being a company also has its drawbacks, such as having to invest a certain amount of effort into marketing-driven development such as trying to keep people buying upgrades. But maybe a company with a BDFL at the top of it can avoid that issue.
A modern python (e.g. anaconda?) distribution is a pretty formidable tool (for some things I'd definitely take Mathematica any day, but I don't really code in mathematica vs. sketch) - the people using that distribution however may also not know anything about good practice. Python unfortunately is far too allowing of this, too, so some scripts are a genuinely hell. I'm a physics student currently working as a programmer, 2/5 lines of code I see in my department would be enough to request changes from a patch. I daydream about teaching them but that's never going to happen.
At work we actually developed a functional language (nee DSL) specifically to funnel people down exactly the places we want.
The practice in my team is that you can start out any way you want, but you're expected to begin learning batter practices as your projects mature. And we have a couple people who can teach you. Though I was the one who introduced Python to my work site, I'm also one of the ones who needs to continue learning better programming practices.
It's sad that there is virtually no decent training for scientists who want to be better programmers. There's certainly a cacophony of advice, much of it conflicting or too complicated to be credible. Maybe it's not widespread, but when "scientific" programming is mentioned, there are always a lot of comments to the effect that we shouldn't be programming at all without a license. Likewise for the use of Excel. Instead, scientists are left to figure things out for ourselves, like we've been doing anyway since the dawn of time.
Also in the context of numerical/scientific programming I don't understand what is the issue with the packaging system. It's been working fine for myself and many others I know of.
Linux kernel, LLVM, Blender, TensorFlow, Stockfish, Firefox, etc etc
OSS or not, I fear for its future after Stephen Wolfram passes. Hopefully he has a good succession plan that's focused on the product and users rather than shareholders.
But then later they walked it back a little and claimed they are "like open source" [2]. Funny there are 12 reasons for being closed source and only 6 for being "like" open source. And the reasons they're like open source are pretty weak. The first one (free use) has a lot of restrictions like the way their cloud product locks you out of your files 60 days after they're created.
It's cool what Wolfam has achieved, but it's hard to justify going with a closed tool these days with all the interest in open science and the capabilities that are now available in the open source world.
[1] https://blog.wolfram.com/2019/04/02/why-wolfram-tech-isnt-op... [2] https://blog.wolfram.com/2021/11/30/six-reasons-why-the-wolf...
I love using Lisp languages, I adapt to Python because I need it for my career in ML/DL, and Haskell for something different.
I have subscribed to the Desktop Edition (better interactivity that the cloud version) twice, so I have about four months of writing little bits of code and experimenting. I don’t mind the price (I happily pay for full up LispWorks with support). It is the language itself.
I have experimented with using WL from Common Lisp and Clojure, but there is some overhead for that.
Anyway, WL is an amazing ecosystem. I wish I could love the language.
I think that there is a small-ish language. And then a bunch of hand-coded libraries that do a lot of the heavy lifting.
But I'm curious what that core language is like. I assume someone, somewhere has built an interpreter that is equivalent. Any ideas?
> The most widely used rewriting engines often sit at the heart of programs and languages used for logic programming, proof assistants and computer algebra systems. One of the most popular of these is Mathematica and the Wolfram language.
Thanks!
https://www.youtube.com/watch?v=H-rnezxOCA8
I have a 5950X also; what are you getting for the benchmark result? I'm getting around 4.06.