It's ok to discriminate when you're trying to target/encourage a specific minority (i.e. women in software), but it's not ok when you're targetting a majority, because it looks like you're trying to encourage the majority while discouraging the minority
Whether or not people say this out loud, or think it consciously is a different question.
"Ladies Learning Code" is discriminatory towards men, but it's less of an issue because it is in the furtherance of encouraging a minority (women) into the field. On the other hand, "Men Learning Code" seemingly discourages women, who are already in the minority.
The point to organiations like this isn't to eliminate "discrimination" in the abstract. It's to eliminate the inequality of opportunity. There is a very large practical and moral difference between being excluded from a single meeting of techincal people and being excluded from (or have limited access to) an entire career path. Spending a few "discrimination" points on the former to reduce the cases of the latter seems like a good idea to me.
(Yes, upvotes say this too, but now that votes are not public, I wanted there to be a visible commendation. These sorts of things set the tone of the thread.)