Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^5: Trying to determine the output length of a Unicode string

by Jim (Curate)
on Sep 26, 2011 at 20:18 UTC ( #927942=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Trying to determine the output length of a Unicode string
in thread Trying to determine the output length of a Unicode string

You just changed your version of length_in_grapheme_clusters() to be more like Tom Christiansen's. I told you I thought your version was "weirdly dependent on context." It was. Now it's not because you changed it to be more like the one you disparaged earlier.

I had tested your original, uncorrected version of length_in_grapheme_clusters() in my Perl script and got results I didn't understand when I called the function in list context instead of scalar context.


Comment on Re^5: Trying to determine the output length of a Unicode string
Select or Download Code
Re^6: Trying to determine the output length of a Unicode string
by ikegami (Pope) on Sep 26, 2011 at 20:29 UTC

    I thought your version was "weirdly dependent on context." It was.

    So what? I never said it wasn't.

    I had tested your original, uncorrected version of length_in_grapheme_clusters() in my Perl script and got results I didn't understand when I called the function in list context instead of scalar context.

    Again, so what? You said far more than that, and I responded to the rest of what you said.

    Now it's not because you changed it to be more like the one you disparaged earlier.

    No, I took no steps closer to reintroducing the silly loop.

      Your original version of the function was broken so you fixed it, yet you continue to argue that my criticism of its brokenness was wrong. It wasn't wrong. It was spot on.

      You made your version of length_in_grapheme_clusters() patently more like Tom's version when you fixed it. You even used the same scalar variable name, $length, that I used in my script!

        Again, so what? I don't see what point you are trying to make even if what you said was true. Of course, what hat you said isn't even close to being true.

        yet you continue to argue that my criticism of its brokenness was wrong

        That's a lie. You never said it was broken, and I never argued on whether it was broken or not.

        • You said it was tricky. I argued it wasn't tricky.
        • You said it was obfuscated. I argued it wasn't obfuscated.
        • You said it seemed to behave weirdly. I fixed that.
        • You said you didn't understand it. I explained it.
        • You implied you didn't need to read the docs to understand your version. I argued that wasn't the case.

        Perhaps you forgot to say you thought it was broken? Could you explain why you think so? Like I pointed out, it's broken for assuming all characters are the same width (just like yours is), but what else?

        You made your version of length_in_grapheme_clusters() patently more like Tom's version when you fixed it

        That's not true. I changed two things: I took out the accumulator and the while loop. I did that by adding () =. It still uses () = instead of the accumulator and the loop, so your claim makes no sense.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-07-11 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls