• Sole Purpose Of Visit (unregistered)

    Twenty Frist!

  • Anon (unregistered)

    I guess no-one read the falsehoods programmers believe about addresses:

    https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/

  • WTFGuy (unregistered)

    Since this code simply produces a large and complicated constant (via a WTFy process), one wonders if those "add1", etc., entries are the submitter's idea of anonymization? Or maybe the whole thing is part of a test harness that is used to validate that what goes in one end of the plumbing comes out ungarbled at the other end with no concern about what the ungarbled contents actually are.

    Or ???

  • (nodebb) in reply to Anon

    I guess no-one read the falsehoods programmers believe about addresses:

    Well that's not very good. Where's "the same memory location is always referenced by a single unique address"?

  • MaxiTB (unregistered)

    This example is odd. Isn't the point of the factory pattern to have another independent class so you can create an instance of a builder that returns you the constructed object? So you can replace the factory with a fake/mock for testing? Why is builder a property of AddressDTO itself?

    I think this was written by some sort of intern.

  • Erich (unregistered) in reply to Jeremy Pereira

    That would be below the processor's paging system below the hypervisor below the OS's paging system, assuming that there are no copy-on-writes in the way at any of those levels to share the unchanged memory.

  • Erich (unregistered) in reply to Jeremy Pereira

    That would be below the processor's paging system below the hypervisor below the OS's paging system, assuming that there are no copy-on-writes in the way at any of those levels to share the unchanged memory.

  • (nodebb)

    JavaScript damages your mind. Here I am, looking at that return statement, and fearing that the semicolon-inserter is going to add a semicolon right after AddressDTO.builder(). But no, sensible languages make you add your own semicolons and don't get "bright" ideas about where they should be.

  • (nodebb) in reply to Erich

    Or it would be be because the processor uses segmentation and it is possible for two segments to overlap, thus introducing two ways to reach any memory in the overlapping area: segment1:offset1 and segment2:offset2.

    As one might find in processors that nobody's heard of, like the 8088, 80286, 80386, 80486, and Pentium. And, frankly, even your modern i9 or Ryzen can do the same thing.

  • (nodebb) in reply to PotatoEngineer

    That reminded me of a guy I knew a long while back who got used to doing the equivalent of snprintf(some_buffer, sizeof(some_buffer), "Some text here: %d", intvar); in JavaScript by simply newstring = "Some text here: "+intvar;.

    It ended badly when he brought that habit back to C and C++, and got bitten by the fact that "Some text here: " + intvar does something very different in C and C++ compared to what it does in JavaScript.

  • Erwin (unregistered) in reply to Steve_The_Cynic

    That reminded me of a server that suffered from file corruption whenever it got busy. Turned out that the end of the swap partition overlapped with the start of the root partition.

  • Nick (unregistered)

    I guess a 20-line address is the IPv6 of the physical address space - it has capacity for future multi-dimensional addressing.
    Maybe we will need something like room number, apartment number, floor number, building number, residential complex name, street, village, city, state, zip code, country, planet, solar system, galaxy, universe, timeline, continuum, variant, licensee, origin.

    How else can Peter Parker in Earth 1 get a package delivered to Miles Morales in Earth 1610, with a copy of the letter that he himself received from Clark Kent over in the DC license?

  • Erich (unregistered) in reply to Steve_The_Cynic
    <grin/>
  • markm (unregistered)

    Isn't transmitting 20 values via global variables rather than method parameters another WTF?

  • Rahul Kumar (unregistered)
    Comment held for moderation.
  • Rahul Kumar (unregistered)
    Comment held for moderation.

Leave a comment on “Two Addresses”

Log In or post as a guest

Replying to comment #:

« Return to Article