Re: definitions of truth

2004-06-25 Thread Paul Hodges
--- Spider Boardman <[EMAIL PROTECTED]> wrote: > At some point in history, Paul Hodges wrote (in part): > ph> So a null byte is still Boolean true. Ugh, yarf, ack, etc. > > No. And it never has been (at least in my world view). A valid point, though I reply: my $x = "\0"; print "true" i

Re: definitions of truth

2004-06-25 Thread Scott Bronson
On Thu, 2004-06-24 at 21:45, Brent 'Dax' Royal-Gordon wrote: > Perhaps not as happy as you think: > > my $foo = '0'; > my String $bar = '0'; > if $foo { say 'foo true' } > if $bar { say 'bar true' } > > Would print 'bar true', but not 'foo true'. Frankly, I love it. Since I plan

Re: definitions of truth

2004-06-25 Thread Spider Boardman
At some point in history, Paul Hodges wrote (in part): ph> So a null byte is still Boolean true. Ugh, yarf, ack, etc. No. And it never has been (at least in my world view). However, asking that question explains some things. See below for more. ph> But as long as I know -- easy enough to che

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Adrian Howard
On 25 Jun 2004, at 16:51, Fergal Daly wrote: [snip] NB: I haven't used xUnit style testing so I could be completely off the mark but some (not all) of these benefits seem to be available in T::M land. Just so I'm clear - I'm /not/ saying any of this is impossible with T::M and friends. That's obv

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Adrian Howard
On 24 Jun 2004, at 19:59, Andrew Pimlott wrote: [snip] - You don't have much control (correct me if I'm wrong) about the order of tests, or the relationship between tests, eg you can't say "if this test fails, skip these others". This is straightforward in Test::More's simple procedural sty

Re: WWW::Mechanize and ASP.NET

2004-06-25 Thread Andy Lester
On Fri, Jun 25, 2004 at 03:35:38PM -0400, Potozniak, Andrew ([EMAIL PROTECTED]) wrote: > Has anyone encountered some really odd errors, namely status 500 errors when > surfing to ASP.Net files only through means of WWW::Mechanize? What is the error that is showing up in the log file on your ASP.Ne

Re: confused parameter order asking for trouble

2004-06-25 Thread Nicholas Clark
On Fri, Jun 25, 2004 at 02:43:14PM +0200, Leopold Toetsch wrote: > Nicholas Clark <[EMAIL PROTECTED]> wrote: > > On Fri, Jun 25, 2004 at 09:46:53AM +0200, Leopold Toetsch wrote: > >> > >> Yep. I'd swap function names as well as argument order, so that > >> everything matches the vtable prototype. >

The benchmarks: b6.py (was: The Pie-thon benchmark)

2004-06-25 Thread Leopold Toetsch
Dan Sugalski wrote: ftp://python.org/pub/python/parrotbench/parrotbench.tgz It's pretty evil, and there's a chunk of "let's exercise python's builtins just because" code in there. Yep that's it, you can omit the word "pretty", though. Worth taking a look at, as we may well enlist the aid of the li

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Adrian Howard
On 25 Jun 2004, at 20:18, Andy Lester wrote: Repetition is good. I feel very strongly that you should be checking your constructor results in every single test, and checked against literals, not variables. I'm not complaining about repetitive tests, and I agree with what you said about testing co

WWW::Mechanize and ASP.NET

2004-06-25 Thread Potozniak, Andrew
Has anyone encountered some really odd errors, namely status 500 errors when surfing to ASP.Net files only through means of WWW::Mechanize? Andrew Potozniak Administrative Computing Student Assistant State Unive

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Nicholas Clark
On Fri, Jun 25, 2004 at 02:18:49PM -0500, Andy Lester wrote: > Tests are all about quantity. I always thought that tests were about malice: "I bet the programmer didn't think of this..." "What happens if I just do this..." "Mmm, I wonder if it covers this corner case?" "Eat pathological data and

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Andy Lester
On Fri, Jun 25, 2004 at 04:51:29PM +0100, Fergal Daly ([EMAIL PROTECTED]) wrote: > > * I never have to type repetitive tests like > > > > isa_ok Foo->new(), 'Foo' > > > > again because it's handled by a base class that all my test classes > > inherit from. Repetition is good. I feel very s

Re: more than one modifier

2004-06-25 Thread Luke Palmer
Juerd writes: > StÃphane Payrard skribis 2004-06-25 16:15 (-0400): > > It is unpossible to stack loop modifiers without adding > > conventions denoting the iterators. > > Is it really? I've always thought this would be useful enough: > > say .{foo} for @$_ for @foo; > > Although that can pro

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Adrian Howard
On 24 Jun 2004, at 21:10, Tony Bowden wrote: On Thu, Jun 24, 2004 at 02:59:30PM -0400, Andrew Pimlott wrote: I see this more as a limitation than a feature. It seems to mean that - You need to use the same setup/teardown for all your tests. Those that need different things aren't testing the same

Re: definitions of truth

2004-06-25 Thread Brent 'Dax' Royal-Gordon
Paul Hodges wrote: So a null byte is still Boolean true. But just tell me thisam I the only guy who thinks this *feels* wierd? Understanding the reason doesn't make it any more ~comfortable~. I think you are. Perl considers null to be data--it's that simple. Remember, while Perl can work with

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Andrew Pimlott
Ok, now that I understand what library you're using ... On Fri, Jun 25, 2004 at 04:41:15PM +0100, Tony Bowden wrote: > On Fri, Jun 25, 2004 at 11:10:19AM -0400, Andrew Pimlott wrote: > > I was responding to your suggestion to put all the tests in one method > > if they are just parametrized by dat

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Ovid
--- Andrew Pimlott <[EMAIL PROTECTED]> wrote: > Now I'm confused too. None of the Test::Unit examples I've seen use > "is", they use some form of assert. You were looking at Test::Class code, not Test::Unit code. Cheers, Ovid = Silence is Evilhttp://users.easystreet.com/ovid/phi

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Andrew Pimlott
On Fri, Jun 25, 2004 at 04:41:15PM +0100, Tony Bowden wrote: > On Fri, Jun 25, 2004 at 11:10:19AM -0400, Andrew Pimlott wrote: > > I was responding to your suggestion to put all the tests in one method > > if they are just parametrized by data. How do you suggest writing the > > equivalent of > >

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Adrian Howard
On 25 Jun 2004, at 16:10, Andrew Pimlott wrote: [snip] I thought the "isolation" principle that people were talking about is that before every test, a "setup" method is called, and after every test a "teardown" is called, automatically by the test harness. This seems to require one method == one

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Fergal Daly
On Fri, Jun 25, 2004 at 04:05:09PM +0100, Adrian Howard wrote: > > On 24 Jun 2004, at 20:19, Andrew Pimlott wrote: > > >On Thu, Jun 24, 2004 at 05:08:44PM +0100, Adrian Howard wrote: > >>Where xUnit wins for me are in the normal places where OO is useful > >>(abstraction, reuse, revealing intenti

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Tony Bowden
On Fri, Jun 25, 2004 at 11:10:19AM -0400, Andrew Pimlott wrote: > I thought the "isolation" principle that people were talking about is > that before every test, a "setup" method is called, and after every test > a "teardown" is called, automatically by the test harness. This > seems to require on

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Adrian Howard
On 24 Jun 2004, at 21:41, Ovid wrote: [snip] I also like the thought of inheriting tests, but I know not everyone is fond of this idea. There was a moderately interesting discussion about this on Perlmonks: http://www.perlmonks.org/index.pl?node_id=294571 [snip] Yeah, I meant to contribute to tha

Re: our own decimal math lib

2004-06-25 Thread Jerome Quelin
On Friday 25 June 2004 03:47, André Pang wrote: > It only seems fair to be using the same library as Python, if you want > a decent bignum speed comparison. We don't mind being unfair, as long as parrot's winning :-) Jerome -- [EMAIL PROTECTED]

Re: confused parameter order asking for trouble

2004-06-25 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Fri, Jun 25, 2004 at 09:46:53AM +0200, Leopold Toetsch wrote: >> >> Yep. I'd swap function names as well as argument order, so that >> everything matches the vtable prototype. > void Parrot_PMC_set_intkey_intval(Parrot_INTERP interp, Parrot_PMC > pmc

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Andrew Pimlott
On Fri, Jun 25, 2004 at 07:35:26AM +0100, Tony Bowden wrote: > On Thu, Jun 24, 2004 at 07:13:08PM -0400, Andrew Pimlott wrote: > > But (I thought) the idea was that every test needs the same setup. If > > they're all in one method, they won't get that. > > How's that? I thought the "isolation"

Devel::Cover and nested subroutines

2004-06-25 Thread Geoffrey Young
hi paul :) I recently discovered an issue with nested subroutines while using Devel::Cover with Parse::Yapp. the basic issue is that some subroutines are not discovered by Devel::Cover and thus no metrics are generated. there are two files in the tarball. Foo.pm is a minimal test case showing t

Re: C/C++ White-Box Unit Testing and Test::More

2004-06-25 Thread Adrian Howard
On 24 Jun 2004, at 20:19, Andrew Pimlott wrote: On Thu, Jun 24, 2004 at 05:08:44PM +0100, Adrian Howard wrote: Where xUnit wins for me are in the normal places where OO is useful (abstraction, reuse, revealing intention, etc.). Since you've thought about this, and obviously don't believe "it's OO

Re: more than one modifier

2004-06-25 Thread Juerd
Stéphane Payrard skribis 2004-06-25 16:15 (-0400): > It is unpossible to stack loop modifiers without adding > conventions denoting the iterators. Is it really? I've always thought this would be useful enough: say .{foo} for @$_ for @foo; Although that can probably just be written as: s

Re: more than one modifier

2004-06-25 Thread Stéphane Payrard
On Fri, Jun 25, 2004 at 03:38:51PM +0200, [EMAIL PROTECTED] wrote: > > >Hello, > > I have a wish for Perl6. I think it would be nice to have the possibility > for more than one modifier after a simple statement. > > For example: > >print $a+$b if $a if $b for 1..3; > > > Gerd P

Re: more than one modifier

2004-06-25 Thread Juerd
Please configure your email client correctly. (I'm surprised that the message was accepted, even) [EMAIL PROTECTED] skribis 2004-06-25 13:38 (-): > I have a wish for Perl6. I think it would be nice to have the possibility > for more than one modifier after a simple statement. Has been di

more than one modifier

2004-06-25 Thread perl6-all-return-51707-archive=jab . org
Hello, I have a wish for Perl6. I think it would be nice to have the possibility for more than one modifier after a simple statement. For example: print $a+$b if $a if $b for 1..3; Gerd Pokorra E-Mail: [EMAIL PROTECTED]

Re: definitions of truth

2004-06-25 Thread Jonadab the Unsightly One
Paul Hodges wrote: So a null byte is still Boolean true. Ugh, yarf, ack, etc. But as long as I know -- easy enough to check explicitly. But just tell me thisam I the only guy who thinks this *feels* wierd? It doesn't feel weird to me, but my previous languages of choice were fairly high-level (

Re: definitions of truth

2004-06-25 Thread John Macdonald
On Thu, Jun 24, 2004 at 08:23:39PM -0700, Paul Hodges wrote: > --- Luke Palmer <[EMAIL PROTECTED]> wrote: > So a null byte is still Boolean true. > Ugh, yarf, ack, etc. > > But as long as I know -- easy enough to check explicitly. > > But just tell me thisam I the only guy who thinks this *fe

Re: confused parameter order asking for trouble

2004-06-25 Thread Nicholas Clark
On Fri, Jun 25, 2004 at 09:46:53AM +0200, Leopold Toetsch wrote: > Nicholas Clark <[EMAIL PROTECTED]> wrote: > > I've just fallen into this trap, and I doubt I'll be the last one: > > > void Parrot_PMC_set_intval_intkey(Parrot_INTERP interp, Parrot_PMC pmc, Parrot_Int > > value, Parrot_Int key) {

Re: definitions of truth

2004-06-25 Thread Matthew Walton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Hodges wrote: | --- Luke Palmer <[EMAIL PROTECTED]> wrote: | |>Paul Hodges writes: |> |>>So, in P6: |>> |>> if 0 { print "0\n"; } # I assume this won't print. |>> if '0' { print "'0'\n"; } # I assume this won't print. |>> if ''{

Re: [perl #30444] [PATCH] string.pmc

2004-06-25 Thread Ion Alexandru Morega
Leopold Toetsch wrote: Ion Alexandru Morega <[EMAIL PROTECTED]> wrote: ... then i'll rewrite perlstring.pmc and possibly the other perlscalar subclasses (derive them from Float, Integer, etc) if that's needed. I think, we should have scalar Integer Boolean PerlInt Float PerlNum

Re: definitions of truth

2004-06-25 Thread David Storrs
On Thu, Jun 24, 2004 at 12:43:30PM -0700, Scott Bronson wrote: > > So, in summary, though "0"==false appears to work, it leads to a number > of strange boundary conditions and, therefore, bugs. It's hard for new > programmers to grasp and even old hacks are still sometimes tripped up > by it. It

Re: user-defined operators?

2004-06-25 Thread Matthew Walton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Larry Wall wrote: | Same in Perl 6. For instance, to call the binary addition operator | C<< $a + $b >> by its "true name", you'd say C<< infix:+($a,$b) >>. | When you define an operator, you always use the "true name" form. I immediately start to feel

Re: definitions of truth

2004-06-25 Thread Juerd
Jonadab the Unsightly One skribis 2004-06-24 22:11 (-0400): > No, what's really special is the ability to return entirely > different things in string versus numeric context, like the > magic $! does in Perl5. That too already works in Perl 5. See dualvar in Scalar::Util. Perl 6 is very neat, but

Re: our own decimal math lib

2004-06-25 Thread Leopold Toetsch
André pang <[EMAIL PROTECTED]> wrote: > On 24/06/2004, at 6:31 PM, Leopold Toetsch wrote: >> The major problem is: we need bignum now^Wtomorrow^WRSN. The Pie-thon >> benchmarks does use long (integer?) arithmetics: +, - *, //, % AFAIK. > Is there a big problem with using GMP for the purposes of t

Re: confused parameter order asking for trouble

2004-06-25 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > I've just fallen into this trap, and I doubt I'll be the last one: > void Parrot_PMC_set_intval_intkey(Parrot_INTERP interp, Parrot_PMC pmc, Parrot_Int > value, Parrot_Int key) { > VTABLE_set_integer_keyed_int(interp, pmc, key, value); >} > Is ther

Re: [perl #30444] [PATCH] string.pmc

2004-06-25 Thread Leopold Toetsch
Ion Alexandru Morega <[EMAIL PROTECTED]> wrote: > Here's the patch, all the tests should pass now. Yep. Thanks, applied. > ... then i'll rewrite perlstring.pmc and possibly the other > perlscalar subclasses (derive them from Float, Integer, etc) if that's > needed. I think, we should have scal