Mathics - A free, light-weight alternative to Mathematica
mathics.org
mathics.org
But Mathics is great for exploring the concepts in the Mathematica programming language, a language that does not get the attention it deserves. If you are not familiar with Mathematica as a language and and are curious, see this comparison of Mathematica with other programming languages such as C, APL, and Lisp, from the first edition of the Mathematica book: http://reference.wolfram.com/legacy/v1/contents/4.2.html (this fourth section was dropped from the second edition and beyond).
http://reference.wolfram.com/mathematica/tutorial/OperatorIn...
So a good thing is a tutorial that guides people to the main parts of the language, explains the pitfalls, etc. I had to use mathematica to check some derivations about 6 months ago, and I spent a whole day trying to figure out how to work with it, and honestly, I nearly drowned under the documentation. There seems to be many ways to do the same thing (take the derivative of a function) and it is not always clear how/why should we use one method over the other.
Another problem I have with mathematica is that although the different functions are extensively referenced (I won't use the word documented), the language itself is not very well explained, and by language I mean how to piece all the functions together and more into one coherent piece of software.
Now I haven't spent enough time with it for my judgment to be definitive, but I found it harder to pick up than most languages / tools I've used.
"when I'm picking up a new language or a new tool, the most important things is to have examples on how to use the language to get things done"
You look for different things when you think about how to implement the language. In a sense, the implementation doesn't really care about the use cases: it merely cares that the behavior matches the stated behavior in the documentation.
the IDEAL documentation for a developer is a proper PEG/LALR grammar for the language. That way you can properly parse expressions. Clearly they didnt provide it.
The documentation gives enough information to reduce an abstract expression from the GUI down to a mathematica expression, which is enough to build an AST. From there, it's a matter of building up each component to match the semantics.
"Another problem I have with mathematica is that although the different functions are extensively referenced (I won't use the word documented), the language itself is not very well explained, and by language I mean how to piece all the functions together and more into one coherent piece of software."
That's the job of the programmer. The documentation should explain how each bit works and the rules for combining the bits, but it's up to you to take the pieces and build something.
Think about Legos: you have a pile of bricks, and no one is going to tell you how to build a rocket ship using those pieces. That's up to you :)
"Take the unix manual for instance. The first thing I do when checking the manual is to search for example. Reading the list of switches is useless to me unless I have a working example of how the thing works."
The manpages do a poor job of explaining the zen of unix. Once you start thinking of operations as transforming streams of text, then you start thinking of tasks in terms of smaller units.
For example, a few minutes ago I needed a way to upgrade all global `npm` modules. I knew there was a way to get JSON lists (npm list -g --parseable --json), which lines I wanted (the ones starting with ' "'), and what I want to do with those (get the name and install). Putting it together, one straightforward way is
npm list -g --parseable --json 2>/dev/null | grep '^ "[a-z-]*": {' | sed 's/^ *"//;s/".*$//' | while read x; do sudo npm install -g $x; done
Now, the documentation doesn't explain that this is a way to do what I want. But the documentation gives enough information to know where to look.i think what may have happened in your case is that you believed Mathematica was a math-specific tool (which it isn't) and so you didn't pay enough attention to the non-math aspects of the language, such as the basic API (for which there is replete documentation/examples in the Help docs, see for example [2]).
the most useful key in Mathematica is F1. click on anything, any symbol or function, and hit F1 to see the Help page for that item
[1] http://reference.wolfram.com/mathematica/ref/Histogram.html
[2] http://reference.wolfram.com/mathematica/guide/ListManipulat...
http://reference.wolfram.com/legacy/v5/Tour/MathematicaAsAPr...
which is just a little more recent. But I agree that Mathematica should be explored more as a general purpose programming language.
However, I would not recommend it as general purpose language because of its proprietary nature.
The $295 barrier to entry is way too high. Unless there are better interpreters than Mathics (which as someone mentioned is great, but is just a subset) around, I don't see the point.
I'm just saying that it'd be a ridiculous "general-purpose" language because anyone who wants to use it must shell out nearly a third of a grand.
I think it fills a fantastic niche for math and science, where its powerful capabilities really come in handy. But general purpose scripting? Silly.
If you've already bought Mathematica, great, use it for whatever you want! However, I don't think you should buy it unless you actually need its advanced features.
People spend that much in dog food.
This is a tool with years of work by a huge team behind it, with hard-core scientific innovations built in, and which you are supposed to use for years professionally.
Imagine if dentists said: "I will use a hammer to take out your teath. I cannot justify $10,000 for this proprietary machine for company X".
I'm not arguing that Mathematica is too expensive. I think it's worth the money and more for math/science/engineering work. I was glad to pay up because it fills that niche for me.
My beef is with the suggestion that it should be used for general purpose work, like scripting. I believe that if people need advanced math features, Mathematica is extraordinary. But dropping $295 for a proprietary system as a replacement for Ruby or Java?
I "may" have discovered a language that seems better Mathematica: Modelica [1]. It turns out that Wolfram itself recently purchased a Modelica add-on to Mathematica, which it now markets as its new SystemModeler product [2].
Note that while the Modelica language is not intended towards general-purpose computations, I find the core concepts behind the language to be valid beyond its intended purposes.
[1] http://en.wikipedia.org/wiki/Modelica [2] http://en.wikipedia.org/wiki/Wolfram_SystemModeler
Mathematica's language / environment is very effective at rapid prototyping math, computation, and physics applications... Thats why people use it.
Not very familiar with this "math" thing, are we?
>It's actually impossible to write a computer program that will prove anything significant. Turing figured that out like 80 years ago, get a clue morans
It's "morons", I believe. And Turing figured nothing of the sort.
Not to mention that it's very easy to write a computer program that will prove something significant (as long as you don't expect the program to do the whole proof itself, which it can also be done).
And an interesting point is that, the core developer of Mathics is also a Kernel Developer at Wolfram Research. Jan Pöschko's website http://www.poeschko.com/
How could he build a free product compete with his company's product?
This topic already mentioned on HN before
http://news.ycombinator.com/item?id=4066826
Indeed, about 8 months ago. Judging by some of the criticisms there, progress has been made, so it's probably worth this extra outing.veyron http://news.ycombinator.com/item?id=4067025 pointed out that
Sum[x^2,{x,1,y}]-y*(y+1)*(2*y+1)/6
was broken, but now it's fixed.programnature http://news.ycombinator.com/item?id=4067225
Plot[Sin[x], {x, -5, 200}]
appears that issue was resolved as well.However, most of the comments seem to be directed at mathematica's language (none of which were resolved, seeing as how the goal was to replicate mathematica)
As for weakening free competition, that's plausible, though I think it more likely that the chap was hired on the basis of his work than as a strategic move. Mathematica seems pretty entrenched and comprehensive (though I do admit that it's not something I've used a great deal), and probably as impervious to attack from open source equivalents as is Excel.
(While MS seems currently troubled, and I bet they're finding it harder and harder to persuade people to upgrade to Office each year, Excel's position looks pretty unassailable.)
Not true at all:
1) Operators acting on a distribution: E[X], Var[X], Cov[X,Y]
2) Square brackets are used in nested parentheses to avoid confusion: [1(2 + 3) + 4]/5
3) Functionals: L[f] for lagrangian
The main reason why [] isn't used as frequently as () is because most domains interpret the square brackets to mean something special. For example:
1) [x] is often used to denote floor(x)
2) [i=j] is used to denote the kronecker delta
What I must point out is you make a weak case based on myopia- for example; in 15 years of working with tens of thousands of hours of high resolution radiometrics I've never once met and talked to a dendrochronologist who's looked at the radiometric signature of individual bands of Japanese pine trees.
It's my understanding that such beasts do exist.
I think it must depend on the professor/university.
Also Matlab's documentation is often not complete, frequently requiring Google searches. I have rarely needed that with Mathematica.
My core reasons to use Matlab at times are:
1. More toolboxes, including those from third-parties 2. More team members familiar with Matlab than Mathematica
I've downloaded Mathics onto my Mac, unpacked it, installed it and tested it without issue. The web interface works well too. I'm very impressed with this software and appreciate all their efforts, especially what appear to be well commented sources. To complain that a better notation could have been used is to completely miss the point. This is for people who would like to use Mathematica syntax but can't afford the licence. I've got four books on Mathematica, but can't remotely afford to purchase it.
As far as I know, there aren't great alternatives to the Mathematica front end - I'd love to be proven wrong, through.
http://wiki.sagemath.org/sage_mathematica
there are some other electronic notebooks out there but not many do latexification, drawing of inline graphs, etc.
then there's Dynamic[1], which is the most straightforward event mechanism you're going to find in any language
[1] http://reference.wolfram.com/mathematica/ref/Dynamic.html
One thing that came out of that was a nice Wheatstone Bridge calculator w/ GUI that was really useful for prototyping signal acquisition circuits.
Try
BesselJ[1,2]//N
On mathematica I get $ /Applications/Mathematica.app/Contents/MacOS/MathKernel
Mathematica 8.0 for Mac OS X x86 (64-bit)
Copyright 1988-2010 Wolfram Research, Inc.
In[1]:= BesselJ[1,2]//N
Out[1]= 0.576725
In excel, `BESSELJ(2,1)` is the same to 5 significant figures.It is an descendant of DOE Macsyma, which ran only on expensive Lisp machines, and porting it to PCs was slow enough to give Mathematica and Maple a headstart.
It is kind of a shame that all the math and physics departments all over the world keep using closed source black box solvers instead of working on improving free and inspectable alternatives like Maxima, Octave, Sage, etc.
They use them because they're more comprehensive, and scientists want to spend their time doing science, not improving free software.
Also, in the case of Mathematica, the interface and feature set are far beyond what any other tool offers (and can be expected to offer, given the track-record of free software).
Wasnt the whole point of science to build their own chain of verifiable tools to rely on, instead of having to trust secret, unverified commercial black boxes?
Arguably, the rough idea is to discover and prove interesting or useful facts.
That's a bit different from Stallman's focus. Stallman is mainly interested in the freedom of users to modify the software they use (and share those modifications). But for scientific software the real issue is whether scientists can look at how it works. It would be fine for it to be under a "look but don't redistribute" proprietary license.
But other things aren't equal, and the productivity difference is order(s) of magniture more important than the transparency of an apparatus that has been successfully used by many others and is believed to give correct results.
... No it wasn't and isn't, what gave you that idea?
[1] http://www.sagemath.org/ [2] http://maxima.sourceforge.net/
Mathematica is non popular because of its syntax, it is popular because of its extensive library, graphics capabilities and documentation.
If you want to make free software packages more competitive compared to mathematica, the best way would be to work on extending their libraries, documentation and graphical capabilities, not increase the fragmentation by starting yet another package from scratch doing the same thing just using a slightly different syntax.
For all intents and purposes, from an user's point of view, this project is as a waste of time as writing yet another scheme interpreter.
The good thing is that mathics make very nice plots (at least for simple functions I tested). The bad news is that it stumbled on a simple NIntegrate.(*) It certainly has potential though...
[ Edit: Hmm looks like Integrate[] does what NIntegrate in my example was supposed to do. I take the "bad news" back.]
I couldn't find a full table of compatibility with Mathematica though, anyone know where one is?
It's startling how much work goes into something like Mathematica, too bad it's not open source, and have to be redone:(
Integrate[Exp[-(x/2)^2],{x,-Infinity,+Infinity}]
Integrate[Exp[-(x/2)^2],{x,-Infinity,Infinity}]
Both give 2 Sqrt[Pi]Mathics vice dictator here btw.