Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Starting with Perl 6

by punkish (Priest)
on Jan 13, 2010 at 16:02 UTC ( [id://817207]=perlquestion: print w/replies, xml ) Need Help??

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

After a few hiccups, I downloaded Rakudo yesterday on my Macbook and was able to run a couple of tiny programs. Where to from here? But, I am getting ahead of myself.

Yesterday, I signed up for and attended a Python "bootcamp," probably the only way I will force myself to learn that language. My impression after the first day, meh. There are a few things that I like (all variables are objects), and many things that I dislike. Yet, nothing compelling that says I should use Python. Of course, from just empirical observation, Python seems to be doing quite well in programs that require an interface, and has a rather useful shell and editor. Of course, it doesn't have anything quite like CPAN. So, after the first day of Python, I decided to learn more about Perl6, and discovered last night that Perl6 is indeed real, and it addresses most of the gaps vis a vis OO. Its ability to create programs that have interfaces remains to be seen, especially in how well it will allow one to interface with native GUI tools... something like the old Camelbones project would be nice. Create the interface using Interface Builder (on the Mac), and write the code that runs it in Perl.

Now, a few Perl6 specific questions --

  1. Is there a http://perldoc.perl.org/ analog for Perl6? Finding even a list of methods supported by objects was tricky. Absence of $str.length confounded me for a while.
  2. Are there tutorials other than at http://svn.pugscode.org/pugs/examples/?
  3. Is it really necessary for perl Configure.pl --gen-parrot to use svn https://? My svn was compiled without secure http support, so that led me on a wild goose chase to first upgrade svn. Why is it necessary to use https? Additionally, why download the code using git, and then fire Perl to download whatever it downloads using svn... are two version control systems really needed? I guess, what I am saying is, make it as easy as possible for folks to get started. There may be many who are curious about Perl6, and would like to start off as easy as possible. In fact, perhaps the best thing would be if there could be a Perl6 implementation within a browser, much like Ruby has on its website. That way one could try out the latest Perl6 without even installing it.
  4. The distinction between Parrot and Perl6 seems really confusing. Is Parrot wasting a lot of effort trying to be a compiler for a host of languages? What benefit would there be to creating such a universal compiler? Would the development of Perl6 itself be faster if Parrot focused only on Perl6?
What I have seen thus far looks really exciting. My final question is -- when will a production ready version of Perl6 arrive?

And, finally, my thanks to all those who have worked and are working on Perl6. Really, I mean it.

--

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

Replies are listed 'Best First'.
Re: Starting with Perl 6
by masak (Scribe) on Jan 13, 2010 at 16:40 UTC

    1. I've been sort of building up to starting to write on a perldoc analog for Perl 6. You can read about it here. However, it's still only just in the late planning stage, with no actual documentation.

    2. The Perl 6 Advent Calendar, as well as Moritz's excellent Perl 5 to 6 posts.

Re: Starting with Perl 6
by moritz (Cardinal) on Jan 14, 2010 at 09:24 UTC

    To add to the excellent answers given so far:

    Some of the Perl 6 hackers (including me) are writing a Perl 6 book. It's not nearly finished, but there are some chapters already worth reading.

    See http://github.com/perl6/book/ for the source repository. You can either read the PseudoPod files directly (and ignore the markup), or go to the download section and grab the latest PDF release.

    Finally: Don't hesitate to ask questions on our IRC channel #perl6. Usually there's somebody around to answer, at least if you live in "reasonable" time zones :-) (aka US or Europe waking hours, though we also have people from Australia and China).

    Perl 6 - links to (nearly) everything that is Perl 6.
      Thanks for the tip about the book. I downloaded it and am finding it very helpful. A few quick comments --
      • It would be helpful to use plain single quotes in the code fragments instead of curly single quotes.
      • Instead of including the basics of Perl in the book (there are many other books for that, and the concepts haven't changed that much anyway), it might be more useful to concentrate on comparing P5 to P6, showing equivalent code in both versions, with new, P6-specific idioms.
      --

      when small people start casting long shadows, it is time to go to bed
        it might be more useful to concentrate on comparing P5 to P6, showing equivalent code in both versions, with new, P6-specific idioms.

        It might, but that's not the book we decided to write. Our target audience are not only Perl 5 programmers, but more generally programmers interested in Perl 6.

        On #perl6 people ask about introduction to Perl 6, and they have no prior experience with Perl 5. Sending them off to learn Perl 5 first to then forget a third of it and learn something else -- that feels just wrong.

        But still there is more Perl 6 literature for the Perl 5 savvy programmer (like my blog series, and various other documents).

        Perl 6 - links to (nearly) everything that is Perl 6.
Re: Starting with Perl 6
by duff (Parson) on Jan 14, 2010 at 05:32 UTC
    The distinction between Parrot and Perl6 seems really confusing. Is Parrot wasting a lot of effort trying to be a compiler for a host of languages? What benefit would there be to creating such a universal compiler? Would the development of Perl6 itself be faster if Parrot focused only on Perl6?
    Parrot is not a compiler. It's a virtual machine. It's an assembly language and environment that compilers can target. Parrot has a few tools for writing compilers though. And I wouldn't say that it is wasted effort.

    Perl 6 is a language that has nothing to do with Parrot except that the Rakudo implementation utilizes Parrot as it's back end. There are other Perl 6 implementations that utilize other back ends.

    I think that if Parrot only catered to Perl 6, then it would make some things simpler for Rakudo, but many things more complex for other languages. Also, they'd give up one of their main selling points: sharing between languages.

    MHO,

      ... if Parrot only catered to Perl 6, then it would make some things simpler for Rakudo, but many things more complex for other languages.

      Beyond that, if Parrot were to support native versions of both Perl 5 and Perl 6 (and that is indeed a goal of Parrot), it'd still be general enough to support many kinds of dynamic languages besides Perl 5 and 6.

Re: Starting with Perl 6
by marto (Cardinal) on Jan 13, 2010 at 16:08 UTC

    Have you looked at the resources available at perl6.org?

      Have you looked at the resources available at perl6.org?
      I thought that was apparent from my post, but, yes, of course, I have looked at the resources available at perl6.org. That is what led me to download Perl6, led me to the examples in pugscode repo, etc.
      --

      when small people start casting long shadows, it is time to go to bed
Re: Starting with Perl 6
by EvanCarroll (Chaplain) on Jan 13, 2010 at 16:29 UTC
    Now, a few Perl6 specific answers --
    3. both rakudo and parrot are tracked on github, try it instead.
    4. Java runs on the JVM. Languages better than Java run on the JVM. Those better languages can use stuff written in Java, that is the benefit. I'm not sure the development would be faster if Parrot focused on Perl6, Parrot is really a side project for a VM. Rakudo wouldn't be as quick to develop a perl6 if they also developed other languages for parrot, but they don't -- yet.
    5. "Before Christmas"

    Now be prepared to be inundated with boring remarks that highlight the ability of "perl5 to do anything perl6 can do", or the quicker response, "perl5 is still good enough for today".



    Evan Carroll
    The most respected person in the whole perl community.
    www.evancarroll.com
      3. both rakudo and parrot are tracked on github, try it instead.
      Yes, that is what I tried. The process seems to be --
      1. use git to download rakudo source
      2. run perl Configure.pl --gen-parrot, which, in turn, uses svn https to download whatever.
      Hence, two different version control systems, and svn using https seemingly unnecessarily.

      The easier it is to get started, the easier it will be to get into it and to like it and learn it.

      --

      when small people start casting long shadows, it is time to go to bed
Re: Starting with Perl 6
by JSchmitz (Canon) on Jan 14, 2010 at 15:07 UTC
    It was pretty fun doing the install - I just happened to install this yesterday also on a CentOS server. I am excited about the potential. Run /usr/local/rakudo-2009-12/parrot/parrot_config --dump to see the cool stuff = )

    Happy Hacking!

    Jeffery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://817207]
Approved by marto
Front-paged by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-03-28 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found