From: Eric Wilhelm <[EMAIL PROTECTED]>
> # The following was supposedly scribed by
> # David Golden
> # on Monday 28 February 2005 07:07 pm:
>
> >Which would you prefer?
> >
> >á á $ perl -le '$x=1/0; print $x+1' á á
> >á á Illegal division by zero at -e line 1.
> >
> >or
> >
> >á á $ perl -le '$x=
* Eric Wilhelm <[EMAIL PROTECTED]> [2005-03-01 06:45]:
> >Think about 1/(1/0) == 2/(1/0).
>
> That sounds about right.
So you accept 1 == 2? Go ahead, then. :-)
> A real-world example where you really do want to operate on
> infinities is when you want to compare slopes of lines. If
> $l[0][1]
Austin Schutz wrote:
I suppose I could try to create a use divide 0/undef/inf/crap pragma.
Then you could do whatever you want. You'd still get a surprise if you ever
forgot it though..
I think that's the best answer. Not a good idea for most programs,
wonderful idea for math programs - which
On Feb 28, 2005, at 7:55 PM, Eric Wilhelm wrote:
# The following was supposedly scribed by
# David Golden
# on Monday 28 February 2005 07:07 pm:
Which would you prefer?
$ perl -le '$x=1/0; print $x+1'
Illegal division by zero at -e line 1.
or
$ perl -le '$x=1/0; print $x+1'
On Tue, Mar 01, 2005 at 12:50:35AM -0800, Austin Schutz wrote:
> I don't know, but I do know that having the interpreter crap out
> is not helpful to most of us simpletons who find phrases like "core dumped"
> not especially user friendly.
If you haven't loaded some external module written i
On Tue, Mar 01, 2005 at 08:13:46AM +, Fergal Daly wrote:
> On Mon, Feb 28, 2005 at 07:55:36PM -0600, Eric Wilhelm wrote:
> > I like the one where you get the mathematically-correct (or at least
> > mathematically-useful) infinity.
> >
> > $perl -le 'use bigint; $x = 1/0; print $x+1'
> > i
On Mon, Feb 28, 2005 at 07:55:36PM -0600, Eric Wilhelm wrote:
> I like the one where you get the mathematically-correct (or at least
> mathematically-useful) infinity.
>
> $perl -le 'use bigint; $x = 1/0; print $x+1'
> inf
>
> $perl -le 'use bigint; $x = 1/0; print 1/$x'
> 0
and what sh
# The following was supposedly scribed by
# A. Pagaltzis
# on Monday 28 February 2005 11:24 pm:
>Are you *really* sure you want to do that?
Yes. And don't try to take it away from me. My right to shoot myself
in the foot is as important as my right to bear arms.
>Think about 1/(1/0) == 2/(1/0
* Eric Wilhelm <[EMAIL PROTECTED]> [2005-03-01 04:25]:
> $perl -le 'use bigint; $x = 1/0; print 1/$x'
> 0
Oh la la.
Are you *really* sure you want to do that?
Think about 1/(1/0) == 2/(1/0).
You really don't want to actually operate on infinities.
Regards,
--
Aristotle
"If you can't laugh
# The following was supposedly scribed by
# David Golden
# on Monday 28 February 2005 07:07 pm:
>Which would you prefer?
>
> $ perl -le '$x=1/0; print $x+1'
> Illegal division by zero at -e line 1.
>
>or
>
> $ perl -le '$x=1/0; print $x+1'
> 1
I like the one where you get the
Aristotle,
Try
perlfunc system
just for a start.
Surely you mean
perldoc -f system
? :)
Sorry; yes, that's what I meant. I aliased that so long ago I forgot it
wasn't built in.
-- Buddy
Austin Schutz wrote:
This is not related to the original topic, but I've always
wondered this: In math a number divided by 0 is "undefined". Why is it
that in a language which has an undefined value does the interpreter
poop out rather than just having the intuitively obvious behavior of
re
Andrew Savige wrote:
BTW, this slip-up is also a good advertisement for ensuring that your
test suite tests all examples given in your documentation to ensure
that they actually work.
Hey, good point. I'll start with that, then.
I'm familiar with the make-up of the 16-bit return value of the sy
On Tue, Mar 01, 2005 at 11:43:31AM +1100, Andrew Savige wrote:
> running this Perl program:
>
> use strict;
> sub div_by_zero { exec("./a.out $_[0]"); die "should not be here" }
> defined(my $pid = fork()) or die "fork: $!";
> if ($pid == 0) {
> warn "child, my pid $$\n";
> div_by_zero(0);
Ofer Nave wrote:
>> die( Parallel::errplus() );
> Incidentaly, the above should have read "die( Parallel::Simple::errplus );".
> I left out the 'Simple::'. Amazing where you find bugs nowadays. :)
Call me Mr Magoo. I mis-interpreted the 'Bareword "Parallel::errplus"
not allowed while "strict su
* Buddy Burden <[EMAIL PROTECTED]> [2005-02-28 19:20]:
> >I've also now removed any traces of the run() synonym. You're
> >right - why complicate things with no benefit.
>
> I didn't see anything wrong with the concept. Personally I
> would have done it the other way around (i.e. make prun a
> s
On Mon, Feb 28, 2005 at 04:05:09PM -0500, Mark Stosberg ([EMAIL PROTECTED])
wrote:
> I was hoping for more of a comparison with Data::Page, which is similar but
> already established.
AND at 100% Devel::Cover coverage, thanks to yours truly! :-)
xoxo,
Andy
--
Andy Lester => [EMAIL PROTECTED] =
On Mon, Feb 28, 2005 at 08:57:04AM -0500, Christopher Hicks wrote:
>
> This is a phenomenal initial cut of a POD. The review of relevant other
> modules in SEE ALSO and the philisophical differences with each deserves
> particular note. Bravo.
I share your appreciation.
I agree that this par
Buddy Burden wrote:
Ofer,
With all due respect to Andrew, please remember that his is but one
opinion.
I've also now removed any traces of the run() synonym. You're right
- why complicate things with no benefit.
I didn't see anything wrong with the concept. Personally I would have
done it th
Ofer,
With all due respect to Andrew, please remember that his is but one opinion.
I've also now removed any traces of the run() synonym. You're right -
why complicate things with no benefit.
I didn't see anything wrong with the concept. Personally I would have done it
the other way around (i.e
Andrew Savige wrote:
--- Ofer Nave wrote:
Here's the POD for my new Parallel::Simple module:
Interface
-
To me, offering both:
Parallel::Simple::run()
and:
Parallel::Simple->run()
just makes the interface bigger -- more for the user to read and
grok -- without any benefit (at
On Mon, 28 Feb 2005, Andrew Savige wrote:
Naming. I wonder if your:
{ use_return => 1 },
is the recommended Perl style for named parameters? I thought not
This is pretty common. Pretty much every module I've written uses it ;)
-dave
/*===
VegG
* Orton, Yves <[EMAIL PROTECTED]> [2005-02-28 14:45]:
> > messy. Four thumbs down to this idea.
>
> You have four thumbs Aristotle? Must make for a crowded space
> bar eh?
Heh, got me. I was referring to thumbs + big toes, wrongly
assuming the toes are called thumbs in English. I actually had to
On Sun, 27 Feb 2005, Ofer Nave wrote:
Here's the POD for my new Parallel::Simple module:
NAME
Parallel::Simple - the simplest way to run code blocks in parallel
SEE ALSO
Parallel::ForkControl, Parallel::ForkManager, and Parallel::Jobs are
all similarly themed, and offer different int
On Mon, 28 Feb 2005, Torsten Schoenfeld wrote:
http://lists.netthink.co.uk/listinfo/code-review-ladder
That box was having hardware problems last week. The maypole lists were
on the box (now they're on SrcFrg), so maybe this has moved somewhere else
too.
--
"There are four boxes to be used in
Title: RE: Introduction Letter
> messy. Four thumbs down to this idea.
You have four thumbs Aristotle? Must make for a crowded space bar eh?
;-)
Yves
* Andrew Savige <[EMAIL PROTECTED]> [2005-02-28 10:25]:
> Naming. I wonder if your:
>
> { use_return => 1 },
>
> is the recommended Perl style for named parameters? I thought
> not until I noticed HTML::Parser uses this style.
File::Find also uses this. So do a large number of OO modules
* Andrew Savige <[EMAIL PROTECTED]> [2005-02-28T04:22:04]
> This function synonym:
>
> sub run { prun( @_ ) }
>
> is better implemented as:
>
> sub run { &prun }
...which, in turn, is better implemented as
sub run { goto &prun }
because it will never have to return to &run. The retu
Andrew Savige wrote:
[...]
Naming. I wonder if your:
{ use_return => 1 },
is the recommended Perl style for named parameters? I thought not
until I noticed HTML::Parser uses this style. Alternatives are
I like this style.
CamelCase style (a la XML::Parser, for example):
{ UseReturn
On Sun, 2005-02-27 at 16:28 -0800, Ofer Nave wrote:
> 2) requesting feedback on design/implementation
For reviews there's also the code-review-ladder:
http://lists.netthink.co.uk/listinfo/code-review-ladder
--
Bye,
-Torsten
--- Ofer Nave wrote:
> Here's the POD for my new Parallel::Simple module:
Interface
-
To me, offering both:
Parallel::Simple::run()
and:
Parallel::Simple->run()
just makes the interface bigger -- more for the user to read and
grok -- without any benefit (at least, none I can
No problem.
BTW-It has nothing to do with the IO:: modules - I was just using that
as an example illustrating the degrees of seriousness when considering
namespace requests. As in, if I *were* creating an IO:: module,
namespace usage would be more closely scrutinized that my
Parallel::Simple m
Hello Ofer,
Motivate us!
Tell the list why we should look at it. What does it do? How does it
solve a problem that is not already solved, or solves it better?
I get the sense from the brief comment you made about IO:: that it has
to do with some mechanism for implementing parallel IO?
Pastin
Hello everyone.
I just subscribed to this list, I just recently received my PAUSE
account, and I just finished writing/documenting/testing the first perl
module that I've written for CPAN. I'd like to know what is considered
a good set of practices for new modules with regards to:
1) naming
2)
34 matches
Mail list logo