Re: Divide by 0? Was: Re: Introduction Letter

2005-03-01 Thread Jenda Krynicky
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=

Re: Divide by 0? Was: Re: Introduction Letter

2005-03-01 Thread A. Pagaltzis
* 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]

Re: Divide by 0? Was: Re: Introduction Letter

2005-03-01 Thread Ofer Nave
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

Re: Divide by 0? Was: Re: Introduction Letter

2005-03-01 Thread Ken Williams
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'        

Re: Divide by 0? Was: Re: Introduction Letter

2005-03-01 Thread Fergal Daly
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

Re: Divide by 0? Was: Re: Introduction Letter

2005-03-01 Thread Austin Schutz
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

Re: Divide by 0? Was: Re: Introduction Letter

2005-03-01 Thread Fergal Daly
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

Re: Divide by 0? Was: Re: Introduction Letter

2005-02-28 Thread Eric Wilhelm
# 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

Re: Divide by 0? Was: Re: Introduction Letter

2005-02-28 Thread A. Pagaltzis
* 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

Re: Divide by 0? Was: Re: Introduction Letter

2005-02-28 Thread Eric Wilhelm
# 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

Re: Introduction Letter

2005-02-28 Thread Buddy Burden
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

Re: Divide by 0? Was: Re: Introduction Letter

2005-02-28 Thread David Golden
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

Re: Introduction Letter

2005-02-28 Thread Ofer Nave
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

Divide by 0? Was: Re: Introduction Letter

2005-02-28 Thread Austin Schutz
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);

Re: Introduction Letter

2005-02-28 Thread Andrew Savige
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

Re: Introduction Letter

2005-02-28 Thread A. Pagaltzis
* 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

Re: better SEE ALSO sections (was: Re: Introduction Letter)

2005-02-28 Thread Andy Lester
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] =

better SEE ALSO sections (was: Re: Introduction Letter)

2005-02-28 Thread Mark Stosberg
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

Re: Introduction Letter

2005-02-28 Thread Ofer Nave
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

Re: Introduction Letter

2005-02-28 Thread Buddy Burden
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

Re: Introduction Letter

2005-02-28 Thread Ofer Nave
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

Re: Introduction Letter

2005-02-28 Thread Dave Rolsky
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

Re: Introduction Letter

2005-02-28 Thread 'A. Pagaltzis'
* 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

Re: Introduction Letter

2005-02-28 Thread Christopher Hicks
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

Re: Introduction Letter

2005-02-28 Thread Christopher Hicks
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

RE: Introduction Letter

2005-02-28 Thread Orton, Yves
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

Re: Introduction Letter

2005-02-28 Thread A. Pagaltzis
* 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

Re: Introduction Letter

2005-02-28 Thread Ricardo SIGNES
* 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

Re: Introduction Letter

2005-02-28 Thread David Landgren
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

Re: Introduction Letter

2005-02-28 Thread Torsten Schoenfeld
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

Re: Introduction Letter

2005-02-28 Thread Andrew Savige
--- 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

Re: Introduction Letter

2005-02-27 Thread Ofer Nave
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

Re: Introduction Letter

2005-02-27 Thread Lincoln A. Baxter
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

Introduction Letter

2005-02-27 Thread Ofer Nave
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)