[13099] in Perl-Users-Digest
Perl-Users Digest, Issue: 509 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 13 17:17:13 1999
Date: Fri, 13 Aug 1999 14:10:18 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 13 Aug 1999 Volume: 9 Number: 509
Today's topics:
Re: s/// and interpolation <aqumsieh@matrox.com>
Re: Strange trouble with a STRAY CURLY BRACE "}" <lfriedl@genome.wi.mit.edu>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! (I R A Darth Aggie)
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! <tchrist@mox.perl.com>
Re: Why use Perl when we've got Python?! (I R A Darth Aggie)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 13 Aug 1999 11:29:16 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: s/// and interpolation
Message-Id: <x3yyaff1yyb.fsf@tigre.matrox.com>
QuestionExchange <USENET@questionexchange.com> writes:
> Perl do not work the way you try (why ? who now :)
Maybe it does. But you don't know it.
> You need place all replace command on one string and than
> execute replacement by "eval" command
> For example
> $search = '(\d{3})-(\d{2})-(\d{4})' ;
> $replace = 'ID#$1$2$3' ;
> $repStr = "s/".$search."/".$replace."/" ;
> eval ($repStr);
When was the last time you checked out perlre? I advise you to go
ahead and read it once more.
Ala
------------------------------
Date: Fri, 13 Aug 1999 16:01:48 -0400
From: Lisa Friedland <lfriedl@genome.wi.mit.edu>
Subject: Re: Strange trouble with a STRAY CURLY BRACE "}"
Message-Id: <37B479AC.3A7A50A2@genome.wi.mit.edu>
> See, the thing is that there is no matching open curly brace for this
> close curly brace!!
agreed, probably not perl's fault. When this happens to me, it means I
have a comment line containing a curly brace--vi matches this to
another, but perl can't see it.
hope this helps,
-Lisa
------------------------------
Date: 13 Aug 1999 14:05:04 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47a70@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:With PCRE, I prefer Python. I am slowly giving up Perl altogether,
:except as a training language in OO classes. Not to surprisingly,
:Python is preferred more than 7 to 1 over Perl by students who are
:exposed to both at the same time.
I'm sure I am perfectly capable of presenting both Perl and Python
in such a way that the students would prefer Perl by 7 to 1 as well.
So what?
--tom
--
"Help save the world!" --Larry Wall in README
------------------------------
Date: 13 Aug 1999 19:51:00 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7r8tt6.2ri.fl_aggie@thepentagon.com>
On Fri, 13 Aug 1999 11:44:21 -0600, John W. Stevens
<jstevens@basho.fc.hp.com>, in <37B45975.CFBFDE19@basho.fc.hp.com>
wrote:
+ I R A Darth Aggie wrote:
+ > James - as a fortran programmer, I can make any language unreadable...
+ Ok. I'll take that challenge. . . create for me an unreadable
+ Python program that actually compiles and runs.
I don't know python, and it isn't on the agenda for the short-term,
and hasn't surfaced in the long-term, either.
Readability is as much a function of the programmer as it is the
language.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: 13 Aug 1999 14:07:45 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47b11@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:Ok. I'll take that challenge. . . create for me an unreadable
:Python program that actually compiles and runs.
Ok, I just showed the paperboy some python programs, and he didn't
think were readable at all.
Please face it: terms like "readable" and "intuitive" are completely
subjective, and therefore purely opinion.
--tom
--
You are the sponsor for the account andrew (Andrew Hume).
------------------------------
Date: 13 Aug 1999 14:15:05 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47cc9@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:And cost a lot, big time, in the real world also. The most common
:lament from a section manager: "I've got all this Perl code that
:<fill-in-a-name> wrote, and nobody else can understand this stuff!"
I am sick and tired of the implication that because stupid people write
stupid Perl, that Perl is stupid. Stupid people are associated with
everything! Perl is also 100x more popular than Python -- simple because
even stupid people *are able* to use it! And they do. And this is what
we get for making something that even stupid people can use. I hope that
Python should be someday cursed with one tenth the number of stupid people
who now write Perl. Then your newsgroup can be as messy as this one.
1. Assume competence.
2. Train the ignorant.
3. Fire the stupid.
--tom
--
"Since nobody ever compared Hitler to Hitler, being compared with Hitler
immediately disqualifies you for Hitlerhood." --Larry Wall
------------------------------
Date: 13 Aug 1999 14:16:19 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47d13@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:I had thought the arguments re: indentation and use of white space had
:been settled years
:ago. . .
Don't be silly. We merely contained our laugher for the nonce.
--tom
--
Real Programmers don't write in PL/I. PL/I is for programmers who
can't decide whether to write in COBOL or FORTRAN.
------------------------------
Date: 13 Aug 1999 14:18:34 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47d9a@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:But, once again, not only is this not a valid criticism but in
:point of fact Python is more correct than Perl for this
:example.
It is wrong from the Larry's principle that things that behave
differently should have different appearances.
--tom
--
"Government is not reason, it is not eloquence - it is force! Like fire, it is
a dangerous servant and a fearful master; never for a moment should it be left
to irresponsible action."
- George Washington
------------------------------
Date: 13 Aug 1999 14:22:08 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47e70@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:But in a test where programmers are ignorant of each, Python is
:the prefered choice . . . *EXCEPT* where the programmers were
:experienced C programmers.
Well what else are you going to get? BASIC programmers? Now those
are clever folks for you! Of course most programmers are C (or C++)
programmers. It's the only real-world langauge that gets the jobs
done in millions of environments. Every CompSci student should be
proficient at C/C++. Anything else is fluff. Beneficial, but fluff.
I don't care whether they're proficient at six other languages, and
in fact, I hope they know those six others, but C/C++ is what counts.
What kind of "programmers" are you talking about?
BTW, something's terribly wrong here:
:Excuse, but this is a bad comparison. Columnarization requirements
:existed
:in Fortran to fit the limits of the compiler technology available at the
:time.
:Indentation requirements exist in Python to fit the needs of the
:programmer.
I think your newsreader is buggy. Better fix it.
--tom
--
You know, by the time you get some with all this, the "Swiss Army
Chainsaw" is going to be more like a Swiss Army Tactical Nuke.... :-)
--Brandon Allbery on perl in <1991Feb21.002412.20045@NCoast.ORG>
------------------------------
Date: 13 Aug 1999 14:22:55 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47e9f@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:What you seem to be complaining about is called "polymorphism"
:in the OO world.
Perl is not about shoving an OO agenda down someone's throat.
--tom
--
If the space is a problem, get a bigger computer. Computers are supposed
to serve man, not vice versa, the experience of the last 40 years
notwithstanding. --Larry Wall in <1995Jul30.033515.25114@netlabs.com>
------------------------------
Date: 13 Aug 1999 14:26:17 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47f69@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:Due to this feature alone, Python programs are easier to read by
:non-authors than Perl programs are.
Prove that. Stop asserting it. Prove it.
Here's your challenge. Pick a Perl programmer with experience equivalent
to mine, and show me their code. I'm sure I'll find it perfectly legible.
I say this for certain because I *do* read their code, and it's completely
easy to do so.
If you're talking about someone who can't stop treating Perl like
BASIC or FORTRAN, and just doesn't `get' it, then sure, it's unnatural.
But that's hardly my fault that they don't know Perl, now is it?
--tom
--
Hey, I had to let awk be better at *something*... :-)
--Larry Wall in <1991Nov7.200504.25280@netlabs.com>1
------------------------------
Date: 13 Aug 1999 14:28:07 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b47fd7@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:It comes down to the issue we discussed once before: Python is the
:better language for [YOUR NEWSREADER SCREWED THIS UP]
:OO, and I write OO most of the time. I know you disagree. But my
:students, [YOUR NEWSREADER SCREWED THIS UP]
:in general, also believe that Python is a better OO scripting language
:than [YOUR NEWSREADER SCREWED THIS UP]
:Perl.
What's a "scripting" language, for goodness sake?
--tom
--
Intel chips aren't defective. They just seem that way.
------------------------------
Date: 13 Aug 1999 14:29:31 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b4802b@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:Which begs the question: Just how many of you Perl II (Perl 5.003, is
:it?)
:programmers are writing OO-Perl?
What the heck is "Perl II"?
And what is "OO-Perl"? How many of us write new OO libraries?
Use existing OO libraries? What?
--tom
--
"I think I'll side with the pissheads on this one." --Larry Wall
------------------------------
Date: 13 Aug 1999 14:31:22 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37b4809a@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"John W. Stevens" <jstevens@basho.fc.hp.com> writes:
:Perl actually seems to be a *SURRENDER* to real-live-languages. This
:makes [YOUR NEWSREADER SCREWED THIS UP]
:it easier to code in *YOUR* way
:(there-is-always-more-than-one-way-to-do-it), [AND THIS ONE]
:but this (just like natural language) provides greater opportunities for
:confusion and ambiguity in the mind of the reader.
Perhaps then the problem is actually the plummeting literacy rate.
--tom
--
I don't believe it's written in Perl, though it probably
ought to have been. :-)
--Larry Wall in <1995Feb21.180249.25507@netlabs.com>
------------------------------
Date: 13 Aug 1999 20:47:10 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7r916d.367.fl_aggie@thepentagon.com>
On Fri, 13 Aug 1999 13:00:22 -0600, John W. Stevens
<jstevens@basho.fc.hp.com>, in <37B46B46.80D5B51E@basho.fc.hp.com>
wrote:
+ I R A Darth Aggie wrote:
+ > IIIIIIIIIIEEEEEEEEE! Is python related in some sick, twisted and demented
+ > way to either f77 or punch cards?
+ No. Python enforces indentation to aid the programmer.
Ok, sure.
+ Fortran enforced spacing/indentation to aid the compiler.
+ > my head now hertz. I guess I knew that,
+ > but seeing it in black & white...
+ What, you don't indent you code?
Sometimes yes, sometimes no. If it is a "keeper" -- something I'll
have in two weeks and still be using, it'll be indented, have
respectable variable names, etc.
I'm not particularly practiced at writing perl one-liners (nor do I
necessarily care to), but I occasionally will write throw-away code to
do a one-time job [contrived example]:
% perl
open(I,'somefile') or die "input: $!";
open(O,">outputfile") or die "output: $!";
while(<I>){
chomp;
($a,$b,$c)=split /\t/;
$d=$a*b+$c;
printf O "%d\t%d\t%d\t%d\n",$a,$b,$c,$d;
}
close(I);
close(O);
^D
% <inspect outputfile -- is ok? if not, copy -n- paste into an editor and
try again>
This is also how I test my posted code (ex|s)amples.
+ I had thought the arguments re: indentation and use of white space had
+ been settled years ago. . .
Sure. So why is it mandatory? why isn't python permitting the programmer
to use the whitespace deemed adequate?
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 509
*************************************