News for hackers. Stuff that matters.
Re:Which Is Closer: Local Beer or Local Whiskey? by lumpypua on Tuesday August 19, 2014 @11:16PM (#8200949)
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.

Re:Which Is Closer: Local Beer or Local Whiskey? by thearn4 on Wednesday August 20, 2014 @12:33AM (#8201102)
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.
Re:Which Is Closer: Local Beer or Local Whiskey? by zzleeper on Tuesday August 19, 2014 @11:42PM (#8201008)
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.
Re:Which Is Closer: Local Beer or Local Whiskey? by carlob on Wednesday August 20, 2014 @04:58AM (#8201592)
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.

Re:Which Is Closer: Local Beer or Local Whiskey? by chaosphere2112 on Wednesday August 20, 2014 @10:42AM (#8202459)
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?
Re:Which Is Closer: Local Beer or Local Whiskey? by carlob on Wednesday August 20, 2014 @12:20PM (#8202975)
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.

Re:Which Is Closer: Local Beer or Local Whiskey? by judk on Wednesday August 20, 2014 @10:54AM (#8202518)
Or it's just how amateurs write code before they no better.
Re:Which Is Closer: Local Beer or Local Whiskey? by muraiki on Wednesday August 20, 2014 @12:26PM (#8203003)
It would also really help people with vision problems, as making the text bigger for the article makes the code blurry. :(
Re:Which Is Closer: Local Beer or Local Whiskey? by shoyer on Wednesday August 20, 2014 @12:35AM (#8201105)
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.

Re:Which Is Closer: Local Beer or Local Whiskey? by larve on Wednesday August 20, 2014 @04:05AM (#8201473)
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 :)

Re:Which Is Closer: Local Beer or Local Whiskey? by itsdevlin on Wednesday August 20, 2014 @12:57PM (#8203172)
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.

Re:Which Is Closer: Local Beer or Local Whiskey? by Smaug123 on Wednesday August 20, 2014 @04:06AM (#8201477)
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.
Re:Which Is Closer: Local Beer or Local Whiskey? by snicker on Wednesday August 20, 2014 @09:50AM (#8202277)
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
Re:Which Is Closer: Local Beer or Local Whiskey? by cschmidt on Wednesday August 20, 2014 @12:27PM (#8203015)
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]

Re:Which Is Closer: Local Beer or Local Whiskey? by allegory on Wednesday August 20, 2014 @05:10AM (#8201614)
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)

Re:Which Is Closer: Local Beer or Local Whiskey? by akater on Friday August 22, 2014 @02:13AM (#8211085)
> 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).

Re:Which Is Closer: Local Beer or Local Whiskey? by philbarr on Wednesday August 20, 2014 @05:58AM (#8201715)
Don't you mean:

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

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

Re:Which Is Closer: Local Beer or Local Whiskey? by gknoy on Wednesday August 20, 2014 @03:25AM (#8201397)
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.
Re:Which Is Closer: Local Beer or Local Whiskey? by smanuel on Wednesday August 20, 2014 @10:23AM (#8202382)
I guess your statement would be as much valid if you replace "meth" with "math".