

Mathematica 9 Is Released Today - lispython
http://blog.stephenwolfram.com/2012/11/mathematica-9-is-released-today/

======
snprbob86
Despite the overwhelming sense of ego that pervades every word Wolfram and his
organization ever writes, you owe it to yourself to try Mathematica.

When I had first encountered Mathematica in college, I thought "this is neat",
used it for a few calculations, and forgot about it. Fast forward to a few
months ago and I decided to install a demo just to learn about term rewriting
and pattern matching.

What I discovered blew my mind: It's just a lisp! Every expression has a
"head", which is just a namespaced symbol. FullForm[x+y+z] is really just
Plus[x,y,z] and Head[Plus[x,y,z]] is simply Plus. Squint, and it looks like (+
x y z) to me... The really interesting part is that the entire computational
library is built around term rewriting. While there is mutable state, it
exists almost primarily at the symbol definition level. Everything else is
pretty much pattern matching on trees of symbols. Even the rendered output is
just a drawn representation of a box-oriented markup built out of Mathematica
forms. It's quite amazing.

~~~
bitwize
Wasn't Wolfram the guy who said that Lisp was completely inadequate for
mathematical computing, being too slow by a factor of 100 or summat?

Mathematica owes much of its lineage to Macsyma, a computer algebra system
that really was Lisp on the inside; its spiritual descendant, Maxima, is
written in CL.

~~~
tzs
Source for the following: personal recollection from when I was an
undergraduate at Caltech. I had a part time job as a systems programmer/admin
at CITHEP (Caltech High Energy Physics), mostly dealing with their VAX-11/780,
at the time that Wolfram was using that machine to develop the predecessor or
Mathematica.

Wolfram and Chris Cole started developing a symbolic math system, which they
named Symbolic Manipulation Program (SMP), when they found that Macsyma was
unable to handle the computational needs for their physics research. For
problems that they considered to be medium problems, Macsyma could do the
work, but it was very slow. For problems that they considered to be large
problems, Macsyma ran out of memory. Thus, they needed something more
efficient in both time and space.

Wolfram and Cole planned on writing in C. They asked researchers in the
symbolic computation community about this, and were told that it was a
terrible idea. C was too low level. To do a high level system like a symbolic
algebra system, you had to work at a much higher level. Using anything less
than Lisp pretty much guaranteed your project would take forever.

Wolfram and Cole decided on C anyway. (BTW, C at CITHEP was not quite standard
C. Norman Wilson had hacked the compiler to handle float and double
expressions the same way FORTRAN handled them, making C almost as good as
FORTRAN for numerical work, and C had mostly taken over from FORTRAN for
physics computation there).

I recall seeing the factor of 100 number, or something like that, in one of
the first public presentations of SMP. On the research problems that Wolfram
and Cole considered to be medium sized, SMP was beating the Lisp-based systems
by around a factor of 100.

~~~
phren0logy
Thanks very much for that. This is one of the reasons I love Hacker News!

------
zackzackzack
Some notable features:

Call outs to R code [http://www.wolfram.com/mathematica/new-in-9/built-in-
integra...](http://www.wolfram.com/mathematica/new-in-9/built-in-integration-
with-r/)

Social network analysis [http://www.wolfram.com/mathematica/new-in-9/social-
network-a...](http://www.wolfram.com/mathematica/new-in-9/social-network-
analysis/)

Computation bar [http://www.wolfram.com/mathematica/new-in-9/next-
computation...](http://www.wolfram.com/mathematica/new-in-9/next-computation-
suggestions-bar/)

Sigh. I dream of Mathematica being open source.

~~~
27182818284
>Sigh. I dream of Mathematica being open source.

That's what Google's Brin was working on when he interned there.

~~~
jkn
Sergey Brin was only working on open sourcing the "pure language" part of it
[1].

I share the dream of an open source Mathematica. It's so rich, elegant and
powerful, using it would be a no-brainer. But in its present state? Nope. I've
been bitten too many times by the proprietary nature of Matlab, in which I
have invested a lot of work, to repeat the mistake. More specifically and from
the top of my mind, I found that proprietary means:

    
    
      - I cannot run my code on my personal PC
      - some people I'm collaborating with cannot use my work
      - when I move to a different job, there is a good chance I cannot reuse my code
      - even when my new workstation (or my colleague's PC) does have the software installed, there is a good chance the version is incompatible with my code or the license doesn't include some toolbox I'm using
      - some work I want to make freely available is of no use to someone who cannot afford the software
    

Notably absent from the list is the notion that I cannot check what is
happening in the proprietary code. That is because the Matlab functions I
needed to check were written in Matlab and perfectly readable. I'm sure the
issue is real though, and I would be concerned if a new kind of science
developed that produced results through opaque processes in closed source
proprietary software.

[1] <http://www.bestofama.com/Stephen_Wolfram/qisot>

~~~
taliesinb
Because most of Mathematica is written in Mathematica, you _can_ actually
introspect large parts of the codebase (by using DownValues). Try e.g.:

    
    
      DownValues[GraphPlot]
    

Sometimes various symbols are 'ReadProtected', which prevents you from seeing
their internal definition. But guess what? You can just Unprotect them and
remove that attribute. And even introduce new definitions to monkey-patch the
language!

Only a smallish subset of the language is written in C (for speed).

Edit: It's also kinda fun to use

    
    
      Names["*`*"] 
    

to see all the defined symbols in a fresh kernel -- there's a lot of hidden
stuff there. Try

    
    
      Names["Internal`*"]
      Names["Developer`*"]
    

to see some stuff the developers kept to themselves :)

~~~
jkn
Interesting! Most things I tried cannot be introspected though (e.g. DSolve,
LaplaceTransform) and it's of course a far cry from a commented source file or
notebook. Still, more than I thought was possible with Mathematica.

------
ivanb
For me this software project is one of the most admirable. The combination of
the quality, expressiveness of the language, uniformity of the environment,
cool algorithms and rich visualizations is a geek's delight. It is a pity that
since I finished my university there is almost no place for this beautiful
software project in my day to day life.

~~~
ksss
Same for me. Most people in business around me use Excel and Matlab. I'd like
to know how people on HNews use Mathematica.

EDIT: Mathematica can do almost anything, but how do you use it actually in
your work environment?

~~~
montecarl
I typically use Mathematica to prototype ideas. When they pan out, I integrate
them with existing code written in c or Python. That Mathematica excels at
symbolic manipulation as well as numerical solutions while having excellent
visualization tools makes it invaluable.

In particular I love to build up some complicated function of many variables
and wrap a Plot[] command in a Manipulate[] command so that I can drag the
slider bars around and see how the shape of the function changes. This allow
for me to get an intuitive understanding of the problem.

------
scottfr
Anyone test it to see if it has reasonable undo/redo support yet?

That alone would almost be reason enough to upgrade.

~~~
Too
Dito. This is a total show stopper. Only undoing your very last action and
with no redo really sucks. I repeat that as it might sound like a joke to most
people. There is no redo. And you can only undo one thing, where "one thing"
might be typing a massive formula with all the correct mathematical notation
or one full page of text.

So if you undo your last 5 minutes of work because you thought you would undo
one line or something there is no way to get it back. T________T

If you deleting something inside that one thing you are currently typing, that
deletion is also _completely impossible to undo_ because if you do you will
undo typing that entire block. (Undoing a small accidental delete is usually
the cause of the scenario i described above)

------
PieSquared
Wow. I am impressed not only by the new features, but also by that blog post.
That was some really effective marketing!

I'm particularly pleased by the addition of units. I can't count the number of
times I've done some symbolic work in Mathematica, copied the results, pasted
them into WolframAlpha, added numeric values and units, and then computed the
value there. It's become a common refrain in my workflow and a rather annoying
one at that, so I'm really glad they're integrating things from WA into real
Mathematica.

~~~
Osmium
Weren't units already in Mathematica 8?
[http://reference.wolfram.com/mathematica/Units/guide/UnitsPa...](http://reference.wolfram.com/mathematica/Units/guide/UnitsPackage.html)

A lot of the new features fall short for me, e.g. face detection. Sure, it's
nice to have over not having it at all, but when alternatives like OpenCV
offer so much _more_ functionality, why bother? I was trying to find an easy
way to do facial landmark detection recently. If Mathematica included _that_
by default, now that'd be a selling point.

Also misleading is their new "audio spectrogram" feature. Wasn't this already
available with their FFT functions? An actual useful feature would be, e.g.,
automatic formant detection from voice files.

Often times, their new features list are just more nicely-packaged versions of
existing features that in practice just save a line or two of code, rather
than an feature that didn't exist at all before.

~~~
taliesinb
> Units

If you read the blog post you'll see that the units support before 9 was
'tacked on' as a separate package. The units in 9 are much more extensive and
flexible, and more importantly are integrated with other functions at a deep
level. To give an example, if you find a solution to an equation that involves
units, the solution will possess the correct units (and so on for curve
fitting, etc..).

> Face detection

Having used both Mathematica and OpenCV for image processing, I challenge you
to explain exactly how OpenCV goes "far beyond" Mathematica. Particularly in
morphological processing and image component measurements, Mathematica is
quite far ahead of OpenCV (in fact, Mathematica _bundles_ OpenCV to do some of
its image processing). However, OpenCV _does_ expose more lower level stuff,
and comes with some ML and object detection routines that Mathematica doesn't
yet have. But the maximum speed at which you can prototype new algorithms in
OpenCV is pretty darn painful.

> Spectrogram

The audio spectrogram is certainly not tacked on. Even doing a Short Time
Fourier Transform yourself is far from easy (it is _not_ equivalent to an
ordinary FFT). Making it performant on large audio samples also requires some
subsampling smarts. And doing a correct wavelet spectrogram is highly non-
trivial, because the feature size depends on the frequency -- i.e. low
frequencies have lower time resolution than higher frequencies.

> No new content.

Look at this list:

[http://reference.wolfram.com/mathematica/guide/SummaryOfNewF...](http://reference.wolfram.com/mathematica/guide/SummaryOfNewFeaturesIn90.html)

There's a massive amount of new algorithmic content there. You can't seriously
claim that, say, symbolic calculation of antisymmetric tensors and continuous
Markov processes are 'just convenient wrapping'.

Disclosure: I work at WRI, and love using Mathematica.

~~~
Osmium
>> No new content.

>You can't seriously mean that.

I didn't say that. For the record, I use Mathematica too, and while I find it
useful I'm more often that not left frustrated.

Clearly they've improved these features, they just haven't improved them
enough for my uses. I've personally used the Units package before and made
audio spectrograms, without much issue but without much success either. I
always had to turn to other tools to get the result I need, and _this is still
the case_ with Mathematica 9. The improvements aren't sufficient to make
Mathematica useful for my particular uses. Let's take face detection as an
example:

<http://reference.wolfram.com/mathematica/ref/FindFaces.html>

Do we know how it finds the faces? What if we want it to find other facial
features, or train it with another data set? With OpenCV, I can tell it to use
a custom Haar cascade. The only options Mathematica exposes are face size!

Having a feature in a bullet point isn't sufficient if the feature isn't
fleshed-out enough to be useful.

More generally, I find myself using Matlab more often even though it doesn't
work quite as well for my purposes. And why? Because it has easily readable
source files, more in-depth documentation that tells you how its algorithms
work, it has an open-source alternative that's more or less source-compatible
(Octave; Matlab gives me a nice GUI and a pleasant working environment, but a
colleague can run my files) and also uses open source software in a lot of
cases so its output can be independently verified. It's that kind of thing
that Mathematica needs to work on, not surface level features that probably
aren't going to be useful for people who actually need them. If someone's
project relies on good face detection I doubt very much they'd find
FindFaces[] sufficient. Which is not to say Mathematica isn't better for
having it than not having it at all, and I am sympathetic that they have to
start somewhere...

Edit: I just want to add thatI have no doubt a lot of very smart people are
working at Wolfram, and a lot of these features are great. I just can't help
but think that developer effort is somewhat misplaced. The graph in the blog
post of number of functions against time only goes to highlight that. When you
see the number of people clamouring for undo support, or a better GUI, or
existing features being better-explained or more fleshed out, I think that's
what they should be concentrating on rather than adding new features to the
list. Though the new Tensor functions are pretty cool..

~~~
taliesinb
Yup... FindFaces is somewhat of a surface feature.

The image processing group thought about allowing you to use custom Haar
cascades with FindFaces, and decided instead to wait another version and do a
proper Viola-Jones detection function + training framework.

The thinking was that enough people will find some basic face detection useful
to justify the early release of this particular facet of the whole object
detection/recognition problem.

But, you are right. There is definitely a balance between 'solving' an entire
domain at once or expanding the frontier to new domains. I think the
Mathematica team is navigating that balance pretty well, though. My most
common reaction when seeing new M functionality is 'wow, this is amazingly
deep', not 'gee, this is a gimmick'.

~~~
spitfire
Feature request for MMA 10. Bayesian classification and bayesian networks.

and a bunch of spit and polish on the Mac notebook interface - undo as people
have mentioned, scrolling performance, responsiveness, etc.

Thanks from a 17 year MMA user.

~~~
taliesinb
Yeah, M is ripe for it. The graph theory is already there, along with symbolic
stat distributions. We should be able to do some pretty powerful inference,
perhaps even on generalized box-plate diagrams.

------
scrumper
Mathematica is also by far the easiest language for solving Project Euler
problems. There's almost a function call for each problem. It feels far too
much like cheating but it's a good way to learn the language.

------
Osmium
Thanks Wolfram for not letting me upgrade. Website claims "up to 80% upgrade
savings!" but when I enter my activation code, I'm told I'm not eligible.

I bought a 1-year license just a few months ago for version 8. Only £36, sure,
but I'm a student and can't afford a second £36 now just for a handful of new
features, even if they would be useful. Upgrade pricing would be nice. I'm
sure working out a fair upgrade price shouldn't be too hard either. I bet
there's even a formula for it somewhere...

~~~
taliesinb
Talk to customer support. I think they're pretty good about helping out
students.

------
sn6uv
For those in search of a FOSS alternative, give Mathics a try: www.mathics.org

In the past couple of months, Mathics had made quite a lot of progress.In
particular the upcoming release will run on PyPy. Obviously it still had lots
of catching up to do, but being written in python (and some Mathematica) makes
development easy and fast. Come join us!

Disclaimer: Mathics vice dictator here

~~~
andrewcooke
<http://www.mathics.net/> (try on-line) gives a 502

~~~
sn6uv
Apparently it couldn't withstand all the traffic from HN (potentially due to
all the server side python). It's up again now.

You can always download it and try it locally: <http://www.mathics.org>

Edit: If anyone is interested in getting involved, we are always looking for
contributers. The full code is on github:
<https://github.com/poeschko/Mathics>

~~~
andrewcooke
wow. just looking now; that's really impressive.

------
Osmium
Any news on if the OS X GUI is still Carbon-based? Was hoping the new version
would be Retina-ready.

~~~
taliesinb
Yeah, I make noise about this all the time. Hopefully there is not too much
legacy burden in switching to Cocoa.

~~~
HSO
Try the "retinizer" utility: <http://retinizer.mikelpr.com> !

I used this to "retina-fy" Mathematica and it worked, the notebooks are clear
now.

~~~
Osmium
I tried it. It made my notebooks nice and crisp, but introduced weird black
artefacts with the menu panels. Did you get that too or do they work fine for
you?

~~~
taliesinb
Yes, I see the same thing, but it does work remarkably well aside from that!
Thanks for the tip, HSO!

------
hxrts
It's unfortunate that they restrict the number of cores according to license
tier. I was excited about R integration, which is where I do a lot of parallel
computations, until I realized this.

~~~
programnature
I doubt that limit affects your use case. The limit is on the number of
mathematica mathkernel processes, not on the number of processes the kernel
calls out to. Though, it likely takes some fiddling to set up numerous R
processes per mathematica mathkernel.

------
frozenport
Is Mathematic customer driven? I see many baroque details, but I can't imagine
them being used often. Graphs and parameters and models that look very
specialized: but in many of these cases I know people use Matlab or C. I use
Matlab. How does Steve choose which features to add?

~~~
taliesinb
On the contrary -- graphs (networks, not plots), statistical distributions,
and random processes are everywhere in almost every industry. It is just that
the current tools for working with them are currently so hyper-specialized to
each individual field that they are 'ghettos' that most smart, general-purpose
developers never enter.

We're all blind to things our current tools don't permit us to explore.

As a random example, I bet that many cloud-based services could (but probably
don't) do reliability analysis of their services under different independence
assumptions. Are the weak links what you thought they were? What if you
updated your model as various things failed / rolled over, so that you could
run to put out the fires that are most likely to burn the whole village down?
For a modest organization a smart intern could probably put this together with
Mathematica in a couple of weeks.

------
philip1209
I maintain that my Mathematica license should include access to Wolfram Alpha
Pro.

------
splicer
The Wolfram Predictive Interface™ sounds a lot like Clippy.

~~~
stevenbedrick
That was my first thought as well, but after playing around with it all
afternoon, I'd say that I'm "cautiously optimistic". It's quite snappy, and
they clearly put a lot of thought into optimizing what it shows and when. It
would have been super-helpful when I was first getting started with MMA, and
as an experienced user I'm finding myself using it more than I would have
expected.

My one gripe thus far is that there isn't as much keyboard control over the
prediction interface as I'd like, but that could just be that I haven't found
the shortcuts yet.

One thing I quite like about it is that there's a built-in "feedback" feature-
any time the "predictive UI bar" is showing, there's a button you can press to
send semi-structured feedback about what's currently showing, suggest other
things you'd like to appear in similar situations, and so on. I've used it
already to suggest a few changes the prediction UI for ListPlot.

