[24848] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6999 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 13 18:11:20 2004

Date: Mon, 13 Sep 2004 15:10:09 -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           Mon, 13 Sep 2004     Volume: 10 Number: 6999

Today's topics:
    Re: Repeatedly parsing a file to "clean" it. (Graeme Stewart)
        Screen Size (Rich)
    Re: Screen Size <1usa@llenroc.ude.invalid>
    Re: Xah Lee's Unixism <wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org>
    Re: Xah Lee's Unixism <albalmer@att.net>
    Re: Xah Lee's Unixism <albalmer@att.net>
    Re: Xah Lee's Unixism <albalmer@att.net>
    Re: Xah Lee's Unixism (Dave Hansen)
    Re: Xah Lee's Unixism <spam@nimblegen.com>
    Re: Xah Lee's Unixism <firstname@lastname.pr1v.n0>
    Re: Xah Lee's Unixism <gregm-news@toadmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 13 Sep 2004 12:26:38 -0700
From: g_stewart@hotmail.com (Graeme Stewart)
Subject: Re: Repeatedly parsing a file to "clean" it.
Message-Id: <61d476af.0409131126.1cc2b122@posting.google.com>

I do appreciate that my original post was somewhat vauge, but I was
originally looking for a way to make the code a little easier to read,
and understand the way Perl manipulates data. I had a gut feeling that
it was incorrect best practice (if their is such a thing) to
continually open and close text files.

Personally I would always rather the system do this in memory.
Although as I'm new to Perl I might soon realize that text files are
the way to go. I was hoping the experience of the group could offer
some insight! Which everyone very kindly did!

P.S I was very careful in my original post to NOT use the word
"optimize". Efficient to me = the readability of the code!

Thanks,


Tad McClellan <tadmc@augustmail.com> wrote in message news:<slrnck43l5.9vh.tadmc@magna.augustmail.com>...
> Wolfgang Hommel <wolf@code-wizards.com> wrote:
> 
> >> can I do this
> >> in a better / more efficient way?
> > 
> > Not sure what exactly you consider as "efficient", but it's rather 
> > unlikely that the performance of your program suffers from opening and 
> > closing files. Instead, regarding the code you posted, I'd recommend
> > 
> > a) using subfunctions instead of repeating code :-)
> 
> 
> That is "anti in-lining", I guess.
> 
> Seems that would move things toward a more INefficient way,
> with regards to performance, what with all that pushing/popping
> stack accessing and whatnot.
> 
> It _would_ move it toward a more efficient way with regards
> to maintenance however.
> 
> 
> As Wolfgang said, "efficient" doesn't help us help the OP.
> 
> Tell us what you want to "optimize".
> 
> Optimize performance? Optimize for labor? Optimize memory usage? ...
> 
> 
> 
> Speed at the expense of maintainability, or maintainability
> at the expense of speed?
> 
> 
> 
> Which costs you more, CPU cycles or labor?
> 
> <wait for the answer>
> 
> Optimize that one.


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

Date: 13 Sep 2004 13:02:02 -0700
From: fabian@ix.netcom.com (Rich)
Subject: Screen Size
Message-Id: <ac980e5.0409131202.49834a61@posting.google.com>

Does anyone know how to get the screen size of the client using
straight Perl (no javascript)?  I have seen several posts which use
"ioctl.ph" but I have been unable to locate this file.  I tried
downloading the source code to perl but was only able to find
ioctl.pl.


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

Date: 13 Sep 2004 20:10:15 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Screen Size
Message-Id: <Xns9563A48108176asu1cornelledu@132.236.56.8>

fabian@ix.netcom.com (Rich) wrote in news:ac980e5.0409131202.49834a61
@posting.google.com:

> Does anyone know how to get the screen size of the client using
> straight Perl (no javascript)?  I have seen several posts which use
> "ioctl.ph" but I have been unable to locate this file.  I tried
> downloading the source code to perl but was only able to find
> ioctl.pl.

Let's see. You want a program running on a computer to somehow know the 
display settings of a computer running the browser. If this does not strike 
you as odd then you probably have no business programming.

You could ask the user and remember the user's pereference using a cookie, 
but none of this is really Perl specific.

-- 
A. Sinan Unur
1usa@llenroc.ude.invalid 
(remove '.invalid' and reverse each component for email address)



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

Date: Mon, 13 Sep 2004 14:08:55 -0000
From: SM Ryan <wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org>
Subject: Re: Xah Lee's Unixism
Message-Id: <10kbafn3aq73p37@corp.supernews.com>

Morten Reistad <firstname@lastname.pr1v.n0> wrote:
# In article <du73c1mk70b.fsf@mozart.cc.tut.fi>,
# Ville Vainio  <ville@spammers.com> wrote:
# >>>>>> "Grant" == Grant Edwards <grante@visi.com> writes:
# >
# >    Grant> shit about international agreements?  Bush thinks he's
# >    Grant> entitled to declare anybody and everybody an "enemy
# >    Grant> combatant" and lock them up in secret forever.  Add a
# >    Grant> moustache and he'd make a pretty good Stalin.
# >
# >I'll raise you a Hitler, in a (probably vain) attempt to invoke the
# >Godwin's law.
# 
# OK, I'll raise that with a Ghengis Khan and a Pol Pot. 

Hence the well known Usenet acronym PKB: Pol Khan Bloody.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
Haven't you ever heard the customer is always right?


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

Date: Mon, 13 Sep 2004 08:52:47 -0700
From: Alan Balmer <albalmer@att.net>
Subject: Re: Xah Lee's Unixism
Message-Id: <60gbk01kj3h9rsvgikv7jahelsal0bfg1c@4ax.com>

On Mon, 13 Sep 04 10:39:16 GMT, jmfbahciv@aol.com wrote:

>>Responding in "hints" and ALL CAPS brings us to the ludicrous situation
>>where a Turk gets to give a pointer to the ACLU to an American:
>>
>>http://www.aclu.org/SafeandFree/SafeandFree.cfm?ID=13079&c=207
>
>I'm not going to be able to get out to read that one.  Just
>mentioning the ACLU gives me the bias that you're listening
>with a BS filter.  ACLU has gone bonkers in that they've
>become completely inconsist these days.

This particular article isn't even consistent within itself. They try
to make the reader equate "detainees" (most of whom have just been
sent back home) and "secret arrests" which they somehow know all
about. They also complain that "this group is almost entirely Arab,
South Asian, or Muslim ...". Surprise, surprise.

In fact, the article with its list of actions the ACLU has taken
belies its own premise that all these things are happening in secret
without any representation for the "victims."

Years ago, I thought the ACLU was a Good Thing.

-- 
Al Balmer
Balmer Consulting
removebalmerconsultingthis@att.net


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

Date: Mon, 13 Sep 2004 08:59:46 -0700
From: Alan Balmer <albalmer@att.net>
Subject: Re: Xah Lee's Unixism
Message-Id: <vqgbk05ikqc0f95pnuk0i116e9vatrrdnj@4ax.com>

On Sat, 11 Sep 04 14:24:09 GMT, jmfbahciv@aol.com wrote:

> Now Congress is shifting towards giving them
>more leeway.  I sure as hell hope they remember Hoover and his
>abuses of power before they suggest putting one guy over it all.

The suggestion has already been made, and President Bush is apparently
going along with it, but refusing to give the position the unlimited
power its proponents want. This gives the disloyal opposition grounds
to claim he's not really serious about terrorism.

-- 
Al Balmer
Balmer Consulting
removebalmerconsultingthis@att.net


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

Date: Mon, 13 Sep 2004 09:09:25 -0700
From: Alan Balmer <albalmer@att.net>
Subject: Re: Xah Lee's Unixism
Message-Id: <b2hbk0t3q18vrbtv7gtfjfom19ifm9kv06@4ax.com>

On Sat, 11 Sep 2004 18:08:57 +0100, Rupert Pigott
<roo@try-removing-this.darkboong.demon.co.uk> wrote:

>
>The Hippocratic Oath demands that patient confidentiality
>be respected.
>
In a rather mild manner: "I will respect the privacy of my patients,
for their problems are not disclosed to me that the world may know."

That's the modern version. The original seems stronger: "All that may
come to my knowledge in the exercise of my profession or in daily
commerce with men, which ought not to be spread abroad, I will keep
secret and will never reveal."

I don't know who was the arbiter of "which ought not to be spread
abroad", though.

In the US nowadays, any receiver of medical treatment or medical
supplies has to sign an acknowledgement that they have read and
understood a statement of their "privacy rights", which seems to
mostly consist of a very long list of all the ways the profession is
allowed to breach your privacy.

-- 
Al Balmer
Balmer Consulting
removebalmerconsultingthis@att.net


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

Date: Mon, 13 Sep 2004 16:11:25 GMT
From: iddw@hotmail.com (Dave Hansen)
Subject: Re: Xah Lee's Unixism
Message-Id: <4145c639.358395718@News.individual.net>

On 13 Sep 2004 09:39:00 +0300, Ville Vainio <ville@spammers.com>
wrote:

>I'll raise you a Hitler, in a (probably vain) attempt to invoke the
>Godwin's law.

Godwin's law does not say that when Hitler is invoked, the thread
terminates.  Rather it is an indicator the thread has lost all
usefulness.  If it ever had any.

Regards,

                               -=Dave
-- 
Change is inevitable, progress is not.


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

Date: Mon, 13 Sep 2004 11:12:06 -0500
From: Chuck Dillon <spam@nimblegen.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <ci4gs0$23p$1@grandcanyon.binc.net>

Antony Sequeira wrote:

> Chuck Dillon wrote:
> 
>>
>> So, lets say you are an elected official on 9/12/01, the day after we 
>> lost *only* 3K out of the potentially 20-30K folks that could have 
>> been killed (that's how many folks spent their day in those towers).  
>> You no longer have any frame of reference for the magnitude or 
>> imminence of risk of an attack elsewhere in country.  How much time do 
>> you spend studying up international treaties before you decide how to 
>> act?
>>
> How is that related to Saqqddam Hussqqqqqain being a jackass and us 
> spending 100 or whatever billions on removing him and having 1000+ of 
> Americans + unknown number of Iraqqqqqis getting killed. How does that 
> help avoid
> 9 qqqq  11 or are you confused between Iraqqqqqis and Saudqqqqis ?

If you reread the post that you responded to you will see it has 
nothing to do with Iraq.

However, to answer your question: How does regime change in Iraq help 
avoid another 9/11...
	1) It removes one of the states that might consider sponsing such a 
future attach.
	2) It removes a state with the expertise of producing (not developing) 
WMD that might be used in such an attack.  We've found no WMD 
stockpiles but we *have* found proof that Iraq retained the expertise 
to produce WMD in the future.  We still don't know if there are stockpiles.
	3) It demonstrates to other states in the region that they could have 
a regime change in about a month's time if they allow themselves to be 
in the position of being held accountable for any future attack. 
Removing the Taliban was a much more ambiguous demonstration of this 
since they had no real military and really weren't an organized state.
	4) Look at a map of the middle east.  It provides us with a base of 
operations in the center of the region.  We probably won't have to ask 
for access to bases and airspace in future operations, which hopefully 
will never have to happen.
	5) It provides us with a second (ref: Afghanistan) shot at 
establishing a pseudo-democracy in the region.
	6) It underscores that 9/11 should go into the "bad idea" category for 
future planners of Islamic extremist operations.

Before you respond saying that it increases the number of potential 
terrorists that might carry out an attack, that may or may not be so. 
But for such an attack to be carried out requires organization and 
resources not just a bunch of pissed off people.  It would require at 
least implicit support by a state or very large organization with 
resources.  If you are one of those pissed off people how are you going 
to sell your plan to say Syria?

You are being naive.  Complain as loud as you like but there is no 
question that the ability and demonstrated willingness to defend ones 
self is the best deterrent to ever having to do so.


> Why don't we destroy everything but the U.S.,  that way we can guarantee 
> that we'll never have any posibility of a terrqqqqorist attack from 
> anywhere but from within U.S. I'll leave it to your imagination on how 
> to extrapolate that to counter terrqqqqorism within U.S.

We could have destroyed Iraq's military in days if we had applied our 
full military capabilities without regard to civilian damage and 
casualties.  We took more American casualties than we had to and we 
continue to so that we can minimize civilian risk.  We have made no 
effort to destroy Iraq, only Hussein's army.  The "insurgents" are the 
ones blowing up pipelines, other infrastructure and law enforcement 
officials.  We have people building schools, churches and 
infrastructure.  You need to find a more accurate news source.

-- ced

-- 
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.


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

Date: Mon, 13 Sep 2004 20:13:50 +0200
From: Morten Reistad <firstname@lastname.pr1v.n0>
Subject: Re: Xah Lee's Unixism
Message-Id: <u0o4ic.bgh.ln@via.reistad.priv.no>

In article <ci4gs0$23p$1@grandcanyon.binc.net>,
Chuck Dillon  <spam@nimblegen.com> wrote:
>Antony Sequeira wrote:
>
>> Chuck Dillon wrote:

[snipped iraqqqqq-rich posting]

>> Americans + unknown number of Iraqqqqqis getting killed. How does that 
>> help avoid
>> 9 qqqq  11 or are you confused between Iraqqqqqis and Saudqqqqis ?
>
>If you reread the post that you responded to you will see it has 
>nothing to do with Iraq.
>
>However, to answer your question: How does regime change in Iraq help 
>avoid another 9/11...
>	1) It removes one of the states that might consider sponsing such a 
>future attach.

Yes, maybe. Iraq was definatly a rouge nation; a mainstay in all the
export documents (You may not export to Libya, Cuba, North Korea, 
Iraq, Iran, Afghanistan, and at times Yemen and Sudan). This is
a long-term; non-urgent argument.

>	2) It removes a state with the expertise of producing (not developing) 
>WMD that might be used in such an attack.  We've found no WMD 
>stockpiles but we *have* found proof that Iraq retained the expertise 
>to produce WMD in the future.  We still don't know if there are stockpiles.

also valid. A long-term argument, too.

>	3) It demonstrates to other states in the region that they could have 
>a regime change in about a month's time if they allow themselves to be 
>in the position of being held accountable for any future attack. 
>Removing the Taliban was a much more ambiguous demonstration of this 
>since they had no real military and really weren't an organized state.

Dont' you think they already knew that? The main problem is rather
how many iraq's can we handle. 

>	4) Look at a map of the middle east.  It provides us with a base of 
>operations in the center of the region.  We probably won't have to ask 
>for access to bases and airspace in future operations, which hopefully 
>will never have to happen.
>	5) It provides us with a second (ref: Afghanistan) shot at 
>establishing a pseudo-democracy in the region.

Valid arguments, but this "democracy-building" has been utterly
mishandled. Firstly by an [almost] US-only war, and then by a US
occupation by PHB's. 

>	6) It underscores that 9/11 should go into the "bad idea" category for 
>future planners of Islamic extremist operations.

Are you listening Saudi Arabia? 

It may actually have worked with Libya; who consiquosly have changed
sides to want friendly terms with the west, and is making a serious 
effort to reform. They also had far more WMD's in the pipeline than 
Saddam probably ever had. THAT was a surprise.

>Before you respond saying that it increases the number of potential 
>terrorists that might carry out an attack, that may or may not be so. 
>But for such an attack to be carried out requires organization and 
>resources not just a bunch of pissed off people.  It would require at 
>least implicit support by a state or very large organization with 
>resources.  If you are one of those pissed off people how are you going 
>to sell your plan to say Syria?
>
>You are being naive.  Complain as loud as you like but there is no 
>question that the ability and demonstrated willingness to defend ones 
>self is the best deterrent to ever having to do so.

Naivite can take many forms.

This is going to be a long battle, and a lot of the success will
be places at simple logistics. Factors like how much real security 
burdons on aviation gives. How much the single victories cost.

We have sort of taken control fo Iraq. 

Now, can we handle a North Korea that really goes sour; together
with an al-Quada insurgency in a few african states, plus Sudan, 
a few tribal genosides, Turkmenistan gone bad (sliding there fast), 
and islamic revolution in Pakistan; or civil war there; plus another
backlash in Afghanistan.

All of these are very real and immediate conserns. I haven't even 
touched the Burmas and the Indoneias that seem stable at the moment.

This is why I critisize the go-it-alone policy so harshly. I have 
a feeling we haven'αΊ— seen the worst yet. 

>> Why don't we destroy everything but the U.S.,  that way we can guarantee 
>> that we'll never have any posibility of a terrqqqqorist attack from 
>> anywhere but from within U.S. I'll leave it to your imagination on how 
>> to extrapolate that to counter terrqqqqorism within U.S.
>
>We could have destroyed Iraq's military in days if we had applied our 
>full military capabilities without regard to civilian damage and 
>casualties.  We took more American casualties than we had to and we 
>continue to so that we can minimize civilian risk.  We have made no 
>effort to destroy Iraq, only Hussein's army.  The "insurgents" are the 
>ones blowing up pipelines, other infrastructure and law enforcement 
>officials.  We have people building schools, churches and 
>infrastructure.  You need to find a more accurate news source.

It is going to require a solid defense to make Iraq come out right, 
and the civil toll in lives is getting large. 

-- mrr


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

Date: 13 Sep 2004 15:57:24 -0400
From: Greg Menke <gregm-news@toadmail.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <m3pt4qc57f.fsf@europa.pienet>

Chuck Dillon <spam@nimblegen.com> writes:

> Antony Sequeira wrote:
> 
> > Chuck Dillon wrote:
> > How is that related to Saqqddam Hussqqqqqain being a jackass and us
> > spending 100 or whatever billions on removing him and having 1000+
> > of Americans + unknown number of Iraqqqqqis getting killed. How does
> > that help avoid
> > 9 qqqq  11 or are you confused between Iraqqqqqis and Saudqqqqis ?
> 
> If you reread the post that you responded to you will see it has
> nothing to do with Iraq.
> 
> However, to answer your question: How does regime change in Iraq help
> avoid another 9/11...
> 	1) It removes one of the states that might consider sponsing
> such a future attach.

Wouldn't it have made more sense to invade Saudi Arabia?  Thats where
the terrorist money and terrorist leadership is from.  Iraq is chump
change on that account- heck, even Iran or Syria would've made a much
better target on this basis.  Or are we such bullies that we'll pick
the weakest kid to beat up to show how strong we are?


> 	2) It removes a state with the expertise of producing (not
> developing) WMD that might be used in such an attack.  We've found no
> WMD stockpiles but we *have* found proof that Iraq retained the
> expertise to produce WMD in the future.  We still don't know if there
> are stockpiles.

I'm sure there are lots of countries that have the expertise & the
will- how many countries should we invade before that approach starts
looking like a bad idea?  I think we should also invade Pakistan right
away- they have working nuclear weapons & real live terrorists, not
just half-baked piles of rusty junk scattered around the country and
half buried under a decade & a half of 3rd world style bureaucratic
corruption & desert sand.


> 	3) It demonstrates to other states in the region that they
> could have a regime change in about a month's time if they allow
> themselves to be in the position of being held accountable for any
> future attack.

Don't you mean "if they are ever placed on the Axis Of Evil?"


> 	4) Look at a map of the middle east.  It provides us with a
> base of operations in the center of the region.  We probably won't
> have to ask for access to bases and airspace in future operations,
> which hopefully will never have to happen.

So now we're back to being an imperial power?  I thought we were in
Iraq for humanitarian reasons- I guess I didn't get the memo.


> 	5) It provides us with a second (ref: Afghanistan) shot at
> establishing a pseudo-democracy in the region.

Don't you think it would be a good idea to practice this sort of thing
before imposing it elsewhere?


> 	6) It underscores that 9/11 should go into the "bad idea"
> category for future planners of Islamic extremist operations.

Afganistan taught that.  Iraq teaches the Islamic world that we're
crazy.

> 
> You are being naive.  Complain as loud as you like but there is no
> question that the ability and demonstrated willingness to defend ones
> self is the best deterrent to ever having to do so.
> 

So you're talking about a "preemptive defense"?  

Gregm


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

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


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