Mathematica v12.1
writings.stephenwolfram.com
writings.stephenwolfram.com
Probably too different to merge the submissions.
For free CAS I would recommend to give Axiom or FriCAS(more actively developed) a run.
http://fricas.sourceforge.net/ https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system...
Overall it is not that polished UI wise. I think it is pretty good for algebra and symbolic computation.
Let me quote from the book/guide of FriCas:
" FriCAS provides state-of-the-art algebraic machinery to handle your most advanced symbolic problems. For example, FriCAS’s integrator gives you the answer when an answer exists. If one does not, it provides a proof that there is no answer. Integration is just one of a multitude of symbolic operations that FriCAS provides. "
You can find out more by reading the book which is available here:
Sage has a notebook interface, is built on Python, and incorporates many free software math packages, like Maxima, into one system.
[1] https://github.com/corywalker/expreduce [2] https://github.com/wrnrlr/foxtrot
Live demo: https://live.sympy.org/
I still do not understand what I'm doing half the time. Mostly just googling and stackoverflow answers get me by. For example, I don't understand why I can't use subscripts as symbols?
Any recommendations on trying to 'get' mathematica?
A scanned PDF was made available for free with the permission of the publisher: https://mathematica.stackexchange.com/questions/16485/are-yo...
Jokes aside, probably you're experiencing the part in learning a programming language where you can think what yu want to do but don't understand it enough to express it correctly. Usually the solution to this is more practice in said language, which is when pet projects come in handy.
Maybe you can try implementing something that already exists from scratch? That way you can always look for help online implementing it, if you need it, but you get to excercise the language a bit.
This way it takes effort and time, for sure, but it'll help you get a good grip.
[1]: https://www.wolfram.com/language/fast-introduction-for-progr...
[2]: https://www.wolfram.com/language/elementary-introduction/2nd...
[3]: https://www.wolfram.com/language/elementary-introduction/nbs...
Read through it once to get the gist, then go back and read it again. The second time through, _play_ with each example. Try them out, see how they behave, attempt to apply other things you've learned to each. In no time at all, you'll have the basics down and then will be able to make heads or tails of the other doc pages much more quickly.
You'll drive yourself crazy trying to understand subscripts as a beginner, I would advise against getting too fancy with them unless you are fairly advanced. They work reasonably transparently in most cases, but there are a handful of situations where they are really frustrating (e.g. in With/Module/Block constructs). You can actually use them as symbols if you import the Symbolize package and Symbolize them, but then you lose the ability to "do math" to the subscript (e.g. you won't be able to use Table[] won't generate the symbolized variables.)
Unfortunately it's also the single tool most hampered by its licensing and silo-like ecosystem.
Wolfram has released good videos to that end, here's the latest:
https://www.twitch.tv/videos/569938853
I find R to also be a lot better than Python and closer to Mathematica (especially if you combine it with RStudio and Shiny) but still not quite as good overall on the interactivity/environment end.
R package Deriv for symbolic differentiation, it allows user to supply custom rules for differentiation.[1]
R package numDeriv[2] for calculating numerical approximations to derivatives.
R package gmp[3] and Rmpfr[4] provide multiple precision arithmetic and floating point operations. They also include some special functions, e.g. Rmpfr::integrateR for numerical integration.
R package mpc[5] available at R forge. It provides multiple precision arithmetic for complex numbers.
R package rSymPy[6] provides an interface to ‘SymPy’ library in python via rJava.
R package Ryacas[7] provides an interface to the ‘Yacas’ computer algebra system. It is easier to install compared to `rSymPy`.
R package symengine[8] is an R interface to the SymEngine C++ library for symbolic computation.
[1] https://cran.r-project.org/web/packages/Deriv/index.html
[2] https://cran.r-project.org/web/packages/numDeriv/index.html
[3] https://cran.r-project.org/web/packages/gmp/index.html
[4] https://cran.r-project.org/web/packages/Rmpfr/index.html
[5] http://mpc.r-forge.r-project.org/
[6] https://cran.r-project.org/web/packages/rSymPy/index.html
[7] https://cran.r-project.org/web/packages/Ryacas/index.html
There are also little nifty things like for image processing you can have a hard coded image show up in your code (I like plain text better but it's cool and future-techy). Distributions (as in normal, binomial, Poisson, etc) are a type and PDFs and CDFs can be obtained from them consistently rather than having to remember the different parameters of dnorm, dbinorm, etc.
I would love a real Mathematica expert to give us more. That's the real drawback of the closed ecosystem there is so much less information about it out there, fewer code samples, etc.
In ipython, matlab and octave it's much easier to repeat and modify last commands, which is something you seem to need all the time when experimenting with math.
What was I missing, usability/interactivity/rapid development wise?
> the way the command line works: no feature to repeat previous comnand with up arrow, have to edit previous existing one, requiring more mouse usage, weird forms of cursor placement, weird default enter key behavior.
It's not a command line. It's an interactive notebook. It's an entirely different experience. Repeating and modifying last commands can still be done with arrow keys, then Shift-Enter. Also, when you are doing math, you spend way more time thinking than typing and manipulating; the time needed to move your hands to the mouse is minuscule by comparison.
Although, as others have said, many prefer the style of editing and re-running, rather than leaving the history above.
https://peertube.mastodon.host/videos/watch/df751bd5-5a26-44...
They were in the unique position of having one of the best symbolic differentiation engines and one of the best numeric engines and a Lisp-like REPL that allows one to write terse, elegant code.
What they were always missing was efficient bulk data structures.
In recent versions they've added a handful of "special cases" where some types of data are stored as a plain data array like in C-derived languages, but this is hit-and-miss.
Similarly, they've dabbled with GPU acceleration and parallelism, but it's half-baked. It feels like a proof of concept, not something you'd ever actually use.
Julia and the like will slowly but surely eat their lunch.
ds = CreateDataStructure["LinkedList"]
String keys to access types is kind of yucky, to be honest :( Couldn't there be a better way to represent this than having to look up the documentation (https://reference.wolfram.com/language/ref/$DataStructures.h...) to see what would work?Why not define a LinkedList constant?
The thing to keep in mind is that WL is based on symbolic replacement. You normally wouldn't define that kind of function as taking in a parameter (i.e., CreateDataStructure[x_] := ...), rather you'd define it for each case separately (i.e., CreateDataStructure["LinkedList"] := ...).
By strongly typed, I mean that Mathematica is weakly typed in the sense that it simply assumes that all expressions are Complex numbers. At most, it can restrict itself to some subset such as the Reals or Integers, but that's it.
It can't, for example, perform general simplifications over non-associative types such as most Matrix algebras, the quaternions, or any geometric algebra. Most built-in functions operate only on Complex numbers, or expressions over the Complex numbers, etc...
I'm looking for something I can use to do symbolic expression manipulation for physics equations in terms of geometric algebra, but as far as I know there's nothing out there with the capability.
A·X=d1
B·X=d2
(A⨯B)·X=(A⨯B)·C
It is a closed monolith, and - especially when you start to use advanced features - you derive results from it that can't be independently verified because of the closed source nature of the monolith.
> the internals of Mathematica are quite complicated, and even given a basic description of the algorithm used for a particular purpose, it is usually extremely difficult to reach a reliable conclusion about how the detailed implementation of this algorithm will actually behave in particular circumstances.
From the article calling for open-source mathematical software (my emphasis):
> ..we need a symbolic standard to make computer manipulations easier to document and verify.
> ..perhaps we should not be dependent on commercial software here. An open source project could..find better answers to the obvious problems such as availability, bugs, backward compatibility, platform independence, standard libraries, etc.
> Increasingly, proprietary software and the algorithms used are an essential part of mathematical proofs.
> ..with this situation two of the most basic rules of conduct in mathematics are violated: information is passed on free of charge and everything is laid open for checking.
If Mathematica were to be open-sourced one day, I suppose that would cover most of this wish list, with improved availability/reproducibility and verifiability. Tough to imagine without significant funding, collaboration, and communal agreement.
In practice, pretty much no one doing science has the expertise or time to completely verify the science they are doing - they are building on centuries of knowledge across many disciplines, and for the most part the community verifies each part as they build knowledge.
And certainly opensource does not allow the vast majority of people "to verify the science you do is correct." They'd have to check the code, the compiler, the hardware, ensure no cosmic rays flipped bits during computation, and so on.
So I'd not worry too much about the closed source vs open source nature of it. It's a solid tool that enables lots of research.
Also, if something is that important, people can and do perform the same calculations using different packages or different algorithms.
Write two algorithms in MMA, or one in MMA and one in something else, and every so often spot check a few cases by hand.
Have you ever looked at the rates, or you just dismiss it without looking at it? Note that the current rate is higher than older references since the feature sizes have shrunk, and lower energy events can change bits on newer hardware.
Scientific computation, especially at the level of most researchers, is affected by cosmic ray bitflips, without question.
Since the OP was complaining about not being able to check everything ad absurdium, then this effect is certainly on the table. It's more likely to affect research than the difference between closed and open source if a researcher is ignorant of it.
It's also why good researchers, who know this is a real effect, tries to run a computation in multiple methods over different times, until they feel a consensus on the calculations is robust enough.
If you've never done it, write a program to watch memory for bit flips, and be amazed.
Here's an intro - do a back of the envelope calculation and see if you still think these events are rare enough that they don't affect common scientific work.
https://en.wikipedia.org/wiki/Soft_error#Cosmic_rays_creatin...
No I'm not. Those are but one avenue of reducing the probability of error during computation. All of those only ensure that the code part is solid - there is an entire other world on the physical part that needs incredible engineering, noise reduction, error correction, defect mitigation, thermal issues, quantum issues, physical data decay, memory leakage, and so on.
I think by focusing only on aspects for code, you miss a large part of ensuring modern computing is accurate.
Two things I miss when working with Mathematica: refactor-rename variables and a usable object-oriented programming support.
Refactor-rename is available via Eclipse-based IDE; however math typesetting is not available there (it makes a difference for large equations/expressions).
There are a lot of community-developed approaches to OOP. I tried a number of these, sticking with a particular approach, but it also leave a lot to be desired. OOP is useful in that it ties together data and functions which act on the data. Inheritance/composition are useful if you compute properties of similar objects.
I've been doing some PenPlotter for fun, I wonder if I can use Mathematica with HatchFilling for some of my plotting now.
The new IPFS integration is exciting; might see if I could write a static site generator that automatically publishes to IPFS.
I mean is it worth using the machine learning from Mathematica or Tensorflow is better?
Is it better to use integer optimization solvers or then Mathematica?
In which ways you are using Mathematica and Really leveraging it?
Sorry for my question but I think and suspect I am missing something bigger.
Will be glad if someone Illuminate me. And please be free to PM if your project is discreet.
My adviser (a physicist) uses Mathematica for all non-physics computations as well. It's a clunky language for general purpose computation and doesn't play well with external programs and libraries. The user experience on Linux can also be quite haphazard with frequent crashes and lack of good HiDPI support (I haven't used version 12.1). It's also hard to run headless programs written in Wolfram language. But if you're okay doing everything inside the Mathematica GUI and don't care about the fact that it's a walled ecosystem, don't have a preferred text editor, and don't particularly care for Unix's one-thing-well philosophy, Mathematica might work for you.
The metadata and annotation facilities seem unclear. Sometimes they change the appearance and behavior of the object, sometimes they don’t.
Some functions now are curried by default. The choice probably makes symbolic programming and pattern matching trickier since it breeds a variety of representations of the same concept. (Pattern matching and rewriting strongly favor canonicalization.)
All and all, it’s beginning to look like the core Wolfram Language is beginning to tremble under its own complexity. I can’t imagine coping with buggy code at all in this framework.
That's not what's preventing it from being AI.
First, there is a question of theoretical vs. practical reproducibility: true, in _theory_, an open-source codebase with many millions of lines of code of highly complex transformation can be checked for accuracy by anyone. In _practice_, only very few insiders will have both technical understanding and time to verify the correctness of this or that algorithm, and everyone else would need to rely on their expertise. That situation is no different from using a proprietary system if we trust their authors.
Second, while it might be shocking for someone, most of the science, outside of maybe math, it's not _practically_ reproducible. Most of the articles are behind paywalls, don't have enough data to replicate their results (even economists much more often than not won't include their raw data or algorithms or both). Also, no one who is trying to build a scientific career would try to replicate someone else's results, especially if it requires some costly equipment, reagents, etc. - the rewards in the scientific community are for novel results. Replication crisis[1] describes this pretty well.
Most of the software that runs LHC at CERN is probably not inspectable by a regular Joe the physicist, yet somehow the physicist community somehow trusts their results, etc.
In summary, while an open-source software of Mathematica quality would be awesome in theory, I highly doubt it would be practical for a long time.
Your (and Wolfram’s!) argument about “not needing to see the insides because really only 10 people in the world understand it anyway” should really be an argument for opening it up. If 10 people could understand it, and we must intersect that group with folks who can access the source, we are left in quite a dismal state of affairs.
Here is a recent example: Imperial College COVID-19 response team published an article[1] where they modeled different effects of non-pharmaceutical interventions, such as suppression and mitigation on the number of infected, deaths, etc. This is a very interesting result, but it's impossible to replicate their results in practice without contacting the authors, as their methodology is not enough to reproduce it.
While someone else[2] posted their own model that is very well documented and fully reproducible by anyone with a $230/year personal license.
While theoretically [1] is high science and [2] is not, in my own opinion [2] is better than [1]. I would love more science to be done and discussed that way. Ideally, using open-source software, but in practice, using Wolfram Language, in that case, is already good enough in my opinion.
PS. I'm not affiliated with Wolfram Research in any way.
[1] https://www.imperial.ac.uk/media/imperial-college/medicine/s...
[1] https://blog.wolfram.com/2019/04/02/why-wolfram-tech-isnt-op...
And many, many amazing open source teams have demonstrated that even including community driven design in some cases does not hamper the quality of the product. Look at Apple and Swift, or Rust, as examples.
I read their arguments as “we do not know how to engage with a community effort because it’s not in our company DNA” under the facade of supposedly legitimate reasons.
Rust I'm not very familiar with: how much of their funding is dependent on Mozilla, at least for the core developer(s)?
Also, a language + a standard library has a (much!) smaller surface comparing to Wolfram's vision.
If Wolfram’s reason to not publish the source code is that they believe they would no longer have a business model, they should list that as the One Reason, not 12 gaslighting reasons.