Re: Lingering questions about Junctions.

2005-02-21 Thread Stefan Lidman
Junctions should be on or off by default, I prefer on. Having them half-on is bad. Because if it is half-on people(me) is going to write C if $x == 3 | 5 | 7 { in N places then have to change it and remember to change it in N-1 places. Oops. ON or OFF. On please. /Stefan Lidman

Pairs and they work in Perl 6

2005-02-21 Thread Steve Peters
I've been starting to play around with Perl 6 and pugs when I ran into some questions regarding pairs. I've looked through Perl 6 and Parrot Essentials as well as the Apocolypses and others and haven't found a good answer. What is the method for retrieving a key or value from a pair? Steve

Question about pairs

2005-02-21 Thread Steve Peters
Sorry if this email is nearly duplicated, but I may have had the wrong email address on the firt email I sent. While looking into Perl 6 and pugs, I noticed a problem with Pairs pretty quickly. Although pairs look like a very useful data type, I could find in the Perl 6 and Parrot Essentials

Re: Question about pairs

2005-02-21 Thread Autrijus Tang
On Mon, Feb 21, 2005 at 09:33:33PM +1100, Damian Conway wrote: In Perl 6, C = is a fully-fledged anonymous object constructor -- like C[...] and C{...}. The objects it constructs are called pairs and they consist of a key (the left operand of the C = ), and a value By the

Re: Sets vs Junctions

2005-02-21 Thread Michele Dondi
On Sun, 13 Feb 2005, Jonathan Lang wrote: If we want Sets in Perl, we should have proper Sets. I'll agree, depending on what you mean by proper. I'd be interested in having some means to perform set operations in perl6: unions, intersections, differences, membership checks, and subset/superset

Re: Question about pairs

2005-02-21 Thread Steve Peters
On Mon, Feb 21, 2005 at 09:33:33PM +1100, Damian Conway wrote: Steve Peters wrote: While looking into Perl 6 and pugs, I noticed a problem with Pairs pretty quickly. Although pairs look like a very useful data type, I could find in the Perl 6 and Parrot Essentials or any Apocolypse or

Re: Fun with junctions (was Sets vs Junctions)

2005-02-21 Thread Michele Dondi
On Mon, 14 Feb 2005, Michele Dondi wrote: Speaking of which, while I think that methods on the implicit topicalizer and the C.= assignement operator are indeed cool, I wonder if any provision will be made for a convenient stand in for whatever is on the left side of an assignment operator, e.g.

Re: Question about pairs

2005-02-21 Thread Juerd
Steve Peters skribis 2005-02-21 8:08 (-0600): Great! I figured I was just missing something. As a followup, is there someplace where the raw Pod for the Apocalypses, Exegeses, and Synopses live. The Pod versions would be much easier to search in bulk than going through the web pages one

Re: [perl #34178] [PATCH][MSWin32] Add gpm linkage and minor cleanup

2005-02-21 Thread Leopold Toetsch
Ron Blaschke [EMAIL PROTECTED] wrote: - adds correct linkage for gpm Some tests fail, though t\pmc\bigint.t 12 307221 12 57.14% 5-10 13-15 18 20-21 Is there any indication what's going wrong? Thanks, applied. leo

Re: Foreign modules in test scripts?

2005-02-21 Thread David Cantrell
Mark Stosberg wrote: On 2005-02-20, Steffen Schwigon [EMAIL PROTECTED] wrote: General testing question: Is it ok for a CPAN module to use other modules from CPAN only for the test scripts (e.g. Text::Diff)? Yes. Just declare them as dependencies. First, I'm not sure about the usage policy. Maybe

Re: Foreign modules in test scripts?

2005-02-21 Thread Sébastien Aperghis-Tramoni
Selon Michael G Schwern [EMAIL PROTECTED]: Second, I know there is a build_requires option in Build.PL, but does the CPAN(PLUS).pm know about that option and really only download and use those build_requires temporarily during module build/test or does it fully install them? Something

Re: Foreign modules in test scripts?

2005-02-21 Thread Johan Vromans
Andy Lester [EMAIL PROTECTED] writes: Is it ok for a CPAN module to use other modules from CPAN only for the test scripts (e.g. Text::Diff)? Yes. See http://phalanx.kwiki.org/index.cgi?StandardDotTFiles for examples of .t files that only run if a certain module is installed. Hmm. I don't

Re: TAP docs

2005-02-21 Thread Johan Vromans
Andy Lester [EMAIL PROTECTED] writes: http://www.petdance.com/random/tap.html Everyone: I still need more comments. Pete Krawczyk's the only one to provide complaints yet. @ Test number 1..6 not ok ok not ok ok ok will generate FAILED tests 1, 3, 6 Would

Re: TAP docs

2005-02-21 Thread Michael G Schwern
On Sun, Feb 20, 2005 at 10:19:09AM +0100, Johan Vromans wrote: http://www.petdance.com/random/tap.html Everyone: I still need more comments. Pete Krawczyk's the only one to provide complaints yet. There's no discussion of the exit code of the test process. Acknowledgements should

Re: Foreign modules in test scripts?

2005-02-21 Thread Michael G Schwern
On Mon, Feb 21, 2005 at 09:34:24AM +, David Cantrell wrote: The practice of bundling third-party modules with yours is IMO very wrong indeed. If I bundle (eg) Test::Frobnitz, and a hundred other people bundle Test::Frobnitz, then this leads to two problems: 1. when the author of

RE: TAP docs

2005-02-21 Thread Clayton, Nik
On Sun, Feb 20, 2005 at 10:19:09AM +0100, Johan Vromans wrote: http://www.petdance.com/random/tap.html Everyone: I still need more comments. Pete Krawczyk's the only one to provide complaints yet. There's no discussion of the exit code of the test process. Descriptions should

Re: Foreign modules in test scripts?

2005-02-21 Thread Barrie Slaymaker
David Cantrell wrote: The practice of bundling third-party modules with yours is IMO very wrong indeed. If I bundle (eg) Test::Frobnitz, and a hundred other people bundle Test::Frobnitz, then this leads to two problems: Agreed. See the earlier advice about the inc/ directory so you can

Re: TAP docs

2005-02-21 Thread Michael G Schwern
On Mon, Feb 21, 2005 at 12:29:59PM -, Clayton, Nik wrote: Perhaps a gammar (or just a regex) that describes a fully conforming test line would be helpful. Some comments about POSIX (non-)conformance might be useful, see the DejaGnu docs for examples;

Re: TAP docs

2005-02-21 Thread Andy Lester
Descriptions should not begin with a digit -- at the moment this generates a warning (in Test::* and libtap). It should probably be documented that this is a non-fatal error. I specifically left that out. It's an issue that Test::More deals with, but doesn't have to. TAP.pod really only

Re: TAP docs

2005-02-21 Thread Andy Lester
As we don't have a copy of POSIX 1003.3 I don't know if we can really say I'm not particularly interested in the POSIX stuff. Seems pretty YAGNI to me. Instead of just having a POSIX non-compliance section it might be worthwhile having a comparision to other testing systems section, including

RE: TAP docs

2005-02-21 Thread Clayton, Nik
I specifically left that out. It's an issue that Test::More deals with, but doesn't have to. TAP.pod really only deals with TAP, not the libs that create it. Sort of. 1. qq{will generate FAILED tests 1, 3, 6 Failed 3/6 tests, 50.00% okay} That's T::H output. 2. qq{Currently

Re: TAP docs

2005-02-21 Thread Andy Lester
On Mon, Feb 21, 2005 at 02:42:49PM -, Clayton, Nik ([EMAIL PROTECTED]) wrote: 1. qq{will generate FAILED tests 1, 3, 6 Failed 3/6 tests, 50.00% okay} That's T::H output. Ok, modified so that it notes that it's T::H output. 2. qq{Currently Test::Harness does nothing with the

Re: Returning varying numbers of results from a tail call

2005-02-21 Thread Bob Rogers
From: Leopold Toetsch [EMAIL PROTECTED] Date: Mon, 21 Feb 2005 11:40:49 +0100 Bob Rogers [EMAIL PROTECTED] wrote: In situations where A calls B and B tail-calls C, and C produces some arbitrary number of return values, I would like to be able to generate code for B without

Re: Fun with junctions (was Sets vs Junctions)

2005-02-21 Thread Larry Wall
On Mon, Feb 21, 2005 at 03:11:12PM +0100, Michele Dondi wrote: : On Mon, 14 Feb 2005, Michele Dondi wrote: : : Speaking of which, while I think that methods on the implicit topicalizer : and the C.= assignement operator are indeed cool, I wonder if any : provision will be made for a convenient

Re: Question about pairs

2005-02-21 Thread osfameron
In Perl 6, C = is a fully-fledged anonymous object constructor -- like C[...] and C{...}. The objects it constructs are called pairs and they consist of a key (the left operand of the C = ), and a value (the right operand). Can pairs also be used to create linked lists? my $x

Re: Sets vs Junctions

2005-02-21 Thread Larry Wall
On Mon, Feb 21, 2005 at 03:07:34PM +0100, Michele Dondi wrote: : On Sun, 13 Feb 2005, Jonathan Lang wrote: : :If we want Sets in Perl, we should have proper Sets. : : I'll agree, depending on what you mean by proper. I'd be interested in : having some means to perform set operations in

Re: Lingering questions about Junctions.

2005-02-21 Thread Larry Wall
On Sun, Feb 20, 2005 at 02:45:36AM +0100, Stefan Lidman wrote: : Junctions should be on or off by default, I prefer on. : Having them half-on is bad. : : Because if it is half-on people(me) is going to write : C if $x == 3 | 5 | 7 { in N places then have to : change it and remember to change it

Re: Question about pairs

2005-02-21 Thread Larry Wall
On Mon, Feb 21, 2005 at 02:07:10PM +, osfameron wrote: : In Perl 6, C = is a fully-fledged anonymous object constructor -- : like C[...] and C{...}. The objects it constructs are called : pairs : and they consist of a key (the left operand of the C = ), and a : value : (the

Re: Slurpy nullary vs nonslurpy nullary

2005-02-21 Thread Larry Wall
On Sat, Feb 19, 2005 at 12:44:49AM +0800, Autrijus Tang wrote: : On Fri, Feb 18, 2005 at 08:26:26AM -0800, Larry Wall wrote: : So I think your initial solution is actually the right one from the : viewpoint of the Perl programmer. If we need to tweak something, : it's perhaps to document the

Re: Slurpy nullary vs nonslurpy nullary

2005-02-21 Thread Damian Conway
Autrijus wrote: A difficulty arises because the expressions used as arguments is not evaluated when arityMatch is done, and for good reason -- they may do wildly different things depending on its context. When Pugs was only implementing FP6, I could affort to force evaluation for each

Re: TAP docs

2005-02-21 Thread Andrew Pimlott
In certain instances a test file may not know how many test points it will ultimately be running. In this case the plan can be the last non-diagnostic line in the output. This feature is new to me--and I have to say, it seems nearly useless. I consider that the primary purpose of a

Re: Fun with junctions (was Sets vs Junctions)

2005-02-21 Thread David Storrs
On Mon, Feb 21, 2005 at 11:01:45AM -0800, Larry Wall wrote: But rather than that, I suspect we'll see more use of constructs where the object to be mutated ends up being the topic, as in: some_complicated_lvalue() but= { .sortmyway(foo($_),bar($_)) } which would presumably do the

Re: TAP docs

2005-02-21 Thread Andy Lester
This feature is new to me--and I have to say, it seems nearly useless. It's the ages-old argument about the value of the plan. Some people don't like the plan, and some do. was expected. I propose to fix this by allowing, in place of a plan at the beginning, something like the line ends with

Re: TAP docs

2005-02-21 Thread Andrew Pimlott
On Mon, Feb 21, 2005 at 08:31:43PM -0600, Andy Lester wrote: This feature is new to me--and I have to say, it seems nearly useless. It's the ages-old argument about the value of the plan. Some people don't like the plan, and some do. I don't mean the plan is new, only the plan at the end.

Re: TAP docs

2005-02-21 Thread Fergal Daly
On Mon, Feb 21, 2005 at 08:31:43PM -0600, Andy Lester wrote: was expected. I propose to fix this by allowing, in place of a plan at the beginning, something like the line ends with plan. In effect, finding ok 1 as the first line means ends with plan. I think that's not mentioned

Re: TAP docs

2005-02-21 Thread Andy Lester
If your tests are numbered then a plan is mandatory. In certain instances a test file may not know how many test points it will ultimately be running. In this case the plan can be the last non-diagnostic line in the output. The plan has to exist, whether it's the first or last line. I've added

Re: TAP docs

2005-02-21 Thread Andrew Pimlott
On Mon, Feb 21, 2005 at 08:58:46PM -0600, Andy Lester wrote: The plan has to exist, whether it's the first or last line. I've added that to the docs. Ah, that clarifies it. I misunderstood the current situation--I didn't realize that Test::More automatically adds the plan at the bottom when

Re: Question about pairs

2005-02-21 Thread Steve Peters
On Mon, Feb 21, 2005 at 11:32:16AM -0800, Larry Wall wrote: On Mon, Feb 21, 2005 at 02:07:10PM +, osfameron wrote: : In Perl 6, C = is a fully-fledged anonymous object constructor -- : like C[...] and C{...}. The objects it constructs are called : pairs : and they consist of

Re: Slurpy nullary vs nonslurpy nullary

2005-02-21 Thread Autrijus Tang
On Tue, Feb 22, 2005 at 09:41:54AM +1100, Damian Conway wrote: Personally, I think the only reasonable way of resolving this is to assume (as in the last paragraph above) that function calls in these kinds of indeterminate contexts are always in list context. So, even if the clash is Num vs

Re: Sets vs Junctions

2005-02-21 Thread Jonathan Lang
Larry Wall wrote: Michele Dondi wrote: : Jonathan Lang wrote: : If we want Sets in Perl, we should have proper Sets. : : I'll agree, depending on what you mean by proper. I'd be : interested in having some means to perform set operations in perl6: : unions, intersections,