Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by ikegami (Pope)
on Sep 26, 2011 at 20:29 UTC ( #927945=note: print w/ replies, xml ) Need Help??


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

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.


Comment on Re^6: Trying to determine the output length of a Unicode string
Re^7: Trying to determine the output length of a Unicode string
by Jim (Curate) on Sep 26, 2011 at 21:22 UTC

    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://927945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (18)
As of 2014-08-20 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (122 votes), past polls