Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^5: length() miscounting UTF8 characters?

by AppleFritter (Vicar)
on May 01, 2014 at 09:23 UTC ( #1084589=note: print w/replies, xml ) Need Help??

in reply to Re^4: length() miscounting UTF8 characters?
in thread length() miscounting UTF8 characters?

Ah, I see! Yes, I was thinking that he suggested I look into Perl 6. I didn't realize Perl6::Str was actually a Perl 5 module. Thanks for the correction of my assumption there!

This is perhaps veering off-topic, but since you mention "[getting] stuff done" (Perl 5) vs. "[having] fun figuring out how it works and contributing to the [...] effort by fixing and working around bugs and speed problems etc." (Perl 6) -- just how does Perl 6 really compare to Perl 5, then, how ready for production use is it? I keep getting conflicting information; on one hand there's advocates who will tell you that Perl 6 is Right Here to use, Right Now, while on the other you've got chronic naysayers making all sorts of disparaging statements.

I reckon the truth is somewhere in between, but-- where? Performance problems aren't a big deal for me since I really only deal in small scripts; usually it's throw-away ones that only get used once, and if they get reused after all, it's usually only to massage data. Other than inefficiently-written code, speed is rarely an issue, and even inefficient code's often not such a big problem: I'd rather spend 10 seconds waiting for a script to finish if I'm only using it once than to spend 10 minutes optimizing it so it'll run in 1. ;)

Bugs are a more serious matter. Of course they're inevitable in any language, and perl is gonna be no exception no matter whether we're talking about Perl 5 or Perl 6, but just how bug-free are the Perl 6 implentations (I gather there's several, right?) right now?

for the ideal simpler Unicode handling scenario you described, there's no better prospect than Perl 6 but it's not yet ready for most users and use cases.

What I'm taking home from this is "Perl 6 will be great once it works reliably, but it doesn't yet". Does that sound about right?

  • Comment on Re^5: length() miscounting UTF8 characters?

Replies are listed 'Best First'.
Re^6: length() miscounting UTF8 characters?
by raiph (Chaplain) on May 01, 2014 at 23:36 UTC
    This post is about the immature Perl 6, not the rock solid Perl 5

    Performance problems aren't a big deal for me

    What if something that took a minute in P5 took a week in P6? OK, so it's no longer that bad, but Rakudo's speed can still be a problem for folk who don't think they care about speed. (This page of benchmarks appropriately takes forever to load.)

    how bug-free are the Perl 6 implentations (I gather there's several, right?)

    P6 is defined by a spec, so there have been multple implementations, and others could one day emerge, but realistically Rakudo is the only serious game in town.1

    I don't think I can usefully answer your "bug-free" question. So I'll be conservative and go with "expect lots of bugs".

    There are other serious issues, eg patchy documentation, very few modules, and no way to call Perl 5 code. Maybe one day...

    If the above hasn't put you off P6, use an IRC client or click this link to visit the freenode IRC channel #perl6 (log) between 6am and 6pm EST (most core devs are European), ask lots of (respectful!) questions, and type code in to the on-channel evalbots. If it isn't fun, forget P6. If it is, then maybe it'll also become useful to you. Either way, please post back here at the monastery about your take away. :)

    1 Rakudo relies on the underlying NQP compiler toolchain, so you may hear about that too. And NQP in turn runs on multiple backends including Parrot, JVM and the new MoarVM. So you may hear about those too. But these are all about Rakudo.

      Thanks, this is all quite informative!

      What if something that took a minute in P5 took a week in P6?

      OK, that would less than ideal after all.

      How about something that took months in Perl 5 taking decades in perl-6? I mean of course making something usable.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1084589]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2017-11-19 19:05 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (282 votes). Check out past polls.