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?
> Also, if you add lots of tests in a single method, (again as I understand)
> they will stop a
Scott Bronson wrote:
That's the plan? Happy day! I was not aware of that. Because I didn't
see anything about this in Perl 6 Essentials, I just figured that
Perl5's '0'==undef was being brought forward into Perl6. The horror!
Sorry for the bad assumption. :)
Perhaps not as happy as you think:
--- 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 ''{ print "''\n";} # I assume this won't print.
> > if undef { pr
Juerd wrote:
That we already have. "0 but true". (perldoc -f fcntl)
It's 1 but false that's really special :)
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, or interesting values of undef :-)
On 24/06/2004, at 6:31 PM, Leopold Toetsch wrote:
i still have my stillborn bignum (using bcd registers and efficient
algorithms) implementation if anyone wants to pick it up. i have some
working base code and the overall design.
The major problem is: we need bignum now^Wtomorrow^WRSN. The Pie-thon
Paul Hodges writes:
> I seemed to have opened a can of worms, lol
> But did anybody see the one that had something to do with my question
> crawling around? (I've obviously missed a couple of messages. They're
> probably hanging out down at the router in the cyberspace equivelent of
> teenagers
I seemed to have opened a can of worms, lol
But did anybody see the one that had something to do with my question
crawling around? (I've obviously missed a couple of messages. They're
probably hanging out down at the router in the cyberspace equivelent of
teenagers ogling girls on the street c
On Thu, 2004-06-24 at 14:17, Smylers wrote:
> Because the above would've been insane: saying that C treats
> $x as a string would be pretending that C always treats its
> arguments as numbers, but something such as C doesn't
> have any numbers in it.
Doesn't it?
perl -e '$x = "frog"; print(($x
> -Original Message-
> From: Dave Whipp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 5:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: definitions of truth
>
> "Larry Wall" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > This is Perl 6. Everything is an o
Rod Adams writes:
> Come the glorious age of Perl6, will hash slices be enhanced to allow
> things like the following?
>
> [EMAIL PROTECTED]'expected'} = [EMAIL PROTECTED];
Well, you can always do this:
[EMAIL PROTECTED] = [EMAIL PROTECTED];
But I definitely look forward to the definitions
Come the glorious age of Perl6, will hash slices be enhanced to allow
things like the following?
[EMAIL PROTECTED]'expected'} = [EMAIL PROTECTED];
Specifically, having the slice be something other than the last element.
This likely dictates having {} be able access a list of of hashrefs, not
jus
On Thu, Jun 24, 2004 at 03:24:25PM -0700, Scott Walters wrote:
: I want an "okay". Routines should be able to "return okay" to indicate
: an ambivalent degree of success. "okay" would be defined as "true | false",
Some messages want to be simultaneously Warnocked and not Warnocked...
Larry
On Thu, Jun 24, 2004 at 09:10:09PM +0100, 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
Austin Hastings skribis 2004-06-24 15:54 (-0700):
> I'd say yeah, it is. 0-but-true is pretty nice to have. (Finally the
> system calls can return something other than -1.)
That we already have. "0 but true". (perldoc -f fcntl)
It's 1 but false that's really special :)
Juerd
--- Juerd <[EMAIL PROTECTED]> wrote:
> Austin Hastings skribis 2004-06-24 14:29 (-0700):
> > > $foo as boolean
> > "This is Perl 6. Everything is an object, or at least pretends to
> > be one. Everything has a .boolean method that returns 0 or 1."
>
> If I understand the current design correctl
Austin Hastings skribis 2004-06-24 14:29 (-0700):
> > $foo as boolean
> "This is Perl 6. Everything is an object, or at least pretends to
> be one. Everything has a .boolean method that returns 0 or 1."
If I understand the current design correctly, having both .boolean and
casting via "as" woul
On 0, Juerd <[EMAIL PROTECTED]> wrote:
>
> However, is the name "boolean" final? I would prefer "true", perhaps
> with a corresponding "false".
I want an "okay". Routines should be able to "return okay" to indicate
an ambivalent degree of success. "okay" would be defined as "true | false",
so:
--- Dave Whipp <[EMAIL PROTECTED]> wrote:
> "Larry Wall" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > This is Perl 6. Everything is an object, or at least pretends to
> be one.
> > Everything has a .boolean method that returns 0 or 1. All
> conditionals
> > call the .bool
"Larry Wall" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> This is Perl 6. Everything is an object, or at least pretends to be one.
> Everything has a .boolean method that returns 0 or 1. All conditionals
> call the .boolean method, at least in the abstract.
My reading of A12 l
Scott Bronson writes:
> On Thu, 2004-06-24 at 11:34, Smylers wrote:
>
> > But you're fine with 0 being false? 0 and '0' are pretty much
> > interchangeable in Perl 5 -- wherever you can use one, you can use
> > the other and it gets coerced to it.
>
> Let's back up... Strings and numbers are m
On Thu, Jun 24, 2004 at 04:19:25PM -0400, Jonadab the Unsightly One wrote:
: Larry Wall wrote:
:
: >What do you mean by "length"?
:
: For a string, it obviously either means number of bytes or number
: of characters. Pick one, document it, and let people who want the
: other semantic use a pra
Michele Dondi writes:
> This is yet another proposal that is probably a few years late. I've had
> some (admittedly limited) experience with S-Lang in the past: the language
> has currently a syntax that resembles much that of C but was originally
> designed to be strongly stack-based and still
Andy Wardley <[EMAIL PROTECTED]> writes:
> Dan Sugalski wrote:
>> it's not exactly exciting watching two people hit return three times
>> in front of a roomful of people.
>
> Although watching two people hit each other in the face with custard
> pies three times in front of a roomful of people m
Michele Dondi writes:
> On Tue, 22 Jun 2004, Juerd wrote:
>
> > > rename -v => 1, $orig, $new;
> [snip]
> > I think just using named arguments would be better and much easier.
> >
> > sub rename ($old, $new, +$verbose) {
> > say "Renaming '$old' to '$new'" if $verbose;
>
>
> On Tue, 22 Ju
--- Tony Bowden <[EMAIL PROTECTED]> wrote:
> The big gain for me with Test::Class is inheritable tests. Subclasses
> can ensure they still pass all their parent's tests, as well as all of
> their own, without me having to copy all the tests, or set up a really
> clumsy testing environment. And of c
Larry Wall wrote:
What do you mean by "length"?
For a string, it obviously either means number of bytes or number
of characters. Pick one, document it, and let people who want the
other semantic use a pragma.
I don't think it matters which one you pick as default, as long
as it's clearly documen
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 thing and
should move to a different cla
Larry Wall skribis 2004-06-24 12:24 (-0700):
> Well, the type/property name doesn't have to be "boolean"--it could
> be "truth", instead.
I understand that 'true' and 'false' can't be used.
However, "truth" is in the same category as "definedness", and
$foo.definedness looks awful :)
Perhaps fo
There are currently 19 bignum vtable slots, which take a BIGNUM* value
argument of some kind. These are IMHO useless. We don't have a Parrot
basic type like BIGNUM.
A BIGNUM (BigInteger, BigNumber) will just be a PMC, AFAIK.
So I think these entries should just get deleted.
leo
On Thu, 2004-06-24 at 11:34, Smylers wrote:
> Scott Bronson writes:
> But you're fine with 0 being false? 0 and '0' are pretty much
> interchangeable in Perl 5 -- wherever you can use one, you can use the
> other and it gets coerced to it.
Let's back up... Strings and numbers are meant to be int
On Thu, 2004-06-24 at 11:59, Andrew Pimlott wrote:
> Every time I hear about xUnit, I figure there must be something other
> than "setup and teardown" in its favor. If that's all there is, I'm not
> sold.
It's the best option for languages that enforce a nominally pure OO
style.
(During the tec
On Thu, Jun 24, 2004 at 08:44:45PM +0200, Juerd wrote:
: Larry Wall skribis 2004-06-24 11:29 (-0700):
: > This is Perl 6. Everything is an object, or at least pretends to be one.
: > Everything has a .boolean method that returns 0 or 1. All conditionals
: > call the .boolean method, at least in t
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 so
it's better", I'd be interested in seein
On Thu, 24 Jun 2004, Piers Cawley wrote:
> Dan Sugalski <[EMAIL PROTECTED]> writes:
>
> > Sorry this one sat so long. (Piers reminded me with the summary)
>
> It worked then '
And not for the first
On Thu, Jun 24, 2004 at 07:09:40AM +0100, Piers Cawley wrote:
> The xUnit style framework does a much better job of enforcing test
> isolation than Test::More does
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.
Dan Sugalski <[EMAIL PROTECTED]> writes:
> On Sun, 20 Jun 2004, Ion Alexandru Morega wrote:
>
>> Dan Sugalski wrote:
>> > I checked in more of PDD 17, detailing parrot's base types. Some of
>> > those types definitely don't exist (like, say, the string and bignum
>> > type...) and could definitely
Larry Wall skribis 2004-06-24 11:29 (-0700):
> This is Perl 6. Everything is an object, or at least pretends to be one.
> Everything has a .boolean method that returns 0 or 1. All conditionals
> call the .boolean method, at least in the abstract. (The optimizer is
> free to optimize the method c
Scott Bronson writes:
> On Thu, 2004-06-24 at 08:04, Jonadab the Unsightly One wrote:
>
> > > In Perl5, the following values are FALSE: undef, '0', 0, and ''.
>
> > ... The really special case is '0', which is false for arcane (but
> > very sensible) reasons.
>
> I don't agree that '0' being fa
On Thu, Jun 24, 2004 at 08:04:10PM +0200, Juerd wrote:
: Scott Bronson skribis 2004-06-24 10:44 (-0700):
: > However, it seems that because Perl is finally getting a typing system,
: > this hack can be fixed in Perl itself! No programmer intervention
: > needed. Undef and '' can be false for stri
On Tue, Jun 22, 2004 at 11:50:03AM -0600, Luke Palmer wrote:
: That one doesn't work. Named arguments have to come at the end of the
: parameter list (just before the "data list", if there is one). This is
: a decision I'm gradually beginning to disagree with, because of:
:
: sub repeat (&co
Scott Bronson skribis 2004-06-24 10:44 (-0700):
> However, it seems that because Perl is finally getting a typing system,
> this hack can be fixed in Perl itself! No programmer intervention
> needed. Undef and '' can be false for strings, undef and 0 can be false
> for integers, undef, 0, and 0.0
On Thu, 2004-06-24 at 10:44, Scott Bronson wrote:
> I don't agree that '0' being false is sensible...
I don't mean to imply that I think it's senseless. Just that, to me, it
smells suspiciously like a hack. :)
- Scott
On Thu, Jun 24, 2004 at 11:59:03AM +0100, Matthew Walton wrote:
: -BEGIN PGP SIGNED MESSAGE-
: Hash: SHA1
:
: Michele Dondi wrote:
:
: | I don't know if this is already provided by current specifications, but
: | since I know of Perl6 that is will support quite a powerful system of
: | fu
On 24 Jun 2004, at 07:09, Piers Cawley wrote:
[snip]
The xUnit style framework does a much better job of enforcing test
isolation than Test::More does (but you have to remember that what
Test::More thinks of as a test, xUnit thinks of as an assertion to be
used *in* a test).
To be fair to Test::Mor
On Thu, 2004-06-24 at 08:04, Jonadab the Unsightly One wrote:
> > In Perl5, the following values are FALSE: undef, '0', 0, and ''.
> ... The really special case is '0', which
> is false for arcane (but very sensible) reasons.
I don't agree that '0' being false is sensible. This, plus less than
vi
On Thu, Jun 24, 2004 at 12:34:44PM +0200, Michele Dondi wrote:
: I don't know if this is already provided by current specifications, but
: since I know of Perl6 that is will support quite a powerful system of
: function prototyping ("signatures"?), I wonder wether it will be possible
: to specify a
> The other concern I've had with our style of xUnit testing is that we're testing
> behavior, but not
> the actual data. With Test::More, we tested against a copy of the live database
> (when possible --
> but this definitely caused some issues) and we sometimes caught data problems that
> xU
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 2:38 PM +0200 6/11/04, Bernhard Schmalhofer wrote:
>>how about having complex numbers as another basic PMC?
>>At least QCL, http://tph.tuwien.ac.at/~oemer/qcl.html, C99 and PDL,
>>http://pdl.perl.org/, have them as a basic type.
As well as Python.
> F
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> I just went digging through the docs to make sure I knew what was going
> on. __repr__ is the python-visible name for our get_string vtable method.
> We don't need any support beyond tying names together in the namespaces,
> so far as I can see.
Sure?
>>
Hi,
I've run into "Can't call method "add_statement" on an undefined value"
running Devel::Cover. Apologies if this was reported before, but the
list archive is not searchable. I am using perl 5.8.4 and Devel::Cover 0.46.
To reproduce the bug, run
/opt/perl/bin/perl -MDevel::Cover -MFooBar -e "F
--- Piers Cawley <[EMAIL PROTECTED]> wrote:
> The xUnit style framework does a much better job of enforcing test
> isolation than Test::More does (but you have to remember that what
> Test::More thinks of as a test, xUnit thinks of as an assertion to be
> used *in* a test).
After working with xUn
In Perl5, the following values are FALSE: undef, '0', 0, and ''.
What you fail to note is that each of these is false for a reason.
undef is false so that you can test an object for truth; if it
is undef it obviously contains no data, so it's false. 0 is false
so that you can test numbers for tru
Every now and then I have this discussion with people at work that involve Perl's
ideas of boolean truth. I usually break it down like this:
In Perl5, the following values are FALSE: undef, '0', 0, and ''.
Anything not in that list is considered TRUE in a boolean context. That means that
Perl
On Thu, Jun 24, 2004 at 12:06:14PM +0200, Michele Dondi wrote:
> However I wonder if an implicit stack could be provided for return()s into
> void context. It is well known that currently split() in void context has
> the bad habit of splitting into @_, which is the reason why doing that is
> de
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 there any reason why the vtable is key, value but the ex
# New Ticket Created by Ion Alexandru Morega
# Please include the string: [perl #30444]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=30444 >
Here's the patch, all the tests should pass now. I'm working on some
more te
> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
LT> Uri Guttman wrote:
>>> "SB" == Scott Bronson <[EMAIL PROTECTED]> writes:
SB> Has anybody inquired to the GMP project as to the possibility
>> of
SB> relaxing that restriction? If GMP truly is the best bignum
SB> impleme
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michele Dondi wrote:
| I don't know if this is already provided by current specifications, but
| since I know of Perl6 that is will support quite a powerful system of
| function prototyping ("signatures"?), I wonder wether it will be possible
| to speci
Ion Alexandru Morega wrote:
In the mean time i fixed some things that were wrong, added a few
functions and the tests. I found some weird things while doing this,
probably bugs. So here's the patch i promised.
Can you please rediff string.pmc - it is in the CVS already, but you did
provide the w
I don't know if this is already provided by current specifications, but
since I know of Perl6 that is will support quite a powerful system of
function prototyping ("signatures"?), I wonder wether it will be possible
to specify a (finite number of) argument(s) on the left of functions, thus
allowing
This is yet another proposal that is probably a few years late. I've had
some (admittedly limited) experience with S-Lang in the past: the language
has currently a syntax that resembles much that of C but was originally
designed to be strongly stack-based and still is behind the scenes, a
conse
On Tue, 22 Jun 2004, Juerd wrote:
> > rename -v => 1, $orig, $new;
[snip]
> I think just using named arguments would be better and much easier.
>
> sub rename ($old, $new, +$verbose) {
> say "Renaming '$old' to '$new'" if $verbose;
On Tue, 22 Jun 2004, Brent 'Dax' Royal-Gordon wrote:
> I
Dan Sugalski wrote:
> it's not exactly exciting watching two people hit return three times
> in front of a roomful of people.
Although watching two people hit each other in the face with custard
pies three times in front of a roomful of people may be a lot more fun.
Progamming language benchmar
Dan Sugalski wrote:
On Sun, 20 Jun 2004, Ion Alexandru Morega wrote:
Dan Sugalski wrote:
I checked in more of PDD 17, detailing parrot's base types. Some of
those types definitely don't exist (like, say, the string and bignum
type...) and could definitely use implementing. Should be fairly
straigh
Uri Guttman wrote:
"SB" == Scott Bronson <[EMAIL PROTECTED]> writes:
SB> Has anybody inquired to the GMP project as to the possibility of
SB> relaxing that restriction? If GMP truly is the best bignum
SB> implementation, I definitely think it's worth asking.
Not AFAIK. Please try.
i still ha
65 matches
Mail list logo