The Enchanted Tavern
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 months ago

Tell me the truth …

piefed.jeena.net

message-square
192
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
1.17K

Tell me the truth …

piefed.jeena.net

@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 months ago
message-square
192
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
alert-triangle
You must log in or register to comment.
  • @ricecake@sh.itjust.works
    link
    fedilink
    135•2 months ago

    I set all 8 bits to 1 because I want it to be really true.

    • OpenStars
      link
      fedilink
      English
      15•2 months ago

      TIL, 255 is the new 1.

      Aka -1 >> 1 : TRUE

      • @ricecake@sh.itjust.works
        link
        fedilink
        8•2 months ago

        But only if you really mean it. If not, it’s a syntax error and the compiler will know.

    • palordrolap
      link
      fedilink
      10•2 months ago

      You jest, but on some older computers, all ones was the official truth value. Other values may also have been true in certain contexts, but that was the guaranteed one.

    • Consti
      link
      fedilink
      12•2 months ago

      I was programming in assembly for ARM (some cortex chip) and I kid you not the C program we were integrating with required 255, with just 1 it read it as false

    • @laranis@lemmy.zip
      link
      fedilink
      95•
      edit-2
      2 months ago

      01111111 = true

      11111111 = negative true = false

      • @ricecake@sh.itjust.works
        link
        fedilink
        13•2 months ago

        Could also store our bools as floats.

        00111111100000000000000000000000 is true and 10111111100000000000000000000000 is negative true.

        Has the fun twist that true & false is true and true | false is false .

      • @StellarSt0rm@lemmy.world
        link
        fedilink
        48•2 months ago

        00001111 = maybe

        • @ThatGuy46475@lemmy.world
          link
          fedilink
          29•2 months ago

          10101010 = I don’t know

          • @foofiepie@lemmy.world
            cake
            link
            fedilink
            22•2 months ago

            100001111 = maybe not

          • @assa123@lemmy.world
            link
            fedilink
            2•2 months ago

            00000001 00000000 00001111 10101010

          • caseyweederman
            link
            fedilink
            4•2 months ago

            0011 1111 = could you repeat the question

        • @Venator@lemmy.nz
          link
          fedilink
          1•1 month ago

          Is this quantum computing? 😜

        • @tfm@europe.pub
          link
          fedilink
          7•2 months ago

          Schrödingers Boolean

      • @VonReposti@feddit.dk
        link
        fedilink
        34•2 months ago

        What if it’s an unsigned boolean?

        • @ivanovsky@lemm.ee
          link
          fedilink
          25•2 months ago

          Cthulhu shows up.

        • @hakunawazo@lemmy.world
          link
          fedilink
          17•2 months ago

        • @CosmicTurtle0@lemmy.dbzer0.com
          link
          fedilink
          English
          1•2 months ago

          Super true.

        • @laranis@lemmy.zip
          link
          fedilink
          3•2 months ago

          Common misconception… Unsigned booleans (ubool) are always 16-bits.

      • OpenStars
        link
        fedilink
        English
        7•2 months ago

        Why do alternative facts always gotta show up uninvited to the party? 🥳

      • @pocker_machine@lemmy.world
        link
        fedilink
        4•2 months ago

        So all this time true was actually false and false was actually true ?

        • @laranis@lemmy.zip
          link
          fedilink
          3•2 months ago

          Depends on if you are on a big endian or little endian architecture.

          • @pocker_machine@lemmy.world
            link
            fedilink
            7•2 months ago

            Come on man, I’m not gonna talk about my endian publicly

      • @Jankatarch@lemmy.world
        link
        fedilink
        2•2 months ago

        negative true = negative non-zero = non-zero = true.

Programmer Humor@programming.dev

!programmer_humor@programming.dev
Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 19 users / day
  • 284 users / week
  • 1.34K users / month
  • 4.39K users / 6 months
  • 1 subscriber
  • 1.52K Posts
  • 50.9K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • UI: unknown version
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org