Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Wanted: Perl 6 Programmers

by educated_foo (Vicar)
on Sep 05, 2002 at 05:29 UTC ( #195295=perlmeditation: print w/ replies, xml ) Need Help??

Do you ever lay awake at night, wondering what it would be like to program in Perl 6? Has your "_" key (Our New Operator of Concatenation) been feeling unloved? Do you want to be an "opinion leader" in the adoption of a new programming language? If you answered "yes" to one or more of the above questions, you may be just the kind of person we're looking for. While it is still a long ways from being useful for real programming tasks, Parrot's prototype Perl 6 compiler now supports a decent enough subset of the language that it's now possible to write interesting, non-trivial programs. We need both testers and users, and this is where you come in.

Currently supported:

  • Most control structures (if, while, for, foreach, etc).
  • Hyper-operators.
  • Some of the new semantics of =~, the "smart match" operator.
  • Basic patterns (in progress).
  • named and anonymous subroutines.
  • etc.

You will find compiler bugs. In some cases, we'll do our best to fix them; in others, we'll just document their existence -- this is a prototype, and is not intended to be complete. However, the features it does implement should be consistent with the Apocalypses and Exegeses. If you are feeling ambitious, you might even want to chase the bug into the compiler, which is written in Perl 5. While documentation is sparse, there should be enough to get you started in languages/perl6/overview.pod, and if there is not -- that's a bug, too. Let us know what is unclear and we'll do our best to clarify.

You may find Parrot bugs. Parrot is, after all, alpha software. If you are feeling adventurous, you may wish to look into the virtual machine, which is written in C.

You may also find ambiguities, surprises, or irritations in the language itself, which might not have surfaced from reading Damian's and Larry's code. While there's a lot of history behind Perl 6 (see the mailing list archives at http://archive.develooper.com/), the language has had relatively few actual users. Finally, you may find idioms for common tasks in Perl 6 which can be shared with potential Perl 6 speakers. For example, this in Perl 5:

print map { "$_\n" } @xs;
may be written more naturally in Perl 6 as
print @xs ^_ "\n";

If this sounds interesting to you, we'd love to have you aboard. The latest release (0.0.8.1) is available on CPAN. The latest code is available via anonymous CVS at :pserver:anonymous@cvs.perl.org:/cvs/public in the parrot directory. Once you have the source, the compiler prototype can be found in languages/perl6.

/s

Contacts:

  • Parrot bugs: <address>bugs-parrot at bugs6 dot perl dot org</address>
  • Language Discussion: <address>perl6-language at perl dot org</address>
  • Parrot Discussion: <address> perl6-internals at perl dot org</address>
  • Compiler bugs and/or development: <address> seano at cpan dot org </address>

More information:

Comment on Wanted: Perl 6 Programmers
Select or Download Code
Re: Wanted: Perl 6 Programmers
by danger (Priest) on Sep 05, 2002 at 07:35 UTC

    I had to make a couple of minor edits to the files: "anyop.c" and "imcc.y" under the "languages/imcc" path --- the version was hardcoded with 0,0,7 but needs to be changed to 0,0,8 once in each file. I found mention of this on the perl6-internals list. After that, make test in the perl6 directory succeeded on all tests. I just wanted to point that out and possibly save someone a little grief. Time to write some Perl6 code I guess :-)

      thanks for the advice mr danger -- i checked out a CVS copy, and needed to twiddle the version number as well.

      have to say, i'm excited... even by my first for loop - parallel iteration is cool! likewise with the hyper operators - just like an even more brief map {} LIST. um... not sure about _ for concatenation though... call me a heretic, but i'd prefer an overloaded '+' to concatenate strings and '*' to repeat strings (a la perl5 'x' operator)... more parametric polymorphism please...

      print "hello perl6 world\n"; my int @list1 = ( 1 .. 10 ); my int @list2 = @list1 ^* 2; my int $i = 0; for @list1; @list2 -> $a; $b { print "list iteration " _ ++$i _ ": a is " _ $a _ "; b is " _ $b _ "\n"; }

      this works! although the contents of @list2, once hyper-doubled, appear to be (ie they print as) floating point numbers. nevertheless, this is extremely exciting.

      matt

        although the contents of @list2, once hyper-doubled, appear to be (ie they print as) floating point numbers.
        You are correct -- numeric hyper-operators always convert their operands to floating-point in the current implementation. This behavior is incorrect.
        /s
        You're a heretic. :)

        Personally, I *HATE* it when + is overloaded as string concatenation. It leads to too many bugs/verbosities where you need to tell the language "no, I wanted addition here", or "no, I wanted concatenation here", especially in a language like perl which is able to DWIM-convert strings to numbers and verse visa.

Re: Wanted: Perl 6 Programmers
by busunsl (Vicar) on Sep 05, 2002 at 11:19 UTC
    I'd like to test, but the build of the shared library for imcc fails.

    This is on Solaris 6, without GNU.

    The error is:

    ld: fatal: option -h and building a dynamic executable are incompatibl +e ld: fatal: Flags processing errors make[2]: *** [blib/lib/libparrot.so] Error 1 make[2]: Leaving directory `/home/sybase/src/parrot-0.0.8' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/sybase/src/parrot-0.0.8/languages/im +cc' make: *** [imcc] Error 2
    I tried various things without really understanding what I was doing :-), but nothing worked.

    Perhaps someone has an idea how to solve this.

    rgds

      I solved it:

      Just tried some cc flags and stumbled over -G.

      Changed the main Makefile from

      LD_SHARED= -shared
      to
      LD_SHARED= -G
      and imcc compiled after the patch danger mentioned.

      All perl6 tests succeeded.

      Now I'll try to convert some scripts from 5.6 to 6.

        I submitted this (and your sketch of a fix) as a bug. Thanks,
        /s
Re: Wanted: Perl 6 Programmers
by John M. Dlugosz (Monsignor) on Sep 05, 2002 at 15:28 UTC
    How about giving the language docs their own public URL's, so people can easily read "the latest" to keep up or figure out a posted example code fragment, even if we don't have the time or resources to install the stuff ourselves.

      Which language docs? Larry's and Damian's Apocalypses and Exegeses, or the compiler docs? The former should be on the web (perl.org, maybe) already. As for the latter, I can't think of a good way to make them web-presentable at the moment; at least, nothing better than cvsweb, which isn't all that good. If people let me know what docs they would most like to see on the web, I'll see what I can do.
      /s
        Well, you mentioned "there should be enough to get you started in languages/perl6/overview.pod" in the post, so I was thinking of that one. That is, let us read it without downloading/installing the whole thing.

        If Perl6 stuff is already on perl.org or here in the documentation section, how about a link to it? The implication was that this leading-edge stuff would superceed any of that, since you mentioned mailing lists for discussion but no documents other than overview.pod.

      If you don't mind pod, I put it on my perlmonk.org account here.
        Thanks. I'll give it a look.

        I'm very interested in Perl6, but don't have time to dive in right now. I just moved, and my home computer room is not set up yet. And I've been doing projects like fixing physical things instead of software sigh.

        I do hope to make a contribution, perhaps in the form of documentation (creation and editing). That will be less critical if I have to fade out for periods.

        —John

Re: Wanted: Perl 6 Programmers
by sharkey (Scribe) on Sep 06, 2002 at 05:37 UTC
    I'm having some fun playing with compiler, and I'm starting to wonder what the best way to give you feedback would be?

    Should I just note what I tried which did not work, such as that any use of a hyper-assignment-operator (e.g. @a ^+= @b; ) causes a runtime exception:

    Died at P6C/Util.pm line 72.

    Or should I submit it as a testcase? Is there some way to indicate that the test is expected to fail?

    output_is(<<'CODE', <<'OUT', "string interpolation"); sub main () { $z = 1; @a = (1..3); $z1 = @a; #currently outputs: z=($z) a=() \=@a=($z1) print "z=($z) a=(@a) \$z1=\@a=($z1)\n"; } CODE z=(1) a=(1 2 3) $z1=@a=(3) OUT
    And how to we check if something has already been reported, or what the current plans are to get rid of the sub main() requirement?

    You give your email address as the contact point for the compiler, so I guess that means we should send bug reports directly to you. (unless they are disguised as a request for clarification on how to report them...)

    One final test case, and I'll stop.

    output_is(<<'CODE', <<'OUT', "concatenation chain"); sub main() { @a = (2,4,8); print @a _ "\n"; # OK: 3 print @a ^_ "\n"; # OK: 2\n4\n8\n print @a ^_ "\t" _ "\n"; # BAD: '' print (@a ^_ "\t"); # OK: 2\t4\t8\t print "next\n"; print "--" _ (@a ^_ "\t"); # BAD: -- print "next\n"; print ((@a ^_ "\t") _ "\n"); # BAD: '' print "stop\n"; } CODE 3 2 4 8 2 4 8 2 4 8 next --2 4 8 next 2 4 8 stop OUT
      There are different "bests" for different kinds of feedback, I suppose. If you have something that's pretty much certainly a bug, bugs-parrot at bugs6.perl.org is probably the best target (bugs-perl6 may also be up and running). If you have a patch, adding "[PATCH]" to the subject tags it automatically.

      If you're not sure whether or not something should work, you can email either me (Sean) or perl6-internals with the question. If you want to make something work (i.e. by implementing it), I'm probably the one you should be bugging, since it will encourage me to document things.

      If something clearly isn't implemented, a test-case is probably overkill -- just note it as "not implemented" and I'll put it somewhere in the docs. Hyper-assignment falls into this category. If something looks like it should work, but doesn't, then a test case is probably more appropriate.

      Both of the tests you provide above look good overall, though I'm not sure about some of the cases in the second. For example,

      print "--" _ (@a ^_ "\t"); # BAD: --
      is concatenating "--" with an array value. It should probably evaluate the array in scalar context (yielding its length) instead of turning into an empty array, but I don't think it will be expanded as in double-quoted string context.

      /s

        is concatenating "--" with an array value.

        doh! I need to remember that hyper forces array context. After I change the _ to , in those lines it works correctly, so it looks like "array in scalar context" evaluation is the only bug I'm showing there.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-07-10 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (198 votes), past polls