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

Re: Wanted: Perl 6 Programmers

by sharkey (Scribe)
on Sep 06, 2002 at 05:37 UTC ( [id://195583]=note: print w/replies, xml ) Need Help??


in reply to Wanted: Perl 6 Programmers

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

Replies are listed 'Best First'.
Re: Re: Wanted: Perl 6 Programmers
by educated_foo (Vicar) on Sep 06, 2002 at 07:35 UTC
    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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://195583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found