http://www.perlmonks.org?node_id=872809

punkish has asked for the wisdom of the Perl Monks concerning the following question:

I am not very good at Perl, but I know my way around, and keep myself employed usefully with the help of Perl. I love using it, and hopefully, get better every day.

Sadly, even after having used Perl for several years, I am confused by where Perl is going.

Perl 6, by its name, implies that it is the next version of Perl, the one after Perl 5. Yet, if I want to install Perl 6, I am directed to "Rakudo Star," a "compiler" based on "Parrot," a virtual machine. Whoa! What happened here?

Seriously, was there a creative naming contest? Was there a, lets-see-how-confusing-we-can-get contest?

Will this be resolved when the "next major version of Perl" arrives? I can't imagine trying to explain to folks that Perl 6 is a "reference specification" and not a language (compiler, virtual machine... whatever).

On the other hand, all this confusion could merely be limited to me and no one else. Would knowledge monks please clarify?

By the way, I installed "Rakudo Star" on my MacBook, and am thoroughly enjoying the new language, and the new yet familiar way to program. Nice job you all.

Update: After a bit more tinkering with Perl 6, I am loving it even more. Its just so... modern. I wish its developers all the success and speed. I can't hardly wait for the first production/stable version to arrive. Many thanks.

--

when small people start casting long shadows, it is time to go to bed

Replies are listed 'Best First'.
Re: What is Perl6? -- a language.
by moritz (Cardinal) on Nov 21, 2010 at 19:57 UTC
    Yet, if I want to install Perl 6, I am directed to "Rakudo Star," a "compiler" based on "Parrot," a virtual machine. Whoa! What happened here?

    I've heard about a programming language called 'C'. It's supposed to be very fast. Yet, if I want to install C, I'm directed the "Gnu Compiler Collection". Or to "clang", based on LLVM, a low-level virtual machine. Or icc, tcc, ... . Whoa! What happened here?

    What happened is that programming languages can have multiple interpreters and compilers. Thus naming one of them just like the language would lead to even more confusion.

    While Rakudo currently is the most usable Perl 6 compiler for most applications, there are others.

    Was there a, lets-see-how-confusing-we-can-get contest?

    So you don't know any reasons, yet assume the worst in others. How very encouraging.

    Will this be resolved when the "next major version of Perl" arrives? I can't imagine trying to explain to folks that Perl 6 is a "reference specification" and not a language (compiler, virtual machine... whatever).

    Perl 6 is a language. Just not a compiler.

    And why ever not? What's wrong with C, C++, Java, Python, Pascal, Haskell and all the other languages that have a specification, and multiple compilers?

      I've heard about a programming language called 'C'. It's supposed to be very fast. Yet, if I want to install C, I'm directed the "Gnu Compiler Collection". Or to "clang", based on LLVM, a low-level virtual machine. Or icc, tcc, ... . Whoa! What happened here?
      You are absolutely correct. It is very confusing to most people. To those who install C, it perhaps makes sense, but I've never had to install C. It always comes on my computer.

      The problem is -- I do have to install Perl. Perl is a fairly routine install. So, when I install "Perl," I install Perl. The world of Perl 5 has made me expect that the language, its specs, its compiler, its VM, its grammar, its whatever... they are all Perl. This makes it easy for me to understand, and it makes communication easy to others. There are times when I have to install Perl (or ask for Perl to be installed) on a server owned by someone else. I tell them to please install Perl, and they do so at /usr/local/bin. Well, now it is a lot more confusing.

      I guess, the reality is that a developer at one level is a user at another (and vice versa). I don't develop Perl, but I use Perl to develop with it. Others use the programs that I write with Perl. So, we have all these different "levels" of users. Simpler naming leads to simpler communication. Is all I am saying.

      So you don't know any reasons, yet assume the worst in others. How very encouraging
      Not at all. Apologies if that came out so. It was more of a tongue-in-cheek statement, but it was based in something that seemed needlessly complicated.
      Perl 6 is a language. Just not a compiler. And why ever not? What's wrong with C, C++, Java, Python, Pascal, Haskell and all the other languages that have a specification, and multiple compilers?
      Perhaps they do. I only know of the Perl 5 world, and I don't have this confusion in the Perl 5 world. That is where I am coming from.
      --

      when small people start casting long shadows, it is time to go to bed
        I've never had to install C. It always comes on my computer.

        NO. A programming language is something abstract. Something that exists inside your head. Like an idea. You can't install a concept on a computer. Just programs.

        And if you conflate programming languages and the tools that work with them, you're creating a lot of confusion.

        Simpler naming leads to simpler communication. Is all I am saying.

        You're spot on. It's simpler to have different names for different things. A language is not the same as a compiler for that language. Therefore we have different names for the language and for our compilers.

        In Perl 5 it doesn't matter very much if conflate the language and compiler, because there's just one compiler, and so context usually makes it clear which one you mean. That's not the case with Perl 6, Haskell, C, and many other languages.

        So, when I install "Perl," I install Perl.

        Which Perl?

        (All the Platonists in the back, put down your hands.)

Re: What is Perl6?
by ikegami (Patriarch) on Nov 22, 2010 at 00:01 UTC

    Perl6 is a spec. Rakudo is an implementations. Parrot is the runtime.

    This is not unfamiliar territory.

    • Java is a spec. Sun's java compiler is an implementation. The VM Firefox uses is a runtime.
    • C is a spec. gcc and MS's cl are implementations. If you compiled for llvm, there's also a runtime involved.
      This is not unfamiliar territory.
      Perhaps not to you. It certainly was to me, which is why I started this thread. I asked a few of my colleagues. They agreed with me. For good measure, I called up a friend of mine who is a Python programmer. He also said that this was confusing to him. He considers himself a Python programmer, he downloads Python, he programs in Python, his programs are written in Python, and he uses Python (the compiler/run-time) to run his programs.

      sigh. Look. I admit that I am technically wrong. But, I am telling how it is. If we want less confusion, if we want Perl 6 to get mindshare, in my highly unscientific but very human-centric view, the message has to be clear and unambiguous, not loaded with technical distinctions that most people will find confusing needlessly.

      Update: By the way, I always found Java naming conventions terrible. They stank to high heaven. Its been a while, but I was always puzzled by Java 2 Version 5 SE whatever. There was the JDK and the JVM and the hotspot technology and the JRE. Seriously?

      It is like Japanese electronics companies naming their products compared to Apple -- you have the svelte Sony VPCZ1290X Vaio computer on the one hand or you have the Apple MacBook on the other.

      --

      when small people start casting long shadows, it is time to go to bed

        not loaded with technical distinctions that most people will find confusing needlessly.

        I provided technical details since you seem to be asking for them. There's no need to know any technical details. All you need to know is that you need rakudo to compile the program, and parrot to run it.

        They can't share the same name since they're unrelated projects.

        I always found Java naming conventions terrible.

        It's the web site that was terrible. The distinction is actually quite straightforward.

        • JDK — Sun's distro for developers. Includes their compiler (javac) and their runtime (java).
        • JRE — Sun's distro for users. Includes their runtime (java).

        JVM is an imaginary machine whose assembler language is Java Bytecode, the product of Sun's compiler. It's not a term you should have to deal with.

        Isn't there Puthon and JPython?

        As Occam said: Entia non sunt multiplicanda praeter necessitatem.

      To be fair, when confronted with a machine/OS, to ask "does it run (P|p)erl" is not an unfair question. In the perl5 sense, "things work". Unless there's CPAN dependencies, etc, which are solved in other ways.

      I love languages. But will Perl6 "just work" on standard distros? Who knows. I hope so.

      Historically, Perl has "just worked", as opposed to *very* persnickety backwards-compatibility-impaired 'other interpreted languages'.

      Cheers,
      Matt

        I think you've got some sampling bias in your definition of "just works". Perl does not "just work" in many places where Java, C#, JavaScript, and even (shudder) PHP "just work". We'd like to fix that so that Perl 6 "just works" all those places too.
Re: What is Perl6?
by Cody Fendant (Hermit) on Nov 22, 2010 at 03:01 UTC

    I think punkish has a very good point, and I'm a bit disappointed with the sarcasm in the responses.

    I almost never have to think about the compiler or the runtime or any of that other stuff. I feel, just like punkish, that the stuff that makes it all work is just there, at a more fundamental level on my computer which I don't have to think about.

    Surely someone can talk us through why all this Rakudo/Parrot stuff is a Good Thing for perl in general, or indeed for programming in general, without being condescending?

      ... the stuff that makes it all work is just there, at a more fundamental level on my computer which I don't have to think about.

      Someone has to think about it.

      Why is Parrot a good thing? Perl 5's internals won't support Perl 6, not without a huge amount of work. Add in the strong tendency for Perl 5 to remain as compatible as possible with Perl 1 code, and it's an immense engineering effort to consider trying to do so while providing the technical foundation to make Perl 6 possible.

      Perl 6 has to run on something, and you have to build the features it needs (continuations, multiple dispatch, gradual typing, lexical scoping, overridable and scoped grammar modifications) somehow.

      You need a VM which runs on the desired target platforms, which does not have license or patent encumbrances, which allows these features, and which permits the development and invention of these features with relative ease and as little performance penalty as possible. (If you can connect that VM to Perl 5 somehow, even better.)

      As to why a specification for Perl 6 is a good thing, consider the fact that there is a single implementation of Perl 5 and that the specification for Perl 5 is, essentially, whatever that single implementation does and whatever unforeseen and incidental behaviors have accreted from the synthesis of various features p5p decides are worth supporting. That's one reason you don't see Perl 5 on the JVM or the CLR, for example.

      With a specification for Perl 6 independent of any single implementation, volunteers will volunteer as volunteers do and can and will write multiple implementations of Perl 6. Thus you need individual names to refer to them.

        Is there an implementation that matches the complete spec currently. Which is stable, with libraries, documentation and tools around?

        This is one of those things where you have to talk to me like I'm an idiot ...

        Perl 6 has to run on something ... You need a VM

        why do we need a Virtual Machine? Why does Perl 6 need one and Perl 5 doesn't? What does Perl 5 "run on"?

        As far as I'm concerned, with my obviously embarrassing levels of knowledge, my perl scripts don't "run on" something, they run by using the perl interpreter, and they "run on" my computer.

Re: What is Perl6?
by SuicideJunkie (Vicar) on Nov 22, 2010 at 15:31 UTC
    It seems to me that the key point is thus:

    Perl 5 has:

    • ActivePerl
    • Strawberry Perl
    • IndigoPerl
    • Etc

    Perl 6 has:

    • Rakudo Star
    • Pugs
    • Perlito
    • Elf?
    • Etc

    On one side, when dealing with 5 everything has "Perl" reassuringly stamped on it somewhere. On the other, dealing with 6 has a distinct lack of common features in the names.

    You probably have not heard of "IndigoPerl" before, but you know enough about what it is, instantly, from the name. If you hadn't seen "Rakudo" before, you'd have no clue until you check with google.

      A tiny bit of beancounting:

      ActivePerl, Strawberry Perl, Vanilla Perl and Indigo Perl are "just" distributions of the same sources found on CPAN. They add some patches here and there, some bundle additional software, like a webserver or a package manager. Comparable: gcc on Red Hat, SuSE, MacOS X, cygwin. Same specification, same source, same functions, different binaries.

      Rakudo, Pugs, Perlito and friends are based on different sources, implementing (more or less) the same specifications. Comparable: gcc vs. Borland C vs. Microsoft C vs. Intel C vs. Watcom C. Same specification, different source, different functions, different binaries.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: What is Perl6?
by ikegami (Patriarch) on Nov 22, 2010 at 02:14 UTC
    I have no experience with rakudo. Do you have to launch parrot yourself, or can rakudo do that for you?

      Rakudo embeds libparrot, so after you've installed a Rakudo Star release you don't even have to know that you have Parrot installed.

        Rakudo embeds libparrot, so after you've installed a Rakudo Star release you don't even have to know that you have Parrot installed.
        That’s the funny thing... once I've installed it all, I go back to writing Perl, and running it using perl(6). I don't have to even think of Rakudo (and I am not sure what the relationship is between "Rakudo" and "Rakudo Star"... the latter seems to be a product on a web site that is called just rakudo.org) or Parrot.

        So, post-installation, life is simple again. That is a clear identity, and I hope that can be maintained and publicized and reinforced. Simplicity *always* wins out over complexity.

        --

        when small people start casting long shadows, it is time to go to bed
Re: What is Perl6?
by Anonymous Monk on May 06, 2011 at 08:11 UTC
    Is there any chance we will ever get to use Perl 6 in our lifetimes?
      People are currently using Perl 6. You can too.