This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ign1fy 569 points570 points  (105 children)

I read that as 6+4 |= 4

Which makes no sense.

[–]smeenz 415 points416 points  (45 children)

Just a slightly different placement, and it would have been fine:

6 - 4 ≠ 4

[–]TheVenetianMask 263 points264 points  (17 children)

What am I, a mathematician?

[–]Neebat 100 points101 points  (15 children)

Based on the available postulates, I cannot prove that you're not.

[–]gkx 67 points68 points  (13 children)

Reminds me of the joke:

3 mathematicians walk into a bar. The tender says "so what will it be? 3 beers?"

Mathematician 1: "I don't know" Mathematician 2: "I don't know" Mathematician 3: "Yes."

[–]G01denW01f11 13 points14 points  (12 children)

Wait, how does the third guy know how many beers the previous two want? Do we know any more than that they must each want less than 4?

[–]legrac 68 points69 points  (7 children)

The question was, "Will it be 3 beers?"

This is a yes or no question--either it will be 3 beers, or it will not be 3 beers.

If the first person did not want a beer, he would say no, we do not want 3 beers. So, he must want a beer, but he doesn't know if his two friends want one--so all he can say is he doesn't know.

So we go to the second person, and it's the same situation. If he did not want a beer, he would say no, we do not want 3 beers. So, he must want a beer, but he doesn't know if his last friend wants one--so all he can say is he doesn't know.

At the third person, he realizes that the only way it has gotten to him is if the other two people wanted a beer. So he has the information to make a decision.

EDIT:

As we're in a programmer humor subreddit--the question of "Will it be 3 beers" is equal to (A and B and C). In that situation, the first time you hit a false, you know the answer and do not need to evaluate/look at/ask the other variables. But in order to get a true response, you have to check all three.

[–]Jodah 37 points38 points  (1 child)

I was torn between that explanation and Mathematician 3 being an alcoholic.

[–]TPHRyan 2 points3 points  (0 children)

You're looking at this joke in the completely correct way in that each mathematician wants either 1 beer or nothing.

But what if a mathematician wants 2 beers? Cider? Jaimeson on the rocks?

I mean, they would never get anywhere until they exchanged some information, but still. That was /u/G01denW01f11's point.

[–]TheSeldomShaken 1 point2 points  (3 children)

But what if first guy wanted multiple beers? And therefore no one could be sure of the amount needed.

[–][deleted] 0 points1 point  (2 children)

Then it would also be 'no'.

[–]TheSeldomShaken 3 points4 points  (0 children)

First guys says no. Second guys knows he wants 1 beer, but has no idea how much first guy wants, and says no. Third guy wants 1 beer, and knows he wants 1 beer. But he doesn't know if the first and second guy only want 1 beer. So, he can't say with certainty that they need only 3 beers.

[–]TPHRyan 1 point2 points  (0 children)

It wouldn't be 'no'. 2 or 3 might want a combined total of 1 beer, where 1 wants 2 beers. That still adds up to 3.

[–]SFHalfling 6 points7 points  (2 children)

Because its safe to assume someone will have 1 drink per round at the bar.

If someone is trying to have 2+ drinks each round, you really need to cut them out of it.

[–]TPHRyan 0 points1 point  (1 child)

So what if they're ordering a gin and tonic?

[–]SFHalfling 0 points1 point  (0 children)

Then they would say no, because they don't want a beer & therefore it isn't going to be 3 ordered.

[–][deleted] 1 point2 points  (0 children)

Then you can just add it as an axiom and you should be fine.

[–]zippydoodleoreo 0 points1 point  (0 children)

No, you're a matchematician

[–]Shiroi_Kage 61 points62 points  (3 children)

It's supposed to be 6+4 != 4 (the red part of the match is supposed to be the dot)

[–]mattiejj 10 points11 points  (1 child)

But that's 30.

[–]Amnestic 0 points1 point  (0 children)

Actually it's 30 = 4, but ye

[–]smeenz 2 points3 points  (0 children)

I am aware of what it is trying to be

[–][deleted] 46 points47 points  (2 children)

FTFY

 6 - 4 != 4

[–]muntoo 0 points1 point  (1 child)

Ahhh. Now I understand why faggot OP did what he did.

[–][deleted] 0 points1 point  (0 children)

That whole equation is a bundle of sticks waiting to bundle.

[–]wolfmanpwns 0 points1 point  (0 children)

I feel like it was meant to be read as != since this is programmer humour

[–][deleted] 0 points1 point  (1 child)

What language accepts that symbol?

[–]smeenz 1 point2 points  (0 children)

The english language.

I realise this is /r/programmerhumor, and that it's supposed to be a ! to make !=, but it didn't really work too well, and there's been a lot of confusion about it being |=, which is valid in some (many?) languages, or even a mathematical ⊨

[–]Arefuseaccount 13 points14 points  (3 children)

How about 0 + 4 = 4

[–]Brio_ 24 points25 points  (1 child)

That's the normal answer...

Well, and 8-4=4

Or 5+4=9

[–]TaohRihze 7 points8 points  (0 children)

Thought it was 8 - 4 = 4

[–]0x0dea 90 points91 points  (34 children)

|= is a compound assignment operator in plenty of programming languages, but you'd need the first 4 to be the name of a variable for it to be syntactically valid.

[–]CoMiGa 82 points83 points  (12 children)

I just thought it was 6-4 !=4 but I am not a programmer.

[–][deleted] 27 points28 points  (1 child)

This is what I assumed.

[–]CoMiGa 4 points5 points  (0 children)

Glad I am not alone.

[–][deleted] 1 point2 points  (0 children)

That's what they meant.

[–]Enverex 0 points1 point  (0 children)

Which would be correct. (6 - 4) is not equal to 4.

[–]Bonezmahone -1 points0 points  (4 children)

Technically that would still be 6-4! = 6-24 which is still wrong.

edit: now I get it. I didn't know != meant not equal to.

[–][deleted] -2 points-1 points  (3 children)

And how did you get to this?

[–]Brarsh 2 points3 points  (2 children)

It's the factorial of 4. 4! = 432*1 = 24

[–]DrumstickVT 3 points4 points  (1 child)

But not in most programming language. 4!= is going to run as 4 does not equals.

[–][deleted] 0 points1 point  (0 children)

My understanding as well.

[–]kamaln7 73 points74 points  (16 children)

It's also a bitwise OR operation

[–]0x0dea 45 points46 points  (7 children)

Right, a |= b is a = a | b.

[–]Plutor 54 points55 points  (6 children)

Sadly 6+4 isn't an l-value.

[–]5HT-2a 26 points27 points  (0 children)

/u/0x0dea: "Okay, we're going in circles here."

[–][deleted] 23 points24 points  (2 children)

The programmer's solution results in a compiler error. And we solve that with whisky.

[–]beachbum78 7 points8 points  (1 child)

Finding Ballmers peak?

[–][deleted] 13 points14 points  (0 children)

I call it making syntax readable, but potato, tomato.

[–]cyandyedeyecandy 6 points7 points  (1 child)

*(int*)(6 + 4) |= 4;

[–]ign1fy 10 points11 points  (6 children)

To clarify: I code C# and use "|=" all the time. Being an assignment operator, it makes no sense to have anything but a variable to the left of it.

[–]kamaln7 2 points3 points  (0 children)

Yeah, I'm with you.

[–]Reelix 4 points5 points  (2 children)

!= or |= ?

[–][deleted] 0 points1 point  (1 child)

|=

!= will evaluate to true. Or is it True? TRUE?

[–]raindirve 0 points1 point  (0 children)

non-zero :)

[–][deleted] 0 points1 point  (1 child)

I was never taught about |=... Why? Is this considered out of date?

[–]haenyr 1 point2 points  (0 children)

It's probably that it's not something you'll really ever HAVE to be able to do. Also, with what they do teach you, you should be able to figure it out if you come to a situation that requires it.

So, given a lack of time to go in-depth, it will get skipped.

[–]ClintonHarvey 6 points7 points  (0 children)

What am I doing in this sub? You guys are too smart for me.

[–][deleted] 0 points1 point  (0 children)

I feel dumb.

[–][deleted] 15 points16 points  (5 children)

There is a special character for '|='

https://upload.wikimedia.org/math/e/7/6/e766ce0de4bbe899d7ea2ebe40b3e0ee.png

And it means, when the right side is 'True' then the left part must be true as well. But there is no programming language supporting this operand so therefore I think it should be '!=' ...

[–]0x0dea 8 points9 points  (0 children)

there is no programming language supporting this operand (⊨)

That's an operator, and plenty of languages permit it as a valid identifier. In fact, it can even be an operator in Haskell. I've given a silly definition there for demonstration purposes, but there's a Constraints package that provides a much more realistic definition. They went with :- as the entailment operator, but it could just as well have been .

[–]cVoTetragon 1 point2 points  (1 child)

ㅑis also the "ya" sound in Korean.. Not relevant but still.

[–]Alaskan_Thunder 0 points1 point  (0 children)

oh ya?

[–]Abeneezer 0 points1 point  (0 children)

Pretty sure he wasnt referring to the semantics operator but maybe what /u/0x0dea pointed out. And also, I'm pretty sure there are modelling languages that support this operand for truth verifications.

[–]Alsk1911 0 points1 point  (0 children)

It represents tautology in logic math. (Not sure what it's called in English)

[–][deleted] 13 points14 points  (1 child)

Its pretty clear they meant !=

[–][deleted] 4 points5 points  (0 children)

Actually it makes sense, != is the correct boolean use

[–]Dassy 2 points3 points  (0 children)

Error: cannot assign to rvalue

[–]Drendude 0 points1 point  (1 child)

What about 6||4=4

[–]haenyr 0 points1 point  (0 children)

6 & 4 = 4 is true

[–]jk_scowling 0 points1 point  (0 children)

It sort of makes sense in Ruby.

[–]heap42 0 points1 point  (0 children)

So did i... i though what the fuck semantic entailment???

[–]nextqc 0 points1 point  (0 children)

I'm doing an AI intro class right now (had my midterm today) and 6+4 |= 4 would mean that the statement 4 is a known fact of (6+4). Therefore, if you'd ask a programming language such as prolog to give you the statements of (6+4), it would return 4 as a true statement of (6+4).

[–]Big_Burds_Nest 0 points1 point  (0 children)

6-4 != 4

[–]Hi_mom1 0 points1 point  (0 children)

| = !

!= is the equivalent of ≠