Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^4: v5, a reimplementation of P5 (was Re^5: A "Perl-7" that I could actually USE right now)

by snoopy (Deacon)
on Jul 07, 2013 at 21:32 UTC ( #1043015=note: print w/replies, xml ) Need Help??

in reply to Re^3: v5, a reimplementation of P5 (was Re^5: A "Perl-7" that I could actually USE right now)
in thread A "Perl-7" that I could actually USE right now

Over on Backcompat is holding us back! you state:
"Breaking XS would be awful, but it's probably necessary for the kinds of internal changes that produce either dramatic speed gains or allow further experiments on the CPAN. Unfortunately, it breaks most of the CPAN."
And Stevan Little replies:
"Actually the XS problem is easily fixed (for some definition of easy). Stop exposing the Perl guts via a macro layer and provide a real API (aka - level of indirection). Of course, then you need to convert all XS modules over to use it, but with a sensible deprecation cycle (of like 2+ years) that should be do-able (not to mention that it will shake out all the old crusty XS modules that no one maintains or cares about)."
It could be that Moe and Perl6 are hitting similar issues with Perl5 integration/compatibility and they may have a common resolution.
  • Comment on Re^4: v5, a reimplementation of P5 (was Re^5: A "Perl-7" that I could actually USE right now)

Replies are listed 'Best First'.
Re^5: v5, a reimplementation of P5 (was Re^5: A "Perl-7" that I could actually USE right now)
by chromatic (Archbishop) on Jul 07, 2013 at 22:05 UTC

    Yes, they may eventually solve the XS problem. They don't now, and to my knowledge neither has a credible solution to do so. Anyone who suggests otherwise—anyone who suggests that Moe or v5 is useful and usable in the same way that Perl 5 is now—is spreading misinformation.

    To be fair to Moe, no one has ever suggested that it is a worthwhile replacement for Perl 5.

      a worthwhile replacement for Perl 5.

      I still don't get all this endeavour to re-write P5 in P6. P5 is perfectly embeddable.

      Just embed perl5xx.dll/.so into the P6 compiler and provide:

      1. P6 built-in(s) to access p5 subroutines:

        Say something like:

        use P5 qw[ LWP::Simple ]; ... my $url :String = <...some P6 source>; my $content = p5call( "LWP::Simple::get( $url )" );
      2. P6 proxies for P5 objects:


        use P5 qw[ DBI DBD::Pg ]; ... my $dbi = P5Object( "DBI->connect( $dataSource, $userName, $userAuth, +\%attrs" ); ); my $sth = $dbi->prepare( 'SOME SQL HERE' ); ...

      Full compatibility at a stroke, and full P5 performance (within the p5 code), and a small hit through the thunking layer.

      How hard could it be to write the thunking layer? (It's gotta be easier than recreating P5 + XS + everything else.)

      I effectively do exactly this in my 15-line Perl5 REPL.

      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.
        How hard could it be to write the thunking layer?

        Keep in mind the current mindset is that everything has to be portable across all of the (hypothetical) backends that Rakudo (hypothetically) supports, so writing a thin embedding layer in C won't do. You have to write it in NQP and then hope that the backend allows you to invoke C functions in an efficient way. That's C for Parrot, JNI for the JVM, something like P/Invoke for the CLR, wishful thinking for v8, and magic unicorn fairy dust for MoarVM.

        It's gotta be easier than recreating P5 + XS + everything else.

        If P6 is optimized for -Ofun, then plumbing and maintenance and packaging and all of the other pieces of finish work that aren't glamorous must not be fun.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043015]
[Corion]: Yay. Traditional finance situation averted. Bonds can be quoted in amounts (1_000_000 EUR) or per unit (1 unit). And a traditional error is to trade 2_000_000 piece when you meant to trade 2_000_000 EUR.
[Corion]: (one of my scripts simply catches high amounts and I phone people making that trade, ideally before the payment is due)
[Corion]: The sad thing is that my script sits at the end of the pipeline and can only look at the payments due today or tomorrow basically, while there are many more systems further up in the pipeline
[GotToBTru]: better late than never, I guess
[Corion]: GotToBTru: Sure - there is a long and sad story of many frantic cleanups that led us to implement this notification ;)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-03-29 11:32 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (347 votes). Check out past polls.