[10184] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3777 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 21 13:07:18 1998

Date: Mon, 21 Sep 98 10:00:25 -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           Mon, 21 Sep 1998     Volume: 8 Number: 3777

Today's topics:
    Re: any way to encrypt my script? (John Moreno)
    Re: any way to encrypt my script? <merlyn@stonehenge.com>
    Re: any way to encrypt my script? (Abigail)
    Re: can MSWord and Adobe PDF docs be read for indexing? <jvradelis@mediaone.net>
    Re: Danish letters =?iso-8859-1?Q?=C6_=D8_=C5?= (Abigail)
    Re: downloading a file using perl... (Garrett Casey)
    Re: EOF command for Mac? (for Perl) <dejah@DejahsPrivateIce.com>
    Re: EOF command for Mac? (for Perl) <dejah@DejahsPrivateIce.com>
    Re: EOF command for Mac? (for Perl) (brian d foy)
    Re: even/odd numbers (John Moreno)
    Re: even/odd numbers <rapruitt@inetconn.net>
    Re: even/odd numbers <tchrist@mox.perl.com>
    Re: even/odd numbers (Abigail)
    Re: even/odd numbers (Abigail)
    Re: even/odd numbers (John Moreno)
    Re: Hash of arrays... dave@mag-sol.com
    Re: How to combine hash %b to hash %a? (union) <merlyn@stonehenge.com>
    Re: O'Reilly's Win32 Perl Resouce Kit (Nathan V. Patwardhan)
    Re: Perl & Java - differences and uses (Abigail)
    Re: Perl & Java - differences and uses (Abigail)
        Perl and Lotus Notes? <rbowen@rcbowen.com>
    Re: perl wrapper to lie about system time? (Mike Wescott)
    Re: Randal Schwartz in Dallas, Texas 10/3 (Brand Hilton)
    Re: script: scriptMangle! <upsetter@ziplink.net>
    Re: script: scriptMangle! (Paul David Fardy)
    Re: Shell-scripts and #! ( big dilemma ) ! (William Totten)
        Trouble with ActiveState Perl on WinNT Workstation 4.0S <ztf@one.com>
        Unix system call to parse print queue info rb0751@rocketmail.com
    Re: Unix system call to parse print queue info <eashton@bbnplanet.com>
        Using perl module nguyen.van@imvi.bls.com
    Re: where is Date::Parse? (Abigail)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 21 Sep 1998 11:23:59 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: any way to encrypt my script?
Message-Id: <1dfpe0m.t9ovkk1gi72tcN@roxboro0-011.dyn.interpath.net>

Russ Allbery <rra@stanford.edu> wrote:

> I don't think that *most* people really care about the reversibility of
> the compile nearly so much as they care about the additional benefits that
> compilation might bring (faster load time, making possible some global
> optimizations that Perl can't do because it has to compile at run-time,
> better profiling and debugging analysis of programs, and the like).

I'd like to see it on the Mac so I could distribute some small programs
without requiring that the user (who most likely doesn't have perl) to
download 3-5 megabytes of stuff.  Reversibility of the compile isn't a
issue at all (hell, it could do it complete with comments for all care).

-- 
John Moreno


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

Date: Mon, 21 Sep 1998 15:37:01 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: any way to encrypt my script?
Message-Id: <8c90jdbhpz.fsf@gadget.cscaper.com>

>>>>> "bitnut1" == bitnut1  <bitnut1@my-dejanews.com> writes:

bitnut1> The officially approved "compiler" uses name strings instead
bitnut1> of pointers.  This unusual design makes the executable larger
bitnut1> and slower -- obviously to make the compilation reversible --
bitnut1> and useless for most people.

Not so obviously, it's also a necessity in the face of local() and
eval() and Exporter->import.  Three things essential to the language.

bitnut1> I doubt it that this preaching through language design and deceit
bitnut1> will bring many converts to Perl.

I doubt that your complaining about it will cause it to change.
Sincerely doubt. :)

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 21 Sep 1998 15:38:51 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: any way to encrypt my script?
Message-Id: <6u5rub$otj$1@client3.news.psi.net>

bitnut1@my-dejanews.com (bitnut1@my-dejanews.com) wrote on MDCCCXLVI
September MCMXCIII in <URL: news:6u42tm$3pl$1@nnrp1.dejanews.com>:
++ 
++ >------------------------------------------
++ > Russ Allbery <rra@stanford.edu>:
++ > ...
++ > Keep in mind that you can compile Perl to a machine-readable binary
++ > executable if you want, provided you don't do too many cute module tricks.
++ >------------------------------------------
++ 
++ The Perl "compiled executable" looks a bit funny:
++ -- A 2-line script results in a 950Kb "executable".
++ -- The variable names are embedded in a human readable form (?!).
++ -- The execution speed is close to the non-compiled form, etc.
++ 
++ You can call it a duck, but it looks, smells and walks like
++ interpreted code.


950 Kb executables look like interpreted code?



Abigail
-- 
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
          for (s;s;s;s;s;s;s;s;s;s;s;s)
              {s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'


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

Date: Mon, 21 Sep 1998 12:45:31 -0400
From: "James T. Vradelis" <jvradelis@mediaone.net>
Subject: Re: can MSWord and Adobe PDF docs be read for indexing?
Message-Id: <360682AB.C6B5CC41@mediaone.net>

You can write msword and excel files using the Win32::OLE module.

Pat Trainor wrote:

> Idea:
>
> Read msword, excel, or pdf files for textual indexing for a search engine.
> They will be residing on a unix box and at my mercy.
>
> What methods exist to read/catalogue the text in them? "strings"? There has
> to be a better answer, eh?! :)
>
> Bonus Question:
>
> What is required (even for $$$) that enables perl to write data in msword,
> excel, pdf formats?
>
> TIA!



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

Date: 21 Sep 1998 16:44:18 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Danish letters =?iso-8859-1?Q?=C6_=D8_=C5?=
Message-Id: <6u5vp2$q3h$3@client3.news.psi.net>

tcd@post10.tele.dk (tcd@post10.tele.dk) wrote on MDCCCXLVI September
MCMXCIII in <URL: news:3604BEDA.4DF2@post10.tele.dk>:
++ I have been looking at some database scripts
++ And it seems that they all have the same fault.
++ When you do a search for a word that starts with a danish letter
++ F X E f x e - like in the words  "Fg" "Xlstykke" "Erhus"
++ the scripts cant find it.
++ 
++ 
++ I'm not sure but this seems to be a problem with
++ perls reg expression matching, not the programs..
++ 
++ Can anyone help me with this problem ????????????
++ Please email me if you have the answer to the problem.


You have a bug in line 17.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: Mon, 21 Sep 1998 15:30:50 GMT
From: nospamno_adms1@cts.com (Garrett Casey)
Subject: Re: downloading a file using perl...
Message-Id: <360670c1.2078699@nntp.cts.com>

On Sat, 19 Sep 1998 18:11:12 -0600, Mark Hulka <adtech@aros.net>
wrote:

>Here's my problem. I have some files that I want people to be able to
>download from my web site. They are binary files, but when I download
>one of the files using Netscape it comes across as plain text, making
>the file unusable.

This sounds like there is a problem with your server software. Check
the MIME Type for the file's extension.

-Garrett
Garrett Casey
nospamo_adms1@cts.com
Remove "nospamo_" To send me email.


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

Date: Mon, 21 Sep 1998 10:44:30 -0500
From: Mary E Tyler <dejah@DejahsPrivateIce.com>
Subject: Re: EOF command for Mac? (for Perl)
Message-Id: <36067458.25C4@DejahsPrivateIce.com>

brian d foy wrote:
> 
> In article <36047EDA.561D@dorsey.org>, mpn@dorsey.org posted:
> 
> >I'm teaching myself Perl on three different platforms: Unix at school,
> >NT at work and Mac at home, but whenever I need interactivity, I'm
> >limited to doing it on NT or Unix, because those are the only ones where
> >I know how to enter an EOF command. Please tell me I'm not the only
> >person in the world using MacPerl!
> 
> do you mean you need to determine how to tell your script that STDIN
> is done?
> 
> have you tried Control-D? it's not the same as NT, which is Control-Z
> as i recall.
> 
> good luck :)
> 
> --
> brian d foy                                  <comdog@computerdog.com>
snip

The mac does not have a control key and does not map these characters
the same way... she would have to use the ASCII codes (for the control
characters), but i do not believe that this is what she is asking. the
question is: what are you trying to do?

dejah, jeez something i know about, the mac!
-- 
i trust i make myself obscure, i have need of obscurity now- robert bolt

a heated exchange of unread mail would be welcomed by all- christensen

Skating Fiction. Featuring the  highly acclaimed serial On The Edge!
http://www.DejahsPrivateIce.com


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

Date: Mon, 21 Sep 1998 10:49:15 -0500
From: Mary E Tyler <dejah@DejahsPrivateIce.com>
Subject: Re: EOF command for Mac? (for Perl)
Message-Id: <36067574.6EFE@DejahsPrivateIce.com>

Mary E Tyler wrote:
> 
> brian d foy wrote:
> >
> > In article <36047EDA.561D@dorsey.org>, mpn@dorsey.org posted:
> >
> > >I'm teaching myself Perl on three different platforms: Unix at school,
> > >NT at work and Mac at home, but whenever I need interactivity, I'm
> > >limited to doing it on NT or Unix, because those are the only ones where
> > >I know how to enter an EOF command. Please tell me I'm not the only
> > >person in the world using MacPerl!
> >
> > do you mean you need to determine how to tell your script that STDIN
> > is done?
> >
> > have you tried Control-D? it's not the same as NT, which is Control-Z
> > as i recall.
> >
> > good luck :)
> >
> > --
> > brian d foy                                  <comdog@computerdog.com>
> snip
> 
> The mac does not have a control key and does not map these characters
> the same way... she would have to use the ASCII codes (for the control
> characters), but i do not believe that this is what she is asking. the
> question is: what are you trying to do?
> 
> dejah, jeez something i know about, the mac!

pardon that stupid thing i just said. ASCII codes indeed! for control
sequences. ak. must be the pretzels. yeah, it's something in the
pretzels!

dejah, having a rough morning, but still wondering what the person is
trying to do.
-- 
i trust i make myself obscure, i have need of obscurity now- robert bolt

a heated exchange of unread mail would be welcomed by all- christensen

Skating Fiction. Featuring the  highly acclaimed serial On The Edge!
http://www.DejahsPrivateIce.com


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

Date: Mon, 21 Sep 1998 12:17:32 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: EOF command for Mac? (for Perl)
Message-Id: <comdog-ya02408000R2109981217320001@news.panix.com>
Keywords: from just another new york perl hacker

In article <36067458.25C4@DejahsPrivateIce.com>, dejah@DejahsPrivateIce.com posted:

>brian d foy wrote:

>> In article <36047EDA.561D@dorsey.org>, mpn@dorsey.org posted:

>> >I'm teaching myself Perl on three different platforms: Unix at school,
>> >NT at work and Mac at home, but whenever I need interactivity, I'm
>> >limited to doing it on NT or Unix, because those are the only ones where
>> >I know how to enter an EOF command. Please tell me I'm not the only
>> >person in the world using MacPerl!

>> have you tried Control-D? it's not the same as NT, which is Control-Z
>> as i recall.

>The mac does not have a control key and does not map these characters
>the same way... she would have to use the ASCII codes (for the control
>characters), but i do not believe that this is what she is asking.

i don't know what machine you are using, but every Apple keyboard i've
ever had (and that's several) has had a functioning key labelled
"Control".  and, if you hold that key down along with "D" while MacPerl
is expecting STDIN, MacPerl gets EOF.

>dejah, jeez something i know about, the mac!

um, maybe not...

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: Mon, 21 Sep 1998 11:11:53 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: even/odd numbers
Message-Id: <1dfpcsa.e0lxlg5183gcN@roxboro0-011.dyn.interpath.net>

Tom Christiansen <tchrist@mox.perl.com> wrote:

> :The reason I'd like to have a div operator is to make it easy to do
> :integer division on a single line.  Currently you can either block it
> :out, or type cast or otherwise fix it ($num =~ s/\..+/;).  The type cast
> :is probably currently the cleanest way of doing it on one line at the
> :moment - I just think that having a explict "divide with integer
> :results" would be a good idea.  
> 
> That's what int() is for.

Maybe so - it certainly can work that way.  I just find it easier to
understand what's happening with: a div b  than using: int(a/b).  I'm
not sure why, that's just the way it is.

-- 
John Moreno


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

Date: Mon, 21 Sep 1998 11:13:16 -0400
From: "Andy" <rapruitt@inetconn.net>
Subject: Re: even/odd numbers
Message-Id: <6u5qoj$pnp$1@news.dn.net>

>> In article <1dfmqcc.8jsdzxpp9ihzN@roxboro0-020.dyn.interpath.net>
>> phenix@interpath.com (John Moreno) wrote:
>>
>> >                         (int($num) / 2)*2 == $num
>>
>> ObNitpick-
>>
>> I believe you mean int($num / 2) * 2 == $num
>


print 'odd' if ($num % 2);
print 'even' unless ($num % 2);

________
andy pruitt







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

Date: 21 Sep 1998 15:24:44 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: even/odd numbers
Message-Id: <6u5r3s$j9d$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, phenix@interpath.com (John Moreno) writes:
:Maybe so - it certainly can work that way.  I just find it easier to
:understand what's happening with: a div b  than using: int(a/b).  I'm
:not sure why, that's just the way it is.

If you continue to program Pascal using Perl, you never be happy.

--tom
-- 
Down that path lies madness.  On the other hand, the road to hell is
paved with melting snowballs. --Larry Wall in <1992Jul2.222039.26476@netlabs.com>


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

Date: 21 Sep 1998 15:45:08 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: even/odd numbers
Message-Id: <6u5sa4$otj$2@client3.news.psi.net>

Josh Kortbein (kortbein@iastate.edu) wrote on MDCCCXLVI September
MCMXCIII in <URL: news:6u3sbf$ct6$1@news.iastate.edu>:
++ 
++ As a mathematician-in-training, I'd like to point out that "modulus"
++ often isn't introduced for quote some time, depending on when one takes
++ which classes. If one takes algebra, geometry, trigonometry, calculus,
++ etc., without ever taking a "discrete math" course, it could be that
++ division modulo n might not even be introduced until a first course
++ in abstract algebra. Yes, the way it works is basic, but the idea
++ of something like the modulus operator is largely useless in lots of
++ mathematical situations.


We got division with quotient and remainder in elementary school
way before fractions were introduced.



Abigail
-- 
perl -wle 'print "Prime" if (0 x shift) !~ m 0^\0?$|^(\0\0+?)\1+$0'


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

Date: 21 Sep 1998 15:48:08 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: even/odd numbers
Message-Id: <6u5sfo$otj$3@client3.news.psi.net>

Dan Nguyen (nguyend7@msu.edu) wrote on MDCCCXLVII September MCMXCIII in
<URL: news:6u4hgm$9vc$1@msunews.cl.msu.edu>:
++ 
++ For example.  In my 'C' class.  They told us to do
++ ch ^= 0x20;
++ to change uppercase to lowercase and lowercase to uppercase.  It's not
++ the clearest way to do something like that.  But it is the easiest
++ and most efficient way of doing it.


It's also wrong of course. It only works for a-z, and a subset
of the accented letters in ISO-8859-1. 



Abigail
-- 
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
         ${qq$\x5F$} = q 97265646f9 and s g..g;
         qq e\x63\x68\x72\x20\x30\x78$&eggee;
         {eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'


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

Date: Mon, 21 Sep 1998 12:00:11 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: even/odd numbers
Message-Id: <1dfpeu9.llzsaq1ybj3c0N@roxboro0-002.dyn.interpath.net>

Tom Christiansen <tchrist@mox.perl.com> wrote:

>  [courtesy cc of this posting sent to cited author via email]

Unnecessarily so.  For the record - all followups to my own articles are
clearly displayed for me by my newsreader.
 
> In comp.lang.perl.misc, phenix@interpath.com (John Moreno) writes:
> :Maybe so - it certainly can work that way.  I just find it easier to
> :understand what's happening with: a div b  than using: int(a/b).  I'm
> :not sure why, that's just the way it is.
> 
> If you continue to program Pascal using Perl, you never be happy.

I don't program pascal using perl - but to *me* a div b makes more sense
(and using a type conversion would be perfectly possible in pascal in
fact except for using int instead of integer it would look exactly the
same).  It says more clearly what I want done than the type conversion
does - there's no room for error as to what is supposed to happen, a
type conversion /because/ it is a type conversion leaves opportunity for
sloppiness and mistakes.  Is it int ($a / $b +$y) or was that a mistake
and it should have been int ($a / $b) + $y?  As long as it just happens
that $y is a integer there isn't a difference.

-- 
John Moreno


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

Date: Mon, 21 Sep 1998 15:16:51 GMT
From: dave@mag-sol.com
Subject: Re: Hash of arrays...
Message-Id: <6u5ql3$33s$1@nnrp1.dejanews.com>

In article <6u5ll2$tq4$1@nnrp1.dejanews.com>,
  mhourahi@ca.ibm.com wrote:
> Hi, everybody!	Is it possible to make a hash of arrays?  If so, how do
> create it?  reference it?
>
> I'm trying to store table such as:
>
> foo 1 3 4
> bar 2 4 5
> foz 4 9 3
> baz 3 6 2
>
> and then directly reference the numbers associated with foo, bar, etc.
>
> Any help would be greatly appreciated...

Mike,

I think you need something like:


my %stuff = (
            'foo' => [1, 3, 4],
            'bar' => [2, 9, 3],
            'foz' => [4, 9, 3],
            'baz' => [3, 6, 2]
            );

# prints 4
print $stuff{'foz'}->[0], "\n";
# prints 6
print $stuff{'baz'}->[1], "\n";
# prints (a different!) 4
print $stuff{'foo'}->[2], "\n";


hth,

Dave...

--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 21 Sep 1998 15:33:30 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: How to combine hash %b to hash %a? (union)
Message-Id: <8cg1dlbhvu.fsf@gadget.cscaper.com>

>>>>> "Martien" == Martien Verbruggen <mgjv@comdyn.com.au> writes:

Martien> One possibility:

Martien> %a = (%a, %b);

Certainly that works, but this works measurably faster for large %a:

	@a{keys %b} = values %b;

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Mon, 21 Sep 1998 15:13:53 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: O'Reilly's Win32 Perl Resouce Kit
Message-Id: <R2uN1.369$_c5.3668414@news.shore.net>

scott@softbase.com wrote:

: But are threads really part of Perl now? Do they work?

Well, to put it another way -- they seem to work reliably under
Win32.  To answer your question, I still think that they're
experimental, but if people seek Threads, there should always be doc
to follow.

: Things like this require you buy into the entire runtime system for the
: development package. You can fork() in DOS if you buy into the right

Yes and no.  One doesn't need to use the entire Cygnus environment
once they've built "Cygperl".  In fact, I've been able to work just
fine with "Cygperl" from a DOS shell!  :-)  I'm sure that someone will
correct me if I'm spewing errors, but ... all I believe that fork() is
doing is some manipulation of CreateProcess(...).

Then again, mingw32 seems to be the most efficient of these toolkits
but it doesn't buy the developer fork().

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: 21 Sep 1998 15:56:30 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6u5sve$otj$4@client3.news.psi.net>

George Reese (borg@imaginary.com) wrote on MDCCCXLVII September MCMXCIII
in <URL: news:kQjN1.1068$Ge.3259462@ptah.visi.com>:
++ 
++ Jesus Christ, I posted a hastily drawn together set of steps which
++ clearly were not an algorithm (not even by the definition I posted)
++ and you take it as an opportunity to make a personal attack on me.


Maybe you shouldn't answer a question that asks for an example of
an algorithm with something that isn't an algorithm.



Abigail
-- 
perl -wle 'print "Prime" if ("m" x shift) !~ m m^\m?$|^(\m\m+?)\1+$mm'


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

Date: 21 Sep 1998 16:26:29 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6u5unl$q3h$1@client3.news.psi.net>

George Reese (borg@imaginary.com) wrote on MDCCCXLVII September MCMXCIII
in <URL: news:d9jN1.1059$Ge.3219069@ptah.visi.com>:
++ In comp.lang.java.programmer Sam Holden <sholden@pgrad.cs.usyd.edu.au> wrote:
++ : Which part of term algorithm do you not understand???
++ 
++ None.  Appearantly, I understand it much better than you.  And Knuth
++ was wrong, or he was specifically talking about algorithms in computer
++ science.  Since your quotes are taken out of context, I do not know
++ which is true.

Oh, let's see. Computer Science is irrelevant in this discussion.

Don't tell me you're applying OO methods when tying your shoes!

++ 
++ Let's take some examples:
++ 
++ : 'An algorithm is a set of rules for getting a specific output from a specif
++ : input. Each step must be so precisely defined that it can be translated int
++ : computer language and executed by a machine.'
++ : 	-- Donald E. Knuth
++ 
++ Isn't this begging the question?  If we define an alogorithm as
++ something a machine can do, we have not really said anything useful.

But that's not what Knuth said. It's merely a specification of the 
preciseness of the rules; rules have to be able to be translated
into a computer language and executed by a machine.

Of course, Knuth isn't specifying any particular language or machine.

++ Isn't an algorithm really a tool for reaching a goal?  Why is it
++ important that a machine must be one of the things that goal?

No, the algorithm isn't a tool for reaching a goal. Reaching a goal
is *performing* the algorithm. The algorithm describes *how* to reach
the goal. The machine is important because a machine will show
unambigious, deterministic and precise behaviour.

Of course, a machine can be something else than a heap of copper, 
plastic and traces of rare materials.

++ : 'The distinguishing feature of an algorithm is that all vagueness must be
++ : eliminated; the rules must describe operations that are so simple and so we
++ : defined that they can be executed by a machine.'
++ : 	-- Donald E. Knuth
++ 
++ Why?

Because otherwise it isn't useful. A recipe for making some kind of
pastry could read:

   - mix flour, milk, eggs and sugar.
   - put mixture in heated oven.
   - take pastry out of oven.

But it isn't an algorithm. It is too vague, and there are not enough
constrains to produce the post condition.

++ : 'Sort this by using comparison operations' is a vague description.
++ 
++ Yes, it is.  This is certainly not an algorithm.  An algorithm exists
++ to yield a certain result.  You have not even stated what sort of
++ result you wish to achieve.

Ah, you just answered your "Why?"

++ : 'Sort this using merge sort' is a vague description, unless a 'set of rules
++ : in which 'each step must be so precisely defined that it can be translated
++ : into a computer language and executed by a machine' exists and is labelled
++ : 'merge sort' - in which case the statement is an algorithm
++ 
++ That you have provided an example of something that is most definitely
++ not an algorithm does not mean that all algorithms are performable by
++ computers.

Knuth didn't mention computers! He said *MACHINES*.


++ A little history lesson for you.  The word algorithm comes from the
++ Persian mathematician M{usb al-Khowbrizm.  The idea of the algorithm
++ as we understand the term today comes from the works of Turing, Gvdel,
++ and Church.  An algorithm has three key features:
++ * substrate neutrality
++ * underlying mindlessness
++ * guaranteed results
++ 
++ Substrate neutrality means the process works well using a pencil, pen,
++ computer, etc.  The power of the algorithm is due to its logical structure.
++ 
++ Underlying mindlessness means that each step must be simple.  It
++ should not require wise decisions.
++ 
++ Guaranteed results means that whatever the algorithm does, it should
++ always provide the same results.

Not quite, as that doesn't leave room for randomized algorithms.
Guarenteed results means satisfying the post condition.

Now, where does this conflict with what Knuth said?


++ Now, certainly OO methodologies do violate the second criteria. But

What have methodologies to do with algorithms?

++ they do isolate the "wise decisions" required of the process to early
++ in the process.  The result is a sert of UML documentation that does
++ remove the need for wise decisions on the part of programmers in the
++ development process.  The problem we have in translating this
++ algorithm for building applications lies in translating business rules
++ into something that would make sense to a computer.  But we can get
++ them simple enough so that novice programmers can work with them,
++ given a properly structured language.


Designing things and then gradually chopping it up in smaller and 
smaller parts, until reaching small parts that can be performed
by lesser schooled people isn't really "new in the 90's".

How do you think the Egyptians build their pyramids 4000 years ago?
Every peasant was a top notch pyramid builder?



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


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

Date: Mon, 21 Sep 1998 10:57:50 -0400
From: Rich Bowen <rbowen@rcbowen.com>
Subject: Perl and Lotus Notes?
Message-Id: <3606696D.743B@rcbowen.com>

I went to the Perl Conference, and learned a lot of cool stuff, but am
now looking at trying to justify the trip, and the stuff that I learned,
to my boss.
Ya see, we (DataBeam Corporation) were recently bought by Lotus, and
everything (yes, everything) is now Lotus Notes. We can't do anything
without it.
And so, I have the unenviable task of trying to convert my Perl talents
to useful Lotus Notes talents. Yes, there are still the MANY other
things that I do with Perl, such as monitor all of our network for
problems and send pages when things go south - you know, little things
like that. But the bulk of my work and job description has been based
around CGI database applications on the intranet. Which are all leaning
towards Notes databases.
So, the questions are:
1) Are any of you folks in a Notes environment, and how does Perl help
you there?
2) Are there any Notes modules available? I did not see any on CPAN, but
I was not sure if they would be in the database directories or in the
"strange, masochistic, chains and bondage applications with uncertain
purposes" directories. (You know, with the Windows modules ...)
3) Perhaps this is more of a question for the "advocacy" list - how are
you Notes users justifying your existance to your supervisors?
4) How can I circumvent the entire Notes juggernaut and still do what I
enjoy doing? Yes, I have heard of GNotes, but it appears to be still
very much vaporware.

If this sounds like a desperate plea, well, it is. I would not like to
think that I had been made superfluous by something as brain-damaged as
Notes. No, I am not interested in folks telling me how wonderful Notes
is. I'm a Lotus employee. Believe me, I've heard the marketing brochure.
And yet, somehow, I still use a POP client to read my email. Amazing.

Rich
-- 
perl -e "eval  reverse '\'rekcaH lreP rehtonA tsuJ\' tnirp'"
http://www.rcbowen.com/


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

Date: 21 Sep 1998 11:28:03 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: perl wrapper to lie about system time?
Message-Id: <x4n27tcwor.fsf@cygnus.ColumbiaSC.NCR.COM>

In article <6tst2e$rec$1@pegasus.csx.cam.ac.uk> htl10@cus.cam.ac.uk (Dr H. T. Leung) writes:

>   Is it possible to have a perl wrapper to lie about the system time for testing
>   y2000 compilance? (i.e. the system time is a different value as far as a command
>   executed inside a script is concerned) Changing the system clock seems a bit
>   tedious...

Not in any way that would provide a reasonably comprehensive test.

On the other hand, changing the TZ environment variable can change programs'
concept of local time:

$ TZ=EST-11193EDT date
Sat Jan  1 00:27:39 EST 2000

-- 
	-Mike Wescott
	 mike.wescott@ColumbiaSC.NCR.COM


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

Date: 21 Sep 1998 15:12:43 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: Randal Schwartz in Dallas, Texas 10/3
Message-Id: <6u5qdb$7tn2@mercury.adc.com>

In article <6tumcj$7tn1@mercury.adc.com>, I wrote:
>The particulars are:
>
>   Saturday, October 3rd, 2:00pm
>   Skybridge III room of the Doubletree Hotel on LBJ Freeway in Dallas 
>   Admission is free

The address of the Doubletree is 5410 LBJ Freeway, Dallas, 75240.
It's located at 635 and the Dallas North Tollway in north Dallas.  For
a map, see:

http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=5410+lbj+fwy&csz=dallas%2C+tx+75240&Get+Map=Get+Map

See you there!

-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


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

Date: Mon, 21 Sep 1998 15:49:29 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: script: scriptMangle!
Message-Id: <dAuN1.370$_c5.3662958@news.shore.net>

Craig Berry <cberry@cinenet.net> wrote:

:> Tom has done a huge amount for the Perl community.  You are spitting
:> in his face, and yet you still want him to act civil.  Again, I hope I
:> never cross paths with you in a dark alley. :)

: Honestly, that wasn't and isn't my intention.  I wish someone could tell
: me why it's being taken that way!

You refused to agree with Tom. Therefore, you are evil. That's the way it
works around here, Craig! :)

--Art
-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: 21 Sep 1998 15:26:08 GMT
From: pdf@morgan.ucs.mun.ca (Paul David Fardy)
Subject: Re: script: scriptMangle!
Message-Id: <6u5r6g$ijt$1@coranto.ucs.mun.ca>

Craig Berry <cberry@cinenet.net> writes:
>... I am arguing for the *principle* that sources may, under certain
>circumstances, be hidden without the action being a moral blot on the
>developer involved.  I wish people would get this straight!

>The decision of whether to sell, or to buy, hidden-source software is an
>economic one, not a moral one.  That is my entire argument.  I'm hoping
>that if I stress that often enough, someone will address the alleged moral
>dimension of the issue, or admit it isn't there.

>Note that your clients above presumably paid more for your services
>because of the added work you needed to do to get around the lack of
>source.  Their *economic* decision to buy no-source code led (in this
>instance) to an *economic* cost.  I truly, honestly, despite having
>sincerely tried, cannot see the moral dimension here.  Perhaps I'm being
>blind; perhaps I'm missing it. ...

Yes, you are missing something.  There is a moral dimension to choosing
_not_ to apply moral values to a decision.

Paul
-- 
Paul David Fardy                      |  pdf@morgan.ucs.mun.ca
Computing and Communications          |  pdf@InfoNET.st-johns.nf.ca
Memorial University of Newfoundland   |
St. John's, NF  A1C 5S7               |


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

Date: 21 Sep 1998 15:16:33 GMT
From: totten @ cis . udel . edu (William Totten)
Subject: Re: Shell-scripts and #! ( big dilemma ) !
Message-Id: <6u5qkh$d5j$1@dewey.udel.edu>

There is always the option of:
#!/usr/bin/env perl

As long as perl is in your path, so put $PRIFIX in your path.

In article <6tr1bu$32ti@soprox-in.bull.fr>,
Serge Noiraud <Serge.Noiraud@bull.net> wrote:
>I have an environment variable called PREFIX which is in my HOME directory.
>This variable is defined like this :
>$HOME/local/$SYSTEM$VERSION
>
>So I have the following directories :
>$HOME/local/IRIX4/( bin, lib, ... )
>$HOME/local/IRIX5/...
>$HOME/local/IRIX6/...
>$HOME/local/AIX32/...
>$HOME/local/AIX41/...
>$HOME/local/AIX42/...
>$HOME/local/AIX43/...
>...
>
>My HOME directory is mounted by NFS.
>I choose the good bin directory depending the system I work on.
>
>All work fine ( the PATH is correct ).
>
>The problem is :
>I have shell-scripts with the #! magic number.
>I can't use #!perl even if my PATH is correct.
>I can't use #! $HOME/local/IRIX5/bin because this shellscript won't work
>on an AIX system.
>I can't use #! $PREFIX/bin/perl
-- 
Totten, William David (Bill)         Computer and Information Science Major
totten@pobox.com                   University of Delaware (Newark, DE; USA)
http://pobox.com/~totten/               Friends don't let friends use emacs


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

Date: Mon, 21 Sep 1998 12:30:58 -0400
From: "Zach Frey" <ztf@one.com>
Subject: Trouble with ActiveState Perl on WinNT Workstation 4.0SP3
Message-Id: <6u5uus$8su$1@news0-alterdial.uu.net>

I just tried the ActivePerl release from ActiveWare, and I found an odd
problem.  After installing and rebooting, I then tried to run Outlook 98
(my normal email client), and it had become painfully, excruciatingly,
unusuably slow.  (Yes, even more than usual.)  I uninstalled ActivePerl
and Outlook returned to it's previous speed.

Does anyone know what the problem is?  Is there a workaround?


Thanks in advance,

Zach Frey
ztf@one.com




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

Date: Mon, 21 Sep 1998 16:42:54 GMT
From: rb0751@rocketmail.com
Subject: Unix system call to parse print queue info
Message-Id: <6u5vme$8cq$1@nnrp1.dejanews.com>

  Is there some way in PERL to view only chosen information about what is in
the UNIX(AIX 4.1.5) queues?  For instance, I give it a	print queue name and
it returns just the name of the file queued to print.  A system call to the
lpstat command clips the fields too much to be useful and I see no way to
request specific fields of information.  Any ideas?  Thanks.  ...Adam

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 21 Sep 1998 16:58:31 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Unix system call to parse print queue info
Message-Id: <3606834F.6AC6C592@bbnplanet.com>

rb0751@rocketmail.com wrote:

>   Is there some way in PERL to view only chosen information about what is in
> the UNIX(AIX 4.1.5) queues?  For instance, I give it a  print queue name and
> it returns just the name of the file queued to print.  A system call to the
> lpstat command clips the fields too much to be useful and I see no way to
> request specific fields of information.  Any ideas?  Thanks.  ...Adam

Does Perl have a command to manage your lp queue? No. Can you write a
script to get this info? Yes. AIX is a beautiful thing. Lpstat should
return a whole boatload of info, now what you need to do is, read the
manpage and take a closer look at split.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Mon, 21 Sep 1998 16:30:31 GMT
From: nguyen.van@imvi.bls.com
Subject: Using perl module
Message-Id: <6u5uv8$7mc$1@nnrp1.dejanews.com>

Hi guys,

I downloaded a certain module.pm, but to use it do I need to set PATH in my
 .profile so that my program know where the modules are?

Thanks
Van Nguyen

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 21 Sep 1998 16:39:47 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: where is Date::Parse?
Message-Id: <6u5vgj$q3h$2@client3.news.psi.net>

Honza Pazdziora (adelton@fi.muni.cz) wrote on MDCCCXLVI September
MCMXCIII in <URL: news:EzKrv7.J89@news.muni.cz>:
++ On 20 Sep 1998 02:42:15 GMT, Abigail <abigail@fnx.com> wrote:
++ > 
++ > I recently fixed my CPAN.pm:  rm -f CPAN CPAN.pm
++ 
++ If there was something wrong or dangerous about CPAN.pm, would you
++ care to comment, so that the rest of the people can work on better
++ fixes of the problem? 


It's just a plain stupid and dumb piece of code. To frustrating
to work with. 



Abigail
-- 
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT


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

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 3777
**************************************

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