News for hackers. Stuff that matters.
Re:FizzBuzz in J, Explained by bithive123 on Thursday January 19, 2017 @09:05PM (#13441224)
"Doesn’t it make sense that in mathematics, we use the integral symbol instead of A.Integral(B)?"

In my experience the obscure notation is what made college math hard for me to learn. As a programmer I really wish there was a math textbook that used A.Integral(B) type notation to teach concepts, because I think I could have been good at math.

I realize that people who start with math have the opposite experience; my physicist friend complains that whenever he has to use a CLI or write code everything seems arbitrary and confusing to him.

Re:FizzBuzz in J, Explained by cttet on Thursday January 19, 2017 @10:18PM (#13441521)
I would be reading math-savy papers 3x as fast if they just declare the variables explicitly before equations, instead of definitions scattering all around the paper..
Re:FizzBuzz in J, Explained by cttet on Thursday January 19, 2017 @10:20PM (#13441530)
And I really hope the future for math be some lisp-like syntax where no special syntax is required every new concept is introduced.
Re:FizzBuzz in J, Explained by ninkendo on Thursday January 19, 2017 @10:11PM (#13441493)
Agreed. And to me it's not just the math notation that bugs me, but the tendency of mathematicians (and perhaps by extension, physicists) to always use one-letter variables.

In software development, you'd get torn apart in code review if your variables are all one letter long. Why is math so terse?

Re:FizzBuzz in J, Explained by imh on Friday January 20, 2017 @02:38AM (#13442277)
I think it's pattern matching and intuition. If I see y = k/x, I can immediately process what that looks like. Further, I can take advantage of tons of conventions that make it read differently from a = b/c or even y = z/x. The conventions take some getting used to, but after a while writing out dependentVariable = divideBy(constant, independentVariable) would get super tedious and it's absolutely not instantly pattern matchable. Especially when you're working out some manipulation where you have to write the same variable a zillion times, and maybe even depending on your brain's pattern matching and inspiration to kick in. Hell, at this point I even use a shorthand for cos and sin for those reasons.
Re:FizzBuzz in J, Explained by evincarofautumn on Thursday January 19, 2017 @11:49PM (#13441791)
I’m sure part of the reason is that mathematics was, and largely still is, written by hand. You can manipulate “code” more easily on paper with a terse, implicit notation. It can also have the advantage of engaging your visual pattern-matching abilities more than prose or prose-like notation.
Re:FizzBuzz in J, Explained by rtpg on Friday January 20, 2017 @04:49AM (#13442644)
Part of the reason is that most variables do not have much meaning.

What name do you ascribe to "a continuous function from R to R"?

Another detail is that you are rarely juggling more than 10 or so names at once.

A lot of math at a higher level becomes abstract enough to where elements no longer have a concrete meaning. What does the x in integral(f(x)dx) mean? It's more about some things being harder to write in point free style rather than anything else.

This is perhaps why it's common to have short names for arguments in functional languages as well.