Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

-Ofun times

by raiph (Hermit)
on Apr 12, 2014 at 04:35 UTC ( #1082052=perlmeditation: print w/ replies, xml ) Need Help??

»»» This post is about the immature Perl 6, not the rock solid Perl 5 «««

In the last few months jnthn has added optimizing stages to the Rakudo/NQP/backends compiler stack. In his latest blog post he outlines these stages and notes some early results from a few things he and timotimo have already done ("Array and hash access is more than 3 times faster, most multi-dispatches are now enormously cheaper").

There's other news too, so even if you're not ready for -Ofun the linked blog post is still worth a read if you are interested in P6.

Comment on -Ofun times
Re: -Ofun times
by davido (Archbishop) on Apr 12, 2014 at 05:06 UTC

    I get it -- optimization is a fun game. But isn't one of the rules of Optimization Club to implement the spec first, and optimize once that's been done? One can play all day with unrolling loops, peeling away layers of indirection, and so forth to gain cycles, while piddling away time and energy that could be spent finishing the project within a timeframe that retains relevancy and the respect of potential users.

    A reminder: http://perl6.org/compilers/features. Red and yellow boxes indicate that time spent on optimization is premature.

    Spending time playing the optimization game without ever finishing the target spec is a strong indication that the project is just a toy for its developer's amusement. Does anyone outside of the project's development club care how fast it runs if it only runs a not-ready-for-production subset of the spec?

    I'm sorry, I have long wanted to believe that Perl6 is destined for belated success. But I'm going to have to give up that position, and resign myself to the more realistic view that it's only destined for belatedness. If you want to inspire people to regain hope and enthusiasm, and possibly even to contribute to the project, tell us that after 14 years we have something that is feature complete, and that help is now needed on optimizing performance, improving documentation, or porting extension libraries over.

    Update3: I do believe that those participating in the project have good intentions, a genuine interest in the project, and are involved in a thankless pursuit. So I apologize if my comments are unkind to them. I seem to be able to go days and weeks without really caring or thinking about P6. And then a post announcing and congratulating progress in an aspect of the project that seems tangential to its success comes along, and I really believe it does the project a disservice, further turning people off to it.


    Dave

      I get it -- optimization is a fun game. But isn't one of the rules of Optimization Club to implement the spec first, and optimize once that's been done?

      That's only if you do waterfall-style development, and if you have well-financed dev team.

      But we are volunteer-driven dev team, and so we must also keep those developers happy. And having a dog slow compiler frustrates people, and drives them away. And if volunteer devs have no users and no fun, they stop developing.

      Another point is that we're listening to user feedback. When we first released the Rakudo Star distribution, we got lots and lots of feedback. Most of it was "this is very cool, but please make it much, much faster (and less memory hungry)".

      Also, while Rakudo isn't feature complete, most user complaints these days concern performance and reliability, not features. Most missing things are very much orthogonal (and on a higher level) than the current optimization, so we don't expect much friction from adding those features later. Quite the opposite; since Rakudo is a partially self-hosting compiler, optimizing it speeds up the development cycle, which makes it easier to add more features.

      Finally I'd like to point to other languages and compilers, like C++ with gcc and clang, and C# with mono/roslyn, and java with OracleJVM/OpenJDK + javac. The compiler (and VM) developers spend quite some time optimizing for performance. Yet none of the languages are feature complete, they are all being developed constantly. And not just the languages, the compilers have to catch up on those features too. Do you think they are all wrong too?

        TIL that #perl6 believes that comparing perl-6 to C++, C#, or Java doesn't make perl-6 look like a horrible, mismanaged, irrelevant death march.

        Mind blown.

        Well played. Perhaps those other three languages will eventually have real world users too someday? It will be interesting to see if they also get documentation, libraries, backwards compatibility, stability, tooling, packaging, and project management.

        That's only if you do waterfall-style development, and if you have well-financed dev team.

        How is that true? Does agile say that you requirements be never frozen?

        And having a dog slow compiler frustrates people, and drives them away.

        How big is your user base and how many have been driven away? There are slower tools, like Scala. Which many people have no problem in using. Mainly because they can atleast use it, instead of a product that isn't complete but promises to be. I guess you don't realize you have a literally zero user base, apart from a few people who like to write one liners on IRC or write toy programs to implement commonly known algorithms on Forums which no one takes seriously. Which explains why they are happy with a sub set of features. Because for most toy programs you don't need much, but the existing ones to run fine

        Also, while Rakudo isn't feature complete, most user complaints these days concern performance and reliability, not features.

        Also who are these users? Can you show us at least on serious use of Perl 6 in the wild? A big company, A start up? Anything?

        C++ with gcc and clang, and C# with mono/roslyn, and java with OracleJVM/OpenJDK + javac. The compiler (and VM) developers spend quite some time optimizing for performance. Yet none of the languages are feature complete

        They are incomplete in the same sense iPhone, or your TV is incomplete. It doesn't mean iPhone's or TV's aren't usable now. It only means they may get a few feature based on the competition they face in the future

        Perl 6 is just incomplete. Its a bit like shipping an iPhone without a feature to store phone numbers. That's a very different kind of incompleteness than the former.

      Spending time playing the optimization game without ever finishing the target spec is a strong indication that the project is just a toy for its developer's amusement. Does anyone outside of the project's development club care how fast it runs if it only runs a not-ready-for-production subset of the spec?
      I am happy that Perl6 is a toy-project and that it can explore all the highways and by-ways, dead-ends and royal roads and takes all the time (and more) than needed.

      Otherwise we will end up with another Java or PHP.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics
      Hi davido,

      If what I write below is not helpful (or worse), please accept my apologies.

      I have long wanted to believe that Perl6 is destined for belated success. But I'm going to have to give up that position, and resign myself to the more realistic view that it's only destined for belatedness.

      It does indeed sound like it might be time for you to let your P6 hopes go. Believing something about the future of P6 is faith really, and if you're in the dark about what's actually going on right now then it's blind faith, which I think you'll agree is ultimately unhealthy.

      If you want to inspire people to regain hope and enthusiasm

      I'm not trying to inspire people to regain hope and enthusiasm. I'm occasionally (about once a month) informing monks about what's going on in the P6 world and encouraging readers to consider exploring P6 -- especially the friendly and productive #perl6 vibe that Audrey bequeathed us (and which bares no recognizable relationship to the dumb drunks caricature one monk in particular would have the world believe).

      And then a post announcing and congratulating progress in an aspect of the project that seems tangential to its success comes along, and I really believe it does the project a disservice, further turning people off to it.

      I've reread my OP and I don't see how I was congratulating anyone. That certainly wasn't my intent. I'd appreciate clarification of what you saw as congratulatory.

      I can see how my posts have put you off, and seem to you like a disservice to everyone, given that you were worried that P6 might not succeed and believed that what I have focused on was tangential. So, while I respectfully disagree, at least about my OP of this thread, I do get that my posts can leave you feeling discouraged or worse.

      However, you can hopefully see things from my perspective too: I see what's actually going on with P6 because I follow the project; I want to occasionally (once a month or so) share P6 tidbits at the monastery; I post in this section because it says "if you want to share or discuss ... Perl 6 development, this is the place"; and my posts usually get positive votes with no significant downvotes, as is the case for this one at the time I write this.


      As I said at the start, I think it might be healthy for you to let go of your hopes for P6. Then, the moment you notice a P6 post, and you don't like it, you'll be able to just ignore it because it won't matter to you. And if a post is interesting, well, you can read it without pain because you won't be getting your hopes up based on blind faith.

        I see nothing wrong with continuing to post updates. I just regret that the updates don't seem to reflect the approach of Christmas.


        Dave

        I never said "dumb drunks." That's just your paranoia talking, Ralphie boy. I think the people who are actually programming are very smart, just irresponsible and not interested in ever releasing anything "useful and usable".

        But for fun, search the logs for "beer" and "tutorial":

        #perl6 beer

        #perl6 tutorial

        I also searched for "book" and "documentation" but those results were too noisy to suggest anything interesting. But you can see from skimming the results that #perl6 spends far more time talking about consuming beer than it does talking about writing a useful tutorial. Unless Moritz edited the logs again to remove Jonathan cursing people out.

        Which probably explains why the Rakudo has approximately zero users and keeps getting rewritten. Ballmer Peak anyone?

Re: -Ofun times
by sundialsvc4 (Abbot) on Apr 14, 2014 at 02:00 UTC

    The only people who at this point show the slightest interest in “the language which dares to call itself Perl-6” are the usual gang of idiots™ the same handful of zealots ... who keep rewriting it to use this-platform or that-one, who keep dabbling with optimization, and so-on-and-on.   Thereby adding to the dictionary an endless number of synonyms for the word, “irrelevant.”

    Like it or not ... there is no successor-language for Perl version 5, other than already readily-accepted tools such as Moose which are built in the Perl-5 language itself.

    Please quit trying to hitch a ride on Perl-5’s good name to hawk your clearly-failed language project toy which just happens to bear the occasional syntactic and semantic resemblance to that battle-tested tool.   Most people who dabble in such things, graduate and then move on.

Re: -Ofun times
by Anonymous Monk on Apr 14, 2014 at 08:16 UTC

    This isn't least bit interesting, as others have pointed out in this thread

    Show us something that is spec complete. That's the only thing that will ever make others feel you are serious about this whole thing. For now most of us, don't really care what your toy experiments are.

    But we all already know what we are going to get an year from now. We are likely to see the same spec being tried to be ported to a few more VM's. Another few sub projects related to that started. And you telling us, that we are able to run them at the same speed the same feature we had 6 months back on the new VM. Or worse, Rakudo is being re written again! And we should expect some thing fully ready by 2020 and that anybody doubting that is a troll.

Re: -Ofun times
by mr_mischief (Monsignor) on Apr 14, 2014 at 14:45 UTC

    I understand why people have the "working now, optimized later" attitude. However, this blog post isn't just about making the compiler run faster. It's about getting it to produce faster compiled code. I for one do consider that a feature. It's also something that would likely be harder to rough in later in the project. A working spec-complete compiler that does basic optimization from the start is more likely, I think, to be used than one that is spec complete and produces very slow programs.

      Pardon me for asking, but... “why do you even give-a-damn whether the code “runs faster,” if nobody on this planet will ever have a pragmatic business reason to submit source-code to your compiler, anyway?”

      I think that I am entirely safe to say that this entire project (sic ...) can be summarized as follows:

      1. Let’s invent a New Language, as though nobody on this planet had ever done such a thing before.
      2. Let’s co-opt the tread of a well-established mainstream language and graft our own version++ moniker onto it, then keep “butting to the head of the line” on that language’s already-established Internet forums with our message of “how good it was going to be.”
      3. Having thusly co-opted our “fifteen minutes of fame,” let us repeatedly demonstrate that we actually have no idea what the language ought to consist of, nor of which interpreter (hey!!   let’s hitch a ride on Java!!) ought to run our brainchild.
      4. Let’s just keep “butting our way into the head of the line” on the forums of the existing language upon which we wish to hang our undeserved coat-tails, all the time insisting that our project is, legitimately, The Next Big Thing™ ... in hopes that, after a decade or two, that community will actually begin to believe us.
      5. For lack of anything better to talk about, let’s talk about Optimization.   “Even though you have no pragmatic use for this, it sure is fast!”

      Well, that’s just not the way that software engineering works.   Your project failed.   It is dead.   It was dead half a decade ago.   Please, bury the dammed thing and get lost.

        I think I am entirely safe to say that each point in your summary could equally apply to most of your own posts on here.

        You keep saying "you" and "your" as if I'm writing this code. I'm not. What I said is that I see value in the compiler being able to optimize code it compiles before version 1.0 comes out.

        I will not, because we have a simple disagreement on a single point, "get lost". It is frankly not only unproductive but also infantile for you to suggest it.

        Hi sundialsvc4, I am glad that I had still one vote available today to be able to down vote your post, which I just did (and I do that extremely rarely, I don't think that I have casted negative votes more than half a dozen times in the last 18 or 19 months that I have been in the Monastery). Nothing personal against you, but that enabled me to see that I am far from being the only one: a -14 vote record (as of now) for your post is a clear sign that many monks here think that your post is an irrelevant, disdainful and intolerant caricature of reality (and BTW, for now, your post gets the title of the worst node of the week and the second worst node of the month, and I think your post deserves it). My hopes of seeing Perl 6 becoming mature and production-ready one day have seriously shrunk in the last years, and I am sad about that, but please show at least some respect for people who are still trying to give it birth, even if you think, rightly or wrongly, they are doing it the wrong way.

        Your "get lost" concluding sentence is the straw that broke the camel's back and convinced me to down vote your post, I might not have done it but for these two words. And remember, even if it might eventually fail, that Perl 6 was a project of the Perl community, including people like Larry, Damian, Tom and Nat among others (as far as I remember), nothing to do with an "evil" cuckoo that would try to rob another bird's nest.

Log In?
Username:
Password:

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

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

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls