Does any/everyone else see the first code block in Inline C memory leak split into 4 sequential code blocks?

Is this a bug?

This is the second or third time I've encountered this recently, though I can't remember which the other posts were.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Single code block split into multiple sequential code blocks.

Replies are listed 'Best First'.
Re: Single code block split into multiple sequential code blocks.
by davido (Cardinal) on Oct 30, 2014 at 20:48 UTC

    The OP is actually intentionally opening and closing the code blocks several times in his post, apparently to facilitate putting portions of the code in <readmore> tags.

    The bug is in how the post is written.

    The OP, or a janitor could fix it. Best if the OP does, because a Janitor would have to decide whether to put all the code in readmore tags, or none of it; a decision that the OP probably should be the one to make, if possible.

    Update: Here is an example of how one small portion of the original post looked in the OP's textbox when 'submit' was clicked:

    const NV nv2 = SvNSIV(b); return nv1 < nv2 ? -1 : nv1 > nv2 ? 1 : 0; } </code> </readmore> <code> void percent2(SV* sv, ...) { I32 i; I32 arrayLen;

    Dave

      The OP is actually opening and closing the code blocks several times in his post

      Huh! S'funny, but I assumed that must be the case the 2 or 3 times I've seen this before, but when I was this post was the OPs first and only post, I thought it unlikely that he would have yet discovered readmores yet, hence my post.

      It's a weird thing to do -- put some bits in readmores and some not -- but I guess if that's what the OP wants, he should be allowed to do so.

      Of course, it makes downloaded and running his code a pain, which will probably discourage anyone from trying to help him...


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        I agree on all counts. I might have been suspicious of the cause had I not been able to inspect it as a janitor. In fact, I had already done that before reading this thread, because I was confused about how I should be evaluating the code.

        OP chose strange formatting. It makes it hard for people to see the code as one contiguous element. A Janitor could fix it, but would have to make decisions that are best made by the OP. If the OP doesn't resolve them, someone could send him or her a friendly message mentioning the issue.

        If it were anonymously posted I'd jump right in and fix it because AM can't fix his own posts. Since it was posted from a real account, I prefer to let the OP do the right thing, and step in for the really bad issues.

        The title isn't great either. It's not an Inline-based leak. It's a user-created leak based on his manipulation of perlguts/perlcall/perlapi. Inline just processed the code.


        Dave

Re: Single code block split into multiple sequential code blocks.
by toolic (Bishop) on Oct 30, 2014 at 20:24 UTC
    Yes, I see that as well. But, on my screen, alternating blocks are slightly shaded. When I look at the xml link, I see "readmore" tags around the "code" tags for the 1st segment. My guess is that the readmores create the 4 separate "downloads". The OP would have to answer why the readmores were used this way.

    You can choose which blocks to download with the "Select" link at the bottom of the node.

      on my screen, alternating blocks are slightly shaded. When I look at the xml link, I see "readmore" tags around the "code" tags for the 1st segment.

      Yes. That's exactly what I see.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Single code block split into multiple sequential code blocks.
by Anonymous Monk on Oct 31, 2014 at 01:30 UTC

    um, yeah, this is not a bug, there is a "download code" link at the bottom of the post that shows all the code sections in one download

    I've done this before, where some parts are in readmore and others aren't, to hilight certain parts ...

    This stuff shouldn't be edited, there is a "download code" corresponding to every node that downloads all the code links, not just part1/part2/part3...

      Yeah! The trouble with that is that you also pick up any other, unrelated code blocks in the post (eg. the fifth code block in the target post_ and then have to manually pick out the bit(s) you need. Doable, but still inconvenient and apt to dissuade responders.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Hi, I am the OP of the Inline C question (my first post here). :)
        The guidelines recommend hiding less important parts of a posting if it is several screens long.
        I was trying to hide the code that wasn't essential, while still providing functioning code.
        The fact that it broke it into separate colored code chunks like that wasn't what I had hoped for.
        I removed the readmore tags for better clarity.
        Thanks for your help