Non-constant constant strings

Discussion in 'C Programming' started by Rick C. Hodgin, Jan 19, 2014.

  1. I was using "somebody's" as a way to to differentiate from "your own."
    It stands to reason that your own computer is also somebody's computer,
    but I think the distinction is clear enough in context. For example,
    other people understood it.
    Was there a question in here somewhere? I thought that I answered BartC's
    questions with my replies. If there's something I missed, I'm happy to
    explain further so you can understand. If you don't care to press the
    issue, I'm content to leave it here as well. I think most people who
    care to do so fully understand at this point.

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
    1. Advertisements

  2. It's perfectly obvious to anyone that isn't a complete cretin. Don't
    let this guy drag you down. I'm at a loss to understand why he is being
    so pedantic and destructive.[/QUOTE]

    Do remember that this is the same guy who took the time and the trouble to
    post a response insisting that it is important to distinguish between an
    error and an error message (as if anyone here doesn't already know and can
    keep it straight all by themselves).

    "The smart way to keep people passive and obedient is to strictly limit the
    spectrum of acceptable opinion, but allow very lively debate within that

    - Noam Chomsky, The Common Good -
    Kenny McCormack, Feb 3, 2014
    1. Advertisements

  3. The above (randomly selected) sig quote is very good, very apropos of this
    newsgroup. Sometimes it just works out that way...

    Religion is regarded by the common people as true,
    by the wise as foolish,
    and by the rulers as useful.

    (Seneca the Younger, 65 AD)
    Kenny McCormack, Feb 3, 2014
  4. [...]

    I understood what you wrote. I also understood what you meant.
    And I understood that those were two quite different things.
    That was a discrepancy worth clearing up, and you could have done
    so much more quickly than you did, with much less wasted bandwidth.

    I'm not criticizing you (much) for the initial use of "somebody's"
    when "somebody else's" would have expressed your intent much more
    clearly; I've certainly been guilty of unclear wording myself.
    But I suggest that simple errors call for simple corrections.
    Keith Thompson, Feb 3, 2014
  5. Rick C. Hodgin

    James Kuyper Guest

    It doesn't have that meaning without adding the word "else". Also, as I
    pointed out above, with that meaning, it's not relevant to BartC's
    question. The issues he raised are just as much of a problem if the
    debugger is running on his own computer, rather than somebody else's.
    Yes, BartC's message included the question:
    Not as far as I could tell. Your response seemed to consist entirely of
    dismissal of the question for reasons that seemed irrelevant, as
    explained above, followed by additional comments about what
    "edit-and-continue" is, and how it works - comments that did not answer
    his question. It was his question, and it's up to him whether he's
    satisfied with your response. I was not particularly interested in the
    question, only in resolving the nonsense in your response. When BartC
    responded to your message, he did so only to comment on other issues,
    and not to address your non-answer to his question, which suggests that
    he might be satisfied with it.
    James Kuyper, Feb 3, 2014
  6. FWIW, I did not understand there was a discrepancy in understanding until
    James pointed it out directly. I was confused by the misunderstanding,
    and assumed it came from something else.

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
  7. Noted. I apologize for not being more clear.
    I'll summarize the answer I've given in this thread many times:

    The developer has to be cognizant of what's going on.
    The developer has to be aware of what the change in source code does
    to the data environment.

    The developer is the one who holds ultimate responsibility because there
    are times edit-and-continue will allow changes which compile without error,
    yet categorically introduce issues which now exist at runtime because stale
    data now exists, or a logic condition expected on previous passes does not
    now match the current logic condition as per the recent change to source
    code. It requires a reasoning human mind to know for sure what changes
    have been made.

    I don't know how to be more clear on this.

    I will try to answer by quoting Microsoft's Ballmer:

    "Developers! Developers! Developers! Developers! Developers!
    Developers! Developers! Developers! Developers! Developers!"

    You can see the hard working man here:

    The developer.
    My response was an attempt to convey how it works so people could translate
    what takes place into their own understanding and answer the myriad of
    questions without having to ask each one specifically.
    Which "nonsense" was that, James?
    Yes. I believe he understood what I said, what I was saying, and had a
    grasp which allowed him to move on. I had presumed that if he needed more
    he would ask more questions.

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
  8. Rick C. Hodgin

    James Kuyper Guest

    Well, it seems to me that more than that is required.
    "edit-and-continue" is a phrase that could be used to describe a wide
    range of possible features. I think that the fact that C is a compiled
    language, its static type system, and it's heavy use of pointers, among
    other things, would make edit-and-continue well-nigh impossible to
    implement fully. Therefore, a key issue any user needs to know is "how
    far does this particular debugger fall short of fully implementing
    edit-and-continue?". Which changes can safely be made will depend upon
    the answer to that question, and no amount of reasoning based solely
    upon a knowledge of C can answer that question.

    The nonsense that resulted from leaving out the word "else". A single
    word can often radically change the meaning of a sentence, and that was
    one example.
    James Kuyper, Feb 3, 2014
  9. I haven't forgotten. I commented on it. I was astonished. A new low
    point in c.l.c pedantry. Is this guy for real?[/QUOTE]

    Mr. Spoons...
    Kenny McCormack, Feb 3, 2014
  10. Yeah. Wow.

    That's pretty much my reaction to every one of Kiki's posts.

    The mental picture that his posts brings up is just, well, so far beyond
    creepy, as to blow your mind.
    Kenny McCormack, Feb 3, 2014
  11. For my money, James, the two are inexorably linked. Edit-and-continue
    is designed, by design, with the purposeful design in mind, from inception
    on through, to be systematically and categorically linked to the debugger
    environment of a running instance of the application. Were the program not
    running it would not be called edit-and-continue. It would be called
    compiling and linking. As it is, it's part of the overall mechanism which
    allows the developer, developer, developer, to create and modify code.

    There are separate issues at work here as well. These are the mechanics
    of data already computed using a prior version of the software (data which
    may reside in memory and may now be stale (as compared to the current state
    of the running software)), compared to the requirements of the new version
    of software now running. They may not link up.

    Even with this potential discrepancy, the two are not in disparity, nor
    is there a lack of well-defined behavior at work. If, for example,
    nothing is changed in the new version of the program as it relates to
    prior computed data, then there is no issue. If, however, something new
    is added which systematically breaks something in use, then it requires
    the data be manually ported over (as through a function which migrates it
    from its old style to the new current style), or for the program to be
    I disagree that my leaving out the word "else" was nonsense.

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
  12. Rick C. Hodgin

    Ian Collins Guest

    That's a very big if which limits the utility of edit and continue. As
    I've said before, the debugger I use (dbx) supports what they call fix
    and continue. I've used it occasionally, but only for small things like
    changing a logic condition. If a change alters the stack layout, the
    fix will fail, which is a good thing.
    Ian Collins, Feb 3, 2014
  13. So long as the code is syntactically correct, and there was enough room to
    allow any changes made to local variables, global variables, etc., and the
    code compiled without error in that way, then Microsoft's debugger will
    not fail simply because the data on the stack might now be invalid. It
    will allow you to continue debugging the current function, for example,
    to find additional errors, and then when you hit a condition where it
    returns, then it will fail.

    This allows you to continue working on a block of code, being able to
    temporarily manually populate some variable if need be (such as if new
    local variables were added which do not currently have an assigned value),
    and you can continue through the rest of the function, even calling sub-
    functions, and so on.

    The utility is there. It's just not going to work in all cases as per
    Microsoft's current design. It will let you continue with program logic,
    and you can do some manual fixups if they're simple enough (and even some
    very complex ones if you want to take the time), but it will not re-adjust
    existing data, and it will fail upon return from a function.

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
  14. Rick C. Hodgin

    James Kuyper Guest

    On 02/01/2014 09:08 PM, Rick C. Hodgin wrote:
    Leaving out the word "else" meant that the developer's machine was not
    excluded. Without that exclusion, what you said means that there's no
    computer anywhere, that belongs to anybody, running the debugger that
    implements this feature. I exaggerated - that's not complete nonsense.
    In principle, it could refer to a debugger running on a machine that
    didn't belong to anybody - but that makes even less sense than what you
    actually meant to say.
    James Kuyper, Feb 3, 2014
  15. It's completely obvious that the developer would be using his machine,
    and that my comment meant somebody's computer ... you know ... out
    there ... in the world.
    Exactly! It makes even less sense ... so that's not what I would've meant.

    As my mother would say to me, "C'mon, man ... figure it out."

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
  16. I once used a BASIC interpreter that allowed edit and continue.
    (But for some changes it wouldn't allow you to continue.)

    It seems to me it makes more sense for an intepreter, where
    variables can exist separate from compilation.

    I once edited a csh script while it was running, and noticed
    (while not planning for) the change to take effect immediately.
    Seems that sometimes csh will reload from disk on loop iterations,
    though I don't know that you can predict that.
    Well, one could implement C as an interpreter. Many interpreted
    languages are difficult to compile, though.

    I notice that Rick seems to expect variables to exist in memory
    in the order they are declared. I don't believe that C requires
    that, and don't know how many compilers do that. Also, you probably
    want a system that keeps code and data in separate address spaces.
    Locations in code could move around, such that function returns
    could easily fail.
    Seems to me more important when debugging programs that might have
    to run for at least minutes, if not hours, before a bug appears.
    If only seconds, much easier to restart. Now, it is nice to keep
    breakpoints and other debugger settings. I wouldn't complain if
    a debugger did that, but often having it read a script file is
    about as easy.

    In the days of slow compilation, I used to try not to recompile
    everything when one change was made. That change might be in a
    struct visible in many files, but that I would know only changed
    anything in a few. When debugging, I might just recompile those
    files. Not quite edit-and-continue, but has similar problems
    (data might move). Still might be true for some very large

    -- glen
    glen herrmannsfeldt, Feb 3, 2014
  17. Actually, to be completely true to the expression, the members of my
    family would say:

    "Then put some food in the boat!"

    It's a reference to a scene in the movie Hot Shots! with the exasperated
    look on the Admiral's face when people around him aren't figuring out
    the blatantly obvious.

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
  18. (snip)
    I was remembering in earlier posts, about compilers that used to
    try harder to complete compilation of programs with bugs in them.

    Leave out a semicolon, and the compiler could figure out what you
    most likely meant. When turnaround times were hours or days, that
    helped much in getting programs running faster. Now, few will do
    even that much.
    But adding new variables can move around existing variables.
    As they won't be in the place that pointers are pointing, things
    can get bad pretty fast.

    Consider other than the first call to a recursive routine.
    It might know where variables are in the current instance, but
    that will be wrong for others.

    -- glen
    glen herrmannsfeldt, Feb 3, 2014
  19. You need to understand that they are not trying to understand you. That's
    not their goal. That is, they aren't treating you like a peer having a
    discussion; rather, they are treating you like a student that they would
    desperately like to flunk for any possible reason. Essentially, as your
    grader, they require absolute precision - no possibility of misunderstanding -
    as a condition of your receiving a passing grade on your exam.

    That - and a host of other things - like properly prototyping main(), not
    casting the return value of malloc, etc, etc.

    Literally, they sit and read your posts - looking for any possible way to
    misinterpret them. If they find it, they pounce.

    Here, they made a big deal out of deliberately misinterpreting your
    somewhat slangy use of the word "somebody".
    Your mother would *love* this newsgroup.

    But the Bush apologists hope that you won't remember all that. And they
    also have a theory, which I've been hearing more and more - namely,
    that President Obama, though not yet in office or even elected, caused the
    2008 slump. You see, people were worried in advance about his future
    policies, and that's what caused the economy to tank. Seriously.

    (Paul Krugman - Addicted to Bush)
    Kenny McCormack, Feb 3, 2014
  20. The purpose of edit-and-continue is to work with what is already there.
    Microsoft uses what they call an "incremental linker" which is able to
    link to the previously constructed ABI. It will not reorder things
    unless they no longer fit where they used to. It will adjust function
    references in classes because the edit-and-continue ABI uses indirection
    for its function call destination. It calls a static location that
    never changes, with only that one portion being updated to point to the
    new location of the function (if it changes more than can be compiled
    into the reserved space set aside for it by the edit-and-continue ABI).

    It is a protocol which allows things to be modified properly in a running
    Edit-and-continue allows you to make simple program logic fixes on any
    system that's been running for any length of time, local or remote. It
    allows you also to do your development from inside of the debugger, so
    you don't have to stop, edit, recompile, restart, get back to where you
    were, and then debug. It makes it a continuous operation: you are
    simply "debugging" (with the word "debugging" in this new context of
    having the edit-and-continue abilities, meaning not just finding bugs,
    but also correcting them as you find them, as well as writing new code,
    modifying existing code, and deleting existing code if you so desire).
    I use it on my current project. It is by no means huge, but if you design
    your system to use multiple DLLs, then you're only debugging one DLL at
    a time typically ... and you only need that one to support the edit-and-
    continue ABI protocol. The rest can be created outside of that format,
    using the standard release mode with full optimization.

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 3, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.