Hacker News new | past | comments | ask | show | jobs | submit login
Which Is Closer: Local Beer or Local Whiskey? (wolfram.com)
111 points by lelf on Aug 20, 2014 | hide | past | favorite | 31 comments



Around "In[115]" I became convinced that the wolfram blogging team has a meth problem.

I'm always blown away by the wolfram blog visualizations and variety of data sources, as well as the occasional mathematical gems they drop! But seriously, don't do meth.


It reminds me of many systems I've seen where you really need to be a developer of the platform to intuitively make use of it for non-tutorial problems.


In[115] is the reason for why Mathematica never clicked with me.. I'm not smart enough to read that big block and write it, much less debug it.


As a Wolfram employee: I really think we should start indenting and formatting the code in the blog better, have some kind of gist rather than those hideous images.

I'm sure that that blob of code would much more legible if it was better formatted.


As the token programmer in a big group of (now graduated) math major friends, the first thing I did when sitting down to help them with Mathematica was completely reindent their code, which was always followed up by "Wow! It looks so much better now!" Is it perhaps endemic to the culture of the language?


I think it's somewhat endemic to the notebook interface where your code grows by accretion from a oneliner function.

Whenever I help novices with their code I ask them to transform all their cells that are not oneliners into code cells which require manual indentation.


Or it's just how amateurs write code before they no better.


It would also really help people with vision problems, as making the text bigger for the article makes the code blurry. :(


To be fair, mixing math and display logic in a giant function like that is a bad idea in any programming language.

But the frightening flexibility of the Mathematica language certainly doesn't help.


I think that is the main reason behind the comments here. The mathematica language takes some using too, and its syntax definitely is on the weird side of functional. However, do you expect this kind of complex example to be a paragon of clarity in any language? Picture what this would look like in haskell, ipython, R or javascript. Do you think "oh yes of course I will totally be able to do that after 2 hours using the platform"?

As to the question if you have to be a developer to write that kind of code, of course not, but you do have to be an experienced developer on that platform. I for one really like Mathematica despite the closed source and the offputting look of the source code, exactly because you can do the sort of magic shown here and actually get there pretty quickly.

Now, I hope that didn't sound too defensive :)


The first five times I read this comment I read it as:

"To be fair, mixing meth and display logic in a giant function like that is a bad idea in any programming language."

Frankly, I agree with either statement.


It's a lot easier to write Mathematica than it is to read it. I've come up with some retrospectively-horrific functions that were intuitively easy to write - just keep piling on the functions, really. It's like the standard mistake when children learn maths of writing "If x=-1, then x^2+2x+1 = (x+1)^2 + 5 = 5" when they mean "x^2+2x+1 = (x+1)^2; then (x+1)^2 + 5 = 5": Mathematica makes it very easy to write in a completely unreadable stream of consciousness.


An ability to switch back and forth to a sort of "graph" view would be tremendously helpful, as most people tend to have a better ability to process visual information rather than a stream of text


You can't use it as an input form, but you can view a nice tree of your expression automatically.

TreeForm[ x^2 + 2 x + 1 == (x + 1)^2]


This. Some novel form of input would be nice. The few times I've used mathematica it has been slightly painful in this department.

I've been using a TI nSpire calculator on and off for math and it's pretty decent with respect to readability on the input and output side of things:

https://www.youtube.com/watch?v=PpmpFis8RQM

Even carries the input/output semantics into the programming language:

https://www.youtube.com/watch?v=oTdvIm9coXk

(just skip around the videos to see the input/outputs)


> It's a lot easier to write Mathematica than it is to read it.

+1. And it gets even more easier to read (“read”? :-) when you can select pieces in FrontEnd, with multiple mouse clicks or a corresponding hotkey. I got so used to it that I actually developed phantom pains in my editing of Html or TeX (or whatever, for that matter).


Don't you mean:

x^2+2x+1 = (x+1)^2;

If x=-1, then (x+1)^2 + 5 = 5


I bet that it would be much easier to read if you were to have longer lines, rather than wrapping in a narrow column, as one might find in an IDE.


I guess your statement would be as much valid if you replace "meth" with "math".


This example may not actually demonstrate what its originators may think. It's possible they think it shows that Mathematica can solve virtually any problem, however esoteric. In fact, it shows that Mathematica can be a hacker's dream world, creating solutions so complex that readers are left in awe of their sheer irreproducibility.

Concisely, the example says, "See what you can do with Mathematica if you're us?"


This is my reqctioe to every Mathematica blog post.

They nerd to write posts that walk through how a beginner could learn to do this stuff without a 15-year career at Mathematica, or it's all sizzle and no steak.


I like Mathematica... while their magic functions don't exactly work for much outside of their demo's, it gives good fodder for open source projects to eventually borrow from. IPython would not be where it is right now with its killer notebook interface and interactive plots if it were not for them borrowing some key ideas from Mathematica.


> while their magic functions don't exactly work for much outside of their demo's ...

I write and solve a lot of differential equations, and of the choices available to me, Mathematica solves more and is easier to use -- compared to the alternatives Sage and IPython. But it's way expensive compared to Sage and IPython, the latter two of which are free.

> IPython would not be where it is right now with its killer notebook interface and interactive plots if it were not for them borrowing some key ideas from Mathematica.

Don't forget Sage. Sage was modeled after Mathematica (but open-source and collaborative), IPython was modeled after Sage (but much more lightweight).

Sage is huge and getting larger, lots of specialized code for various esoteric mathematical fields, IPython has a smaller footprint and is in some ways easier to use.


I believe that Sage was modeled after Magma, which isn't important, but I highly recommend this long blog post by William Stein[1] talking about his motivations, the problem of basing academic work on closed source software, and in the case of Magma, the potential politics of even being able to get the software.

[1] http://sagemath.blogspot.com/2009/12/mathematical-software-a...


I agree, I've read that piece, it's very worthwhile, especially with regard to the issue of being able to publish the mathematical methods built into common math environments.

Oh -- my Sage tutorial: http://arachnoid.com/sage


I am only using wolfram for their api and source of data, i've don't used too much of their programming langage.

But only the data source is enough for me to give them money and support them ...

And their financials tools looks very interesting.


Have you had any concerns yet about data provenance? Granted, I've only done queries right on Wolfram Alpha itself (and not with an api), but figuring out precisely where the original source data came from is sometimes pretty hit-or-miss.


not really i could ask them an i will.

thks for the comment


This is incredibly cool.


Must be nice to live in the cognitive dissonance where you think your fragile, kludgey, application specific solutions are somehow stabile, well designed, universal tools.


Buried under the shitty attitude, there is actually a useful comment here.

Remember HN is the sum of it's parts. Be a postitive part.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: