15
$\begingroup$

It seems that both math and wolframscript can be used to run Mathematica scripts on the command line. Which one I should use, are they cross-compatible and what are the differences?

$\endgroup$

2 Answers 2

1
$\begingroup$

You do not get the fancy plotting using the terminal to run scripts. They do not error but the plots just do not appear on the terminal The math functions give the same answers for both mathematica and the terminal as far as numbers go. You do not get the nice auto completion and integrated environment with the terminal-wolframscript approach. I am using textpad to edit the scripts. It seems OK for learning the wolfram language though. Just installed today on my iMac & macos sonoma. If you are poor and motivated it seems fine. I am going to buy mathematica because it is for things like this that I have a job. It is fun to play with and works fine. I have tried the cloud option in my scripts and it takes a little longer to run but you get the same text answers back.

$\endgroup$
-2
$\begingroup$
math 

starts Mathematica as an application or in shell. This is the full application with all built-ins and loaded packages. Graphics and data types can be input and output.

wolframscript 

is a reduced modern innovative variant of Mathematica. The set of built-ins available are dependent on the monthly abonnement on the web platform web Mathematica in my case. wolframscript is independently licensed from Mathematica or other Wolfram Inc products.

For most younger, it is very important to get the knowledge from Wolfram Alpha to advance better and faster. Mathematica provides more built-ins. A good orientation provides the online web platform Web Mathematica some times web platform, wolfram online.

The most important difference is the missing notebook interface, help features, graphics are not displayed, no interactivity, the formatting of help like ? or Information is different. It is like the documentation provided with the used shell.

It works in shell of choice and has more kind of OS near functionality. It is a script version of Mathematica otherwise. Batch processing and calculation that run safely are a good choice in comparison to the Mathematica interface or the web platform. It has obviously the In-Out-concept that is common to Mathematica-based apps.

Wolframscript is free or cheaper for short time uses than Mathematica and therefore much more attractive for low budgets. concepts for code creating and management and storage are needed for both.

There are cases like the update to Catalina on MacOS where Wolframscript worked and Mathmatica needed to be updated to version 12 and 64bit in complete.

$\endgroup$
3
  • 4
    $\begingroup$ "innovative variant of Mathematica". Why is this innovative? I've seen reduced versions of flagship products released by other software developers. $\endgroup$
    – QuantumDot
    Apr 30, 2020 at 19:37
  • 8
    $\begingroup$ Most of this description is incorrect and seems to refer to differences between Mathematica and the free Wolfram Engine (which does contain all the function which are available in Mathematica). wolframscript is not a different product. It is a way to invoke the Mathematica kernel. You can run scripts with wolframscript or with math -script and there are some differences in behaviour. $\endgroup$
    – Szabolcs
    Apr 30, 2020 at 19:39
  • $\begingroup$ Thanks @Szabolcs and @user2432923. Indeed I was not referring to the free engine. I have found little documentation on scripts using math -script, but somehow my install doesn't have wolframscript, so in first instance, I was wondering if I could just substitute the commands. But also which one would be future-proof, more widely used etc. $\endgroup$
    – Daniel
    May 2, 2020 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.