Berkeley CSUA MOTD:2003:January:18 Saturday <Friday, Sunday>
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2003/1/18 [Recreation/Humor, Recreation/Music] UID:27138 Activity:nil
1/17    Funny band name: Camper Van Beethoven"
        \_ I've actually heard some of their songs
2003/1/18-19 [Computer/SW/Languages/C_Cplusplus] UID:27139 Activity:very high
1/17    If I have "foo_bar_baz_struct_t *p, *q;", which of the following
        is better?
        1.      p = malloc(sizeof (foo_bar_baz_struct_t));
                memcpy(q, p, sizeof (foo_bar_baz_struct_t));
        2.      p = malloc(sizeof *p);
                memcpy(q, p, sizeof *p);
        Thanks.
        \_ 1 is far more obvious for me...
        \_ 2 is better if you think you are going to change
          what type of struct p points to frequently. 1 is
          the preferred way of coding for readability.
        \_ Well, I like 2.  It's more concise, and you can't screw up
           and put in the wrong type in the sizeof.
           \_ My vote is for #2 too. Also, I like *q = *p better than
              the memcpy. And no, for someone familiar with C, I don't
              see how the memcpy makes anything clearer.
              \_I don't think that they are necessarily the same in straight C.
              In C++ that may be equivalent. Also, shouldn't you be mallocing q?
              \_I don't think that they are necessarily the same in straight
                C. In C++ that may be equivalent. Also, shouldn't you be
                malloc'ing q?
                        \_ It seems so. Also, shouldn't OP be checking if
                           the pointer returned by malloc is NULL?
                \_ You are exactly backwards. -pld
                \_ you think wrong.  In C bar=foo does a shallow copy.
                  \_ Yes, we know this, but the question is does memcpy
                     do a shallow copy also? Somehow I think this is
                     wrong. From what I remember memcpy does a bit for bit
                     copy, which is very problematic once you get into things
                     like structs and classes. The two may not be equivalent,
                     and it certainly would come out different in the
                     object code.
                     \_ How do shallow and bit-for-bit differ? Very curious-pld
                       \_ It may or may not, it depends on what the struct
                       actually contains. That's the crux of the argument.
                       If the struct contains a class or class pointer(assuming
                       you are doing this in c++) you
                       run into all sorts of different behaviors.
                       \_ The proper answer is "they're identical"  -pld
                          \_ No they are not.  Shallow copy copies pointers,
                             deep copy copies objects also (potentially
                             using copy constructors, etc.)
                  \_ Is it possible that this is a Visual C++ extension for C?
                     Possibly, if they are on crack. You can do this in C++ by
                     defining your own operator= method.
2003/1/18 [Computer/SW/OS/Windows] UID:27140 Activity:moderate
1/17    Is it possible (advisable) to upgrade from Windows 98 SE to
        Windows XP?  Win2k?  Is there a way to safely convert a FAT32 FS
        to NTFS?
        \_ w2k and I assume wxp have a converter for f32->ntfs.  I've always
           found that doing an MS 'upgrade' leaves you with a broken fucked up
           system and in the long run you're better off with a fresh install
           if you're going to be using it or care about the person who is.
        \_ incredibly bad 'advice' about using fat32 instead of ntfs deleted
           due to extreme stupdiity.
           \_ Whatever. For a single user system for the average person's
              games, internet, taxes, and office there's no need for NTFS.
              FAT32 is faster. Just run defrag now and then and back up
              important shit, which u would do anyway. Also, FAT32 is needed
              for dual-booting win9x and better for dual booting with Linux.
              \_How is it better for dual booting Linux? You can read NTFS
                in Linux now and vice versa in WinNT variants. FAT32 is i
                more prone to error and its performance is definitely
                not faster than NTFS on modern computers. And why would
                you still want to run WIn9x after installing 2k/XP?
                Most games run fine now on those OSes, and
                unless you like running old legacy applications there
                is really no need to run 16 bit Windows. If you need it to
                run DOS then I guess it makes sense.
2003/1/18 [Computer/SW/Security] UID:27141 Activity:moderate
1/17    Do any other search engines besides google cache?
        \_ I think the question is do any others provide public access to
           their caches... I'm sure any reasonable search engine does
           caching on some level.
2003/1/18 [Academia/OtherSchools] UID:27142 Activity:nil
1/16    What is UCB's CS research funding compared to say, the Furd, CalTech,
        MIT, etc?
2003/1/18-25 [Academia/Berkeley/CSUA, Computer/SW/Unix] UID:27143 Activity:nil
01/17   Soda needs patching bad. No, it wasn't patched when it was taken down
        before, that would have made sense, and we're not here to make sense,
        we're here to make your lives hard. So don't get too used to those
        screen sessions, 'cuz I'm gonna reboot it again later tonight to
        upgrade the thing. Hopefully it won't be down much longer than it was
        yesterday. And, really, 24 hours is too much uptime anyway. - ajani
        \_ Due to unforseen complications, this won't be happening today.
           Enjoy your longer uptime. Patching will be resumed when I figure
           out all the uniquely soda complications. - ajani
2003/1/18 [Recreation/Dating, Politics/Foreign/Europe] UID:27144 Activity:high
1/17    How hard is it to have sex in an airplane lavatory without
        getting caught?  What do they do if they catch you?
        \_ Why do you ask?
        \_ Any law against that?  Why would they try to catch you?
           \_ well, that's what I was wondering.  so i asked the motd.
              \- legal unless you disable the smoke detector
                 although that might be ok on air france --psb
                 \_ The *French* (snicker)
                \_ "do you smoke after sex?"
                   "I'm not sure, I never checked"
2003/1/18 [Recreation/Pets, Recreation/Dating] UID:27145 Activity:high
1/17    What's the English phrase that means "Since you look good, you
        have/deserve a good-looking gf" or "since you're smart, you naturally
        have smart friends" or something like that?  Thanks.
        \_ You so money!
        \_ You're so money!
        \_ I live 3 blocks from here if you ladies are interested.
        \_ Birds of a feather flock together.
           \_ If meant in a bad way, water seeks its own level.
              \_ [apostrophed was here]
        \_ I meant a line like "Things alike get together." or something like
           that.  Is there such a line?  -- OP
           \_ Misery loves company?
              Great minds think alike?
              Birds of a feather flock together? (mentioned above)
                \_ airheads think alike? (u look so good, so do ur friends)
        \_ Your fellatio is promising.
           \_ [apostrophed was here]
        \_ A man is known by his friends
        \_ Like father like son
        \_ Providence
2003/1/18-19 [Computer/SW/Languages, Computer/HW/Printer] UID:27146 Activity:high
1/17    What format does a (wireless) print server use to communicate
        on the network?  For example, if I have some crappy WinPrinter
        (with Windows drivers) can I plug that into a print server and
        print to it as a PostScript printer from a FreeBSD/Linux
        machine?  What about Mac?
        \_ Depends on the print server. If you get one that supports
           LPR (IP) printing then you can probably make this happen.
        \_ This question makes me wince.
        \_ Yes.  Yes.
2003/1/18-19 [Recreation/Celebrity, Computer/SW/Apps/Media] UID:27147 Activity:nil
1/18    Perhaps the iPodNG will feature removable media:
        http://www.pcworld.com/news/article/0,aid,108816,tk,dn011603X,00.asp
2003/1/18-19 [Computer/Networking] UID:27148 Activity:high
1/18    So I have a cable modem and both a Debian Linux and a WinXP
        machine. I want to set up one as the firewall/server for my
        internal network to the internet.  Which is preferable and why?
        \_ obLinuxSux! & obDoesntWorkWithCableModem.
           Seriously, I'd pick linux since its possible to secure it
           to some extent (unless you really need asp and vbscript
           in which case you are stuck with XP).
           \_ Clueless n00b.  You can run asp, etc through the linux firewall.
                \_ Dipshit, I know you can port forward, but he said
                   he wants a single fw/server. If that is the case
                   then he is stuck with xp. And if he wants vb, asp
                   etc, he is also stuck with iis.
                   \_ Do a little research on reverse web proxies (specifically
                      URL based proxying)
                   \_ good thing all the politics threads got deleted,
                      so we can have intelligent technical dialog like
                      this.
        \_ I'd do linux if you already have it. It doesn't really need any
           resources (P100 is fine) and if you don't play with it, will be
           up for 3-6 months at a time (it's a cheap PC, so you'll probably
           have some hardware failure or trip over the cord every so often.)
        \_ or if you were lazy and had about $75, you could buy NAT-in-a-box
           like a Linksys cable router/firewall, but then accessing your
           linux box would be a bit trickier, if you needed to get at it
           from the "outside".
           \_ you can get one on craigslist for ~$40
        \_ Or you could pay an extra $5/month and get a real IP for both.
           Using pf on openbsd and both winroute and zone alarm 2.x on w2k
           each with own public IP.  As far as I know, nothing ugly has
           happened after 2+ years like this.  Script kiddies run into the
           fw's on both *all* the time but nothing serious is going on.
2003/1/18-19 [Uncategorized] UID:27149 Activity:high
1/18    If I post a stupid question here, will I get a stupid answer?
        \_ RTFM
        \_ STFW
        \_ STFU
        \_ Duh.
        \_ obNoChanceInHell
        \_ you'll probably get at least one stupid answer.  What you
           should ask is 'will any of the answers be intelligent/useful'
           -darin
2003/1/18-19 [Uncategorized] UID:27150 Activity:nil
1/18    I hope you're happy.  the motd is now as exciting as a technical
        manual.  why don't you censor this, too, while you're at it?
2003/1/18-19 [Politics/Domestic/California, Politics/Domestic/911] UID:27151 Activity:very high
1/18    Looks like some senators still have a little backbone:
        http://news.com.com/2100-1023-980889.html
        \_ this is why everyone, regardless of party affiliation should
           vote in the democratic primary so they acan vote against
           Liebermann.
           \_ Lieberman isn't even mentioned in the article that I could see.
              WTF are you talking about?
              \_ Anti-Semitic troll attempt.
        \_ The original logo for the Information Awareness Office is scary.
           \_ "Concealed in his fortress, the Eye of Mordor sees all."
        \_ Does the Information Awareness Office remind anyone else of the
           "Information Retrieval" office in the movie "Brazil"?
           \_ No.
        \_ Does the Department of Homeland Security remind anyone
           else of the Ministry of Love?
2017/09/24 [General] UID:1000 Activity:popular
9/24    
Berkeley CSUA MOTD:2003:January:18 Saturday <Friday, Sunday>