Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread demerphq
On 7/2/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: > On Sat, Jul 02, 2005 at 09:18:30AM -0700, Ovid wrote: > > In short, I think most agree that we're talking about two separate > > things and that neither is wrong, so if someone wants to pitch a > > solution rather than continue a long email

Re: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Michael Carman
On 7/1/2005 7:39 AM, demerphq wrote: > On 6/30/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: >> Yves has some controversial ideas about what is and is not data structure >> equivalence. I'd like comments on it. > > Well while im disappointed that its considered to be a controversial > position

Re: Fwd: [demerphq@gmail.com: Re: fixing is_deeply]

2005-07-02 Thread Andrew Pimlott
On Sun, Jul 03, 2005 at 01:13:50AM +0100, Fergal Daly wrote: > On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > Can you give me a hint as to the difference in a language like Perl? > > When they are the same reference they are the same reference (can't > think of any other way of saying it

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Andrew Pimlott
On Sat, Jul 02, 2005 at 07:34:47PM +0100, Fergal Daly wrote: > On 7/2/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > Citing "computer science" as the basis of your position is just too > > much. The "computer science" answer to the comparison of references is > > that they are equal if and only

Re: Test::Builder::Tester vs. Test::Tester

2005-07-02 Thread James E Keenan
Nik Clayton wrote: As I write my first set of Test::Builder based tests I'm looking for a way to test the tests themselves, and make sure that they're doing the right thing. A quick peruse of CPAN has thrown up Test::Builder::Tester and Test::Tester. I've seen quite a few modules that use

How to get started with Test::TAP::HTMLMatrix

2005-07-02 Thread Mark Stosberg
Hello, I'd like to use Test::TAP::HTMLMatrix to better visualize the state of large test runs. However, I can't tell from the docs how to run the test suite such that it gets involved in the process. Could someone provide an example? Thanks! Mark -- http://mark.stosberg.com/

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Michael G Schwern
On Sat, Jul 02, 2005 at 09:18:30AM -0700, Ovid wrote: > In short, I think most agree that we're talking about two separate > things and that neither is wrong, so if someone wants to pitch a > solution rather than continue a long email chain, I'm sure we'd be > grateful :) Seconded! Go code someth

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Michael G Schwern
On Sat, Jul 02, 2005 at 09:50:24AM -0700, Andrew Pimlott wrote: > Finally, I think that comparing functions (which started this > discussion) is insane! You haven't done much testing of serialization. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Reality is that w

Re: like, cmp_ok and undef

2005-07-02 Thread Michael G Schwern
On Sat, Jul 02, 2005 at 08:40:48PM +0100, Nicholas Clark wrote: > > something like: > > > > like( $foo, qr/.../ ); > > > > and: > > > > cmp_ok( $foo, 'eq', $bar ); > > > > warning about $foo being undefined? Especially since the test diagnostics > > will let you know about what was und

Re: like, cmp_ok and undef

2005-07-02 Thread Nicholas Clark
On Fri, Jul 01, 2005 at 07:26:16PM -0700, Michael G Schwern wrote: > It seems pretty clear to me that most warnings should not be supressed. > But what about uninit warnings, specificly? Is there any utility to > something like: > > like( $foo, qr/.../ ); > > and: > > cmp_ok( $foo,

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Fergal Daly
On 7/2/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Sat, Jul 02, 2005 at 08:55:34AM +0200, demerphq wrote: > > The entire basis of computer science is based around the idea that if > > you do the same operation to two items that are the same the end > > result is the same. > > Citing "comput

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Fergal Daly
On 7/2/05, Michael Peters <[EMAIL PROTECTED]> wrote: > That's what I'm trying to point out. If we follow the reasoning fully > out then the second call to is_deeply() would need to fail as well as > the first. Try explaining that to the someone using it. > > calls to is_deeply() *need* to behave i

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Michael Peters
Fergal Daly wrote: On 7/2/05, Michael Peters <[EMAIL PROTECTED]> wrote: But if we say x=y and x=z can we then say that x,x != y,z If say $x = []; $y = []; $z = []; is_deeply($x, $y); # passes is_deeply($x, $z): # passes is_deeply([$x,$x], [$y, $z]); # fails for some reason If w

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Andrew Pimlott
On Sat, Jul 02, 2005 at 08:55:34AM +0200, demerphq wrote: > The entire basis of computer science is based around the idea that if > you do the same operation to two items that are the same the end > result is the same. Citing "computer science" as the basis of your position is just too much. The

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Ovid
--- demerphq <[EMAIL PROTECTED]> wrote: > You are playing on some TV gameshow. You've won the big prize: a > house. Now the thing is that the presenter gives you a choice of two > envelopes. Both contain two house addresses. However one contains the > same address twice and the other contains two s

Test::Builder::Tester vs. Test::Tester

2005-07-02 Thread Nik Clayton
As I write my first set of Test::Builder based tests I'm looking for a way to test the tests themselves, and make sure that they're doing the right thing. A quick peruse of CPAN has thrown up Test::Builder::Tester and Test::Tester. I've seen quite a few modules that use Test::Builder::Tester,

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Fergal Daly
Here's a way of looking at it that doesn't require you to consider what happens if you alter the structures. Let's say you have a Person class with a Name an Age and a House class with Owner and Resident. Now imagine there are 2 people who have the same name and age but are different people. my

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Fergal Daly
On 7/2/05, Michael Peters <[EMAIL PROTECTED]> wrote: > But if we say >x=y and x=z can we then say that x,x != y,z > > If say >$x = []; >$y = []; >$z = []; >is_deeply($x, $y); # passes >is_deeply($x, $z): # passes >is_deeply([$x,$x], [$y, $z]); # fails for some reason >

Re: Fwd: [demerphq@gmail.com: Re: fixing is_deeply]

2005-07-02 Thread demerphq
On 7/2/05, Michael Peters <[EMAIL PROTECTED]> wrote: > demerphq wrote: > > >>x=y; but x,x != y,y? > > > > > > but rather > > > > x=y, but x,x != y,z > > But if we say >x=y and x=z can we then say that x,x != y,z > > If say >$x = []; >$y = []; >$z = []; >is_deeply($x, $y); # p

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread demerphq
On 7/2/05, Fergal Daly <[EMAIL PROTECTED]> wrote: > Here's a way of looking at it that doesn't require you to consider > what happens if you alter the structures. > > Let's say you have a Person class with a Name an Age and a House class > with Owner and Resident. > > Now imagine there are 2 peop

Re: Fwd: [demerphq@gmail.com: Re: fixing is_deeply]

2005-07-02 Thread Michael Peters
demerphq wrote: x=y; but x,x != y,y? but rather x=y, but x,x != y,z But if we say x=y and x=z can we then say that x,x != y,z If say $x = []; $y = []; $z = []; is_deeply($x, $y); # passes is_deeply($x, $z): # passes is_deeply([$x,$x], [$y, $z]); # fails for some reason If

Re: Fwd: [demerphq@gmail.com: Re: fixing is_deeply]

2005-07-02 Thread demerphq
On 7/2/05, Michael Peters <[EMAIL PROTECTED]> wrote: > demerphq wrote: > > > I wasn't suggesting that this should fail and wouldnt suggest it should > > either. > > > > I was suggesting that > > > > my $a=[]; > > is_deeply([$a,$a],[[],[]]) > > So doesn't that just come down to > is_deeply([], []

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Michael Peters
demerphq wrote: I wasn't suggesting that this should fail and wouldnt suggest it should either. I was suggesting that my $a=[]; is_deeply([$a,$a],[[],[]]) So doesn't that just come down to is_deeply([], []) failing? Can we really say that x=y; but x,x != y,y? If that is the case, the it is

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Michael G Schwern
On Sat, Jul 02, 2005 at 09:18:35AM +0200, demerphq wrote: > Its too bad that is_deeply() was the name chosen for the weaker > behaviour and I think the docs need to change to reflect that this can > be misleading. It should be absolutely clear from the documentation > that the routine is not checki

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread Michael G Schwern
On Sat, Jul 02, 2005 at 08:55:34AM +0200, demerphq wrote: > > Similar to is(), except that if $this and $that are hash or array > references, it does a deep comparison walking each data structure to > see if they are equivalent. If the two structures are different, it > will display the place wher

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread demerphq
On 7/2/05, chromatic <[EMAIL PROTECTED]> wrote: > On Sat, 2005-07-02 at 08:55 +0200, demerphq wrote: > > > The entire basis of computer science is based around the idea that if > > you do the same operation to two items that are the same the end > > result is the same. Without this there is no pre

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread demerphq
On 7/1/05, Ovid <[EMAIL PROTECTED]> wrote: > --- Piers Cawley <[EMAIL PROTECTED]> wrote: > > I've always thought of C as being about the 'shape' of a > > data > > structure. When you think of things in this way, then it seems > > obvious that given > > > > $a = [], $b = [], $c = [] > > > > then

Re: Fwd: [demerphq@gmail.com: Re: fixing is_deeply]

2005-07-02 Thread chromatic
On Sat, 2005-07-02 at 08:55 +0200, demerphq wrote: > The entire basis of computer science is based around the idea that if > you do the same operation to two items that are the same the end > result is the same. Without this there is no predictability. No > program could ever be expected to run th

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-02 Thread demerphq
On 7/1/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: > On Fri, Jul 01, 2005 at 10:28:29AM -0700, Ovid wrote: > > So, just for the sake of argument, imagine I write a class where I > > periodically returns array refs to the user. I do this by building > > them every time they're called. Later,