Skip to main content

View Diary: What Happens When DKos Reaches UID 1,000,000? (54 comments)

Comment Preferences

  •  It's probably a 32-bit reference (4+ / 0-)

    So, UID's would roll-over either at the 2-billion mark or the 4-billion mark depending on if they were declared singed integers or unsigned respectively.  That's what typically happens in 32-bit software.

    Republicans: Taking the country back ... to the 19th century

    by yet another liberal on Fri Aug 30, 2013 at 10:26:06 PM PDT

    •  Clarification (1+ / 0-)
      Recommended by:
      Dbug

      2-billion is technically 2^^31 - 1    (2 to the 31 minus 1)

      And 4-billion is 2^^32 - 1    (2 to the 32 minus 1)

      As those are powers of 2.  And the -1 accounts for starting counting at 0.

      Republicans: Taking the country back ... to the 19th century

      by yet another liberal on Fri Aug 30, 2013 at 10:28:51 PM PDT

      [ Parent ]

    •  Singed integers... (3+ / 0-)
      Recommended by:
      Dbug, Youffraita, TexasLefty

      ... are stored in ash tables?

      Let us all have the strength to see the humanity in our enemies, and the courage to let them see the humanity in ourselves.

      by Nowhere Man on Fri Aug 30, 2013 at 11:05:07 PM PDT

      [ Parent ]

      •  It could just be a field in a database record (1+ / 0-)
        Recommended by:
        Dbug

        It has to be some size, probably 32-bits is my guess.  But it isn't limitless.

        Republicans: Taking the country back ... to the 19th century

        by yet another liberal on Fri Aug 30, 2013 at 11:11:44 PM PDT

        [ Parent ]

      •  That's hilarious. (11+ / 0-)

        A computer nerd joke.

        OK. How many programmers does it take to change a lightbulb? Sorry that's a hardware problem.

        How many computer salesmen to change a lightbulb? You're gonna have to upgrade your whole system. But we can save you money if you skimp on memory and processor speed.

        How many object-oriented programmers to change a lightbulb? No problem, we'll send a message to the lightbulb and it will change itself.

        How many Linux programmers to change a lightbulb? Give me six months and I'll design a foolproof lightbulb that will work perfectly and never needs to be changed. But for six months you'll be sitting in the dark.

        How many Microsoft programmers to change a lightbulb? We're sorry, we no longer support that lightbulb. And the hardware driver is not available. Did this automated response answer your question (Y/N)?

        "Stupid just can't keep its mouth shut." -- SweetAuntFanny's grandmother.

        by Dbug on Fri Aug 30, 2013 at 11:29:58 PM PDT

        [ Parent ]

    •  could be run on a mainframe... (1+ / 0-)
      Recommended by:
      Dbug

      ...and then you have to ask if it is one's complement or not.

      We Glory in war, in the shedding of human blood. What fools we are.

      by delver rootnose on Sat Aug 31, 2013 at 12:41:41 AM PDT

      [ Parent ]

      •  So, in 1's complement (1+ / 0-)
        Recommended by:
        Dbug

        You have 2 zeroes.  You have this one:
            0x00000000

        And you have this one:
            0xFFFFFFFF

        It would have to be a really old mainframe to not use 2's complement.

        But I read in a TCP/IP book a long time ago that they use 1's complement on the Checksum on a header because you can distinguish between a checksum that equals 0 and a checksum that was never computed.

        Republicans: Taking the country back ... to the 19th century

        by yet another liberal on Sat Aug 31, 2013 at 12:58:46 AM PDT

        [ Parent ]

        •  I only know about twos complement. (1+ / 0-)
          Recommended by:
          yet another liberal

          I consider 0xFFFFFFFF to be -1 (decimal).

          The bit at the end is the positive/negative bit. To switch positive to negative, you just XOR (or EOR, depending on the convention). That's 64 bits, of course. I'd have to think a bit to figure out how ones complement works. Maybe I'll google it.

          Hey! Can I brag to you that I once figured out how to calculate a square root in binary in 6502 assembly language (Apple II, Commodore 64), which didn't even have multiply or divide instructions? If you know how to do it in base 10, binary square roots are simple.

          And I'll also say I hate floating point numbers. Too messy.

          Also, if you're programming something with vectors or circles, forget about converting back and forth from 360 degrees. Use either 256 degrees or 65,536 degrees. It's much simpler. Does that make sense to you?

          "Stupid just can't keep its mouth shut." -- SweetAuntFanny's grandmother.

          by Dbug on Sat Aug 31, 2013 at 01:29:26 AM PDT

          [ Parent ]

          •  Yeah, cool (1+ / 0-)
            Recommended by:
            Dbug

            I never tried to do a sqrt() with integers.

            And yeah, I see what you mean with 256 or 65536 and a circle.  Chop the thing up into the best resolution you can get with your bits (8-bits use 256 pie slices, 16-bit use 65536 pie slices) instead of degrees.  Good idea, I like it.

            Republicans: Taking the country back ... to the 19th century

            by yet another liberal on Sat Aug 31, 2013 at 11:07:46 AM PDT

            [ Parent ]

          •  For what it's worth, ... (1+ / 0-)
            Recommended by:
            Dbug

            I managed to put my underwear on correctly this morning.


            Reality occupies a dimly lit corner somewhere on the edge of town. I drive by every now and then on my way to visit mom. That’s where the cookie jar is.

            by glb3 on Sat Aug 31, 2013 at 07:22:35 PM PDT

            [ Parent ]

    •  Burned integers :) eom (1+ / 0-)
      Recommended by:
      Dbug

      "No one can serve two masters. Either he will hate the one and love the other, or he will be devoted to the one and despise the other. You cannot serve both God and Money." -- JC, Matthew 6:24

      by Chi on Sat Aug 31, 2013 at 06:36:10 AM PDT

      [ Parent ]

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site