Berkeley CSUA MOTD:2002:October:07 Monday <Sunday, Tuesday>
Berkeley CSUA MOTD
2002/10/7 [Recreation/Computer/Games, Recreation/Sports] UID:26118 Activity:nil
10/6    Merchants of Andromeda is a pretty decent puzzle game --pld
2002/10/7-8 [Computer/SW/Languages/Perl] UID:26119 Activity:high
10/6    Perl question: I want to use something like
        @files = readdir(DIR);
        and get the a list of files, not just the first one in DIR.
        How do I tell readdir to give me the whole list, not just one?
        I rtfm'ed and it only said this behavior was possible.
        \_ perl works better if you don't treat it as C.
           @file = readdir($DIR);
                            \_ perl morks better if you have a clue.
                               readdir takes an open FILEHANDLE, not a var.
                               \_ Believe it or not, with IO::Dir, it is
                                  possible to generate anonymous references to
                                  directory handles which you can then assign
                                  to regular variables.
        \_ why not just write a trivial function that does this (preferably
           using readdir)? Also, have you considered using perl's glob()?
           It could be what you need ..
        \_      opendir(DIR, $somedir) || die "can't opendir $somedir: $!";
                while( $name = readdir(DIR))
                  next if( $name eq ".");
                  next if( $name eq "..");
                  push( @files, $name);
                closedir (DIR);
            \_ or if what you really want is just the files in that
                    opendir DIR, $somedir;
                    @files = grep {-f} readdir DIR;
                    closedir DIR;
                 \_ You are rad.
                \_ What is that grep {-f} doing?  That was what I didn't
                   get in the perlfunc example.
                   \_ It's the function for grep to check for truth.  in this
                      case it's the "test" function, -f, which tests if the
                      argument is a normal file. --scotsman
                      \_ You could also use this to get just directories
                         (-d), links (-l), sockets (-S)... see the perlfunc
                         page for the rest of the flags. -geordan
        \_ or:
           @files = <$somedir/*>;
                \_ even more rad.
           \_ Note that this will return all entries that would be globbed
              by the shell for *, including directories, links, sockets,
              etc.  Also I believe this actually forks off a shell process
              to run the glob, so it might be slower if you care. -geordan
2002/10/7 [Reference/BayArea] UID:26120 Activity:insanely high
        Longshoremen and you!  Intro to feeling bad for the oppressed working
        \_ Minor bit of trivia, but the longshoremen's strike in SF ("On
           the Waterfront") is one of the major reasons why a lot of
           manufacturing and shipbuilding moved out of SF.  Too expensive,
           too regulated, too prone things like $100,000/year longshoremen
           striking, for better of worse.  -John
           \_ And here I thought it was because the railheads from LA and
              Seattle were faster and easier to traverse the country than
              they are from Oakland/SF and land was cheaper. Too bad they
              don't have those cheap workers in Seattle and LA.
           \_ It's funny but I heard this same one from my Dad. I suspect it's
              become the stuff of West Coast folk history even though it makes
              little sense. Think about it. Where did that stuff go? I haven't
              read up on it but the ILWU control every port on the West Coast.
              Had they not taken control of Seattle, Long Beach, Alameda and
              San Diego yet? Moreoever, this stuff (except for US military) all
              moved offshore.
              San Diego yet? This stuff (except for US military) all moved
              offshore in another decade or two anyways. Sure the ILWU resisted
              containers, but for how long? That's how the whole world works,
              now. The rail corridor/land cost explanation makes more sense.
2002/10/7 [Politics/Domestic] UID:26121 Activity:kinda low
10/6    Communists won the elections in Brazil.  Very bad news for the US.
        \_ maybe if you are McCarthy
        \_ Bad news?  Why?  It's an election.  As long as the country continues
           to have elections and they're (reasonably) honest, I see no issue.
           \_ How many countries continue to have elections after communists
              gain power?
              \_ Depends.  How many got elected as communists which is the
                 situation here as opposed to a violent overthrow which is
                 the standard communist take over method since no one in their
                 right mind would let the typical violet communist take over
                 anythign more than a bus stop?
              \_ Even if they got rid of elections,  how would it be
                 very bad news for the US?
        \_ Da Silva isn't a communist--he's realized he can't afford to be.
           Nor will he back out of Cardozo's reforms significantly--he's
           agreed to keep the country's commitment to a $30 billion IMF loan.
           Wait and see...
2002/10/7-8 [Computer/SW/WWW/Browsers] UID:26122 Activity:high
10/6    Is there a way to make internet explorer not make any sound? I listen
        to music on my computer all the time but i hate it when I go to a
        website and some ad plays music or makes some stupid noise.
        \_ Tools > Internet Options > Advanced > Multimedia, uncheck
           "Play sounds..." ... won't help for audio that comes from
           Flash or other plug-ins, though.
        \_ I believe the sound you're wishing to turn off is the one labeled
           "Start navigation"... that's the click you hear each time you
           hit a bookmark or traverse menus.
           \_ "... and some ad plays music"
              \_ nice
2002/10/7-8 [Politics/Foreign/Asia/China, Politics/Foreign/Asia/Japan, Recreation/Media] UID:26123 Activity:moderate
10/7    Reviews of Miyazaki's "Spirited Away"?  I usual avoid dubbed versions
        of Miyasaki's work, but I haven't gotten a hold of the original
        japanese version with either english or chinese subtitles yet.  Is
        it worth watching this dubbed version?  Thanks.
        \_ I liked the dubbed version better -pld
        \_ It was a surreal trip.  I didn't mind the dubbing so much.  If you
           like his stuff, I'd watch this ... especially on weed!
        \_ the kabuki is playing the non dubbed version
        \_ Even dubbed it's a must see. Better than PM not as classic as
                MNT or NPoV or CiS but very very good.
           \_ The review on says it's the Disney-dubbed version
        \_ Even dubbed it's a must see. Better than Mononoke not as classic as
           Totoro or NPoV(??Nausicaa = NVoW) or Laputa but very very good.
           \_ WTF?  Fucking anime geeks... sheesh.
        \_ that movie took two hours of my life, and I want them back.
        \_ the best anime ever was something to do with anime porn and 3
2002/10/7 [Computer/SW/Languages/Perl] UID:26124 Activity:nil 66%like:26768
10/7    More perl q's:
        \_ sorry, this was a stupid mistake on my part.  It does work as
2002/10/7-8 [Uncategorized] UID:26125 Activity:nil
10/7    Correction in WSU's student newspaper... oops.
2002/10/7-8 [Uncategorized] UID:26126 Activity:nil
10/7    Anyone use Play Trinity / Globecaster? Is it any good?
2002/10/7-8 [Computer/SW/OS/FreeBSD] UID:26127 Activity:very high
10/7    What do you think of Apple's "Switch to Apple" campaign?  And what
        do you think of that IT director who said he used and liked unix
        before and is now moving to Apple?
        \_ "If it's on TV, then it must be real!" It's a commercial, it's
           fake. Although, sure, there may exist the possibility that one
           person on this planet who went from unix to apple.
           \_ Yep.  There's definitely at least one.  - misha.
              \_ I'm sorry.  You did this because...?  Not for the better
                 office applications, or games, or compatibility with other
                 people's file formats, or cheaper non-proprietary hardware....
                 It must be that you like the stoner chick in the apple ad from
                 spring and figured you could be cool like that too?  "BEEP!
                 BEEP! BEEP!  Like uh!  BEEP!"
                 \_ Beautiful fonts and rendering.  gcc/vi preinstalled.
                    And stoner chicks love it.  - misha.
                 \_ How about a GUI that is actually designed?  How about
                    not wasting time reading stupid, incomplete man pages?
                    How about an environment where apps all work together
                    and in a similar fashion. (Windows apps all have their
                    own conventions on buttons and menus.)
        \_ anybody know why apple went with the mach kernel instead of using
           freebsd in its entirety and just add the GUI on top?  What is so
           great about mach?
           \_ history? NeXT used the mach kernel.
           \_ Probably because it made it easier to run OS9 and OSX
              concurrently. --jwm
           \_ I've heard that it supposedly made it easier for apple to
              port to other architectures and it also makes it easier
              for device driver authors under OS X. Note that stock FreeBSD
              isn't very portable to non-x86 arch. because of numerous
              x86 specific optimizations in the vm subsystem, so even if
              apple wanted the FreeBSD kernel, they would have had a lot
              of work getting it to work on PPC.
           \_ at the time NeXT was choosing an OS, BSD is tangled in
              lawsuit.  So Steve decided to go to Mach.
        \_ The job title "IT Director" should explain it all.
Berkeley CSUA MOTD:2002:October:07 Monday <Sunday, Tuesday>