• wtf (unregistered) in reply to Anon
    Anon:
    Checkbox controls, however, can show a 3rd state as a greyed out appearance. But then I would argue that such checkbox controls are not representative of a boolean value :)

    Yup we either treat null as a false, or if we really need to show a difference use a radio box with yes/no and have neither selected.

  • RB (unregistered) in reply to faoileag

    Well, we have you beat on that one, pizza is a vegetable!

  • Iggy (unregistered) in reply to RB
    RB:
    Well, we have you beat on that one, pizza is a vegetable!

    well, logically assume the following. Vegetables grow on trees. cacao beens grow on trees.

    therefore chocolate is a vegetable

  • lurker (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    QJo:
    More frist.
    More usefully, less Discourse...
    Thank the gods! That made reading the comments virtually impossible, and no way in hell was I ever going to register with that pile of crap.
  • Anon (unregistered) in reply to Miriam
    Miriam:
    TRWTF is Big Bang Theory's popularity. It just gets boring after a few episodes and the characters are all so very cliché. How in the world did it manage to stick around for so long?

    I've never actually watched an episode, but I do get sick of people telling me that I must watch it.

    Also, Penny really isn't that hot. She's okay.

  • faoileag (unregistered) in reply to RB
    RB:
    Well, we have you beat on that one, pizza is a vegetable!
    Yeah, that one's truly hilarious :-)

    I'm still waiting for certain other countries to declare half a bottle of wine as an equivalent to the recommended daily amount of fruit, though...

  • Tobias (unregistered) in reply to keef
    keef:
    Three state booleans (or Booleans) are in Java:
    Boolean[] bools = new Boolean[]{null, Boolean.TRUE, Boolean.FALSE};
    No no no, don't say "booleans (or Booleans)" like it's the same. Those are two different things, and what you're describing only goes for the boxed Booleans which behave like any object and thus can be the value null. However small-b booleans are primitives and can only be true or false.
  • Walky_one (unregistered) in reply to Iggy
    Iggy:
    RB:
    Well, we have you beat on that one, pizza is a vegetable!

    well, logically assume the following. Vegetables grow on trees. cacao beens grow on trees.

    therefore chocolate is a vegetable

    Plainly wrong. Vegetables don't grow on trees. (Depending on the definition of vegetables we may have "none grow on trees" or "not all grow on trees").

    The closest I can make is: Vegetables grow on plants. cacao beans grow on trees. trees are plants. chocolate is made from cacao beans.

    therefore chocolate is made from vegetables

  • (cs)

    Now, let's see. Where did I put that fuzzy logic class I wrote? One byte, with values 0 - 200 should be sufficient. 100 is a definite maybe. 175 is almost certainly true. 50 is mostly false. That should do it.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to Iggy
    Iggy:
    well, logically assume the following. Vegetables grow on trees. cacao beens grow on trees.

    therefore chocolate is a vegetable

    But it's nuts that grow on trees. Therefore chocolate is a nut. Nuts also post spam worthy of a ten-year-old.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to Nutster
    Nutster:
    Now, let's see. Where did I put that fuzzy logic class I wrote? One byte, with values 0 - 200 should be sufficient. 100 is a definite maybe. 175 is almost certainly true. 50 is mostly false. That should do it.
    I'm a big fan of signed fuzzy logic. So -127 would be very false, 127 would be very true, and 0 would be damifino. -128 would be FILE_NOT_FOUND
  • StarWarsKid77 (unregistered) in reply to TDWTF
    TDWTF:
    +1
  • 7eggert (unregistered) in reply to Hannes

    SQL has a ternary logic, TRUE, FALSE and NULL (unknown).

    https://en.wikipedia.org/wiki/Ternary_logic

  • (cs) in reply to MustBeusersFault
    MustBeusersFault:
    needs more TruerFalse and WronglyTrue
    Also needs:

    Quantum

    Boolean state is indeterminate until observed, at which point it randomly becomes either true or false.

  • Chelloveck (unregistered) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    I'm a big fan of signed fuzzy logic. So -127 would be very false, 127 would be very true, and 0 would be damifino.

    I always use 1's complement for my fuzzy logic. +1 is True, -1 is False, +0 is "nominally True but actually False" and -0 is "nominally False but actually True". The +/- 0 values are most useful for detecting the class of error conditions which are usually commented with

    // This can never happen

  • faoileag (unregistered) in reply to Iggy
    Iggy:
    RB:
    Well, we have you beat on that one, pizza is a vegetable!

    well, logically assume the following. Vegetables grow on trees. cacao beens grow on trees.

    therefore chocolate is a vegetable

    In Germany you can buy a cutting board with such reasoning as imprinted message: Because cocoa grows on trees, chocolate is sorta fruit!

  • Filip (unregistered) in reply to Hannes

    In C# you can use nullable boolean.

  • Paul Neumann (unregistered) in reply to kilroo
    kilroo:
    Some Random Idiot:
    Miriam:
    TRWTF is Big Bang Theory's popularity. It just gets boring after a few episodes and the characters are all so very cliché. How in the world did it manage to stick around for so long?
    Penny
    *knock knock knock*
    Was that three knocks on the ceiling I just heard? Or two on the pipe with an echo?
  • (cs) in reply to Doodpants
    Doodpants:
    Steve The Cynic:
    np:
    or does VB complain (even though <> is a strange way to imply !=)
    BASIC has done not-equals with <> more or less from the beginning. And it isn't the only language that uses <> for not-equals - consider the Pascal family of languages - and overall, giving the chronology of programming languages, that makes != a strange way of expressing <>, and both of them a strange way of expressing .NE..
    I agree, those are rather strange ways of expressing northeast. I would have gone with ↗.
    Has the world truly forgotten the formula translator? I didn't say NE. I said dot enn ee dot. Now go look up FORTRAN...
  • (cs) in reply to Jim the Tool
    Jim the Tool:
    4. The real WTF is that the two wrongs are both zero. If it makes sense to distinguish between them, then at least make them positive and negative zero.
    One's complement FTW!
  • Developer Dude (unregistered)

    Double plus wrong

  • Eric Gem (unregistered) in reply to ¯\(°_o)/¯ I DUNNO LOL

    That's just Jeff Ate-wood showing why his "civil" comment system is needed.

  • (cs) in reply to faoileag
    faoileag:
    DQ:
    Bah. Tomatoes. Boring stuff. For some real innovation see EU Council Directive 2001/113/EC which declares carrots to be fruit.

    And the US government has tried to declare Ketchup and relish to be vegetables, and has taken the issue of Tomatoes being fruits all the way to the Supreme Court.

  • Maurizio (unregistered) in reply to Hannes
    Hannes:
    Doesn't Microsoft has some sort of three state boolean (or even four state)? But AFAIK only two states can be used.

    I do not know about Microsoft, but a 4 value logic algebra (true, false, i do not know, what i know is inconsistent) it is still a boolean algebra, and used in math (and computer languages formal semantic).

    OK, this is not funny :-<

  • Valued Service (unregistered) in reply to DQ
    DQ:
    Stuart is right: A tomato is a fruit http://www.oxforddictionaries.com/words/is-a-tomato-a-fruit-or-a-vegetable

    Captcha: suscipere: no, it's not suspicious

    I love how we make up groups based on common traits and then argue over which common traits are more important.

    Like, a tomato is a vegetable because it's not sweet, or some goofy reason why people don't know it's a fruit.

    It's the most fun to watch how they keep gerrymandering classifications of autism. No it's the way they blink when they don't look at you... that's non-blinkitismistic!!!

    Another favorite is how we keep changing words every generation. First fool, then retard, then mentally challenged, then ...

    People and their words.

    I'm going back to grunting for a while.

    Ooh - uug - ghu

  • (cs)

    You just need to redefine right/wrong as a distance function.

    Then 'tomato is a vegetable' gets a value of -1, 'tomato is a little-league baseball' gets -100, and "tomato is a suspension bridge" gets a value of -1e6.

  • (cs) in reply to Anon
    Anon:
    Miriam:
    TRWTF is Big Bang Theory's popularity. It just gets boring after a few episodes and the characters are all so very cliché. How in the world did it manage to stick around for so long?

    I've never actually watched an episode, but I do get sick of people telling me that I must watch it.

    Also, Penny really isn't that hot. She's okay.

    You only think that because you haven't watched the show and only seen her in ads etc. On the show she flashes her boobies at some unpredictable point.

  • (cs) in reply to D-Coder
    Miriam:
    TRWTF is Big Bang Theory's popularity. It just gets boring after a few episodes and the characters are all so very cliché. How in the world did it manage to stick around for so long?

    You just don't understand. Big Bang Theory is NOT a comedy, it IS a DOCUMENTARY. I have relatives that work at JPL (part of CalTech), and there are LOTS of Sheldon's there that have absolutely NO social skills. They are stuck in their theory and buried so deep it is hard to get out.

  • John (unregistered)

    CorrectPositive CorrectNegative FalsePositive FalseNegative

    yep, four.

  • (cs) in reply to Miriam
    Miriam:
    TRWTF is Big Bang Theory's popularity. It just gets boring after a few episodes and the characters are all so very cliché. How in the world did it manage to stick around for so long?

    I have issues describing how bad that show is since it was so bad, that I have repressed all memories of what I saw.

  • (cs)

    Fie on Boolean's "two value system"; we can have billions on billions on billions of extendedBoolean values. Just for starters:

    True False AbsolutelyTrue AbsolutelyFalse ProbablyTrue ProbablyFalse WishyWashy PossiblyTrue PossiblyFalse SortOfKindOfTrue SortOfKindOfFalse TrulyFalse FalselyTrue TrulyTrue FalselyFalse MaybeTrue MaybeFalse MaybeNotTrue MaybeNotFalse FileFound FileNotFound FileAbsolutelyFound FileAbsolutelyNotFound FileProbablyFound FileProbablyNotFound FilePossiblyFound FilePossiblyNotFound FileSortOfKindOfFound FileSortOfKindOfNotFound FileTrulyFound FileTrulyNotFound FileFalselyFound FileFalselyNotFound TrueShrug FalseShrug

  • (cs) in reply to QJo
    QJo:
    TRWTF is that both "False" and "More False" have the same ID...? I confess to not having a particularly strong grasp on the intentions of the developers involved here -- it's going to need a debrief session *and* a code review. And I think an earlier-than-scheduled career appraisal is in order as well.

    No, this requires Steve the Cynic's GAU-8.

  • (cs) in reply to QJo
    QJo:
    This leads itself to expansion:

    Smidgeon of truth Possibly True Probably True True More True Most True Extremely True Religious Conviction

    Not Entirely Sure Doubtful Seriously Doubtful False More False Most False Utterly False Political Statement

    ... and so on.

    Aren't those the same?

  • (cs) in reply to cyborg
    cyborg:
    np:
    (even though <> is a strange way to imply !=)

    Eh, not really for BASIC languages - only strange if you're used to Pascal/C conventions.

    SQL...

  • RedWizard (unregistered) in reply to QJo
    QJo:
    This leads itself to expansion:

    Smidgeon of truth Possibly True Probably True True More True Most True Extremely True Religious Conviction

    Not Entirely Sure Doubtful Seriously Doubtful False More False Most False Utterly False Political Statement

    ... and so on.

    Is it then possible to assign a complement operation upon an ExtraBoolean such that the complement of e.g. Seriously Doubtful is Probably True? Or does one need to posit the existence of statements whose extra-boolean truthiness and falsitude are in fact independent? e.g. a statement may be Most False but at the same time Possibly True? We could build an entire field of mathematics upon this concept. Perhaps model a statement's Extra-booleanity on the complex plane: truthiness along the real axis and falsitude along the complex. Then a statement that is purely Political Statement, when multiplied by the negative square root of minus one becomes a Religious Conviction?

    Might this analysis be used to get to the bottom of the relationship between US and UK during the early 2000's?

    +1

    But then, the Universe and reality itself is considered by some merely an illusion. If that is true (Religious Conviction for some), then reality itself is a Political Statement (which I find to be hilarious).

  • (cs)

    I actually had to create a class to try to emmulate a boolean as close as possible but to allow 4 states

    • Null
    • Yes (True)
    • No (False)
    • Both

    Essentially we had a lot of properties to describe what the item is, and in some cases it could apply to ones that meet the condition or don't meet the condition equally.

    It actually worked pretty well after I implemented it, except that Microsoft's compiler optimizations assumed that if something is true, then it is not false. In other words, depending on the test, it would reverse the check so that even though wou were asking essentially "Is it true" it could optimize in and say "Is is not false"... kind of ruined it. Still implemented it, but you have to test for it with equality operators instead of just using it as a boolean.

  • (cs) in reply to RedWizard
    RedWizard:
    But then, the Universe and reality itself is considered by some merely an illusion. If that is true (Religious Conviction for some), then reality itself is a Political Statement (which I find to be hilarious).
    Then there was the time we tried to implement a "religious strength" system based on the metric system, and a little bit borrowed from the Catholics.

    You could step on a special scale, or have a cetified evaluator give you you current measurement.

    Scale worked something like this, based on a measurement of a "Billy Grahm".

    1,000 Bg - Bishop (1K Billy Grahms) 1,000,000 Bg - Cardinal 1,000,000,000 Bg - Pope

    We don't really discuss the names on the scale for those with a negative Billy Grahm rating.

  • Leon (unregistered) in reply to Anon
    Anon:
    Penny really isn't that hot. She's okay.
    Penny has the rare ability to focus her eyes on a nerd. That alone makes her of substantial interest.

    Also, Discourse must die!!

  • lolatu (unregistered)

    I want a Lebowski Boolean

    0 - FALSE 1 - TRUE 2 - NOT FALSE BUT YOU'RE JUST AN ASSHOLE

  • (cs) in reply to lolatu
    lolatu:
    I want a Lebowski Boolean

    0 - FALSE 1 - TRUE 2 - NOT FALSE BUT YOU'RE JUST AN ASSHOLE

    3 - THAT'S JUST LIKE, YOUR OPINION MAN 4 - SHUT THE F*** UP, DONNY

  • anonymous (unregistered) in reply to faoileag
    faoileag:
    DQ:
    Bah. Tomatoes. Boring stuff. For some real innovation see EU Council Directive 2001/113/EC which declares carrots to be fruit.
    Well, THAT is a RWTF!
  • (cs) in reply to herby
    herby:
    I have relative's that work at JPL (part of CalTech), and there are LOT'S of Sheldon's there that have absolutely NO social skill's.
    FTFY.
  • Jame's (unregistered) in reply to Zylon
    Zylon:
    herby:
    I have relative's that work at JPL (part of CalTech), and there are LOT'S of Sheldon's there that have absolutely NO social skill's.
    FTFY.
    You mi's'sed a few...
  • klc (unregistered) in reply to cellocgw
    cellocgw:
    You just need to redefine right/wrong as a distance function.

    Then 'tomato is a vegetable' gets a value of -1, 'tomato is a little-league baseball' gets -100, and "tomato is a suspension bridge" gets a value of -1e6.

    If you purchase that tomato from a grocery store in winter it may be functionally equivalent (and equivalent in taste) to a little league baseball. So maybe -2.

  • (cs) in reply to graybeard
    graybeard:
    When simulating digital circuits (which are made of analog parts), you easily find yourself in a situation where "booleans" are not so black and white, such as..
    • True
    • False
    • Not connected
    • Possibly True
    • Possibly False
    • Invalid

    ..where "possibly" signals get overwritten by the "strong" signals if in the same net, and "invalid" is caused by having both True and False in the same net.

    No FILE_NOT_FOUND there yet, though..

    Close. This is normally described using four states:

    - True (1)
    - False (0)
    - Unknown (X)
    - Not driven (Z)
    

    and several strengths of each state, depending on which language you are using. The unknown state can occur for any of several reasons: A variable is uninitialized, multiple gates trying to drive a net to different values, as graybeard said, or an unknown (for any reason) feeding into downstream boolean logic. Z is essentially the weakest possible state of unknown, but it is special in that it is so weak it cannot really have a true or false value.

  • (cs) in reply to Steve The Cynic
    Steve The Cynic:
    Doodpants:
    Steve The Cynic:
    np:
    or does VB complain (even though <> is a strange way to imply !=)
    BASIC has done not-equals with <> more or less from the beginning. And it isn't the only language that uses <> for not-equals - consider the Pascal family of languages - and overall, giving the chronology of programming languages, that makes != a strange way of expressing <>, and both of them a strange way of expressing .NE..
    I agree, those are rather strange ways of expressing northeast. I would have gone with ↗.
    Has the world truly forgotten the formula translator? I didn't say NE. I said dot enn ee dot. Now go look up FORTRAN...
    And LaTeX.
  • Pock Suppet (unregistered) in reply to klc
    klc:
    cellocgw:
    You just need to redefine right/wrong as a distance function.

    Then 'tomato is a vegetable' gets a value of -1, 'tomato is a little-league baseball' gets -100, and "tomato is a suspension bridge" gets a value of -1e6.

    If you purchase that tomato from a grocery store in winter it may be functionally equivalent (and equivalent in taste) to a little league baseball. So maybe -2.
    Where else am I going to purchase a tomato in winter? Fly to the opposite hemisphere and find a local farmer?
  • Anonymous (unregistered) in reply to Maurizio
    Maurizio:
    Hannes:
    Doesn't Microsoft has some sort of three state boolean (or even four state)? But AFAIK only two states can be used.

    I do not know about Microsoft, but a 4 value logic algebra (true, false, i do not know, what i know is inconsistent) it is still a boolean algebra, and used in math (and computer languages formal semantic).

    OK, this is not funny :-<

    An element of algebra isn't really a "boolean [value]" though. I would think a boolean value is commonly interpreted to be an element of {0, 1}.

  • Dubstep (unregistered)

    Grandma would love it

  • Miriam (unregistered)

    I just noticed that they forgot the most important truthiness value! WORSE_THAN_FAILURE And of course, the negated counterpart: BETTER_THAN_FAILURE

Leave a comment on “Extra Boolean”

Log In or post as a guest

Replying to comment #:

« Return to Article