[28324] in Perl-Users-Digest
Perl-Users Digest, Issue: 9688 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 5 11:05:57 2006
Date: Tue, 5 Sep 2006 08:05:08 -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 Tue, 5 Sep 2006 Volume: 10 Number: 9688
Today's topics:
Re: (Off topic) Cyberwar question <skybuck2000@hotmail.com>
Re: (Off topic) Cyberwar question <dha@panix.com>
Re: CPAN - 'cl' is not recognized as an internal or ext <henry.mcguinness@dphpc.ox.ac.uk>
Re: CPAN - 'cl' is not recognized as an internal or ext <sisyphus1@nomail.afraid.org>
Re: CPAN - 'cl' is not recognized as an internal or ext <henry.mcguinness@dphpc.ox.ac.uk>
Re: Cygwin error regarding profile.global beartiger@gmail.com
help with sudo and net::ssh:perl <royg21@gmail.com>
Re: How to handle jpegs inside Net::NNTP <rvtol+news@isolution.nl>
Re: imagemagick very slow - is there anything better? <paul.matthijsse@wanadoo.fr>
Re: Insert Log file into oracle table <addinall@addinall.org>
Re: IPC on Win XP: messages, shared memory <ThomasKratz@REMOVEwebCAPS.de>
Memory Limitations for Perl Programs? <hamelcd@hotmail.com>
Re: Net::FTP - How Do I Read The Available Space On A P <mark1.thompson45@btinternet.com>
Re: Net::FTP - How Do I Read The Available Space On A P <rvtol+news@isolution.nl>
Re: Regexp slowdown <1usa@llenroc.ude.invalid>
Re: Regexp slowdown <rvtol+news@isolution.nl>
Re: Regexp slowdown <notvalid@email.com>
Ultimate programmer's reference - Quickref.org launches <robby.walker@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Sep 2006 07:39:25 -0700
From: "Skybuck" <skybuck2000@hotmail.com>
Subject: Re: (Off topic) Cyberwar question
Message-Id: <1157467165.453508.301930@m79g2000cwm.googlegroups.com>
HAHAHAHAHAHAHAHAHAHA
YOU LAME BASTARDS =D
COMPLAIN ALL YOU WANT AT MY DIAL-UP PROVIDER.
So far they digging it.
Soon I'll switch to broadband and then I can UNDERGROUND.
Yeah baby.
I am going
I am going
I am going DEEPER UNDERGROUND ;) =D
And then I'll be anoumous just like YOU cowardly dipshits.
YEAH BABY =D
I love FREESPEECH hahahahahahahaha.
NEHNEHNEHNEH
Bye,
Skybuck.
------------------------------
Date: Tue, 5 Sep 2006 14:46:12 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: (Off topic) Cyberwar question
Message-Id: <slrnefr3dl.brq.dha@panix2.panix.com>
> Bye,
> Skybuck.
Ah, if only...
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
And if you are a real looney, you would read the manpage.
- Abigail in c.l.p.misc
------------------------------
Date: Tue, 5 Sep 2006 11:43:22 +0100
From: "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk>
Subject: Re: CPAN - 'cl' is not recognized as an internal or external command,
Message-Id: <edjkcc$j21$1@frank-exchange-of-views.oucs.ox.ac.uk>
Ok you seem to be using ActivePerl for windows (you didn't say :)). This is
compiled using Visual C++ version 6, and you have to use the same compiler
to build Perl modules that contain any functions written in C. Some modules
are Pure Perl, so you don't need to worry about compiling any C.
Not everyone is going to have VC++, so there are 2 approaches: By far the
easiest is to use PPM, which gives you compiled windows binaries (as .dll
files) for the relevant bits of the modules you want, and copies these and
the perl code to your perl/site/lib directory. Easy. And there are several
repositories with lots of modules on them, not all of the CPAN, though
More difficult is to build things with Active Perl if you haven't got VC++:
get hold of make.exe, cl.exe etc (you sometimes need a lot of libraries and
header files). Can be a painful way to go.
The Strawberry/Vanilla Perl projects are attempting to provide Windows Perl
distributions compiled using gcc (which is included in the distribution I
think) instead. So you'll be able to use CPAN. They're still experimental
though.
Henry
"MoshiachNow" <lev.weissman@creo.com> wrote in message
news:1157358492.870947.101260@74g2000cwt.googlegroups.com...
> >Install such modules using the ppm utility instead.
>
> Thanks,Rob
> Works like majic.
>
> But why these errors pop up in the first place?
> Do I realy need have C++ compilers installed for this ?
>
------------------------------
Date: Tue, 5 Sep 2006 21:29:15 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: CPAN - 'cl' is not recognized as an internal or external command,
Message-Id: <44fd6080$0$10627$afc38c87@news.optusnet.com.au>
"Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote in message
news:edjkcc$j21$1@frank-exchange-of-views.oucs.ox.ac.uk...
> Ok you seem to be using ActivePerl for windows (you didn't say :)). This
is
> compiled using Visual C++ version 6, and you have to use the same compiler
> to build Perl modules that contain any functions written in C.
That's not strictly true any more - though you won't go wrong if you follow
that advice.
Some time back ExtUtils::FakeConfig appeared, which enables you to use the
freely available MinGW (gcc) compiler with ActivePerl. It provides good
milage, too.
Then, starting with build 817 (I think), ActivePerl started working
seamlessly with the MinGW compiler (though ActivePerl is still built with
MSVC++6.0). They haven't got it quite right, however - and it doesn't
provide the milage you get with ExtUtils::FakeConfig. However, for many
extensions (modules), it works fine.
You can also generally use MSVC++ 7.0, 7.1, and 8.0 (which were/are freely
available)with ActivePerl. Again, there are exceptions.
So ... the waters have been muddied ... and I thought it simpler to tell the
op to "use ppm", rather than detail other options.
(The above info is provided as a "something you might find interesting",
rather than as a "correction" :-)
Cheers,
Rob
------------------------------
Date: Tue, 5 Sep 2006 14:57:22 +0100
From: "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk>
Subject: Re: CPAN - 'cl' is not recognized as an internal or external command,
Message-Id: <edjvo5$n2j$1@frank-exchange-of-views.oucs.ox.ac.uk>
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message
news:44fd6080$0$10627$afc38c87@news.optusnet.com.au...
>
> "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote in message
> news:edjkcc$j21$1@frank-exchange-of-views.oucs.ox.ac.uk...
>> Ok you seem to be using ActivePerl for windows (you didn't say :)). This
> is
>> compiled using Visual C++ version 6, and you have to use the same
>> compiler
>> to build Perl modules that contain any functions written in C.
>
> That's not strictly true any more - though you won't go wrong if you
> follow
> that advice.
>
> Some time back ExtUtils::FakeConfig appeared, which enables you to use the
> freely available MinGW (gcc) compiler with ActivePerl. It provides good
> milage, too.
>
[snip]
>
> (The above info is provided as a "something you might find interesting",
> rather than as a "correction" :-)
>
> Cheers,
> Rob
Excellent. Many thanks. I'll look into that and try it out.
There were/are obviously complications with things like Inline, XS, and
compiling modules on Windows. Is there a site where all this info is covered
well? http://win32.perl.org is there but it seems a bit sparse so far.
Maybe I should write something on there (when I've done my research that
is!).
Henry
------------------------------
Date: 5 Sep 2006 06:48:45 -0700
From: beartiger@gmail.com
Subject: Re: Cygwin error regarding profile.global
Message-Id: <1157464125.634455.248740@i3g2000cwc.googlegroups.com>
Matt Garrish wrote:
<snip>
> You started this thread with the ... statement that no one should
> object to<snip>
Should anyone object to your posting off topic here in clpm, and, if
not, why not?
J
------------------------------
Date: 5 Sep 2006 06:19:29 -0700
From: "roygbaba" <royg21@gmail.com>
Subject: help with sudo and net::ssh:perl
Message-Id: <1157462369.599608.120700@m79g2000cwm.googlegroups.com>
I am tring to interact with sudo command but i cant seem to get it
right.
i took the example from the /eg directory from CPAN and tried to use it
, but nothing ....
can someone take a look at the code and suggest somthing?? I realy want
to gte this thing done .
#!/usr/bin/perl -w
use strict;
use Net::SSH::Perl;
my ( $host , $username , $password );
$host="1.1.1.1";
$username="USER";
$password="PASS";
my $ssh = Net::SSH::Perl->new($host, debug => 1, protocol => 2 ,
use_pty => 0);
$ssh->login($username, $password);
$ssh->register_handler("stderr", sub {
my($channel, $buffer) = @_;
my $str = $buffer->bytes;
print $str;
if ($str eq "Password:") {
$channel->send_data("$password\n");
}
$channel->send_data("$password\n");
});
$ssh->cmd('sudo tcsh');
------------------------------
Date: Tue, 5 Sep 2006 14:43:26 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: How to handle jpegs inside Net::NNTP
Message-Id: <edk2gp.1bk.1@news.isolution.nl>
Michele Dondi schreef:
> usenet:
>> Abigail:
>>> $; # A lone dollar?
>>> =$"; # Pod?
>>> $; # The return of the lone
>>> dollar? {Just=>another=>Perl=>Hacker=>} # Bare block?
>>> =$/; # More pod?
>>> print%; # No right operand for %?
>>
>> I kept staring at that and saying, NO WAY WILL THAT JAPH COMPILE.
>> And damned if it doesn't. I still have no idea how. Now I gotta go
>> figure it out...
>
> Granted, *any* of Abigail's japhs is awesome almost by definition.
> But... we both know perl is free form: if you just remove a pair of
> newlines and think that $; and %; are variable names like any other,
> then it's not that obscure any more, althouth not less brilliant and
> fascinating!
>
> $; = $";
> $;{Just=>another=>Perl=>Hacker=>} = $/;
> print %; ;
Somehow I liked most the superfluous '=>' after Hacker.
With -MO=Deparse:
$; = $";
$;{join $;, 'Just', 'another', 'Perl', 'Hacker'} = $/;
print %;
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Tue, 05 Sep 2006 15:10:13 +0200
From: Paul Matthijsse <paul.matthijsse@wanadoo.fr>
Subject: Re: imagemagick very slow - is there anything better?
Message-Id: <44fd7732$0$5074$ba4acef3@news.orange.fr>
W Marsh wrote:
[cut]
> I don't think you understand the details of the operation you're asking
> ImageMagick to perform well enough to comment on speed issues. Are you
> aware of what the filter you're applying is actually doing?
Actually - meaning that I studied the sharpen algorithm used by
ImageMagick - no. On the other hand, the word 'sharpen' used in an image
context, made me think this was about a sharpen filter, like those used
in tons of image/photo processing apps, but I may be wrong...
> It has very little to do with the compression of the JPEG (although
> naturally the decompression time will have to be taken into account,
> although I imagine that this is negligible).
No significant speed diffs between jpg or png noticed.
> You're applying a filter to
> each and every pixel in that image.
2048 x 1536 = 3145728 pixels. I do not see the problem for a recent
home computer to make some calculations on a very moderate data set like
this?
That's what you're asking
> ImageMagick to do, and it's certainly doing that at a happy rate. It's a
> large DSP operation on a massive data set.
>
> If you don't want it to do this, stop asking it to.
That's what I already did...
Cheers, Paul.
------------------------------
Date: 5 Sep 2006 04:59:51 -0700
From: "addinall" <addinall@addinall.org>
Subject: Re: Insert Log file into oracle table
Message-Id: <1157457590.897112.270650@m79g2000cwm.googlegroups.com>
mattjones@hotmail.co.uk wrote:
> Right, I've managed to input the data so i can move on to the next bit
> of the script.
Goodo! Have fun!
>
> I was thinking someone would have a go at me for posting such a
> question! I've got the programming perl and the perl DBI books but
> sometimes its good to have someone explain it for you...
>
> Thanks for everyones help anyway.
No worries on my part.
Cheers,
Mark Addinall.
>
> Matt
------------------------------
Date: Tue, 05 Sep 2006 12:05:47 +0200
From: Thomas Kratz <ThomasKratz@REMOVEwebCAPS.de>
Subject: Re: IPC on Win XP: messages, shared memory
Message-Id: <44fd4bfb$0$31168$bb690d87@news.main-rheiner.de>
Clyde Ingram wrote:
> 1. IPC::Msg is described as being for System V.
> 2. Win32::IPC appears not to support IPCs using messages or shared memory.
> 3. On ActiveState Perl 5.8.8, the default IPC library omits IPC::Msg. Win32
> library offers little promise.
>
> Am I right in concluding that unrelated processes on Windows XP (Pro) cannot
> do inter-process communication using either messages or shared memory?
What about IPC::Mmap?
Thomas
--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
------------------------------
Date: 5 Sep 2006 07:44:45 -0700
From: "Chris Hamel" <hamelcd@hotmail.com>
Subject: Memory Limitations for Perl Programs?
Message-Id: <1157467485.777969.57110@i42g2000cwa.googlegroups.com>
This may not be a Perl issue per se, but our Unix support people don't
have any insight and I was hoping to get some direction.
We have Perl (5.8.0) installed on an AIX server. The server itself is
capable of handling 32-bit processes as large as about 2 GB, and we've
never found a ceiling for the 64-bit processes (only 32 GB on the
server, and we've run programs as large as 22 GB). When I run programs
in Perl, however, they core dump once the process hits about 250 MB.
In many cases, we can get around this by using the BerkeleyDB module,
but this results in a significant performance hit and requires some
data structure reengineering.
Unfortunately, I am fairly Unix ignorant. I did not install Perl on
Unix, nor would I know how to. I just use what the Unix admins
installed for us. What I'm trying to find out is if there is a runtime
option or an option on installation (compilation?) that enables Perl to
have a higher threshhold than 250 MB.... or is this a limitation built
into Perl?
Any information or feedback I can pass on to our Unix admins would be
most appreciated.
Also, for what it's worth, our programs really are that large. We've
done a number of things to try to reduce the footprint of the programs
(other than what's in perldoc -q memory). One example I learned is
that that doing this:
$part_info{$part} = [ $nomenclature, $cost, $min_qty, $max_qty ];
takes up more memory than this:
$part_info{$part} = join '|', $nomenclature, $cost, $min_qty,
$max_qty;
(not to mention not working with Berkeley). But the bottom line is the
data we bring together is huge.
Thanks in advance for any insight or direction, and I apologize in
advance if this has more to do with the OS than with Perl...
Chris H.
------------------------------
Date: 5 Sep 2006 05:03:45 -0700
From: "tommo_blade" <mark1.thompson45@btinternet.com>
Subject: Re: Net::FTP - How Do I Read The Available Space On A Partition ???
Message-Id: <1157457825.843952.209220@d34g2000cwd.googlegroups.com>
Thanks to all who replied, I think I will go with the suggestion of
sticking the file in regardless and then checking that it is the same
size (->size()) as the source file.
------------------------------
Date: Tue, 5 Sep 2006 14:49:43 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Net::FTP - How Do I Read The Available Space On A Partition ???
Message-Id: <edk33k.1b0.1@news.isolution.nl>
tommo_blade schreef:
> Thanks to all who replied, I think I will go with the suggestion of
> sticking the file in regardless and then checking that it is the same
> size (->size()) as the source file.
If the transport is compressed, and the quota-calculation isn't, you
could test by first sending the file with all 0 bytes.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Tue, 05 Sep 2006 11:38:44 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Regexp slowdown
Message-Id: <Xns98354DC7169B1asu1cornelledu@127.0.0.1>
chris.ritchie@gmail.com wrote in news:1157427053.892057.81570@
74g2000cwt.googlegroups.com:
[ Please do not snip attributions ]
>> [ Please do not top-post ]
> As far as I know, this only applies when addressing parts of someone's
> post. Aside from the 'thanks I'll check it out', my last post was an
> addendum to the first post. Another piece of etiquette is reading all
> relevant material before making a comment/criticism :-\
I read all the material. Your reply did not make any sense without
reading all the material. Your responses addressed various comments made
by John Krahn. Each of those responses should have been interspersed
with the points to which they were relevant.
>> Well, neither do we, as you refuse to show this regex. Is it top
>> secret or something.
...
> Unfortunately I cannot.
Then you don't need or want help.
> The interpretation of regexes is pretty straightforward. I have no
> problem analyzing the expression for correctness and efficiency.
Then you don't have a problem with slow matches.
> Though I was alarmed by John's mention of backtracking- I was afraid
> he meant backtracking across previous expression matches or some
> memory-intensive attempt at interpreter optimization by the perl
> folks.
The word 'backtracking' has a specific meaning in the context of Perl
regular expressions. This meaning is not secret. It is readily explained
in the docs such as perlretut. If you knew enough (and, I, most
decidedly do not know enough) about Perl regular expressions, there
would not have been any room for confusion.
> After reading his suggested information, I found this is not the
> case.
Then you don't have a problem with slow matches.
> What I am unfamiliar with is Perl memory management and Unix
> scheduling - in practice.
How is that relevant? If the level of activity on your computer remains
fairly constant, and your program is not trashing virtual memory, there
is not much chance that the problem is with anything but the regular
expression you are using. And, if you want help fixing that problem, you
will need to show the expression you are using along with some sample
data.
All of this back and forth would not have been necessary if you had
divulged that bit of information. And, if you don't need help, why did
you post in the first place?
> That was the direction of my second post.
>
>> Please read the posting guidelines for this group to learn how you
>> can help yourself and help others help you.
...
> John seemed to understand pretty well. Sadly, you made no attempt to
> answer any of my questions.
It is well established that there are about a zillion (that is a
scientific term) with higher IQs than mine. John Krahn is probably among
them. Yet, he also pointed out that it is impossible to say anything for
sure if we can't see the regular expression you are using.
> You wrongly complained about my etiquette
If you had read the posting guidelines, you would have known about the
established conventions in this group.
> and suggested I can't write regular expressions.
I made no such statement. A sentence that begins with "it is possible"
is a general statement about the world. I have written my share of
stupid code and there is no way I could have known about my errors if I
did not show the code to the people whose help I was asking for.
> Now who's wasting peoples' time?
I did not say anything about anyone wasting anyone's time, but come to
think of it, you definitely are. On the other hand, reading your
responses in this thread was definitely entertaining as I do enjoy
absurd drama.
>> It is easy to write a stupid regex that will just waste time doing
>> unnecessary things.
> If this were the case, it wouldn't have quickly matched to the
> hundreds of string inputs I fed it before it started slowing down.
Who knows? Who can know? You have not isolated the problem. Please re-
read the posting guidelines, come up with a short but complete script
that still exhibits the problem and post it here.
> Granted I could have hit a special case that fools the regexp, this is
> unlikely considering the number of inputs it works perfectly on.
http://en.wikipedia.org/wiki/Falsifiability
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Tue, 5 Sep 2006 15:03:50 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Regexp slowdown
Message-Id: <edk3mf.1hg.1@news.isolution.nl>
chris.ritchie@gmail.com schreef:
> I DON'T NEED HELP WITH THE SYNTAX OF MY REGEX.
Maybe not, maybe you should be told to use something different than
regexen, and certainly to not use your suboptimal regex.
But because you don't show any code that shows the problem (as the
Posting Guidelines tell you should), we'll never know.
*ploink*
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Tue, 05 Sep 2006 14:54:00 GMT
From: Ala Qumsieh <notvalid@email.com>
Subject: Re: Regexp slowdown
Message-Id: <ccgLg.1371$MF1.1366@newssvr25.news.prodigy.net>
chris.ritchie@gmail.com wrote:
> I have a subroutine that does a rather extensive expression match (the
> expression is ~80 characters long). It's looking for this expression
> in strings limited to 500 characters.
[snip]
> What else could it be?
I suggest you strip down the code to the barest minimum, and see what is
the cause for the slowdown.
Another thought is whether you are using any of the special regexp
variables: $& $' $`
If you are, then that might explain the slowdown.
Of course, as other said, it is impossible to guess what is causing the
problem without seeing any code.
--Ala
------------------------------
Date: 5 Sep 2006 07:36:34 -0700
From: "Robby Walker" <robby.walker@gmail.com>
Subject: Ultimate programmer's reference - Quickref.org launches
Message-Id: <1157466994.205318.302500@m73g2000cwd.googlegroups.com>
QuickRef.org : AJAX-powered site searches for documentation on Perl,
CSS, HTML, HTML DOM, Java, JavaScript, MySQL, PHP, Ruby, and more
languages added all the time. Minimize docs and they show up next time
you visit the site. Instantly access Google search for documents not in
the QuickRef system. Never open 15 tabs or windows again!
If you like it, please digg it:
http://www.digg.com/programming/Ultimate_programmer_s_reference_QuickRef_org_launches
------------------------------
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 9688
***************************************