[10198] in Perl-Users-Digest
Perl-Users Digest, Issue: 3791 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 22 21:08:27 1998
Date: Tue, 22 Sep 98 18:01:31 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 22 Sep 1998 Volume: 8 Number: 3791
Today's topics:
Re: Perl & Java - differences and uses <borg@imaginary.com>
Re: Perl & Java - differences and uses <jdporter@min.net>
Re: Perl & Java - differences and uses <jdporter@min.net>
Re: Perl & Java - differences and uses <jdporter@min.net>
Re: Perl and FORTRAN namelists <jdporter@min.net>
Re: PerlMagick & linux (Enrique Terrazas)
Re: Q: how to search/replace (s/...) extended ascii cha (Joergen W. Lang)
requiring into multiple namespaces (James Galagan)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 22 Sep 1998 23:03:02 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <G0WN1.1447$Ge.4545062@ptah.visi.com>
In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> John Porter wrote in message <3606B683.2640764@min.net>...
:> >No, you have consistently stated that it *IS* the case, as support
:> >for the notion that Python is "therefore" superior to Perl.
:>
:> Please provide any quote where I have said this.
: Glad to oblige.
:> I clearly believe strongly in the OO way of life.
:> OO is not simply a tool.
:> Java is pure OO. Python is close enough.
: Besides being wrong about Java, this shows that you think Python
: is superior to Perl on the basis of its OO-ness.
: Better OO => Better Language. Clearly OO-ness is driving the
: "quality" metric.
Which one of those quotes suggests that I believe OO is the solution for
everything? The first says I believe strongly in the OO way of life.
the second says that whatever I think of OO, I believe it is not
simply a tool. And the third is a comment on the OO-ness of two
languages.
And, yes, OO-ness is PART of the driver behind the quality metric.
Syntax is the other bit. And all of that is based on the assumption
of functional equivalence.
So let's review. You have worked hard to get three quotes. Of the
three quotes, you have one quote that, taken alone out of context,
*might* lead one to the *assumption* that I am suggesting OO is
everything.
On the other hand, you have many, many posts of me explicitly saying
otherwise.
Clearly you desperately want to assign this belief to me. By doing
so, you can write me off as a zealot who does not understand the real
world. Give it up. I do not hold that belief, I have never held that
belief, and throughout the entire thread I have done nothing to
promote that belief.
:> A good OO language is an
:> important tool in maintaining the OO paradigm across the process.
: This begs the question of whether the OO paradigm *ought* to be
: maintained across the process. Clearly, you think it does.
And I have provided support for that belief in other posts. I even
went so far as to sum it up into premises and a conclusion.
:> You should parse the [pattern match] results within an OO framework.
: This is saying that all operations, regardless of scale, should
: be performed in an OO framework. Which sounds a lot like
: "OO Everywhere" to me.
How does it sound like that? Again, you took the quote out of
context. The context was not so much that pattern match results
should be in an OO framework, but that they should be handled within
some structure imposed by the language in question. For example, lisp
pattern matching is not OO, but it is handled within the Lisp
paradigm. I support that for Lisp. I support the OO paradigm for
python. Perl, however, is a hodge podge of paradigms. And I do not
support that.
:> If [the code] is properly OO, it is very likely to be reusable.
:> OO is the single best path to code reuse.
:> software reuse does not make something OO.
: These statements clearly betray your priorities: you think the
: means (OO) is more important than the end (code reuse).
What? Please try and describe how you get that from the above
quotes. As I read them, they are all variations of: "if you want code
reuse, OO is the way to go".
: So, are we unclear as to where you stand on OO?
Evidently, you are. And what is really funny, you will not take my
explicit statements as proof. You instead spend a lot of time reading
into other statements non-explicit meanings.
:> >If OO is not for everything (as you now appear to be admitting),
:> >then languages which support both OO and non-OO programming are more
:> >broadly useful than languages which support only OO programming.
:>
:> This is a logical fallacy.
: Not at all.
:> Just because perl allows programming under non-OO paradigms does not imply
:> that perl is the best tool for working in those paradigms.
: I didn't say otherwise!
: Your statement would make sense, if one were to choose a language from
: a small set, say [ Perl, Python ]. Of these two, Perl is the more
: broadly useful, since it does not enforce one paradigm over another.
This is true only if the strength of perl lies in where OO is weak.
This is not the case. OO's weakness lies in performance of speed
critical systems--usually in the embedded systems world.
For those things where taking an OO approach will not work, perl,
python, and java are all bad solutions.
: (Of course, I admit that that is faulty, since in fact Python does
: not enforce OO any more than Perl does. But that's a different
: argument...)
Would you care to back this up?
: Btw, can you say how well (if at all) Python supports a functional
: programming style? Does it have closures, partial evaluation, and
: continuations? Just curious...
Start a new thread on python programming if you want to go into this.
:> I am saying and I have maintained all along that in an OO paradigm, python
:> makes more sense as it is functionally similar but more strictly OO (plus
:> several other things not related to this particular line of argument).
: Yes, I know.
Then why do you keep trying to assign to me some other argument?
--
George Reese (borg@imaginary.com) http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
"Keep Ted Turner and his goddamned Crayolas away from my movie."
-Orson Welles
------------------------------
Date: Tue, 22 Sep 1998 19:15:28 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36082F90.DFD9EAE2@min.net>
George Reese wrote:
>
> I have shown rational arguments to backup OO software engineering as a
> good paradigm for development in the large. I have not referenced any
> authorities as some sort of argument from authority. I have simply
> provided many, many reasons.
Clearly you prefer to take your chances standing on your own authority.
But as a skeptic, I would much prefer that you had referenced other
authorities whom I respect; it would have done much more for your case.
--
John "Many Jars" Porter
------------------------------
Date: Tue, 22 Sep 1998 19:19:39 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3608308B.571966E2@min.net>
George Reese wrote:
>
> In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
> : I am saying that the usefulness of Amazon rankings is limited
> : like this: it is not the absolute ratio of favorable to
> : unfavorable reviews for a book that matters; it is the relative
> : ratio, compared to the ratios for other books. Nearly every
> : book reviewed at Amazon has a preponderance of favorable reviews.
> : Does that mean that all these books are good? Of course not.
> : Any book that gets an unusually large proportion of unfavorable
> : reviews -- even if it is still less than half -- is probably
> : a pretty poor book, to have motivated that many people to log
> : on and submit a review.
>
> : Of course, the other problem is sheer sample size: very few
> : books get enough reviews of (any kind) to be statistically
> : significant.
>
> This would be an excellent point if it were *I* who was offering up
> the reviews at amazon.com as having any meaning. I was in fact
> responding to someone else who tried to read meaning into them that
> did not exist.
Well, actually, it's an excellent point, regardless of who might
take it as argumentative. The point is, if your book has more than
a tiny number of negative reviews, that says something (not favorable)
about your book.
--
John "Many Jars" Porter
------------------------------
Date: Tue, 22 Sep 1998 19:57:49 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3608397C.C82CC380@min.net>
George Reese wrote:
>
> Clearly you desperately want to assign this belief to me. By doing
> so, you can write me off as a zealot who does not understand the real
> world. Give it up. I do not hold that belief, I have never held that
> belief, and throughout the entire thread I have done nothing to
> promote that belief.
O.k. I guess we're clear on that. :-)
> John Porter wrote:
> : This begs the question of whether the OO paradigm *ought* to be
> : maintained across the process. Clearly, you think it does.
>
> And I have provided support for that belief in other posts.
You keep saying that, but it still isn't true.
You have not ever (in this thread) provided one shred of EVIDENCE
for anything. You repeat the same claims, over and over, one of
which is that you've provided support for the others. It's a lie.
You have NOT, EVER ONCE provided ANY EVIDENCE for the claims you
have made.
> I even went so far as to sum it up into premises and a conclusion.
Yeah, that's pretty far, all right.
You really went beyond the call of duty on that one.
> :> You should parse the [pattern match] results within an OO framework.
>
> : This is saying that all operations, regardless of scale, should
> : be performed in an OO framework. Which sounds a lot like
> : "OO Everywhere" to me.
>
> How does it sound like that? Again, you took the quote out of
> context. The context was not so much that pattern match results
> should be in an OO framework, but that they should be handled within
> some structure imposed by the language in question. For example, lisp
> pattern matching is not OO, but it is handled within the Lisp
> paradigm. I support that for Lisp. I support the OO paradigm for
> python.
That's nice, and I appreciate you saying that.
But can you see how I might have gotten "confused"?
>:> You should parse the results within an OO framework.
I'm supposed to have eisegeted "...if programming in a language
which supports OO"?
I eisegeted "...always, and therefore always use a language which
supports OO", which, obviously, would be a rather fanatical
claim to make.
> Perl, however, is a hodge podge of paradigms. And I do not
> support that.
Perl supports multiple paradigms, without enforcing any.*
That's a good thing, not a bad thing.
(*Except procedural; hard to get away from that :-)
> :> If [the code] is properly OO, it is very likely to be reusable.
>
> :> OO is the single best path to code reuse.
>
> :> software reuse does not make something OO.
>
> : These statements clearly betray your priorities: you think the
> : means (OO) is more important than the end (code reuse).
>
> What? Please try and describe how you get that from the above
> quotes. As I read them, they are all variations of: "if you want code
> reuse, OO is the way to go".
The third quote is the key.
"Software reuse does not make something OO."
True, but so what?
If I have achieved reuse -- by whatever means -- so what if is
or isn't via OO? The (unfortunate?) fact of the matter is that
software reuse occurs outside of any OO framework a lot, and
that should not be denigrated. Besides, it is still debatable
just how effective OO is at leading to reuse. Debatable, at least,
for those who haven't preconcluded it.
> And what is really funny, you will not take my
> explicit statements as proof.
Sorry, chum, but your statements do not constitute proof.
You could be Knuth, and your statements alone would not
constitute proof.
If you actually offer some proof, then I'll consider that.
Show me some case studies, some hard numbers; that would
be a little more like proof.
> For those things where taking an OO approach will not work, perl,
> python, and java are all bad solutions.
Which is to say, in the problem domain in which perl, python, and
java are not bad solutions, OO is the best approach.
Again, close enough to "OO is Everything" as makes no difference.
(Yes, let's ignore embedded real-time systems. Fair enough?)
> : (Of course, I admit that that is faulty, since in fact Python does
> : not enforce OO any more than Perl does. But that's a different
> : argument...)
>
> Would you care to back this up?
Of the two samples of Python code presented in this thread -- one
of which was penned by you -- neither was written in object-oriented
style. They were strictly procedural, except for calls to some
externally defined objects (sys, regex, cgi). Before you jump the gun
on what I am saying here, I am NOT saying that those examples were
poorly written, or were not written appropriately to the task.
My point is that Python did not, apparently, force the programmer to
code in an OO style. Which is to say, he defined no new classes or
derived classes; and none of the new code was contained in a method.
It was all plain ol' Pascal-like procedural code.
If you can't find the code samples I'm referring to on your news
server or on DejaNews, I'll do it for you.
> : Btw, can you say how well (if at all) Python supports a functional
> : programming style? Does it have closures, partial evaluation, and
> : continuations? Just curious...
>
> Start a new thread on python programming if you want to go into this.
If you are at all interested in that topic, please email me. Thanks.
> :> I am saying and I have maintained all along that in an OO paradigm, python
> :> makes more sense as it is functionally similar but more strictly OO (plus
> :> several other things not related to this particular line of argument).
>
> : Yes, I know.
>
> Then why do you keep trying to assign to me some other argument?
Beg your pardon?
I am not saying you never made those claims.
I am trying to argue with you about the merit of those claims.
--
John "Many Jars" Porter
------------------------------
Date: Tue, 22 Sep 1998 20:16:35 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl and FORTRAN namelists
Message-Id: <36083DE3.CA60B41A@min.net>
Peter Sakalaukus wrote:
>
> Anyway, I am converting some cshell scripts to Perl. The scripts call
> FORTRAN programs using the namelist syntax with a here document:
>
> $path/tofortran/code/nc2asc2 << END
> &inputs
> filencin = 'test.in'
> fileascout = 'test.out'
> &end
> END
>
> Is there anyway of coding this in Perl (so that the FORTRAN
> code does not have to be changed)?
Did you try this?:
system( "$path/tofortran/code/nc2asc2 " . <<'END' );
&inputs
filencin = 'test.in'
fileascout = 'test.out'
&end
END
The essential point is that the here-doc tag is introduced with
single-quotes; this means the entire contents of the here-doc
will be treated as a single-quoted string, i.e. with minimal
interpolation (i.e. none, AFAIK).
--
John "Many Jars" Porter
------------------------------
Date: Tue, 22 Sep 1998 16:12:39 -0700
From: terrazas@labmed.ucsf.edu (Enrique Terrazas)
Subject: Re: PerlMagick & linux
Message-Id: <terrazas-2209981612390001@asgard.ucsf.edu>
Hello,
Thanks for the suggestion! The ImageMagick-devel rpm did install the
header file. I was able to finish the installation of PerlMagick after
that. I did run into some problems when I did 'make test', so I have to
study the install a little bit more.
> terrazas@labmed.ucsf.edu (Enrique Terrazas) writes:
> > I installed ImageMagick (ImageMagick-4.1.0-1glibc.i386.rpm) on my linux
> > machine (Pentium PC running RedHat Linux 5.1) with no problem. However, I
> > can't get PerlMagick installed. I get the following error when I try to
> > "make":
>
> did you also install the ImageMagick-dev (from memory). You need to
> also install the header files and libraries.
>
> > cc -c -I../magick -I/usr/local/include/magick -I/usr/X11R6/include
> > -Dbool=char -DHAS_BOOL -I/usr/loc
> > al/include -O2 -DVERSION=\"1.45\" -DXS_VERSION=\"1.45\" -fpic
> > -I/usr/lib/perl5/i386-linux/5.00404
> > /CORE Magick.c
> > Magick.xs:15: magick.h: No such file or directory
> > make: *** [Magick.o] Error 1
> >
> > Is magick.h supposed to be installed with ImageMagick? If so, it doesn't
> > seem to be installed on my machine.
>
> If I remember correctly the .rpm put the header files in an odd place,
> something like /usr/include/X11R6/include/magick either query the
> .rpm or walk your drive... (You'll probably have to edit the
> Makefile.PL file, but it's in the README)
--
Enrique Terrazas
mailto:terrazas@labmed.ucsf.edu
http://pangloss.ucsf.edu/~terrazas/
------------------------------
Date: Wed, 23 Sep 1998 00:03:13 +0100
From: jwl@_munged_part_of_address_worldmusic.de (Joergen W. Lang)
Subject: Re: Q: how to search/replace (s/...) extended ascii characters?
Message-Id: <1dfs6sx.ohasmjca5ep2N@host063-210.seicom.net>
#!/usr/bin/perl -w
use locale; # here's your friend...
$_ = "Hi, my name is Jxrgen. Blame my parents.";
s/x/oe/;
print;
__END__
prints: "Hi, my name is Joergen. Blame my parents."
Hth,
Jørgen ;-)
Serge G <sergeg@odyssee.net> wrote:
> Hi, y'all,
>
> Anybody out there kind enough to explain / illustrate how does one
> search and replace (Perl Win32, v5.02, methinks) extended ascii
> characters? Only hint I got in this NG was how to search and replace
> some "owithumlautoverit", using it's hex value, which was not of much
> use to me, not knowing the hex values of french extended asciis... :(
>
> Or (wishful thinking mode engaged), any routine out there for
> translating extended asciis to their HTML equivalent?
>
> TIA,
>
>
>
> /sergeg ;(
--
To reply by email please remove _munged_part_of_address_ Thanks !
-------------------------------------------------------------------
"Everything is possible - even sometimes the impossible"
HOELDERLIN EXPRESS - "Touch the void"
------------------------------
Date: Wed, 23 Sep 1998 00:44:02 GMT
From: jgalag@mit.edu (James Galagan)
Subject: requiring into multiple namespaces
Message-Id: <36084432.16428668@news.ne.mediaone.net>
Hi,
I was wondering if there was a way to "require" a file in a module and
also "require" the same file in a program that "use"s that model.
For example, if we have in a.pl :
sub a {
print "In a()\n";
}
1;
and in b.pm :
package b;
use Exporter;
require "a.pl";
@ISA = qw(Exporter);
@EXPORT = qw(&b);
sub b {
print "In b()!\n";
&a;
}
1;
and finally if we have a script c.pl :
use b;
require "a.pl"
$b
$a
script c.pl will balk with an error: "Undefined subroutine &main::a
called at c.pl ..." since the compiler is checking to see if a.pl has
already been "require"d (which it has in b.pm).
Assuming that a.pl is a library of useful subroutines, I would
like for both b.pm to be able to use them and also any scripts
that use b.pm.
Of course in c.pl I can always call &b::a, but this means any user
of b.pm must know that now the subroutines in a.pl have been
kidnapped into the namespace of b.
I have also considered adding all the subroutines in a.pl to the
EXPORT list of b.pm, but once again it seems non-intuitive
that using one module should result in the importing of subs
from what is basically a stand alone library (a.pl).
Any advice would be much appreciated.
Thanks,
James
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 3791
**************************************