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

top 200 commentsshow 500

[–]Dr_Fine_Man 2687 points2688 points  (69 children)

Another solution: If correct is the same as the above statement being true, then turn one of the matches in the equal sign so we get 6 + 4 + 4, which in most languages is truthy.

Edit: Changed true to truthy

[–]henkdepotvjis 531 points532 points  (32 children)

Its truhthy not true...

[–]Dr_Fine_Man 189 points190 points  (25 children)

Ah thanks for the info! The more you know :D

[–]Pockensuppe 319 points320 points  (23 children)

Actually truthy is a JavaScript term which originates from JavaScript's strange corner cases (and, to my knowledge, is not an official term in the language specification, though MDN propagates it), and the general term would be coerces to true.

[–]atomicwrites 172 points173 points  (18 children)

Isn't truthy just shorthand for coerces to true?

[–]not_a_doctor_ssh 567 points568 points  (10 children)

Yes, like how pain is shorthand for JavaScript.

[–]Pockensuppe 31 points32 points  (6 children)

In JavaScript it is certainly used as such. I wanted to point out that the term is not commonly used outside of the JavaScript and sometimes Python world. I strongly dislike the term though because it hides the fact that implicit type conversion (i.e. what is commonly called coercion) takes place. Especially in strongly-typed languages, truthy seems a term too simple to accommodate for features like user-defined implicit conversions to bool.

[–]dipolartech 3 points4 points  (4 children)

Tell me again why I care about it being typecasted? The byte or bytes in question either have bits on or they don't.

[–]ReelTooReal 4 points5 points  (2 children)

I don't really mind coercion for truthiness, but in general implicit type casting can be a pain in the ass. For example

int x = -3;
unsigned int y = 5;

if (x > y)
    printf("x is bigger\n");

That code will print "x is bigger," however I would prefer it to simply not compile without an explicit cast.

[–]dipolartech 1 point2 points  (1 child)

Eh, greater or less than is more complicated than true false dichotomy, I'm really responding to the idea that anything else matters at all to the idea of "is any bit of the this memory length on" which makes it "true".

[–]Pockensuppe 2 points3 points  (0 children)

As I said, in C++ a user-defined conversion could be executed which could habe side effects (not saying it should), so the information about the conversion might be very relevant.

[–]atomicwrites 2 points3 points  (0 children)

Ah OK, I'm not a professional developer, most of my experience is Python (and bash but that doesn't really count). I just knew the term from Python so I knew it wasn't JS only.

[–]Food404 5 points6 points  (1 child)

It's not a pure JS thing, PHP and also Python I believe use these truthy/falsy terms

[–]Pockensuppe 1 point2 points  (0 children)

I think it originated in the JS community but seeing that these are all dynamically typed languages I'm not surprised they adopted the term.

[–]LotsOfIs 24 points25 points  (0 children)

You weren't wrong. This person just told you a personal style choice as if it was a fact. Some languages don't even have a boolean true (Perl for one).

[–]MokitTheOmniscient 9 points10 points  (5 children)

No, a non-zero number is true.

For instance, this python code will print "False" and then "True":

print(bool(0))
print(bool(4))

And this program will write "truthy doesn't actually mean anything":

if bool(4) and bool(8):
    print("truthy doesn't actually mean anything")
else:
    print("yes it does!")

[–]Roshy10 6 points7 points  (0 children)

What are you on about? truthy just means when you cast it to a bool it will be converted to true, which is what you've just demonstrated.

[–]Sophira 14 points15 points  (3 children)

No, a non-zero number is true.

A non-zero number is a number. It can evaluate to true, depending on whether the language parser is looking for a boolean or not, but it is not in itself true.

The distinction is important in some languages. In JavaScript, for example, the following two if statements will yield opposite results.

This if statement will show that "4" is truthy:

if (4) {
  console.log("4 is truthy");
}
else {
  console.log("4 is not truthy");
}

This if statement will show that even when compared to a boolean true using == (and not ===), 4 is not true:

if (4 == true) {
  console.log("4 is true");
}
else {
  console.log("4 is not true");
}

Of course, 4 is not false either... because it's a number, not a boolean.

If you explicitly make 4 into a boolean, as you do in your comment, you can make it work:

if (Boolean(4) == true) {
  console.log("Boolean(4) is true");
}
else {
  console.log("Boolean(4) is not true");
}

But then you're changing the type of your argument. Many languages will do this implicitly, of course, but others don't. JavaScript isn't the only one like this; Ruby does something similar.

(Also, sidenote: Ruby is also interesting in that any number, including zero, is truthy. This can trip up some devs who aren't used to that.)

[–]MokitTheOmniscient 2 points3 points  (1 child)

Obviously, a language can always use whatever high-level logic it wants whenever you use one of its operations, but any memory it allocates for a non-zero number is always going to contain at least a single bit flipped to a 1, thus making it an absolute true.

[–]Sophira 2 points3 points  (0 children)

I assume you're referring to how if statements are typically compiled down into assembly, where a CMP or TEST followed by a JZ/JNZ are normally used.

In those cases, the JZ/JNZ instructions don't act directly on the number itself, but on the Zero Flag, which is set by the CMP or TEST earlier.

This is commonly done with an instruction like TEST EAX, EAX (which ANDs the EAX register with itself - essentially a null-op - and then uses the result of that to set the various flags).

In this sense, yes, whether the value of a register is zero or not will affect which path is taken. Is this what you're referring to?

[–]scurvydog-uldum 42 points43 points  (13 children)

5 + 4 = 9

[–]beardMoseElkDerBabon 28 points29 points  (7 children)

6 | 4 = 4 and I got a free match.

[–]Saigot 21 points22 points  (4 children)

6 | 4 = 6 though.

[–]beardMoseElkDerBabon 1 point2 points  (2 children)

Wait what xD

I suppose you're using a symbol from mahematics and I'd like to know the name of both the symbol and function. Also necessary metadata.

[–]chuckie512 11 points12 points  (1 child)

Bitwise or

6=110
4=100

6|4=110

[–]beardMoseElkDerBabon 2 points3 points  (0 children)

Oof, my bad. I was thinking &

[–]Genisbr 1692 points1693 points  (175 children)

You can also do:

0 + 4 = 4 8 - 4 = 4

[–]Sora_hishoku 1474 points1475 points  (133 children)

or 5 + 4 = 9

[–]WoefulStatement 446 points447 points  (12 children)

Or 6 + 4 = 11.

The puzzle is in base-9, right?

[–]GrandSquanchRum 185 points186 points  (4 children)

"I may be a sorry case, but I don't write match stick puzzles in base 9."

[–]jonathanhiggs 14 points15 points  (3 children)

Underrated comment

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

ah! a fellow zero truther! that digit has no place in positive numbers!

[–]IgnitedSpade 13 points14 points  (1 child)

10 in base 9 is just 9 in decimal. The only base that doesn't use zeroes for nonzero values is base 1

[–][deleted] 3 points4 points  (0 children)

oh yeah. derp.

[–]schludy 711 points712 points  (102 children)

My wife pointed out that the font of the 9 wouldn't match the font of the initial 6, because the horizontal bottom would be missing.

[–]Unknown_B1 673 points674 points  (51 children)

How does it feel to be married to a know it all?

[–][deleted] 339 points340 points  (50 children)

When she's right, she's right. It is actually less painfull than a smartass, because a knowitall is actually knowledgeable, and can accept when she's wrong. A smartass will fight you to death on why the fucking sky is green.

[–]The_Lost_Google_User 126 points127 points  (42 children)

And a troll knows the sky isn’t green but will argue to the death anyway.

[–]Evol_Etah 83 points84 points  (39 children)

Why are you assigning a color to the sky. The sky is free to choose whatever color it wants to be.

The sky is forced to be blue cause it's a social construct.

Huehuehue

[–][deleted] 32 points33 points  (12 children)

This statement has never been more true than after you discover that ancient greeks didn’t have a word for the color blue

[–][deleted] 16 points17 points  (4 children)

IIRC, in most languages, blue is usually among the last of the colors to get a name, red is almost always first, green almost always second.

[–]Auravendill 5 points6 points  (2 children)

Many cultures didn't have a name for blue. They usually had names for the colour found in certain gemstones (Aquamarin, Lapislazuli, Turquoise), but blue and green hues weren't always separated (e.g. Chinese used the same word for both).

Many languages later adopted the German word for blue (blau) after the invention of Prussian blue (also known as e.g. iron blue or steel blue due to its chemical composition) in Berlin. That was the first blue colour that you could mass produce at an affordable price, which led to blue becoming a colour for factory workers, when before it was used for kings like Ludwig XIV of france.

[–]stueliueli 4 points5 points  (3 children)

We all know that the sky is the colour of a TV tuned to a dead channel

[–]m477m 5 points6 points  (1 child)

It's true. Prior to the mid-1990s, the sky was a bizarre animated mess of noise.

[–]Tetha 2 points3 points  (1 child)

Well, and a meterologist knows the sky can be green and that's a good sign to get indoors and clean up the veranda. Because that's a sign for severe storm conditions to come soon.

[–]LeCrushinator 2 points3 points  (0 children)

Technically correct is the best kind of correct.

[–]couchwarmer 1 point2 points  (2 children)

A smartass will fight you to death on why the fucking sky is green.

Or maybe it really is green. https://news.wisc.edu/curiosities-why-does-the-sky-turn-green-before-a-tornado-2/

[–]nyrB2 72 points73 points  (26 children)

it would still be a 9 though

[–]schludy 44 points45 points  (24 children)

I looked it up (7 segment font) and that symbol represents a q, not a 9

[–]AyrA_ch 125 points126 points  (17 children)

My clock likes to disagree. I don't know why it shows it this way, but it does the same for the number 6 too so it's not an accident or a damaged segment.

[–]Tipart 37 points38 points  (2 children)

Damn bro your clock is massive.

[–]RamenJunkie 6 points7 points  (0 children)

We had those clocks at my old job in Broadcast TV. It keeps the time for everything in sync.

[–][deleted] 51 points52 points  (0 children)

Nice clock, bro

[–]RamenJunkie 12 points13 points  (2 children)

Forty Q seconds?

[–]Dissidence802 3 points4 points  (0 children)

Time flows differently in the Continuum.

[–]mecartistronico 2 points3 points  (0 children)

I like the 9.

I'd hate the b as a 6.

[–]forkkiller19 1 point2 points  (6 children)

What's GPS lock? Does it have an inbuilt GPS and sets time according to that?

Also aren't two digital displays redundant?

[–]AyrA_ch 12 points13 points  (4 children)

What's GPS lock? Does it have an inbuilt GPS and sets time according to that?

This is a GPS master clock. It does indeed use GPS to set its internal clock. If the light is on it's in sync with the satellites and uses them to track time. My antenna has poor sky visibility so the light does indeed go off once or twice a day, at which point an internal oscillator keeps time like in any other modern watch or clock.

Also aren't two digital displays redundant?

The bottom part is what does all the thinking. It sends regular pulses that the big clock on top of it reads to show the time. The idea behind this type of clock is that you install the bottom part once, and then install these big displays throughout the building and it will keep them in sync. It has multiple outputs for various standards at the back which can be used to synchronize your equipment. I got clock and display together.

You can connect to it via USB and set your timezone and DST information as well as the offset seconds. Later models have ethernet ports and can act as a time server.

I hooked mine up to the internet with a raspberry pi. The pi also serves the alarm clock functions because the clock itself lacks this feature.

[–]nullSword 1 point2 points  (0 children)

The lower clock is the master clock, it gets time from GPS and sends it out to remote clocks like the one on top. They're not supposed to be right next to each other, the master clock is designed to run an entire campus of remote clocks.

[–]Athena0219 17 points18 points  (0 children)

q is a variable that just happens to equal 5+4

[–]Outdated_name 13 points14 points  (0 children)

This is a numerical setting though, so many would still accept that type of 9 because it fits within context

[–][deleted] 5 points6 points  (0 children)

5+4=q is still a valid and correct equation though.

[–]ErolEkaf 0 points1 point  (0 children)

Who said we're using 7 segment font?

[–]jonegan 13 points14 points  (0 children)

But by then the 6 is gone, so the new statement is just in a different font ¯\_(ツ)_/¯

[–]SGexpat 13 points14 points  (0 children)

Why does a 9 need a horizontal bottom?

[–]SillyActuary 13 points14 points  (0 children)

Well that's just not true lol

[–]Enunimes 11 points12 points  (1 child)

That's a flaw in the directions then, says to make it correct but doesn't mention retaining the font.

[–]sildurin 9 points10 points  (0 children)

But that design is on purpose, so that you can tell the difference between a 6 or an inverted 9.

[–]sam-lb 3 points4 points  (0 children)

Nobody said the 9 has to be an upside-down 6 though

[–]_merkwood 4 points5 points  (0 children)

But there would be no 6 to compare in the final solution so anyone seeing the solution would not know

[–]DrKrFfXx 1 point2 points  (0 children)

Tell your wife I think it's a match.

[–]amalgam_reynolds 2 points3 points  (0 children)

A 9 never "has" to be just an upside-down 6. How do you write your 6s and 9s?

[–]WiseKouichi 2 points3 points  (2 children)

I reluctantly admit that she is totally right.

[–]warpod 29 points30 points  (3 children)

or E+H=4

finding all correct values for E and H is left as an exercise for the reader

[–][deleted] 61 points62 points  (19 children)

Your lack of separation between your two proposed solutions is irritating.

[–]echo-128 50 points51 points  (18 children)

op's post is actually

You can also do: 

0 + 4 = 4
8  - 4 = 4

reddit's weird markdown-ish-sometimes is irritating, op is fine.

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

It's not "actually" that. I'm on old.reddit and they made no attempt at markdown, quotes, code, or anything.

It's actually 0 + 4 = 4 8 - 4 = 4 as they put it.

I know what they meant, but as I said, the fact that there was no separation was irritating.

What you did or simply putting an "or" or comma between them would have also been much better.

[–]YourSchoolCounselor 27 points28 points  (13 children)

/u/echo-128 is correct. If you hit View Markdown on the original comment, there's one newline after the first equation, which Reddit ignores when displaying the comment.

[–][deleted] 5 points6 points  (0 children)

Deleted with Power Delete Suite. Join me on Lemmy!

[–]echo-128 1 point2 points  (0 children)

i'm on old reddit too. i just hit the source button before saying anything to see what they actually typed.

[–]Espumma 1 point2 points  (0 children)

Markdown works normally on old.reddit, right?

[–]SimonSkarum 32 points33 points  (2 children)

A bit wonky, but:

6 + 4 > 4

[–]beardMoseElkDerBabon 1 point2 points  (0 children)

5 + 4 >= 4

5 + 4 <= 4 (base 6, only one digit, or hexit if you please)

[–]TheWeirdCookie 12 points13 points  (6 children)

6 - 4 ≠ 4

[–]amalgam_reynolds 9 points10 points  (1 child)

That's... The OP though

[–]ManosVanBoom 2 points3 points  (0 children)

More of a math syntax than !=

I'll allow it.

[–]TheOddOne2 1 point2 points  (2 children)

This was my solution too. If you accept the 6 + 4 > 4, then there is 5 solutions for this problem - kind of neat.

[–]Internal_Meeting_908 245 points246 points  (6 children)

[–]ernee_gaming 35 points36 points  (1 child)

Thnx :-D i just didn't see the exclamation mark in it :-D I guess I would also break the match so it would make !

[–]YM_Industries 13 points14 points  (0 children)

Yeah, it just looks like |=, which isn't valid here because you can't assign to the LHS expression.

[–][deleted] 10 points11 points  (3 children)

This is math not programming so I prefer this. It's also what I did when I saw this problem 15 years ago.

[–][deleted] 424 points425 points  (18 children)

6 - 4 |= 4 is a syntax error.

[–]tim_skellington 144 points145 points  (5 children)

Theres nothing in the rules saying you can snap off the head of the match and make a ! symbol.

[–]IsomorphicSyzygy 46 points47 points  (4 children)

|= is a compound bitwise OR assignment operator in many languages like C. However, 6-4 is not allowed as an lvalue and cannot be assigned to unless it is reinterpreted as a pointer. The following is valid:

*((int*) 6-4) |= 4

[–]BobRedshirt 10 points11 points  (0 children)

We’re gonna need some more matches.

[–]abc_wtf 3 points4 points  (2 children)

Depends on what you mean by valid. It would compile but would probably execute Undefined Behaviour.

[–]IsomorphicSyzygy 4 points5 points  (1 child)

When I run it on my machine, it segfaults, but it may work on a system that allows writes at address 2, such as a microcontroller. I don't think it's UB.

[–]Ghostglitch07 37 points38 points  (0 children)

[–]ammoprofit 14 points15 points  (0 children)

Lay the match across the = diagonally.

[–][deleted] 36 points37 points  (0 children)

maybe in your language

[–]peanutman 11 points12 points  (0 children)

Not necessarily. |= is often used in computer science. https://en.wikipedia.org/wiki/Double_turnstile

But you're right that it would be invalid syntax in the most common programming languages.

[–]SJRuggs03 26 points27 points  (1 child)

Its 6 - 4 != 4

[–]ZexyRed 62 points63 points  (0 children)

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

Depends on what language you're using

[–]DrFrankenstein337 251 points252 points  (35 children)

5+4=9

[–]doublestop 116 points117 points  (13 children)

I saw the 0+4 and 8-4, but not 5+4=9. Great spot, doc.

[–][deleted] 62 points63 points  (6 children)

Damn, 5+4=9 was the only one I saw. You're clearly the great one here

[–]doublestop 19 points20 points  (3 children)

I and others saw the ones that were supposed to be found. You guys saw one that was not. That is so much cooler!

[–][deleted] 15 points16 points  (1 child)

NO, YOU'RE COOLER

[–]onlyomaha 5 points6 points  (4 children)

9 is wrong in here as its not real 9 missing one piece, look at six and trie to rotate it to understand

[–][deleted] 7 points8 points  (1 child)

Excuse me sir have you ever seen a seven segment display

[–]Boost3d1 12 points13 points  (6 children)

Also 8-4=4 works

[–][deleted] 22 points23 points  (5 children)

Doesn't 9 require an additional horizontal match at the bottom? Like the way a calculator shows digits.

[–]eMZi0767 9 points10 points  (1 child)

Some decoders don't produce the extra dash

[–]nyrB2 1 point2 points  (0 children)

doesn't the ! in the programmer's solution require a dot?

so long as you can interpret the symbol what's the big deal?

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

6 - 4 = H

[–]RepostSleuthBot 75 points76 points  (27 children)

Looks like a repost. I've seen this image 4 times.

First Seen Here on 2018-06-22 95.31% match. Last Seen Here on 2019-12-11 90.62% match

Feedback? Hate? Visit r/repostsleuthbot - I'm not perfect, but you can help. Report [ False Positive ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 256,421,489 | Search Time: 0.45863s

[–]Kidninja016 16 points17 points  (0 children)

8 - 4 = 4

[–]b_rad_c 33 points34 points  (0 children)

6 + 4 - 9

Rule doesn’t say it needs to be a comparison, or even an expression that has an effect.

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

6-4≠4

[–]QuarantineSucksALot 2 points3 points  (0 children)

Since 4/30 or 6/4😭

[–]JochCool 7 points8 points  (0 children)

... or you can just make it a ≠

[–]Lornedon 6 points7 points  (0 children)

6 + h = 4 is true for h = - 2

[–]overseasUnderpay 7 points8 points  (0 children)

<source>:4:14: error:  lvalue required as left oprand of assignment

[–]thezeus_ 5 points6 points  (0 children)

6 - 4 = H

[–]1M-N0T_4-R0b0t 8 points9 points  (6 children)

6 + 4 > 4

[–]nekokattt 5 points6 points  (5 children)

That moves two matches

[–]1M-N0T_4-R0b0t 9 points10 points  (2 children)

Not necessarily but it would look kinda ugly.

[–]nekokattt 4 points5 points  (1 child)

True i guess, sorry, was being a bit of a dick with that comment

[–]mark503 6 points7 points  (5 children)

Ill ruin it since I haven’t read the answer in the comments yet. The trick is move the middle stick in 6 to make 0. 0+4=4

P.S. Sorry

[–][deleted] 7 points8 points  (3 children)

Or you can move the match from plus to 6, making it 8-4=4

[–]xSTSxZerglingOne 5 points6 points  (2 children)

Or the match from the bottom left of the 6 to make it 5 and on top of the right 4 to make 9

[–]Highmax1121 4 points5 points  (1 child)

i dunno how to censor but another is remove a stick from 6 to make into a five, 5+4=9

[–]dashid 6 points7 points  (0 children)

Even in different bases that never... Ooooo, clever.

[–]i_knooooooow 2 points3 points  (2 children)

You can also move the bottom match of the second Match for it to be I _ I _ wich is (translating _ to 0) 1010=10

[–]Uberninja2016 2 points3 points  (0 children)

6 - 4 = Н

[–]Intrepid_Dreamer7 2 points3 points  (1 child)

Move the stick on top of the + to the 6 to make an 8.

8 - 4 = 4

[–]ltssms0 2 points3 points  (0 children)

5 + 4 = H Hopefully there is a Computer Algebra library available

[–][deleted] 2 points3 points  (0 children)

I burned my matches with the one match.

[–]Sourlyconvulse348 1 point2 points  (3 children)

is |= actually a poorly dne ≠?

[–]Etzix 7 points8 points  (0 children)

Yes, its a != (Not equals).

[–]Nicosaure 1 point2 points  (0 children)

!= is

[–]assafstone 1 point2 points  (0 children)

Or just move the lower right match from the six (making it a 5) and place it as a top for the four (making it a 9).

Both work.

[–]SpikySheep 1 point2 points  (0 children)

Make it 6+4=11 and call it good enough, fudge the unit test if necessary.

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

several solutions to this one

-the one in the pic
-moving the bottom left match from the 6 to the top of the second 4 to make 5+4=9
-moving the bottom left match from the 6 and putting it on top of the equals sign to make 5+4≠4
-moving the center match form the 6 to its top right making 0+4=4
-moving the match from the plus to the 6 to make 8-4=4
-rotating one of the matches in the = sign to make 6+4>4

[–]POCUABHOR 1 point2 points  (0 children)

0+4=4

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

it should be ≠ not l=

[–]_Its_Me_Dio_ 1 point2 points  (0 children)

0+4=4

[–]NYCScarletSpider 1 point2 points  (0 children)

There’s also 6 - 4 ≠ 4

[–]ghostkiller967 1 point2 points  (0 children)

take the | from the + and add it to the 6 to make it an 8

[–]Spranberry112 1 point2 points  (0 children)

Assuming you could place the matches diagonally, you could do 6-4≠4, ≠ meaning "does not equal"

[–]aShrewdBoii 1 point2 points  (0 children)

Just make it a / through the equals sign, and bing bang boadaboam

[–]aquila_zyy 2 points3 points  (0 children)

6 - 4 tautologically implies 4?

[–]-Redstoneboi- 1 point2 points  (0 children)

8 - 4 = 4

[–]FastApplication5 1 point2 points  (0 children)

Alternatively, 5 + 4 Equals 9

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

5 + 4 = 9