News for hackers. Stuff that matters.
Re:C++17: I See a Monad in Your Future by Kutta on Thursday February 27, 2014 @04:46PM (#7315352)
It seems a massive violation of basic DRY to come up with new names instead of using those that have been a staple in math for the last 50 years. It's also just about 5 words in total, if you count the most important and widely used Haskell/FP typeclasses. I really hope people in general are able to memorize five words.
Re:C++17: I See a Monad in Your Future by coldtea on Thursday February 27, 2014 @05:56PM (#7315857)
>It seems a massive violation of basic DRY to come up with new names instead of using those that have been a staple in math for the last 50 years.

DRY is not abour reusing names from other fields. Perhaps you were going for the "principle of least surprise".

But given that most people are not familiar with those Math names in the first places (including mathematicians not versed in type theory, trust me, I've asked a few Math colleagues from university and it's chinese to them too), I doubt even that applies here.

So, no, some arbitrary names like Monoid and co, obscure even for people with a passable Math knowledge, picked back in the day, is not the best naming scheme for that behavior that people can come up with.

The best that it has going for it is that is has been used in Math "for the last 50 years" (still, hardly a "staple").

A lot of math naming and notation is arbitrary and a historical accident. That was one of the things the "axiomatic language" guys tried to solve back in the '20s after all.

Re:C++17: I See a Monad in Your Future by jroesch on Thursday February 27, 2014 @06:52PM (#7316230)
If you don't know what a Monoid is you are probably a pretty poor mathematician as it is core structure to do even undergraduate abstract algebra.

Many computer scientists already understand reasoning about abstract structures and use them in their work.

For example commutative operators are incredibly powerful tool in distributed systems, as I am able to disregard ordering. In general it is useful to be able to say that if I meet an abstract specification (i.e a Monoid, Group, Ring, ect) because it allows me to perform operations with confidence that they are correct.

If you doubt the usefulness of this just look to Twitter (can't get much more "real world" than that) and see how they have been leveraging abstract reasoning in projects like Summing Bird (and its sub-projects like Algebird, Bijection, ect).

Re:C++17: I See a Monad in Your Future by Iftheshoefits on Thursday February 27, 2014 @08:53PM (#7316749)
I think what you meant to say was "you are probably not very well versed in a specific branch of mathematics." Because otherwise you're coming off as needlessly--and baselessly--arrogant asshole who also has mistakenly generalized his specific area of expertise far beyond what it actually is.
Re:C++17: I See a Monad in Your Future by coldtea on Friday February 28, 2014 @03:51AM (#7317758)
>If you don't know what a Monoid is you are probably a pretty poor mathematician as it is core structure to do even undergraduate abstract algebra.

Well, I asked undergraduate math students on their final year, and they didn't know. Perhaps all PhDs in math do, but that's not much of an argument in reusing those terms in CS.

Myself had several classes of algebra in different years in university (for the CS degree) and we didn't ever talk about Monoids and such.

Re:C++17: I See a Monad in Your Future by nzp on Friday February 28, 2014 @04:50PM (#7321749)
> Well, I asked undergraduate math students on their final year, and they didn't know.

I have no reason to not believe you, but how is this possible, and what does it say about either those students or that university or even both? Do they also not know what a group is? A ring, a field? How can a mathematician (and a nearly graduated student in maths is certainly a mathematician) not know what basic algebraic structures are? I'm shocked, frankly. It's literally equivalent to saying they don't know what real numbers are, without exaggerating one bit.

Re:C++17: I See a Monad in Your Future by coldtea on Saturday March 01, 2014 @03:06AM (#7323594)
>* I have no reason to not believe you, but how is this possible, and what does it say about either those students or that university or even both? Do they also not know what a group is?*

They should know what a group is, because even us, CS students, were taught group theory for a whole semester.

As for the monoid thing, I guess they could have been taught at some point, along with being taught 20 other branches and fields of mathematics in different classes, and they were more likely to remember a) the basic stuff, b) the stuff they started to specialize on and concentrated upon writing their thesis. So, I guess if I had talked to someone who had taken a preference to type theory and such, they would have known.

>How can a mathematician (and a nearly graduated student in maths is certainly a mathematician) not know what basic algebraic structures are? I'm shocked, frankly. It's literally equivalent to saying they don't know what real numbers are, without exaggerating one bit.

Is it? I don't know. You can read whole books in Algebra and not mean the word "Monoid" once in them, including some university books.

For example (not even one mention): http://www.amazon.com/gp/search?index=books&linkCode=qs&keyw...

This again no mention: http://www.amazon.com/gp/search?index=books&linkCode=qs&keyw...

This (a "graduate level" book) only mentions Monoid once, somewhere on the first pages, and adds that it won't be emphasised: http://books.google.com.sg/books?id=C4TByeUh9A4C&printsec=fr...

And I'm pretty sure in our Algebra books (for CS students, 2 classes in the 1st and 2nd year) there was no much mention of monoids (or, possibly, the professor skipped over those chapters, maybe had some brief explanation and went on to other things).

Of course, what university gradutes of a field do not know can sometimes be even more daunting. For example, a surprising percentage of degree-ed Computer Scientists cannot even solve the fizz-buzz problem:

http://blog.codinghorror.com/why-cant-programmers-program/

Re:C++17: I See a Monad in Your Future by nzp on Saturday March 01, 2014 @06:49AM (#7323963)
Of course, to not remember exactly what a monoid is is completely fine for a mathematician who's field isn't abstract algebra and related stuff, but to be clueless as to what the concept is at all is somewhat disturbing. I would have no problem if they said something like "ah, yeah, it's a little simpler than a group, I can't remember the exact properties ATM".

Hm, I just gave a quick glance to one group theory textbook (the only one I have in English), and to be honest in the first 20 or so pages there is no mention of the word "monoid" (as far as I can see, I really just quickly scanned through the first chapter) but it does mention semigroups (which are just an identity element away from monoids)...

> And I'm pretty sure in our Algebra books (for CS students, 2 classes in the 1st and 2nd year) there was no much mention of monoids (or, possibly, the professor skipped over those chapters, maybe had some brief explanation and went on to other things).

Yeah, and that's fine, but for maths students to not even remember that it was mentioned is kind of sad. It shows they don't really care that much about what they're doing. If it wasn't even mentioned by the professor, shows a disinterest on his/her part to actually teach concepts. It's always much better when teaching a concept to also at least mention related concepts or similar ones at different levels of abstraction, that gives a complete picture in which you can neatly place things. A group doesn't just appear out of nowhere (although it certainly can be defined on it's own), and it's not alone...

> For example, a surprising percentage of degree-ed Computer Scientists cannot even solve the fizz-buzz problem:

Sigh... I know. But you see, that's why I found this discussion about the unintuitiveness of the word "monad", here of all places, absurd. I wouldn't expect people who cannot solve fizz-buzz to have any clue about anything, and on some level I'm fine with that, this is not an elitist rant, but people in a place like this? After all, programming routinely involves dealing with concepts that are much more unintuitive that a monoid, IMHO.

Re:C++17: I See a Monad in Your Future by marssaxman on Thursday February 27, 2014 @06:15PM (#7315980)
We are not mathematicians. Those terms are not really part of our industry.
Re:C++17: I See a Monad in Your Future by jroesch on Thursday February 27, 2014 @06:43PM (#7316162)
Though many of us are computer scientists (at least by education), and engineers. Vocabulary does not just manifest out of thin air. Where do you think the words function, or algorithm came from? I can tell you they were in use before 1950. We have already collectively borrowed a huge amount of vocabulary from mathematics. There is nothing wrong with adopting a few more that accurately describe what these objects are. For example we could call Functor Mappable or some such but it falls short in describing the abstraction. For example functions of one argument form a Functor and its "map" is function composition. So for functions Mappable is a pretty poor name.

Edit: Yes languages get this wrong but I was focusing on the borrowing of vocabulary more so than the correct usage of it. Many words are abused like Functor to mean function object in C++, functions referring to procedures, ad-hoc vs. parametric polymorphism, strong and weak typing ect.

Re:C++17: I See a Monad in Your Future by bjz_ on Thursday February 27, 2014 @06:57PM (#7316260)
Unfortunately the term 'function' is somewhat misused in most programming languages, where 'procedure' would be a better term. The Wirth languages, Haskell, and Nimrod are the few that seem to get this right.
Re:C++17: I See a Monad in Your Future by axman6 on Thursday February 27, 2014 @11:31PM (#7317252)
Ada too, it has distinct procedures and functions; the latter producing only one output based only on its inputs (though I believe recently they added the ability to also have out parameters so multiple values can be returned).
Re:C++17: I See a Monad in Your Future by marcosdumay on Thursday February 27, 2014 @09:03PM (#7316783)
Eh, sorry, but you work with a machine whose purpose is to manipulate mathematical constructs, following a mathematical algorithm, receiving mathematical symbols as input, and outputting that same class of symbols, originally invented by mathematicians, and improved by them through several iterations until they achieved the form they have now.

Oh, and lots and lots of your peers are formed in an specialization of mathematics called "Computer Science".

Re:C++17: I See a Monad in Your Future by marssaxman on Friday February 28, 2014 @02:13PM (#7320813)
Of course. But the fact that I'm doing this work on a device built from electronic components does not make me an electrical engineer, and the fact that physicists discovered the principles which make semiconductors possible does not make the work I'm doing a part of physics.

One might as well say that biology is a branch of philosophy, because it was the source of all the natural scientists; but such a description, in modern times, would not be particularly informative.

Re:C++17: I See a Monad in Your Future by freyrs3 on Thursday February 27, 2014 @06:39PM (#7316142)
Um, which industry do you work in? Enormous amounts of words from mathematics have been incorporated into the programming lexicon. Vector, matrix, index, graph, tree, function, domain, ... the list goes on and on.
Re:C++17: I See a Monad in Your Future by Pacabel on Thursday February 27, 2014 @07:34PM (#7316461)
The words you listed tend to have well-understood meanings in numerous contexts aside from mathematics that are still related in some way to the software concept.

Some of those words are very likely non-mathematical words that were adopted and re-purposed by mathematicians. "Tree" is inspired by how the data structure's shape is very similar to that of trees (that is, the plants), for example.

Re:C++17: I See a Monad in Your Future by freyrs3 on Thursday February 27, 2014 @07:52PM (#7316543)
You missed the point, they all come from mathematics and their meaning in the context of programming is precisely related to their mathematical context.