Berkeley CSUA MOTD:2004:April:10 Saturday <Friday, Sunday>
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2004/4/10-11 [Computer/SW/Languages/Perl] UID:13124 Activity:low
4/9     Can one write a filename expansion pattern that, say, match all
        filenames without a '.' in it?  This would be trivial in regexp but
        I can't see how to do it in sh.
        \_ I don't think you can do it directly (at least, not in a practical
           way). You can always run the output of ls through sed easily
           enough. Finer shells like zsh also have ways to negate wildcards,
           which may help here somewhat.
        \_ something silly like [A-Za-z0-9 _]*  (etc,etc), but it really
           depends on your shell.  in /bin/sh?  eh....  This sounds like
           another of those motd problem where you're better off asking how
           you should solve the real problem instead of asking the tedious
           detail you got stuck on because you're lost in the forest looking
           at the trees.
           \- right. use ls,find,echo |fgrep -v . to generate the list. --psb
           \_ psb is right.  sh's pattern is different from regexp so that
              char class cannot have wild card multiplier.
              \_ yes I know that but if you read what I said the point is I
                 think he's doing the wrong thing.  if he tells us what he's
                 trying to do at a higher level this whole regexp problem will
                 go away if he has a better general plan.  his original q.
                 seems silly.  he could just as easily call perl or some
                 other regexp compatible parser at that point in his /bin/sh
                 program but that doesn't seem to be the point, does it?
                 \_ I am not doing SA.  I am just doing some spring cleaning
                    of the hard drive on my home pc and wondered if there is
                    a oneliner solution to a simple problem.  It's faster to
                    visually inspect than to learn perl.
                    \- use emacs dired-mode --psb
                    \_ ok then use either of psb's answers or use a different
                       shell that can deal with a regexp.
2004/4/10-11 [Recreation/Media] UID:13125 Activity:nil
4/10    So do you think Clarke feels sorry enough about his failure that he'll
        be donating his book *AND* movie profits to the surviving families
        of 9/11?  Somehow, I doubt it but I do think highly of his market
        timing if not his morals and ethics.
    http://www.hollywoodreporter.com/thr/article_display.jsp?vnu_content_id=1000484839
        \_ As a conservative, you should have long ago made peace with
           the fact that many sets of "facts" pass as "truth" in this country
           depending on what your political party is.
           \_ This isn't an issue of truth or fact or any such thing.  This is
              strictly about his making a drooling apology from one side of
              his mouth while counting his profit and cashing in on that same
              failure from the other.  I'd take his book (and now his movie)
              more seriously if it didn't look like a market timing action
              instead of an honest mea culpa.
              \_ So how exactly do you feel about Haliburton cashing it in--
                 oh, wait, sorry--spreading good will and cheer in Iraq? -sax
                 \_ Not all.  No one from Haliburton ever sat in front of a
                    camera and said, "boo hoo! woe is us!  we're so sorry!"
                    while pushing their book and movie.  Haliburton is a
                    corporation.  Corporations exist to profit and make money.
                    If you don't like corporations that is an entirely
                    different issue and either way it doesn't excuse Clarke's
                    sicken behavior.  One company's possible wrongs does
                    not excuse some unrelated one man's wrongs.  How do you
                    feel about Clarke cashing in since you find Haliburton
                    so distasteful?
                    \_ Is what Clarke said true?
                       \_ That he's sorry?  I can't read his mind but his
                          actions don't meet his words.
                    \_ Nothing wrong with speaking up about a cover up.
                       If it just so happens someone then decides to offer
                       him a book deal, there is nothing wrong with it.
                       Why do you hate when good people win?  Why do you
                       hate America?
                       \_ No, it was book deal first.  There wouldn't be a
                          book and movie if this wasn't a hot current topic.
                          My issue is that he apologised to the 9/11 families
                          and boo-hooed on TV (we call it grandstanding) but
                          then turns around and pockets the cash.  Why do all
                          of you ignore the hypocritical nature of the apology
                          preceded by book and movie deals?  The apology was
                          clearly just sales hype so he could cash in.  Why is
                          he not donating the profits to the families if he's
                          so sorry?
           the fact that two sets of "facts" pass as "truth" in this country.
2004/4/10-12 [Computer/SW/WWW/Browsers] UID:13126 Activity:nil
4/10    When I use font-size:medium, the font sizes are totally different in
        IE and Firefox/Moz/Safari/etc. For real websites, is it recommended
        to do something like font-size:11px ? Both allow for resizing.
        \_ If you want something that looks exactly the way you want it to,
           use PDF. If you want something that looks the way the reader
           wants it to, use HTML. Your reader can make that choice; you
           shouldn't. HTML specifies "what" not "how", despite the strong
           efforts of far too many web designers who tell it "how", sigh ...
           \_ PDF doesn't exactly work for interactive websites.
              \_ Exactly the point.  The "web designer" can not have absolute
                 control over the look of a site because html doesn't allow
                 for that.  That is in the hands of the browser.  There is no
                 way in hell a page in IE will look like the same in Mozilla
                 and in Opera and in lynks and Safari, etc.
                 and in Opera and in links and Safari, etc.
        \_ medium/large/small/etc. are measured relative to the browser's
           default font setting (which is configurable by the user, although
           the default may vary from browser to browser).  If you set it to
           something like 11 px, then you're making your text by default to
           be too small for people with high display resolutions or poor
           eyesight.  Every time they visit your page, they'll need to resize.
           \_ Yes but if I use relative font settings and set my fonts to an
              average size (which of course, looks too big to a 20something
              graphic designer), it'll look tiny in FireFox, etc. If I set it
              to 11pt, like most of the web, then people like my dad can still
              view the site as long as their browser's font size is "Larger"
              than default.
              \_ Your grandmother's font size will be whatever the default is
                 for her browser.  Stop being clever.
2004/4/10-12 [Politics/Domestic/President/Bush, Politics/Foreign/MiddleEast/Iraq] UID:13127 Activity:high
4/10    Good balanced article on Economist.  US still has a window of
        opportunity to make things work in Iraq.
        http://www.economist.com/opinion/displayStory.cfm?story_id=2572254
        "It was one of the worst weeks so far. But it would still be
        wrong to write Iraq off"
        \_ I'd like to point out for the umpteenth time that NOBODY-- not
           even the Berkeley liberals-- wants the US to "write Iraq off".
           We are opposed to the flimsy justification for this war, and the
           continued mishandling of it.
           \_ how do you figure it should be handled at this point?  please
              don't say "bring in the UN!".  they were already there and Kofi
              pulled them out after a single bombing after their local
              directors ignored their own security people's advice.
              \_ Turn the country over to the UN or some other multinational
                 co-alition, maybe the Arab League.
                 \_ Duh, where have you been?  I just told you the UN turned
                    tail at the first sign of trouble.  Do you read?  Watch the
                    news?  Anything?  Or do you just make this shit up as you
                    go?  The Arab League?  Ah, yes, genius plan!  We're there
                    right now trying to create a democracy of some sort and you
                    want to turn it over to the most oppressive dictators in
                    the modern world.  Stick with html and java.
           \_ You haven't been walking around campuses recently, or gone to
              Berkeley-style bookstores of a certain variety, I take it?
              And not seen those 'BRING OUR TROOPS HOME NOW!' posters?
              This is in LA, btw, not Berkeley.  Berkeley is likely a lot
              worse.  I could have sworn I saw the same guys with the
              'END IRAQ SANCTIONS NOW!' posters just a year ago. -- ilyas
              \_ I live in a town where democrats outnumber republicans
                 13 to 1, with several universities within a couple miles.
                 all my freinds are democrats or greens or way out leftists
                 of some other type, and no one i know thinks we should just
                 pull out, and i have seen no signs to that effect.  perhaps
                 LA is just full of stupid ass tools?  why the fuck else
                 would they have decided to live in LA?
                 \_ Look, dude, I am happy that your far out leftist friends
                    are more reasonable, but your "NOBODY" claim is simply
                    false, I would say to the tune of 5% of the population
                    (at least).  In fact, next time I am at UCLA, I am
                    going to take a little informal poll, and report back.
                      -- ilyas
                    p.s. One of them is Governor Stupid Ass Tool to you.
                    \_ 5% of the population believes that the govenment
                       is controlled by space aliens, too.
                       \_ We're working hard to convince the rest of you before
                          They take over everything and we all perish into the
                          food vats or as hosts for their symbiotes!
                    false.  -- ilyas
                 \_ I've seen them in Berkeley, and wasn't that half of
                    Kucinichi's (sp?) platform?
                    \_ poor bastard... how does he expect anyone to vote for
                       him when they can't even spell his name.  if he was
                       smith or jones or jackson he'd be ok.
                       \_ Seriously.  That's probably a factor.  I mean,
                    Kucinichi's (sp?) platform?
                          Kelly vs Bush?
        \_ Actually, if and when the window of opportunity above closes,
           it's time to get out.  not getting out would just be prolonging
           the pain.
           \_ Agreed. It's not foolish or cowardly to realize that it's
              possible for us to screw this situation up past the point
              where our presence is in any way helpful.  That point may
              not be now, but we need to consider it as a possibility.
              \_ It's always helpful to someone. The point so far has been
                 that on balance, it was never helpful to America to do this.
                 Nothing about the current situation is really much different
                 than many imagined.
                 \_ Not to take sides in this debate, or anything, but I
                    really don't think it is possible to evaluate the effects
                    of sweeping foreign policy changes after so little time
                    has passed.  While it is true that the outcome in Iraq
                    is important, the fact that America now has a much more
                    aggressive doctrine of preemption (for example) will also
                    have effects.  In twenty years it will be obvious whether
                    the Bush Doctrine was a bad idea.  Calling it a failure
                    now falls under the heading of "I hate Bush" criticism.
                    To the poster below: whatever else may be true, pulling
                    out this very instant is certainly stupid, considering
                    how much it will save, and how much it will lose.  There
                    will be no pullout certainly until November for obvious
                    reasons, and probably not for a few years.  I think
                    the final toll will be a few thousand american lives, and
                    a whole lotta deficit.  -- ilyas
                    \_ What is our agressive policy supposedly trying to
                       preempt? Disagreement with the United States? Because
                       it sure as hell has nothing to do with terrorism.
                       \_ What our aggressive policy is trying to prevent is
                          state-sponsored terrorism.  Whether Iraq actually
                          sponsored terrorism is not even relevant.  What is
                          relevant was the reason why we are in Iraq.  Now
                          suddenly, the world realizes America has a really
                          itchy trigger finger for stuff like that, and will
                          think twice about it.  Syria, for instance, is scared
                          shitless, they were doing nothing but conceding as of
                          late.  In fact, domestic dissent on the Iraq war is
                          a natural sideeffect of democracy, but it weakens the
                          effect of the policy insofar as it makes America less
                          likely to engage in future wars of this type.  In
                          case of Iraq, there was also a gamble to place a seed
                          of democracy in the middle east, using the common
                          observation that democracy is virulent, and
                          prosperity follows democracy.  It was a gamble because
                          creating democracy from scratch is difficult, all
                          democratic european states went through a long period
                          of bloodshed before democracy was established for
                          good.  -- ilyas
                          \_ "established for good".  Really, that should be
                             "established for the moment".  Democracy is
                             fragile and must be tended, not taken for granted
                             as the western Europeans and so many Americans do.
                             As far as the Bush Gamble goes, only time will
                             tell.  Historians will look back and children will
                             either be taught that he was the most brilliant
                             foreign policy President in generations or the
                             worst.  It is too soon to tell now.
                          \_ "Now suddenly, the world [...] will think twice
                              about it." Or they won't. It's equally possible
                              that countries will realize that the only to
                              protect themselves from aggression is to develop
                              their own WMD. I don't understand why above you
                              say that we need 20 years to evaluate the
                              success of the Bush Doctrine, and then you go
                              and claim that the Bush Doctrine has been
                              successful.
                              \_ I don't claim that it is successful.  I was
                                 merely giving possible reasons for the Bush
                    the Bush Doctrine was a bad idea.  Calling it a failure
                    now falls under the heading of "I hate Bush" criticism.
                    Whatever else may be true, pulling out this very instant
                    is certainly stupid.  - ilyas
                    To the poster below: whatever else may be true, pulling
           \_ The right people at the top of what to accomplish what who wants?
                          a natural sideeffect of democracy, but it weakens the
                          effect of the policy insofar as it makes America less
                          likely to engage in future wars of this type. -- ilyas
                                 Doctrine.  Whether they are good reasons or
                                 not remains to be seen.  -- ilyas
                             \_ Developing WMD as a defense against the US at
                                this point in history would be pure suicide.
                                Only the most insane of leaders would think
                                like this.  Witness North Korea for an example
                                of insanity.  Without a dramatic shift in
                                power due to leapfrogging non-US technology or
                                the complete economic collapse of the US, the
                                currently non-WMD would only do as you suggest
                                if they were completely irrational.  It's a
                                losing policy for any nation as the world
                                stands now.  As far as the BD goes, no one here
                                has claimed success.  Where do you get this
                                stuff from?  Do you not read?  Do you knee
                                jerk into anything that doesn't bash Bush must
                                be pro-Bush?  We're having a nice little chat
                                here, please don't fuck it up with blind
                                partisanship.
        \_ It's not stupid to support a pullout at this point.  The
           Washington Post has at least one very long article on the Falluja
              This is in LA, btw, not Berkeley.  I shudder when I think about
              Berkeley...  -- ilyas
                    Kucinichi's (sp?) platform?
           it's time to get out.  not getting out would just be prolonging
           the pain.
                    out this very instant is certainly stupid, considering
                    how much it will save, and how much it will lose. -- ilyas
        \_ It's not stupid to support a pullout at this point.  The
           Washington Post has at least one very long article on the Falluja
           problem.  I just get the impression that we're shitting ourselves
           into a deeper and deeper hole; we don't have the right people
           at the top to accomplish what they want.
           war with each other for Europe's benefit.  The lines are entirely
           artificial and detrimental to the cause of peace and anyone's
           security.  If anyone had the balls to just admit the Europeans
           fucked most of the rest of the world and just redraw the lines a
           whole lot of ugliness would simply evaporate over night.
           \_ Good idea, all we have to do is also invade Iran, Syria, and
              Turkey so we can erase all current lines and redivide!
              (Although, I agree with out in a perfect world sense.)
           problem.  I just get the impression that we're shitting ourselves
           into a deeper and deeper hole; we don't have the right people
           at the top to accomplish what they want.
           \_ The right people at the top of what to accomplish what who wants?
        \_ Does anyone remember how many troops we *still* have in the Kosovo
           region?  They were supposed to be out after *one year* from the
           time they first entered the area.  All these people all over the
           place hate each other so much.  Most of these situations were
           created by European colonialism.  The Europeans *intentionally*
           divided tribes and put halves of traditional enemy tribes together
           for the express purpose of making sure these places were always at
           war with each other for Europe's benefit.  The lines are entirely
           artificial and detrimental to the cause of peace and anyone's
           security.  If anyone had the balls to just admit the Europeans
           fucked most of the rest of the world and just redraw the lines a
           whole lot of ugliness would simply evaporate over night.
           \_ Good idea, all we have to do is also invade Iran, Syria, and
              Turkey so we can erase all current lines and redivide!
              (Although, I agree with out in a perfect world sense.)
              \_ No invasion would be necesssary in most cases.  A lot of the
                 current wars going on are because the original tribes are
                 trying to reform across borders.  The Tutsi/Hutu thing was a
                 good example of that.  One tribe managed to take control of
                 the government and used it to attempt to genocide the other
                 from within their borders.  After 500,000 to 800,000 dead, it
                 sure looks like a better plan to bring everyone to the table
                 to redraw borders peacefully rather than by the gun or the
                 machete.
2004/4/10-12 [Computer/SW/Languages/Perl] UID:13128 Activity:nil
4/10    In perl, how do I get time precise to the milisecond? The CPAN module
        requires recompilation and root access to install it, I'm looking for
        something more portable. Thanks!
        \_ If you need to know the time, there's no portable way to do it
           without modules.  However, if you just want a sub-second delay,
           you can do it with select -- for example, select "", "", "", 0.1;
           will pause for a tenth of a second.  --mconst
        \_ you can always install modules as a user and add the libs to your
           perl lib path.
2004/4/10-12 [Computer/SW/Languages/Perl] UID:13129 Activity:nil
4/10    In perl, can I make the program more portable by first checking if
        a module is available, then "use" or "require" it later?
        \_ I think you can do this with an exec call.  Checking.
           no.  i think i was thinking of using an eval block, but i
           can't quite get it to work.
        \_ You can set up a variables using single quoted strings with
           embedded use/require statements and necessary subroutine
           calls and then use eval to figure out which ones work at
           runtime. Here is a short example that returns a hash of @_
           using either MD5 or SHA1 (which ever is found first, unless
           a search order is specified via $MODE):

        sub doHash
        {
           my $hashCmdMD5 = 'use Digest::MD5 qw(md5 md5_hex md5_base64);';
           $hashCmdMD5 .= " md5_hex('@_'); ";

           my $hashCmdSHA1 = 'use Digest::SHA1 qw(sha1 sha1_hex sha1_base64);';
           $hashCmdSHA1 .= " sha1_hex('@_'); ";

           my $hashCmd = ($MODE eq "MD5" ? $hashCmdMD5 : $hashCmdSHA1);
           my $hash = eval $hashCmd;

           if ($@ || !defined($hash) || $hash eq "") {
              $hashCmd = ($MODE eq "MD5" ? $hashCmdSHA1 : $hashCmdMD5);
              $hash = eval $hashCmd;
           }

           return ($@ || !defined($hash) ? "" : $hash);
        }
        \_ nice.  where's that code from?  yours?
           \_ This is modified from some code I wrote for work. I added
              $MODE for this example, so that one can get an idea about
              how this can work.
2004/4/10-11 [Uncategorized] UID:13130 Activity:nil
4/10    Bank ATM card reading scam.  It's short.  Read it.
        http://www.utexas.edu/admin/utpd/atm.html
2004/4/10-12 [Transportation/Airplane] UID:13131 Activity:high
4/10    Does anyone have any information on or experiences with Thai
        Airways Intl? Are they reliable/safe? Thanks.
        \_ Most of their pilots are trained in Afghanistan and Saudi Arabia.
           Take offs: ok.  Steering: excellent.  Landing: not so good.
        \- helo i have flown thai a number of times. in the last few yrs
           they have more or less consciously modelled themselves after
           singapore airlines, i.e. big focus on in-air service.
           as for safety, you may wish to see:
           http://home.lbl.gov:8080/~psb/Articles/News
           [i missed SQ 006 by a little bit ... switched to SQ 002]
           If you are scared to fly a major airlines like this, you should
           just kill yourself. However, I wouldnt blame you for being a bit
           nervous on say Sita Air [where the pilot's GPS was from Sharper
           Image] and there was more weight in beer in the cabin than people.
                \_ yeah, "major airline". maybe I should just kill myself.
                   \- I hope you have a good flight and then get SARS. --psb
                      \_ but SARS has a low fatality rate.
                      \_ That is quite mean.
                      \_ wow partha that is the most malicious I've ever
                         seen you.
                         \- you all should get together and have a CircleCough
        \_ I've flown Thai Airways several times, as have many of my ex-pat
           friends.  The planes are modern and safe, the pilots fly smoothly,
           and the flight attendants are wonderfully polite and an absolute
           joy to look at. Business class is better than Economy, of course,
           but Thai Air's Economy is better than the steerage you'll find on
           Northwest. --erikred
           \_ Thai girls... mmmm... yummy....
              \_ Ummm... you know those are really guys... right?
                        \_ At least we still have Singapore girls.
                 \_ When guys start looking *that* good I'm going queer.
                    \_ Most of them are post-op, so it's not really that queer.
                       \_ Pre, post, whatever.  Hot is hot.
                          \_ Does retrofit vagina feel as good as real vagina?
                          \_ Pre, post, queer is queer.
                             \_ mesmerized by the pattern. must post.
                                \_ he's just jealous that he'll never be as hot
           Image] --psb
                                   as the other Thai girls.  his surgeon sucks.

        \_ if any more of this stuff is posted directly to the motd instead of
           as a url somewhere it'll be toasted instantly with no further
           warning.  post a link to his site.  if he cant then make one for
           him and post it.  but stop abusing the motd with endless lengthy
           ramblings from this one guy.
        \_ ok, look.  If you're reallly reporting straight from Iraq to the
           motd that's pretty cool, but could you PLEASE provide context for
           these posts?  Are you in the army?  marines?  a contractor? tourist?
           where are you?
           \_ he mentioned Flur in another post, which probably means he's
              constructing infrastructure of some kind (I see mention of water<
              and electrical in central/south iraq) -chialea
           \_ civilian contractor working on iraq reconstruction. (our camp
              -fluor daniel-is located within camp taji)
              http://www.globalsecurity.org/wmd/world/iraq/taji_m.htm -kinney
        \_ This is the equivelent of political spam.  Instead of posting
           this whole guys blog here, why not just provide a link and let
           us read it ourselves?
        \_ Kinney is a contractor.  This is from one of his emails.  He does
           not have a web site.  Don't delete this. -dans
        \_ 4/11  [ I said, no spam, bitch.  Just post a link ]
2004/4/10 [Uncategorized] UID:29913 Activity:nil 50%like:11405 60%like:13066
4/9     http://hinterlands.cc/index.php?showtopic=66
        Probably not work-safe.
2004/4/10 [Computer/SW/OS/Linux, Computer/SW/Languages/Misc] UID:29914 Activity:nil
4/10    Does anyone know how Redhat turns on IP forwarding? Apparently you can
        set a directive FORWARD_IPV4=yes in /etc/sysconfig/network, but I can't
        seem to find the script (or whatever) that acts on this. I know you can
        'echo 1 > /proc/net/ipv4/ip_forward' to do the same thing, but I'd like
        to find that file in hopes of also finding a list of other similar
        directives. Google also does not seem to be coming up with a definitive
        list of these things. Thanks.
Berkeley CSUA MOTD:2004:April:10 Saturday <Friday, Sunday>