• Ribert (unregistered)

    What's wrong with that piece of code? isn't that standard C++?

     

  • George Jempty (unregistered)

    Seriously, are you not familiar with filenotfoundian algebra?

  • (cs)
    Alex Papadimoulis:

    The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc. Thankfully, there are some among us, like Mark Harrison's colleague, who are not afraid to stand up to these logic advocates and shout "no, I will not succumb to your false dichotomies!" Today, I think we all should salute those few brave people ...

    enum Bool 
    {
    True,
    False,
    FileNotFound
    };


    "... I will succumb to my own false dichotomies!"

    You should adjust that third value to "InMyOtherJacket".  It makes the output easier:
    <font size="2">     The answer is _____.
    </font>
    Sincerely,

    Gene Wirchenko

  • (cs)
    Alex Papadimoulis:

     Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc.


    Obviously there are never 2 choices...always 3.

    True, False, or FileNotFound
    black, white, or apple
    yes, no, or car
    paper, plastic, or shoe

    -ds
  • Wang (unregistered) in reply to DisturbedSaint

    or indeed true, false or null...

  • (cs) in reply to DisturbedSaint

    All my apps have the following enum:

    public enum MostlyBool
    {
      True,
      False,
      KindaSortaNotReally
    }

  • (cs)

    This guy and his fuzzy logic are way too advanced for my limited mind.

  • (cs)

    In one app of mine, to see if the user can edit fields in a form:

    public enum Editable { YES, NO, DISABLED, READONLY; }

    The last three values mean "no" :)

  • (cs)

    <!--StartFragment --> 

    Alex Papadimalanotgonnaworkhereanymore:
    no, I will not succumb to your false dichotomies!

    No, I will not succumb to your FileNotFound dichotomies!

    [image]

  • (cs)

    Const True as Int = -1
    Const False as Int = 0
    Const Maybe as Int = 0.5


  • Matt (unregistered) in reply to tmountjr

    ...and later on down the code there is the ubiquitous IsTrue() function.

  • vhawk (unregistered)

    We all know this is wrong ...

    Should have been

    enum Bool 
    {
    True,
    False,
    DefiniteMaybe
    };

  • (cs) in reply to Matt

    I'm surrounded by code written by morons.  Complete... utter... morons.    Just... oh fu** it nevermind.   Just look:

        /// <remarks/>
        [System.Xml.Serialization.XmlTypeAttribute(Namespace="<snip>")]
        public enum BoolEnum
        {
            /// <remarks/>
            @false,

            /// <remarks/>
            @true,
       
       
        }

  • (cs)
    Alex Papadimoulis:

    The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc. Thankfully, there are some among us, like Mark Harrison's colleague, who are not afraid to stand up to these logic advocates and shout "no, <font size="5">I will not succumb to your false dichotomies!</font>" Today, I think we all should salute those few brave people ...

    enum Bool 
    {
    True,
    False,
    FileNotFound
    };


    The problem with opponents of basic modal logic, of course, is that proponents of ulterior transmogrified logic systems must use modal logic to base their preposterous arguments… arguments which appear to resemble something, when consumed, tastes entirely unlike tea.


  • Hexar (unregistered)
    Alex Papadimoulis:

    The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc. Thankfully, there are some among us, like Mark Harrison's colleague, who are not afraid to stand up to these logic advocates and shout "no, I will not succumb to your false dichotomies!" Today, I think we all should salute those few brave people ...

    enum Bool 
    { 
        True, 
        False, 
        FileNotFound 
    };

    <FONT face=Verdana size=1>The more subtle WTF is that, by default, True is 0 and False is 1.  Which is completely bass-ackwards.</FONT>

  • (cs)
    Alex Papadimoulis:

    enum Bool 
    { 
        True, 
        False, 
        FileNotFound 
    };

    <FONT face="Courier New" size=2>wait, wouldn't this assign:</FONT>

    <FONT face="Courier New" size=2>True <- 0
    False <- 1
    FileNotFound <- 2</FONT>

    <FONT face="Courier New" size=2>in C/C++?  what language is this?</FONT>

  • (cs) in reply to christoofar

    christoofar:
    The problem with opponents of basic modal logic, of course, is that proponents of ulterior transmogrified logic systems must use modal logic to base their preposterous arguments… arguments which appear to resemble something, when consumed, tastes entirely unlike tea.

    <FONT face="Courier New" size=2>i would like to transmogrify into a tiger.</FONT>

  • siege (unregistered)

    My favorite part about this is the following:

    int main() {

      if(True) {
        printf("True is true\n");
      }
      if(False) {
        printf("False is true\n");
      }
      if(FileNotFound) {
        printf("FileNotFound is true\n");
      }
    }

  • (cs) in reply to emptyset
    emptyset:
    Alex Papadimoulis:

    enum Bool 
    {
    True,
    False,
    FileNotFound
    };

    <font face="Courier New" size="2">wait, wouldn't this assign:</font>

    <font face="Courier New" size="2">True <- 0
    False <- 1
    FileNotFound <- 2</font>

    <font face="Courier New" size="2">in C/C++?  what language is this?</font>



    I was wondering the same thing, since Bool is a reserved word in Java/C#...  they superceded the Bool class?!?!! wtf?!?!!  Now you have System.Boolean and WTF.Bool.    How con-vieeeeeeeeeeean-yant.
  • Autobot (unregistered) in reply to emptyset
    emptyset:
    <font face="Courier New" size="2">i would like to transmogrify into a tiger.</font>

    Transform!

    More than meets the eye!
  • anon (unregistered)

    Aha!

    In UNIX, everything is a file!
    memory, devices, process info, PCI bus... and, uh, files (duh!)

    So, this makes perfect' sense!







    ': enum {perfect = 0};


  • (cs)

    idiot!

    True, False, HowTheHellDidThisHappen

  • jnz (unregistered) in reply to DisturbedSaint
    DisturbedSaint:

    Obviously there are never 2 choices...always 3.

    True, False, or FileNotFound
    black, white, or apple
    yes, no, or car
    paper, plastic, or shoe


    North, South, or Dennis

  • George Bezel (unregistered) in reply to Enric Naval
    Enric Naval:

    In one app of mine, to see if the user can edit fields in a form:

    public enum Editable { YES, NO, DISABLED, READONLY; }

    The last three values mean "no" :)

  • (cs) in reply to christoofar
    christoofar:
    emptyset:
    Alex Papadimoulis:

    enum Bool 
    {
    True,
    False,
    FileNotFound
    };

    <font face="Courier New" size="2">wait, wouldn't this assign:</font>

    <font face="Courier New" size="2">True <- 0
    False <- 1
    FileNotFound <- 2</font>

    <font face="Courier New" size="2">in C/C++?  what language is this?</font>



    I was wondering the same thing, since Bool is a reserved word in Java/C#...  they superceded the Bool class?!?!! wtf?!?!!  Now you have System.Boolean and WTF.Bool.    How con-vieeeeeeeeeeean-yant.


    boolean, not Bool, is reserved in Java as a primitive type, and there's also a Boolean class. I don't know about C#.  In C/C++ it depends on compiler if it's even supported, but for every compiler I've worked with it is bool, not Bool, that is reserved.

    Sincerely,

    I'm cooler than Gene W-name
  • (cs)

    May be part of his brain is in a quantum universe... He's trying to add another dimension to our world !!!

  • Kiss me, I'm Polish (unregistered) in reply to anon

    And in Soviet Russia, the file is you!

  • Henk (unregistered) in reply to Ytram

    Er, wouldn't that be a trichotomy ?

  • Henk (unregistered) in reply to Ytram
    Ytram:

    <!--StartFragment --> 

    Alex Papadimalanotgonnaworkhereanymore:
    no, I will not succumb to your false dichotomies!

    No, I will not succumb to your FileNotFound dichotomies!

    [image]

    Er, wouldn't that be a trichotomy? (One of these days I'm going to get quoting right)

  • Henk (unregistered) in reply to Henk

    OK, I give up. What about HTML?

  • (cs) in reply to Henk
    Anonymous:
    OK, I give up. What about HTML?

    Below the writing area, there are two options: "design" and "HTML". Select the "HTML" option. Use a browser that can render the options, like Internet Explorer. Remember to use &amp; for &, &gt; for >, &lt; for <, etc. and <p> tags for nice paragraphs and <pre> tags for code.

  • Andir (unregistered) in reply to Enric Naval

    0, 1, and sqr(-1)?

  • (cs) in reply to Enric Naval
    Enric Naval:
    Anonymous:
    OK, I give up. What about HTML?

    Below the writing area, there are two options: "design" and "HTML". Select the "HTML" option. Use a browser that can render the options, like Internet Explorer. Remember to use & for &, > for >, < for <, etc. and

    tags for nice paragraphs and

     tags for code.

    Actually, you should use <blockquote><pre> </pre><blockquote> for blocks of code.

    And <code> for inline code, such as variables of one-liners.

    BTW, Firefox handles that just fine.

  • (cs) in reply to masklinn
    masklinn:
    Enric Naval:
    Anonymous:
    OK, I give up. What about HTML?

    Below the writing area, there are two options: "design" and "HTML". Select the "HTML" option. Use a browser that can render the options, like Internet Explorer. Remember to use & for &, > for >, < for <, etc. and

    tags for nice paragraphs and

     tags for code.

    Actually, you should use

     
    for blocks of code.

    And for inline code, such as variables of one-liners.

    BTW, Firefox handles that just fine.

    Bah, forgot to close the blockquote, and s/of/or.

  • (cs)
    Alex Papadimoulis:

    The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc. Thankfully, there are some among us, like Mark Harrison's colleague, who are not afraid to stand up to these logic advocates and shout "no, I will not succumb to your false dichotomies!" Today, I think we all should salute those few brave people ...

    enum Bool 
    {
    True,
    False,
    FileNotFound
    };


    Us SQL developers know this should really be
    enum Bool 
    {
    True,
    False,
    NULL
    };

  • (cs) in reply to christoofar
    christoofar:

    The problem with opponents of basic modal logic, of course, is that proponents of ulterior transmogrified logic systems must use modal logic to base their preposterous arguments… arguments which appear to resemble something, when consumed, tastes entirely unlike tea.

    No no - it's almost, but not quite, entirely unlike tea.

    Thus spake the Holy Prophet of Douglas Adams.

  • ??? (unregistered) in reply to tmountjr
    tmountjr:
    Const True as Int = -1
    Const False as Int = 0
    Const Maybe as Int = 0.5


    0.5 as an Integer..... very interesting! ^o)
  • (cs) in reply to RevMike
    RevMike:
    Alex Papadimoulis:

    The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc. Thankfully, there are some among us, like Mark Harrison's colleague, who are not afraid to stand up to these logic advocates and shout "no, I will not succumb to your false dichotomies!" Today, I think we all should salute those few brave people ...

    enum Bool 
    {
    True,
    False,
    FileNotFound
    };


    Us SQL developers know this should really be
    enum Bool 
    {
    True,
    False,
    NULL
    };


    Us Electronic Engineers now that it should really be

  • (cs) in reply to WTFer

    That would be:
    enum Bool{
        VCC,
        GND,
        Z
    }

  • Paul O (unregistered) in reply to Andir

    We have languages wherein "everything" non-zero is "true" ... at least this one uses an enum to limit the choices.  Since the language in this WTF seems a little ambiguous (C/C++? Java?), let's at least hope it's a type enforcing language.

    It does explain some of the stranger "file not found" messages I get :)  Have we already forgotten "An unnamed file was not found"?

    [Any other 'unregistered' users noting the captcha verification misses the first word sometimes?]

  • (cs)

    In the fashion of fuzzy logic, I say he updates this code to be "True", "False" and "Maybe".

  • (cs) in reply to Hexar

    Anonymous:
    <FONT face=Verdana size=1>The more subtle WTF is that, by default, True is 0 and False is 1.  Which is completely bass-ackwards.</FONT>
    Silly me, I was in such a hurry to comment I didn't know that.  That's as big as a WTF as the fact he has a 3 value boolean!

  • James Schend (unregistered)

    Whose turn is it to explain why this isn't all that bad after-all?

  • (cs) in reply to James Schend

    What about "maybe"?

  • (cs) in reply to johnl

    "I will not succumb to your FileNotFound dichotomies!"

  • (cs) in reply to fregas
    fregas:

    All my apps have the following enum:

    public enum MostlyBool
    {
      True,
      False,
      KindaSortaNotReally
    }

    But... what does IsTrue(KindaSortaNotReally) return? We need another level of the enum for... "Probably"

  • (cs) in reply to James Schend
    Anonymous:
    Whose turn is it to explain why this isn't all that bad after-all?


    I'll take a stab.  This looks like C++.  Maybe he's used to coding with HResults.  If that's the case, he's used to 0 meaning "good", negative meaning "error", and positive meaning "warning".  Maybe this Bool type is supposed to be an HResult.


    It's interesting that he could define IsTrue something like this:
    <font size="2">bool IsTrue(Bool b) {  return !b; }</font>


  • (cs)

    I don't think people are seeing the value in this.

    In standard logic, the statement "all deep-sea dwelling elephants can fly" is true.  With this addition, the answer is now FileNotFound; a much more satisfying answer.

  • (cs) in reply to kipthegreat

    In that case it's a WTF for calling it a bool.

  • (cs) in reply to Hexar
    Anonymous:

    The more subtle WTF is that, by default, True is 0 and False is 1.  Which is completely bass-ackwards.

    UNIX would beg to differ:

    
    > [ -d / ]; echo $?
    0
    > [ -f / ]; echo $?
    1
    

Leave a comment on “What Is Truth?”

Log In or post as a guest

Replying to comment #:

« Return to Article