23 ms·
Mathematica v12.1
- saagarjha 7y agods = 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.html https://reference.wolfram.com/language/ref/$DataStructures.h...) to see what would work?
- carry_bit 7y agoIn these cases the notebook interface will normally show you all of the choices via autocomplete.
- lonelappde 7y agoEven for string? Why not define a LinkedList constant?
- carry_bit 7y agoYes, in WL strings are commonly used in a matter similar to enums in other languages. 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"] := ...).
- jxy 7y agoFor interpreted languages, it doesn't matter semantically whether you use strings or not. It's always a run-time value that needs to get resolved when the interpreter gets there.
- armitron 7y agoMathematica is worth learning and using since it's so far ahead of the open source alternatives (e.g. Python/Jupyter and associated libraries ) in usability/interactivity/rapid development that it comes across like future-tech. Unfortunately it's also the single tool most hampered by its licensing and silo-like ecosystem.
- phillc73 7y agoI'm an R and sometimes Julia user, although not Python. Can you offer some examples of how Mathematica surpasses open source alternatives in those areas you've mentioned?
- armitron 7y agoIt's hard to convey what I mean exactly by listing features, it's best if you use it yourself. Next best thing is to watch an expert use it. Wolfram has released good videos to that end, here's the latest: https://www.twitch.tv/videos/569938853 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.
- ur-whale 7y agoHow much symbolic computation can you do with R?
- phillc73 7y agoThere are several functions in base R for differentiation, integration, solving system of equations, etc. E.g. `solve`, `stats::D`, `stats::deriv`, `stats::integrate`, `stats::numericDeriv`. 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 https://cran.r-project.org/web/packages/Deriv/index.html [2] https://cran.r-project.org/web/packages/numDeriv/index.html https://cran.r-project.org/web/packages/numDeriv/index.html [3] https://cran.r-project.org/web/packages/gmp/index.html https://cran.r-project.org/web/packages/gmp/index.html [4] https://cran.r-project.org/web/packages/Rmpfr/index.html https://cran.r-project.org/web/packages/Rmpfr/index.html [5] http://mpc.r-forge.r-project.org/ http://mpc.r-forge.r-project.org/ [6] https://cran.r-project.org/web/packages/rSymPy/index.html https://cran.r-project.org/web/packages/rSymPy/index.html [7] https://cran.r-project.org/web/packages/Ryacas/index.html https://cran.r-project.org/web/packages/Ryacas/index.html [8] https://github.com/symengine/symengine.R https://github.com/symengine/symengine.R
- ur-whale 7y agoMathematica is an amazing tool, but it has one huge downside: reproducibility. 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.
- jimhefferon 7y agoA good piece to read about this was in the American Math Society Notices: https://www.ams.org/notices/200710/tx071001279p.pdf https://www.ams.org/notices/200710/tx071001279p.pdf
- lioeters 7y agoThanks for the link! The succinct article, "Open Source Mathematical Software", illustrates the issue with a quote from a Mathematica tutorial: > 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.
- carry_bit 7y agoDo note that's in the context of performance optimization. Even open source complicated code is still complicated code.
- jimhefferon 7y agoVery true. But like mathematical arguments in journals, I'm glad open source complicated code is there to be examined.
- lioeters 7y agoI agree. How an algorithm "actually behaves" depends on the implementation details of the language interpreter or compiler; open source or not, there are complex transformations leading to running code, that it might as well be a black box. 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.
- veer-chah 7y agoI have tried Mathematica for small duration and in general was wowed by it. For free CAS I would recommend to give Axiom or FriCAS(more actively developed) a run. http://fricas.sourceforge.net/ http://fricas.sourceforge.net/ https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system) https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system...
- alok-g 7y agoHow good is Axiom as compared to Mathematica in general? I am familiar with Mathematica, am asking to get zeroth order idea for Axiom before I would try it out myself. Thanks.
- veer-chah 7y agoI think Mathematica is HUGE. Axiom/FriCAS does not have every thing that Mathematica have(specially statistics). 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: http://fricas.sourceforge.net/doc/index.html http://fricas.sourceforge.net/doc/index.html
- alok-g 7y agoThanks!
- mmillery 7y agoNow days, it's not often that I need to do heavy mathematical work, but I turn to Sage https://www.sagemath.org/ https://www.sagemath.org/ when I do. Sage has a notebook interface, is built on Python, and incorporates many free software math packages, like Maxima, into one system.
- eric234223 7y agoIf a software is used to create data that is okay like editing text files in microsoft windows. But computational software such as Wolfram being closed source bothers me a lot. There is no way to verify the science you do is correct.
- madengr 7y agoLikely you can see certain sections of the code if you sign an NDA. I have done this before for the CAD software I use.
- ChrisLomont 7y agoQuite often it gives you a result that you can then prove directly, or check with other tools. The benefit of MMA is that it has a lot of tools and a good interface, good documentation, and a large community. 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.
- reikonomusha 7y agoThe “cosmic rays” argument, to me, is inane. It simply doesn’t practically apply and is certainly not an argument against the benefits of open source code. You’re castigating the whole practice of code review, computer-aided proofs, automated theorem proving, etc.
- rayhem_ 7y agoAnd how many people doing "science" do code review, computer-aided proofs, or automated theorem proving to verify their code is correct? Very, very, very few.
- bk322 7y agoKudos to the team for the great release. 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.
- davnn 7y agoMathematica is mostly used for relatively small, notebook-style, applications. Both features, while probably useful for some people, don‘t seem to be necessary for the more popular use cases.
- mehrdadn 7y agoIs there any reason not to call Mathematica AI at this point? I swear some of the things it does look more like black magic than what we call AI nowadays...
- HPsquared 7y agoI'd call it more of an "expert system" - it has a HUGE amount of rules and methods built-in, but at the end of the day it's all deterministic.
- balfirevic 7y ago> but at the end of the day it's all deterministic. That's not what's preventing it from being AI.
- carry_bit 7y agoIt also appears to be faster than v12.0; my WolframBench score with 12.1 was significantly higher than 12.0 (25-50% higher). The new IPFS integration is exciting; might see if I could write a static site generator that automatically publishes to IPFS.
- currymj 7y agothey put the biggest improvement upfront lol: things now scale properly if you have a 4K monitor. people (myself included) have been squinting at very tiny font for years, and now they don't have to anymore!
- dang 7y agoOngoing related thread: https://news.ycombinator.com/item?id=22625682 https://news.ycombinator.com/item?id=22625682 Probably too different to merge the submissions.
- saboot 7y agoI'm a physicist and I've used mathematica sparingly off and on for several years, mostly manipulating symbolic formulas. 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?
- vtail 7y agoMy advice is to find a good book that teaches the fundamentals. I'm currently reading "Power Programming with Mathematica: The Kernel" by David B. Wagner. It was published in 1996 and covers then-new version 3, but boy is it good (and still very relevant!). A scanned PDF was made available for free with the permission of the publisher: https://mathematica.stackexchange.com/questions/16485/are-you-interested-in-purchasing-david-wagners-power-programming-with-mathemat https://mathematica.stackexchange.com/questions/16485/are-yo...
- dr_zoidberg 7y agoThat's whay working on CS feels like all the time! /sarcasm 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.
- b215826 7y agoAs someone who started using Mathematica only very recently, I found The Wolfram Language: Fast Introduction for Programmers [1] very helpful. It's the quickest way to get started with the Wolfram language if you've seen a bit of functional programming before, e.g., Python's map(F, x) is equivalent to Wolfram's Map[F, x], reduce(F, x) equivalent to Fold[F, x], etc. There's also An Elementary Introduction to the Wolfram Language by Stephen Wolfram [2,3] which is available freely as Mathematica Notebooks, although I'm yet to read it fully. [1]: https://www.wolfram.com/language/fast-introduction-for-programmers/en/ https://www.wolfram.com/language/fast-introduction-for-progr... [2]: https://www.wolfram.com/language/elementary-introduction/2nd-ed/ https://www.wolfram.com/language/elementary-introduction/2nd... [3]: https://www.wolfram.com/language/elementary-introduction/nbs/EIWL2-Notebook-Archive.zip https://www.wolfram.com/language/elementary-introduction/nbs...
- vtail 7y agoMany people on this and similar threads rightly question whether results received with the help of a closed source software are reproducible. I think it's a fair question, but these discussions often miss a couple of important points. 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. [1] https://en.wikipedia.org/wiki/Replication_crisis https://en.wikipedia.org/wiki/Replication_crisis
- reikonomusha 7y agoReproducible has a much simpler meaning than that you describe: it’s feasible for any scientist to recreate the result perpetually. While inspection of the methods might help one understand the result—and I think itself holds a great deal of value to especially mathematicians—just the simple ability to compute the answers yourself without binding yourself to a contract or paying $1000’s of dollars in license fees is a valuable aspect to science. Especially so when the calculations are at the level of pure algebraic manipulation. 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.
- superflit 7y agoAnyone here uses Mathematica besides Physics or pure mathematics? 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.
- dagw 7y agoDepends how wide your definition of 'physics' is. We have a couple of environmental scientists at work that use it to model water pollution for example. The big win is that they can basically just type in their differential equations exactly like they would write them on paper and have the answers simply pop out.
- b215826 7y ago> Anyone here uses Mathematica besides Physics or pure mathematics? 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.
- reikonomusha 7y agoThe language began as something of a gem and each release seems to be muddying it up. Another commenter already mentioned the string argument to make a data structure. It also looks like built-in methods on these objects are also strings. 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.
- TheRealPomax 7y agoNow if only it wasn't $350 for home use. Like any non-privileged student can afford that.
- orr721 7y agoIt is free on the Raspberry Pi computer.
- TheRealPomax 7y agoIt is, and that's how I use it, but we also find that computer in the category "horribly underpowered" category of devices that can run Mathematica.
- lonelappde 7y ago$160 or $80/yr for students
- TheRealPomax 7y ago"per year" is the drug dealer of the software world. Adobe might be the biggest pusher, but Mathematica isn't far behind.
- SethTro 7y agoThis is one of the few pieces of non-free software I'm happy to pay for. I've been doing some PenPlotter for fun, I wonder if I can use Mathematica with HatchFilling for some of my plotting now.
- drwu 7y agoSeems to support 4k HiDPI on windows finally.
- jiggawatts 7y agoDoes anyone know of a good, strongly-typed computer algebra system similar to Mathematica? 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.