[24866] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7130 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 14 11:17:44 2004

Date: Tue, 14 Sep 2004 08:16:24 -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, 14 Sep 2004     Volume: 10 Number: 7130

Today's topics:
    Re: $| (undocumented) magic? (J. Romano)
    Re: Screen Size <mistersoftware@aol.com>
    Re: Xah Lee's Unixism <bm@acm.org>
    Re: Xah Lee's Unixism <flavell@ph.gla.ac.uk>
    Re: Xah Lee's Unixism <spam@nimblegen.com>
    Re: Xah Lee's Unixism <gregm-news@toadmail.com>
    Re: Xah Lee's Unixism <spam@nimblegen.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 14 Sep 2004 07:40:16 -0700
From: jl_post@hotmail.com (J. Romano)
Subject: Re: $| (undocumented) magic?
Message-Id: <b893f5d4.0409140640.68d8ce97@posting.google.com>

> On Fri, 10 Sep 2004 00:57:20 -0400, Jeff 'japhy' Pinyan
> <pinyaj@rpi.edu> wrote:
> 
> >The C code implementing $| basically says "if the value
> >assigned to $| is true, have $| return 1, otherwise have
> >it return 0".  This leads to the

Michele Dondi <bik.mido@tiscalinet.it> wrote in message news:<un74k0t9g74s1askdo1meu4uad0eucmr6q@4ax.com>...
> 
> (Having not seen the actual code, and not being to) I
> *think* that basically it should say "if the result of
> an assignment is true then actually store 1 in it,
> otherwise store 0 in it". Isn't this closer?


   Forgive me for bringing this up one more time, Michele.  I've been
thinking about this, and it seems to me that $| may have been
implemented to return 1 (if true) in order to behave like a boolean
variable.  This would be an advantage when comparing to boolean
variables, like in this example:

   Say that both $| and $a are booleans.  $| was set to 5, and $a was
set to 1.  If you compare them with the == operator, should it
evaluate to true or false?  In other words, should the following code
print "True"?:

      $| = 5;
      $a = 1;
      print "True"  if $| == $a;

   If you're comparing their boolean states (whether they are both
true or both false), then yes, it should print true.  But if you're
comparing actual numerical values, then they should print false.  In
this case, it prints "True" because of that quirk you found with $|,
which may have been deliberately put in to make $| behave as if it
only had true/false states.  If it weren't for this feature, you could
compare $| and $a's boolean states another way with "not" and "xor,"
like this:

      print "True"  if not ($| xor $a);

I happen to think that the '==' operator is more readable. 
Unfortunately, in order to use '==' for boolean comparisons you have
to know which variables behave like booleans and which don't.

   -- Jean-Luc


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

Date: Tue, 14 Sep 2004 08:07:46 -0500
From: Wayne <mistersoftware@aol.com>
Subject: Re: Screen Size
Message-Id: <Xns95645CDEE2680Dataman@204.186.200.105>

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.

Try:
 ...
use Win32::Console;
 ...
my ($cons, $col, $row, $ncols, $nrows, $ic, $oc, @ci, 
	$size, $visible);
 ...
$cons = Win32::Console->new(STD_ERROR_HANDLE);
die "Cannot attach to console!\n" if ( ! $cons );
 ...
# get the screen width from the Info call
@ci = $cons->Info();
$ncols = $ci[0] ? $ci[0] : 1;		# when STDERR is redirected, it 
returns 0
$nrows = $ci[10] ? $ci[10] : 1;		# when STDERR is redirected, it 
returns 0
#$nrows -= 1;
 ...
print STDERR "MAX x=$ncols, y=$nrows\n";
 ...

- Mr. Software



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

Date: Tue, 14 Sep 2004 16:37:25 +0300
From: Bulent Murtezaoglu <bm@acm.org>
Subject: Re: Xah Lee's Unixism
Message-Id: <87brg96kfe.fsf@p4.internal>


Soo, another lisper cannot resist the temptation.  

>>>>> "GM" == Greg Menke <gregm-news@toadmail.com> writes:
[...]
    GM> They're pretty convinced of that already- after all Dubya
    GM> called this a crusade from day 1.  [...]

In all fairness I think that was plain dumbness in use of langauge.
He didn't mean a crusade in the historic sense.  Even if he thinks it,
that was nothing more than an unfortunate choice of words.  I am 99%
sure of this as I vividly remeber my jaw dropping when I saw him say
it in the window to the left of the one I was reading this very
newsgroup in.  The men in that family are not good public speakers 
and they seem to have trouble expressing themselves to reporters.  
I see no malice in that.

[...]
    GM> I'm not vastly fond of Dubya Sr., but I think he did the right
    GM> things in Iraq; he was a better president than his son in all
    GM> respects.

He was, but the Iraq thing wasn't done right back then either.  Of
course it is easy to say this with hindsight, but saving a shiekdom
and a kingdom while ending up in a position where you cross your
fingers that Saddam supresses uprisings w/o too much visible carnage
is not a good outcome.  Maintaining a state of embargo against, as it
turned out, the people of Iraq indefinitely was not a good option
either.

It is one of those cases where it's pretty clear that any obvious
option is not good, but it is not clear what the right thing to do is.
Had it been possible to leave the region alone after (or indeed
during) WW-I, some reasonably stable state of affairs might have
emerged.  Actually, this is not unlike the Balkans.  There, oil was
not in the equation but once Tito was gone, things that should have
happened between the Balkan wars and maybe 1950's ended up happening
in the 90s with much bloodshed and no clean ending (think Kosovo).

Presumably the people who get elected to positions of power are called
leaders because they are supposed to have better ideas and visions on
these things than us geeks do.  That has clearly not been the case so
far.

9/11 seems to have gotten rid of any chance of sane action by the US in 
the region, anyway.  So basically the problem is no longer how the 
civilized and reasonably free world will exert its influence in the 
middle east, but how the world can try to influence the lone superpower 
so it doesn't do too much damage to itself and the rest of the world.
Now that, I suspect, could have been prevented had the influential 
people in the states (be it the press, the congress, whatever) showed 
some backbone.

cheers,

BM


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

Date: Tue, 14 Sep 2004 14:43:24 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: Xah Lee's Unixism
Message-Id: <Pine.LNX.4.61.0409141442400.6495@ppepc56.ph.gla.ac.uk>

On Tue, 14 Sep 2004, Greg Menke wrote:

> jmfbahciv@aol.com writes:
> 
> > turned into a 100% religious war.
> 
> They're pretty convinced of that already- after all Dubya called this
> a crusade from day 1. 

I seriously doubt that he understood what the word meant.


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

Date: Tue, 14 Sep 2004 09:46:52 -0500
From: Chuck Dillon <spam@nimblegen.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <ci707n$miq$1@grandcanyon.binc.net>

Greg Menke wrote:
> 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?

Please try and follow the trend of the thread you respond to.  I did 
not address whether or not regime change in Iraq was an optimal move. 
I'm responding to the question posed, see above for what it was.

Regardless of how we got where we are there are arguably benefits to 
the "war on terror".  That doesn't mean you should miopically focus on 
them as the sole rationale for regime change in Iraq.  See the various 
U.N Security Counsil resolutions for the primary rationale.  Also, see 
the reports from Blix et.al. that point out the lack of cooperation on 
the part of the Iraqi government.

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

Hence my use of the qualifier "underscores".

> Iraq teaches the Islamic world that we're
> crazy.

By "we" you are referring to the some 40 nations who have contributed 
to the effort right?

-- ced


-- 
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.


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

Date: 14 Sep 2004 10:55:11 -0400
From: Greg Menke <gregm-news@toadmail.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <m34qm0yk6o.fsf@europa.pienet>

Bulent Murtezaoglu <bm@acm.org> writes:

> Soo, another lisper cannot resist the temptation.  
> 
> >>>>> "GM" == Greg Menke <gregm-news@toadmail.com> writes:
> [...]
>     GM> They're pretty convinced of that already- after all Dubya
>     GM> called this a crusade from day 1.  [...]
> 
> In all fairness I think that was plain dumbness in use of langauge.
> He didn't mean a crusade in the historic sense.  Even if he thinks it,
> that was nothing more than an unfortunate choice of words.  I am 99%
> sure of this as I vividly remeber my jaw dropping when I saw him say
> it in the window to the left of the one I was reading this very
> newsgroup in.  The men in that family are not good public speakers 
> and they seem to have trouble expressing themselves to reporters.  
> I see no malice in that.

You may or may not be right about the dumbness of language, but thats
not germane.  What is important are the conclusions people in the
middle east draw from it.

> 
> [...]
>     GM> I'm not vastly fond of Dubya Sr., but I think he did the right
>     GM> things in Iraq; he was a better president than his son in all
>     GM> respects.
> 
> He was, but the Iraq thing wasn't done right back then either.  Of
> course it is easy to say this with hindsight, but saving a shiekdom
> and a kingdom while ending up in a position where you cross your
> fingers that Saddam supresses uprisings w/o too much visible carnage
> is not a good outcome.  Maintaining a state of embargo against, as it
> turned out, the people of Iraq indefinitely was not a good option
> either.
> 
> It is one of those cases where it's pretty clear that any obvious
> option is not good, but it is not clear what the right thing to do is.
> Had it been possible to leave the region alone after (or indeed
> during) WW-I, some reasonably stable state of affairs might have
> emerged.  Actually, this is not unlike the Balkans.  There, oil was
> not in the equation but once Tito was gone, things that should have
> happened between the Balkan wars and maybe 1950's ended up happening
> in the 90s with much bloodshed and no clean ending (think Kosovo).


What if what if what if.  The problem is we're stuck in a hugely
expensive, poorly planned and strategically stupid situation.  We
weren't before we invaded.

 
> Presumably the people who get elected to positions of power are called
> leaders because they are supposed to have better ideas and visions on
> these things than us geeks do.  That has clearly not been the case so
> far.

To be sure. 


> 9/11 seems to have gotten rid of any chance of sane action by the US in 
> the region, anyway.  So basically the problem is no longer how the 
> civilized and reasonably free world will exert its influence in the 
> middle east, but how the world can try to influence the lone superpower 
> so it doesn't do too much damage to itself and the rest of the world.
> Now that, I suspect, could have been prevented had the influential 
> people in the states (be it the press, the congress, whatever) showed 
> some backbone.

One problem with the situation was Dubya & Co succeeded in strongly
hinting that disagreement was akin to treason.  There was simply no
policital room for debate after 9/11.  Bush was well on his way to
sinking into his own incompetence by September 2001- the incompetence
hasn't changed, but he sure got his mandate to Do Something.

Gregm



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

Date: Tue, 14 Sep 2004 09:55:49 -0500
From: Chuck Dillon <spam@nimblegen.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <ci70og$mne$1@grandcanyon.binc.net>

SM Ryan wrote:

<lots of stuff that misses the point of the post removed>
> 
> # 	6) It underscores that 9/11 should go into the "bad idea" category for 
> # future planners of Islamic extremist operations.
> 
> Again only you and Dick Cheney believe Iraq had anything to do with
> terrorism. 

I don't think anything of the kind.  I have no evidence that they were 
involved.  Whether they were or not is not the point.  My point is that 
removal of the Iraqi regime *underscores* the potential consequences of 
actions like 9/11.  It underscores it because Iraq was the largest Arab 
military power in the region.


> The real terrorist are back in Afghanistan laughing their
> butts off; they are safe today than two years ago because the USA
> abandonned the war on terrorism. The only terrorist organisation that

I very much doubt you really think the above to be true.

-- ced


-- 
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.


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

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


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