[25299] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7544 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 20 18:10:40 2004

Date: Mon, 20 Dec 2004 15:10:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 20 Dec 2004     Volume: 10 Number: 7544

Today's topics:
    Re: Is zero even or odd? <dummy@dummy.net>
    Re: Is zero even or odd? <jfields@austininstruments.com>
    Re: Is zero even or odd? <ITSnetNOTcom#virgil@COMCAST.com>
    Re: Is zero even or odd? <dak@gnu.org>
    Re: Is zero even or odd? <see@sig.com>
    Re: Is zero even or odd? <shawn.corey@sympatico.ca>
    Re: Is zero even or odd? (IFR LIT MET\)
    Re: Is zero even or odd? <ITSnetNOTcom#virgil@COMCAST.com>
    Re: Is zero even or odd? <jmw@jmwa.demon.contraspam.yuk>
    Re: Is zero even or odd? <jmw@jmwa.demon.contraspam.yuk>
    Re: Is zero even or odd? <jmw@jmwa.demon.contraspam.yuk>
    Re: Is zero even or odd? <george_coxanti@spambtinternet.com.invalid>
    Re: Is zero even or odd? <notfranz.heymann@btopenworld.com>
    Re: Is zero even or odd? <notfranz.heymann@btopenworld.com>
    Re: Is zero even or odd? <dak@gnu.org>
    Re: Is zero even or odd? <dak@gnu.org>
    Re: Is zero even or odd? <responder_solo_en_el_grupo@yahoo.es>
    Re: Parsing Large Files <abigail@abigail.nl>
    Re: Read mail file? (Linux) <a.newmane.remove@eastcoastcz.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 20 Dec 2004 19:11:01 GMT
From: "Androcles" <dummy@dummy.net>
Subject: Re: Is zero even or odd?
Message-Id: <9tFxd.5251$ef5.260@fe1.news.blueyonder.co.uk>


"John Fields" <jfields@austininstruments.com> wrote in message 
news:i38es0hm84fs7esii5go3qgo7lodeh7n5e@4ax.com...
> On Mon, 20 Dec 2004 15:50:04 GMT, "Androcles" <dummy@dummy.net> wrote:
>
>
>>> Zero has no sign. Consider:
>>>
>>> If zero was positive, 1+0 > 1, but 1+0 = 0
>>> If zero was negative, 1+0 < 1, but 1+0 = 0
>>
>>I thought 1+0 = 1, but I guess I can't do hard sums.
>>Androcles.
>
> ---
> Aaargghhh!!!
>
> LOL!, Neither can I, obviously!
>
> -- 
> John Fields

Don't feel too bad. Neither could Einstein.
Androcles




------------------------------

Date: Mon, 20 Dec 2004 13:19:34 -0600
From: John Fields <jfields@austininstruments.com>
Subject: Re: Is zero even or odd?
Message-Id: <bh8es0hcgjha9jci87r1ks49n2g8t08ff3@4ax.com>

On Mon, 20 Dec 2004 09:21:25 -0600, John Sefton <john@petcom.com>
wrote:


>It's not a prime, because a prime can
>only be divided by itself and 1.

---
That's not true.  A prime can be divided by anything, but an integer
greater than one is prime if its only positive divisors are itself and
one, but zero isn't prime because it's even.
---

>0 can't be divided by itself,

---
Sure it can. Anything (or nothing) divided by itself = 1
---

>but
>can be divided by everything else.
>An anti-prime?

---
No, an infinity.

-- 
John Fields


------------------------------

Date: Mon, 20 Dec 2004 13:38:28 -0700
From: Virgil <ITSnetNOTcom#virgil@COMCAST.com>
Subject: Re: Is zero even or odd?
Message-Id: <ITSnetNOTcom#virgil-2A1122.13382820122004@[63.218.45.211]>

In article <10sdnunotbnere2@corp.supernews.com>,
 Gactimus <gactimus@xrs.net> wrote:

> I know 0 is neither negative or positive but what about odd/even? I think
> it's even. 
> 
> Odd numbers start at 1 and go every other number 1,3,5,7;1,-1,-3,-5,-7
> Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8

The usual definition of an even integer (non-integers are neither even 
nor odd) is that N is an even integer iff n = 2*m for some integer m.

Is 0 = 2*m for some integer m?


------------------------------

Date: Mon, 20 Dec 2004 21:43:14 +0100
From: David Kastrup <dak@gnu.org>
Subject: Re: Is zero even or odd?
Message-Id: <x5mzw8k8f1.fsf@lola.goethe.zz>

John Fields <jfields@austininstruments.com> writes:

> On Mon, 20 Dec 2004 09:21:25 -0600, John Sefton <john@petcom.com>
> wrote:
>
>
>>It's not a prime, because a prime can
>>only be divided by itself and 1.
>
> ---
> That's not true.  A prime can be divided by anything, but an integer
> greater than one is prime if its only positive divisors are itself and
> one, but zero isn't prime because it's even.
> ---
>
>>0 can't be divided by itself,
>
> ---
> Sure it can. Anything (or nothing) divided by itself = 1

Ah, so 1 = 0/0 = (0+0)/0 = (0/0) + (0/0) = 2 ?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


------------------------------

Date: Mon, 20 Dec 2004 20:54:02 GMT
From: "Nicholas O. Lindan" <see@sig.com>
Subject: Re: Is zero even or odd?
Message-Id: <KZGxd.5245$Z47.3366@newsread2.news.atl.earthlink.net>

"David Kastrup" <dak@gnu.org> wrote in message

> > 0/0 = 1

> Ah, so 1 = 0/0 = (0+0)/0 = (0/0) + (0/0) = 2 ?

Not so fast, if 0/0 = 1 then it follows:

0 + 0 = 2 * 0

1 + 1 = 0/0 + 0/0 = (0 + 0)/0 = 2 * 0/0 = 2

-- 
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
Remove spaces etc. to reply: n o lindan at net com dot com
psst.. want to buy an f-stop timer? nolindan.com/da/fstop/


------------------------------

Date: Mon, 20 Dec 2004 15:43:59 -0500
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: Is zero even or odd?
Message-Id: <lPGxd.7179$Z%3.300422@news20.bellglobal.com>

Nicholas O. Lindan wrote:
> "John Sefton" <john@petcom.com> wrote
> 
> 
>>0 can't be divided by itself,
> 
> 
> Sure it can: 0 / 0 = 0 * (1 / 0) = 0 * infinity = 1
> 
> It works if the only three numbers in the universe are
> 0, 1, and infinity -- A number system that seems very
> suited to usenet.
> 

Zero is even. You cannot divide by zero. Limits are not division. 
Infinity is not a number. Computers bugger up the system.

    --- Shawn


------------------------------

Date: Mon, 20 Dec 2004 15:56:31 -0500
From: "Richards Noah \(IFR LIT MET\)" <Noah.Richards@infineon.com>
Subject: Re: Is zero even or odd?
Message-Id: <cq7ea3$bt1$1@athen03.muc.infineon.com>


"Virgil" <ITSnetNOTcom#virgil@COMCAST.com> wrote in message
news:ITSnetNOTcom%23virgil-2A1122.13382820122004@[63.218.45.211]...
> In article <10sdnunotbnere2@corp.supernews.com>,
>  Gactimus <gactimus@xrs.net> wrote:
>
> > I know 0 is neither negative or positive but what about odd/even? I
think
> > it's even.
> >
> > Odd numbers start at 1 and go every other number 1,3,5,7;1,-1,-3,-5,-7
> > Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
>
> The usual definition of an even integer (non-integers are neither even
> nor odd) is that N is an even integer iff n = 2*m for some integer m.
>
> Is 0 = 2*m for some integer m?

Yes.  0 is an integer, and 0 = (2) (0), so therefore 0 is an even integer.
(Just to clarify, integers are defined as the set {...-3, -2, -1, 0, 1, 2,
3, ...} )




------------------------------

Date: Mon, 20 Dec 2004 14:09:12 -0700
From: Virgil <ITSnetNOTcom#virgil@COMCAST.com>
Subject: Re: Is zero even or odd?
Message-Id: <ITSnetNOTcom#virgil-488BD6.14091120122004@[63.218.45.211]>

Yes!


------------------------------

Date: Mon, 20 Dec 2004 21:02:32 +0000
From: John Woodgate <jmw@jmwa.demon.contraspam.yuk>
Subject: Re: Is zero even or odd?
Message-Id: <RjuheAKo3zxBFwnN@jmwa.demon.co.uk>

I read in sci.electronics.design that David Kastrup <dak@gnu.org> wrote
(in <x5mzw8k8f1.fsf@lola.goethe.zz>) about 'Is zero even or odd?', on
Mon, 20 Dec 2004:

>Ah, so 1 = 0/0 = (0+0)/0 = (0/0) + (0/0) = 2 ? 

0/0 can take ANY value.
-- 
Regards, John Woodgate, OOO - Own Opinions Only. 
The good news is that nothing is compulsory.
The bad news is that everything is prohibited.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk 


------------------------------

Date: Mon, 20 Dec 2004 21:04:15 +0000
From: John Woodgate <jmw@jmwa.demon.contraspam.yuk>
Subject: Re: Is zero even or odd?
Message-Id: <cT3iCOKP5zxBFwll@jmwa.demon.co.uk>

I read in sci.electronics.design that Virgil <ITSnetNOTcom#virgil@COMCAS
T.com> wrote (in <ITSnetNOTcom#virgil-2A1122.13382820122004@[63.218.45.2
11]>) about 'Is zero even or odd?', on Mon, 20 Dec 2004:
>In article <10sdnunotbnere2@corp.supernews.com>,
> Gactimus <gactimus@xrs.net> wrote:
>
>> I know 0 is neither negative or positive but what about odd/even? I think
>> it's even. 
>> 
>> Odd numbers start at 1 and go every other number 1,3,5,7;1,-1,-3,-5,-7
>> Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
>
>The usual definition of an even integer (non-integers are neither even 
>nor odd) is that N is an even integer iff n = 2*m for some integer m.
>
>Is 0 = 2*m for some integer m?

Yes. m = 0. 0 is clearly not a non-integer. 
-- 
Regards, John Woodgate, OOO - Own Opinions Only. 
The good news is that nothing is compulsory.
The bad news is that everything is prohibited.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk 


------------------------------

Date: Mon, 20 Dec 2004 21:01:20 +0000
From: John Woodgate <jmw@jmwa.demon.contraspam.yuk>
Subject: Re: Is zero even or odd?
Message-Id: <tjsu+0Jg2zxBFwAj@jmwa.demon.co.uk>

I read in sci.electronics.design that David Kastrup <dak@gnu.org> wrote
(in <x5oegolrx3.fsf@lola.goethe.zz>) about 'Is zero even or odd?', on
Mon, 20 Dec 2004:
>John Woodgate <jmw@jmwa.demon.contraspam.yuk> writes:
>
>> I read in sci.electronics.design that David Kastrup <dak@gnu.org> wrote
>> (in <x5d5x4nbx9.fsf@lola.goethe.zz>) about 'Is zero even or odd?', on
>> Mon, 20 Dec 2004:
>>>(-0)^2 = -0
>>>
>>
>> Not even in Bochum. (;-)
>>
>> Lim{x->0}[(-x^)2] = 0
>
>Either you mangled your parentheses, or this is a insidious way of 
>sneaking in a smilie.

Nothing is mangled if you view plain text. What HTML might make of it, I
don't know. 
>
>If the former: in what respect does this negate my statement?  While the 
>limit need not necessarily be the same as the value itself (a frequent 
>mistake when talking about 0^0), we actually _do_ arrive at the same 
>result even in the limit here.

Your equation claims that a certain *real* number squared is a negative
number. '-0' passes the test of a real number in that it is the root of
(innumerable) algebraic equations with integer coefficients, such as
4576238x^2 = 0, solution x = +/-0. Its square must be positive. 
-- 
Regards, John Woodgate, OOO - Own Opinions Only. 
The good news is that nothing is compulsory.
The bad news is that everything is prohibited.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk 


------------------------------

Date: Mon, 20 Dec 2004 21:54:18 +0000 (UTC)
From: George Cox <george_coxanti@spambtinternet.com.invalid>
Subject: Re: Is zero even or odd?
Message-Id: <41C74A0E.7BC03B48@spambtinternet.com.invalid>

John Fields wrote:

> That's not true.  A prime can be divided by anything, but an integer
> greater than one is prime if its only positive divisors are itself and
> one, but zero isn't prime because it's even.

And two isn't prime because it's even?


------------------------------

Date: Mon, 20 Dec 2004 22:19:47 +0000 (UTC)
From: "Franz Heymann" <notfranz.heymann@btopenworld.com>
Subject: Re: Is zero even or odd?
Message-Id: <cq7j62$6gm$3@sparta.btinternet.com>


"David Kastrup" <dak@gnu.org> wrote in message
news:x5d5x4nbx9.fsf@lola.goethe.zz...

[snip]

> (-0)^2 = -0

Not on my Casio calculator.

Franz




------------------------------

Date: Mon, 20 Dec 2004 22:19:46 +0000 (UTC)
From: "Franz Heymann" <notfranz.heymann@btopenworld.com>
Subject: Re: Is zero even or odd?
Message-Id: <cq7j61$6gm$2@sparta.btinternet.com>


"John Woodgate" <jmw@jmwa.demon.contraspam.yuk> wrote in message
news:QM1RleEHRvxBFwlq@jmwa.demon.co.uk...
> I read in sci.electronics.design that Nicholas O. Lindan
<see@sig.com>
> wrote (in <PjCxd.4752$yK.1793@newsread3.news.atl.earthlink.net>)
about
> 'Is zero even or odd?', on Mon, 20 Dec 2004:
>
> >"John Sefton" <john@petcom.com> wrote
> >
> >> 0 can't be divided by itself,
> >
> >Sure it can: 0 / 0 = 0 * (1 / 0) = 0 * infinity = 1
>
> One possible solution, given the enormous lack of rigour in
'infinity'.

There is no lack of rigour in the definition of infinity.  Read anbout
the work of Cantor, Dedekind and others.

[snip]

Franz





------------------------------

Date: Mon, 20 Dec 2004 23:34:25 +0100
From: David Kastrup <dak@gnu.org>
Subject: Re: Is zero even or odd?
Message-Id: <x5wtvciopa.fsf@lola.goethe.zz>

John Woodgate <jmw@jmwa.demon.contraspam.yuk> writes:

> I read in sci.electronics.design that David Kastrup <dak@gnu.org> wrote
> (in <x5mzw8k8f1.fsf@lola.goethe.zz>) about 'Is zero even or odd?', on
> Mon, 20 Dec 2004:
>
>>Ah, so 1 = 0/0 = (0+0)/0 = (0/0) + (0/0) = 2 ? 
>
> 0/0 can take ANY value.

Well, and in the above it takes on 1, so that would be quite legal,
right?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


------------------------------

Date: Mon, 20 Dec 2004 23:35:55 +0100
From: David Kastrup <dak@gnu.org>
Subject: Re: Is zero even or odd?
Message-Id: <x5sm60ioms.fsf@lola.goethe.zz>

"Franz Heymann" <notfranz.heymann@btopenworld.com> writes:

> "David Kastrup" <dak@gnu.org> wrote in message
> news:x5d5x4nbx9.fsf@lola.goethe.zz...
>
> [snip]
>
>> (-0)^2 = -0
>
> Not on my Casio calculator.

What else is it there?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


------------------------------

Date: Mon, 20 Dec 2004 22:35:54 +0000 (UTC)
From: Hue-Bond <responder_solo_en_el_grupo@yahoo.es>
Subject: Re: Is zero even or odd?
Message-Id: <slrncsekua.530.responder_solo_en_el_grupo@genus.hue-bond.com>

Shawn Corey, lun20041220@21:43:59(CET):
>
> Zero is even. You cannot divide by zero. Limits are not division. 
> Infinity is not a number. Computers bugger up the system.

That could be said louder, but not clearer :).


-- 
 David Serrano


------------------------------

Date: 20 Dec 2004 22:29:39 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Parsing Large Files
Message-Id: <slrncsekij.fj.abigail@alexandra.abigail.nl>

Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMMMCXXIX
September MCMXCIII in <URL:news:cq6870$itc$1@mamenchi.zrz.TU-Berlin.DE>:
,,  BigDaDDY  <ihatespam@hotmail.com> wrote in comp.lang.perl.misc:
,, > All,
,, > 
,, > I recently received a reply to a previous post which is almost the answer I 
,, > needed.  The problem is, when I tried it at work, it wouldn't work.  The 
,,  
,,  Wouldn't work, eh?  So what is the error you get, or in which way is the
,,  result different from what you expect?  
,,  
,, > reason it didn't work was because we have an early version of Perl at work 
,, > which does not support "values" as in:
,, > 
,, > my(%nid, %id);
,, > 
,, > foreach (values %id) {
,, >   foreach my $y (keys %$_) {
,, >      foreach (values %{$_->{$y}}) {
,, >         die "duplicate $_!" if exists $nid{$_};
,, >         $nid{$_}=$y;
,, >      }
,, >   }
,, > }
,,  
,,  "values" works since Perl 1 (and I don't see them used as lvalues).  So
,,  what's the error?  Please don't waste our time.


Perhaps he has a copy of the mythical Perl 0. But in that case, one
isn't supposed to ask....



Abigail
-- 
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
 |perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
 |perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
 |perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;


------------------------------

Date: Mon, 20 Dec 2004 13:30:27 -0800
From: "Alfred Z. Newmane" <a.newmane.remove@eastcoastcz.com>
Subject: Re: Read mail file? (Linux)
Message-Id: <32oujoF3olkqnU1@individual.net>

Joe Smith wrote:
> David Efflandt wrote:
>> On Tue, 14 Dec 2004 10:04:17 -0800, Crom <xxxx@yyyy.zzzz> wrote:
>>
>>> How can I parse my mail spool file? Like in /var/spool/mail (and I
>>> think the mailbox file in my home dir follows the same format.)
>>
>>
>> In the main spool file any line that begins with "From " (From
>> followed by a space, which as a regex would be /^From / ) marks the
>> start of the next message.  Not sure if From is always capitalized.
>> This is not to be confused with "From:" (w/colon) which is within
>> headers, if present.
>
> Other than the first line of the file, the delimiter is "\n\nFrom ".
> The blank line before "^From " is required.  It is always capitalized.

But it can stil show up in the message body text can it not? If all it
is doing is checking for what you described above, it seems it could
easily be broken by putting that in the message body text:

---- MSG BODY BEGIN


^From


----- MSN BODY END

Do mail handlers (ie sendmail) it take any actualy to (temporarly)
handle such cases?




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7544
***************************************


home help back first fref pref prev next nref lref last post