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

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

by snoopy (Curate)
on Jul 07, 2013 at 21:32 UTC ( [id://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:

        Say:

        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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-24 06:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found