Computer SW Languages C_Cplusplus - Berkeley CSUA MOTD
Berkeley CSUA MOTD:Computer:SW:Languages:C_Cplusplus:
Results 1 - 150 of 415   < 1 2 3 >
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/11/23 [General] UID:1000 Activity:popular
11/23   

2001/11/27-28 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl, Computer/SW/Unix] UID:23113 Activity:nil
11/26   How do I find file and symlink only that excludes a, b, and c?
        I tried: find . \( -type f -o -type l \) -name a -prune -o
                        -name b -prune -name c -prune -o -print
        and failed miserably.
        \_ find . \( -type f -o -type l \) -print | egrep -v '^(a|b|c)$'
        \_ perl
2001/10/31 [Computer/SW/Languages/C_Cplusplus] UID:22882 Activity:very high
10/31   How can I save the output of a subshell command into a Makefile
        variable? I want something like TIMESTAMP=`date '+%Y-%b-%d-%H:%M'`,
        and then use that in the following rule:
        checkpoint : clean
                tar cf ../$(TIMESTAMP).tar .
        ------------
        But instead of returning the date string, it makes tar files named
        date '+%Y-%b-%d-%H:%M'.tar ... What am I doing wrong?
        \_ 1. Which shell?
           2. Loose the brackets. They have a special meaning in most shells
           3. Post the exact commands/script you're trying to run
        \_ What version of make?  From Solaris 8 make(1S)
        \_ What version of make?  From Solaris 8 make(1S) -jon
  Command Substitutions
     To incorporate the standard output of a shell command  in  a
     macro, use a definition of the form:

        MACRO:sh =command

     The command is executed only once, standard error output  is
     discarded,  and NEWLINE characters are replaced with SPACEs.
     If the command has a non-zero exit status, make  halts  with
     an error.

     To capture the output of a shell command in a  macro  refer-
     ence, use a reference of the form:

        $(MACRO:sh)

     where MACRO is the name of a macro containing a valid Bourne
     shell  command  line.  In this case, the command is executed
     whenever the reference is evaluated.  As with shell  command
     substitutions,  the  reference is replaced with the standard
     output of the command. If the command has  a  non-zero  exit
     status, make halts with an error.
2001/10/19 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:22774 Activity:nil
10/18   How difficult is it in emacs to write a mode to quickly add a
        type to a variable?  I'd like to be able to enter a "typing-mode"
        and, eg, add "const" to the declaration of variables I
        shift-click on.
        \_ you have got to be kidding me
        \_ perl
2001/10/17-18 [Computer/SW/Compilers, Computer/SW/Languages/C_Cplusplus] UID:22763 Activity:high
10/17   Is "const volatile" or "volatile const" a valid type qualifier in plain
        C?  I want to define something for some read-only hardware registers.
        I'm wondering if something like
                typedef struct {
                  const volatile int reg1, reg2, ......;
                } myRegs, *myRegsPtr;
        will do the trick.  I want the fields to be read-only but I don't want
        the compiler to optimize away any read operations.  I tried compiling
        the above and there's no error, but I don't know if it'll always
        compile to the right thing.  Thanks.
        \_ If the HW registers are read-only then you shouldn't need to do
           anything like const.  Just do volatile reg1, reg2, etc. This stuff
           is memory mapped right? So when you write to hardware locations
           that are read only, nothing will happen. When you read it back it
           will still get the read-only value.  (If the HW is designed
           correctly).  Things get trickier if you're using this struct to
           keep a shadow copy of the registers due to some ASIC bug.  But
           generally, read-only means exactly that.  Read-only.
           \_ Does "const volatile" actually mean anything then?
           \_ Yes it's memory mapped.  I realize I don't need to use "const",
              but I just want to use it so that the compile will generate an
              error when someone accidentally writes code to assign a value
              to that location.
              to that location, just like what it does for an ordinary const
              variable.
        \_ Yes, it's defined in standard C, and it does exactly what you
           want: you're not allowed to assign to the variable (const), but
           the compiler will read the value from memory every time you
           access it (volatile).  --mconst
           \_ You need volatile mconst.  -John
2001/9/23-24 [Computer/SW/Languages/C_Cplusplus] UID:22600 Activity:moderate
9/23    let's say there's a C library you want to use called libmdn.so.
        I think to load it you'd go something like:
        static { System.loadLibrary("mdn"); }
        However, let's say that a function call looked like this:
        mdn_result_t mdn_encodename(int actions, const char
        *from, char *to, size_t tolen)
        since mdn_result_t is probably a typedef or struct,
        does that mean you'd have to write another C wrapper
        to make mdn_result_t make sense to Java?
        \_ Yes. BTW, you probably can't call the c function directly
           without risking random segv's in your program.
2001/9/21-22 [Computer/SW/Languages/C_Cplusplus] UID:22575 Activity:insanely high 76%like:23074
9/20    How do I pass a pointer to a member function in C++?
        \_ void Apply( Class* obj, (Class::*pmf)(void) ) { obj->*pmf(); }

        \_ Ilyas answers the question "How do I pass a PMF to a function
           that expects a pointer to a non-member function?", which is not
           what you asked.   --pld
           void Apply(Class* obj, (Class::*pmf)(void)) { obj->*pmf(); }
           Apply(instance, &instance::SomeMemberFunction);
        \_ You can't because a member function is not quite a function in a
           sense you are used to.  You see, all member functions implicitly
           assume a 'zeroth' argument, which is always the object on which
           this member function is invoked.  In general, you do not know the
           identity of this object at compile time, and even if you did, there
           is really no syntax in C++ to allow you to specify this information
           in the function pointer type.  What you want is to create a wrapper
           function, which calls the member function on an appropriate object.
           Then you can pass the pointer to the wrapper function to your
           mergesort routine.  It's worth noting that object oriented languages
           with closures and curried functions, like ocaml, avoid this
           problem altogether.  -- ilyas
           \_ I like my functions curried, Indian style.
    \_ If intCompare is static, then try &MyClass::intCompare.  If it's not,
       you can use member function adaptor in stl <functional>.
       \_ I stand corrected, static member functions (obviously) don't need
          the pointer to the object as an argument.  -- ilyas.
       \_ Speaking of which, any rec's on a good online beginner's guide to stl
          and/or a book?
          \_ it's such an unwieldy, ugly, large mess full of little caveats.
             i think it's time for C++ to die.
             \_ lovely.  really.  when microsoft dies because of that same
                thing, i'll be worried about c++.  If you're on campus net
                you can get to the C++ lang spec.
          \_ I liked Meyers' "Effective STL".  The docs on
             http://www.sgi.com/tech/stl are good for reference.
    \_ Ah.  C derived languages.
       Widget w;
       char *c;
       w.function(c);
       \_ what the fuck? are you clueless? what are you talking about?
          \_ 'c' is a pointer being passed to a member function.  The OP needs
             to clarify.
          \_ a) How do I pass a (pointer to a member function) in C++?
             b) How do I pass (a pointer) to (a member function) in C++?
             I think the original question was (a), not (b).
             \_ Maybe that's why most books refer to them as "function pointer"
                and "member function pointer".
2001/9/21 [Computer/SW/Languages/C_Cplusplus, Computer/Theory] UID:22569 Activity:nil
9/20    How do I pass a pointer to a member function in C++?
        I'm trying to use mergesort (stdlib.h) like this
        mergesort(array, arrLength, sizeof(int), intCompare);
        where intCompare is my comparison function-- but I'd like to put
        intCompare into a class.  But
        mergesort(array, arrLength, sizeof(int), MyClass::intCompare);
        doesn't work.  How do I do this?
        \_ You can't.
        \_ You can't because a member function is not quite a function in a
           sense you are used to.  You see, all member functions implicitly
           assume a 'zeroth' argument, which is always the object on which
           this member function is invoked.  In general, you do not know the
           identity of this object at compile time, and even if you did, there
           is really no syntax in C++ to allow you to specify this information
           in the function pointer type.  What you want is to create a wrapper
           function, which calls the member function on an appropriate object.
           Then you can pass the pointer to the wrapper function to your
           mergesort routine.  It's worth noting that object oriented languages
           with closures and curried functions, like ocaml, avoid this
           problem altogether.  -- ilyas
2001/9/18-19 [Computer/SW/Languages/C_Cplusplus] UID:22511 Activity:high
9/18    Does someone have a URL that archives all US Senate and House
        transcripts?
        \_ Does http://thomas.loc.gov work for you?
           \_ I already tried that. That's just an archive of the
              legislative texts. I'm actually looking for transcripts
              of speeches and congressional hearings.
        \_ I don't believe that such a URL exists.  If memory serves, what
           you're looking for is called the Congressional Review (or something
           to that effect).  The Federal Government sells it as a subscription
           service.  It is incredibly expensive (i.e. thousands of dollars per
           year); its pricing rivals that of some of the more ludicrously
           priced scientific journals.  Your best bet would be to see if it is
           available in a sizeable library near you. -dans
        \_ tape C-Span or look for C-Span web site somehow?
2001/9/6 [Computer/SW/Languages/C_Cplusplus] UID:22334 Activity:high
9/5     In C++ how do you detect that a constructor failed to execute
        successfully? I've got this ugly hack that sets an instance
        variable which my code can check, but I'm looking for something
        a bit more elegant. My C++ fu is really weak as I've been a
        C programmer way too long.
        \_ Throw an exception from the constructor if it fails, and catch
           the exception wherever you want to deal with it.
          |_ Thought that was in Java.
        \_ The above response is the preferred method. --jsjacob
           http://www.parashift.com/c++-faq-lite/exceptions.html#[17.2]
           \_ Thanks. Looks like my soln. was equivalent to the "zombie"
              idea, but I'll try to use an execption instead.
        \_ It returns NULL?
           \_ Constructors do not return anything.
           \_ Your an idiot. [sic]
2024/11/23 [General] UID:1000 Activity:popular
11/23   

2001/8/22-23 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs] UID:22212 Activity:high
8/22    How do I make emacs do an isearch using the currently selected region
        as the search string?
        \_ M-w C-s M-y
           \_ that sucks. how do i bind a key to do all those at once?
           \_ thanks...now how do i bind a key to do all those at once?
              \_ C-h i m emacs RET m keyboard macros RET
                \_ emacs doesn't leave me inside the isearch mode after
                   executing the macro though. how do i make it do dat?
                   \_ bug.  edit-last-kbd-macro, remove terminal C-x
        \_ ^A   oh wait.. that's vi again.. i'm sure there's a couple K of
           elisp you need to download to make it work in emacs, but really..
           it's better that way.
           \- it is a couple of lines of elisp. you can also use the macro to
           elisp "compiler". remind me how you do incremental search in vi
           again? --psb
           \_ what do you mean by incremental search?
           \_ nvi:  set searchincr
2001/8/21-22 [Computer/SW/Languages/C_Cplusplus] UID:22202 Activity:kinda low
8/21    What's the general rule for nesting C include files?  Say if FOO is
        defined in foo.h and bar.h uses FOO, should I makde bar.h #include
        foo.h, or should I let whatever .c files that use bar.h include foo.h?
        \_ use #ifdefs
        \_ As a general rule, if a file uses FOO, it should #include
           whatever file declares FOO.  If you also use #ifdefs (which
           you should) then the fact that you may have included foo.h
           multiple times shouldn't be a problem.
        \_ Do the following in bar.h and you can include it anywhere you feel
           like and it will all just work out in the end:
           #ifndef _BAR_H
           #define _BAR_H
           [ your code here ]
           #endif /* ! _BAR_H */
           \_ as usual, this poster didn't bother to read the question.
              do what hte poster said, but on foo.h, not bar.h. then
              have bar.h include foo.h. -ali
              \_ what kind of post is this? oh yes, it was FOO, not BAR. jesus
                 fucking christ. he said if you do that to bar you can include
                 it anywhere. if he's too stupid to figure out that also works
                 for foo then he's probably too stupid to know how to post to
                 the motd.
        \_ General rule is for foo.h to include bar.h.  If foo.h and bar.h
           are very closely related -- e.g. part of the same system library --
           then there are other options: puting FOO definition into baz.h and
           including it from both files, or modifing bar.h to declare only
           FOO if _NEED_FOO is defined (in order not to pollute the namespace.)
           Are bar.h and foo.h maintained by the same person?  -- misha.
2001/8/15-16 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:22133 Activity:moderate
8/15    Is there a way in C to specify that I want a particular enum type
        to be one byte or something small instead of the size of an int?
                typedef enum {ME_FOO, ME_BAR} my_enum_t;
                my_enum_t myVar;
                myVar = ME_FOO;
        I saw that gcc has an option "-fshort-enums", but I'm looking for a
        compiler-independent way, preferably in the source code itself.
        Another possible way is to do this instead
                unsigned char myVar;    /* It's really my_enum_t. */
                myVar = (unsigned char) ME_FOO;
        But that's ugly, plus "sizeof(my_enum_t)" is still the size of an int.
        Thanks in advance.  -- yuen
        \_ if you read your K&R you see that this is left implementation
           dependent.  You have to use a compile pragma, or just use the
           constants and not the enum type.  BTW I saw witort today. -- pld
           \_ Hi Paul!  I never noticed pld was you until you mentioned witort!
              -- yuen
        \_ There's no portable way to do this in ANSI C (C++ doesn't force
           a particular size either -- just a minimum size, AFAIK).
           The following hack might be your best option:
               enum my_enum_t_literals { ME_FOO, ME_BAR };
               typedef unsigned char my_enum_t;
               my_enum_t x; x = ME_FOO; /* Works, no warnings */
           sizeof (my_enum_t) is 1 in this case.  And the intent is
           clear from the naming convention.  -- misha.
           \_ i don't see anywhere in the standard that an enum CAN
              be converted to char. only int and larger (including float).
              i believe that implies that the compiler is free to
              issue a warning. but it would have to be a pretty
              stupid compiler.
              \_  Enum constants are the same as int constants (K&R2 A8.4),
                  and you can assign int to char in C.  Compilers might
                  give warnings if the value doesn't fit, which shouldn't
                  happen here.  C is liberal about primitive conversions,
                  which has some upsides (see Kahan's page about Java) -- misha.
2001/8/8 [Computer/SW/Compilers, Computer/SW/Languages/C_Cplusplus] UID:22046 Activity:high
8/7     Is there a way to assign values to a structure in one statement?  e.g.
                my_struct_t m1, m2;

                m2 = m1;        /* compiles*/
                m2 = {1,2,3};   /* doesn't compile */
        Thanks.
        \_ give my_struct_t a constructor.  pass 1,2,3 as arguments.
           m2 = my_struct_t(1,2,3);  --pld
           \_ if he's using C++, another way to do it is to define
              operator<< and/or operator,
              then you can do intuitive looking things like:
              Array ar;
              ar << 1,3,4,5,6;
              i don't remember the precedence of operator= but if it's
              lower than that of operator,
              you could also do
              ar = 1,2,3,4,5;
        \_ oh shit, you're asking for hell from the language lawyers.
           you can't do that at runtime but you can use that syntax as an
           initializer. that's why it's called "initializer" syntax.
           \_ Yes, you can say my_struct_t m2 = {1, 2, 3};
           \_ I need to assign different values multiple times, hence I can't
              do it as initialization.  Oh well, I'll just have to do it field
              by field then.
              \_ yeah, quit being such a lazy ass and do it by field.
              \_ have you read up on these things called "classes" by the way?
                 \_ Been out of school for too long.  I can't even find my K&R
                    book anymore.
                    \_ I have a copy, but it's in Russian :(.  As for your
                       question -- yeah, you can't use struct initialization
                       as assignment in C.  If you need it a lot, you can write
                       a macro.  -- misha.
              \_ this isn't terribly efficient, but can't you declare and
                 initialize a temporary structure, and then assign that to the
                 one you really want?  e.g.:
                 { my_struct temp = { x, y, z };
                   whatever = temp;
                 }
                  ...?  yeah, it's not a single line answer, but it's simple.
                 and if you're lucky, maybe your compiler will do the right
                 thing and ditch that temporary structure entirely. -jameslin
        \_ i think c99 allows this. you are using c99, right? -ali
2001/7/22 [Computer/SW/Languages/C_Cplusplus] UID:21903 Activity:nil
   /*
    * Let's see if anyone finds this.  If glTexImage2D() is called with
    * a NULL image pointer then load the texture image with something
    * interesting instead of leaving it indeterminate.
    */
   if (texImage->Data) {
      static const char message[8][32] = {
         "   X   X  XXXXX   XXX     X    ",
         "   XX XX  X      X   X   X X   ",
         "   X X X  X      X      X   X  ",
         "   X   X  XXXX    XXX   XXXXX  ",
         "   X   X  X          X  X   X  ",
         "   X   X  X      X   X  X   X  ",
         "   X   X  XXXXX   XXX   X   X  ",
         "                               "
      };
2001/7/16-17 [Computer/SW/Languages/C_Cplusplus] UID:21812 Activity:moderate
7/16    Dear motd, is it true that the gnu implementation of C++ lacks
        <sstream>?  What gives?
        \_ see below on the bit on ali.  C++?  who cares.
           \_ what should we care about, java? eiffel? mh?
           \_ what should we care about, java? eiffel? ml?
              \_ Ocaml.
                  \_ All of a sudden i keep seing Ocaml referenced.  Is
                     it really all that?
                     \_ It's a version of SML concentrating on real world
                        usefulness: it has a full object system, good interface
                        to C, useful libraries, regexp handling, lex/yacc
                        tools etc.  It also has a very high quality compiler.
2001/7/11 [Computer/SW/Languages/C_Cplusplus, Uncategorized/Profanity, Industry/Startup] UID:21764 Activity:nil
7/10    Found out my X-company is a "C corporation", not an LLC.  does this
        mean I'm up shit creek when they go bankrupt? - <DEAD>X-.com<DEAD> founder.
        \_ If they go bankrupt, they can't pay you.  What's wrong with that?
           \_ other way around, i'm worried that incurred debt could be
              charged to me.
        \_ http://4inc.com/compare.htm . Shouldn't you have asked all these
           questions of the attorney that helped you incorporate? --dim
                \_ each column contains the word "are not normally liable
                   for the debts of the corporation".  relax.
2001/7/5-7 [Computer/SW/Languages/C_Cplusplus] UID:21718 Activity:high
7/5     Does MFC/STL provide functions for quick extractions of word/line
        counts of a textfile?
        \_ in STL, open the file using a stream iterator. then use
           std::count() in <algorithm>. two lines of code. -ali
           \_ C++ is an evil tool of Satan.
              \_ uh huh.  and i suppose you're either a C purist or
                 one of those "Pee-Ell" people who like ML.  Well,
                              \_ Learn ML before spewing idiocy.
                 when /usr/src starts shipping with ML stuff in it, i suppose
                 you'll be right.  Until then, you're a motd-wanker!
                 (apologies if you are a C purist, but eventually you will
                 be phased out along with fortran).
                 \_ This will take another 10 to 20 years, by which time
                    I will be retired. - not the original poster but still
              \_ and you're a stupid unoriginal troll. -ali
                    not a fan of c++
              \_ and you're a stupid unoriginal troll. learn to code
                 c++ before before you spew idiocy. -ali
                 \_ Ocaml and SML are faster than C++:
                    http://www.bagley.org/~doug/shootout
                    \_ those tests are seriously flawed
                       \_ Show me one test where C++ beats Ocaml.
                       \_ Tell me about it, java beats C++.
                          Only if you run java on a E10K and
                          C++ on a M68K
                 \ Is C++ really that much better than C? I mainly
                    \_ I compare it to the English language:  Difficult
                                bullshit, language learning curve _/
                                depends entirely on your first language and
                                others you may know.
                                \_ I know C well.  C++'s virtual stuff,
                                   STL extensions, and iostream.h classes
                                   are hard to memorize.  I don't mean to
                                   argue ...
                                   it's not really that important, anyway.
                                   I mean, really, do you think I want
                                   to waste more time on C vs. C++ wars?
                       to learn, but very useful if mastered - relative
                       to other languages.
                    write network servers/clients, utility daemons
                    and such and C seems to serve me well. I'd consider
                    switching to C++ if I could figure out how it
                    would make my life eaiser. URL okay. - NTOP (not
                    the original poster)
              \_ Bjarne Stroustrup musings:
                 http://freespace.virgin.net/s.hector/jokes/stroustrup.htm
2001/6/28-29 [Computer/SW/Languages/C_Cplusplus] UID:21667 Activity:high
6/28    The gcc man page says:
       -trigraphs
              Support  ANSI  C trigraphs.  The `-ansi' option im-
              plies `-trigraphs'.
        What are ANSI C trigraphs?
        \_ the cpp man page says:
           -trigraphs
              Process ANSI standard trigraph sequences.  These are
              three-character sequences, all starting with `??', that are
              defined by ANSI C to stand for single characters.  For
              example, `??/' stands for `\', so `'??/n'' is a character
              constant for a newline.  Strictly speaking, the GNU C
              preprocessor does not support all programs in ANSI Standard
              C unless `-trigraphs' is used, but if you ever notice the
              difference it will be with relief.

           You don't want to know any more about trigraphs.
        \_ They were added to ANSI C in order to add support for
           characters such as '{','}','[',']','#' which aren't
           available on european keyboards (they use the keys
           that were ment for these characters for thier accented
           characters). If the stupid europeans could get thier
           act together and learn english and use normal computers
           like the rest of humanity we would never have had to
           deal with this bullshit.
2001/6/27-28 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java, Computer/SW/Languages/Misc] UID:21644 Activity:insanely high
6/27    I'm looking for a programming field that very few people go into
        because it's very hard.  And of course, fewer people -> higher pay.
        Too many coding monkeys doing Java/C++ applications so that's a no.
        I've done network protocol development, embedded software development
        inside network devices and microcode for parallel packet processing
        ASICs.  I've heard programming for DSPs in parallel DSP arrays is hard
        as well.  Is that true?  What other stuff requires real intelligence
        instead of just coding monkey skills?  I'm asking for programming
        positions, not phd level math bullshit work.  That doesn't pay that
                           \_ ah, so you want to use your brain but you don't
                              want to use your brain...
        well.  Thanks.
        \_ you're a wanker, go away
                           \_ ah, so you want to use your brain but you don't
                              want to use your brain...
        well.  Thanks.
        \_ Quantum programming is hard.
           \_ quantum computation is a really exciting feild.  I know, because
              I am getting payed 18,000 dollars a year before taxes to work on
              a quantum computer project. This is just the field for you.
              if the amazing pay doesn't hook you in, check out the fringe
              benefits like spending your saturday nights in a cave-like
              enclosure using an e-beam writer. nont that i'm complaining,
              enclosure using an e-beam writer. not that i'm complaining,
              it's great for some of us, but it is a good way to be poor.
        \_ Solaris device drivers. Actually, it's easier than linux drivers,
           but very very few people are doing it.
           \_ The pay is not that great for Solaris device drivers. Most of
              the work is contract based for custom peripheral cards.
        \_ Become an Oracle DBE. That should be quite sufficient to
           distinguish yourself.
        \_ if you were really smart, ppl would be offering the hard jobs
           to you, lamer.
           \_ If I interview at MSFT, will I get a job programming parallel
              DSP arrays?  You need to determine a field first and then look
              for it.  My main drive is money and few people involved.  E.g.,
              there are only a handful of people in the world that can
              implement BGP4 compatible and scalable with Cisco's BGP4.  They
              get paid very very well.
              \_ Try the fields of medicine or dentistry if you're
                 concerned so much about a big pay day for minimal
                 work/intelligence. A pediatrician can clear over $250,000
                 without overtime working for an HMO. A specialist in
                 private practice... --dim
        \_ you could claim to do your job well, and you'd get paid higher.
           for example, you could say i do web backend developent and deliver
           something that runs on $3000 worth of hardware instead
           of $300000. coding chained DSPs is hard but I have a feeling
           people don't do that kind of shit outside of academia. if you
           like that stuff, you should loook into coding for multimedia
           chips like from Ccbue and Equator and TI. Also, you could get
           a clue and become a compiler writer.
        \_ I followed my interest and did CS.  Now I thought I should
           have gone into medicine.  They pay is better and the babes
           are hotter.
           \_ if you just want $$$ (like I do) then getting a MD now is
              definitely not worth the investment in time.  The money
              you can save working 10 years as a peon programmer is way
              more than the time+money it takes to get a MD.  After 10
              years of slavery I plan to retire.  What will you be doing
              in 10 years?  Just getting out of med school and paying off
              your student loans?  Gimme a break.
              \_ Ten years at $120,000/year is $1.2 million. Cost of
                 medical school is $200,000 (say). Even if you don't make
                 a dime the entire time you are in medical school and
                 residency, you'll be ahead after 18 years from now at most.
                 That's not a bad proposition if you're under 35. Your
                 idea of retirement must suck. --dim
                 \_ I guess you've never heard of compound interest or
                    captial appreciation. 120K/yr with a savings rate
                    of 50% or higher and a modest growth rate of 10%
                    per yr will amount to several million over the
                    course of 10 yrs. Investing this in say short-term
                    bonds gives you a solid income of 100K to 200K per
                    yr. Considering you don't need to spend most of that,
                    your net worth will continue to rise, while you sit
                    around doing what you want. The guy who went the
                    Med School route will get out around age 30 and
                    will spend the next 5 yrs earning ~ 30K while
                    he does a residency, and then he will spend another
                    2 to 5 yrs paying off his debt and will only
                    really start to earn money around age 40. By then
                    your smart coder will be semi-retired living on
                    easy street. If you add in options, the peon coder
                    has a much better life than the MD, as you can
                    use your options to buy a home, thus avoiding a
                    30 yr mortgage that the poor sappy MD has to get
                    in order to affort a home. (We will forget for
                    now that the average MD doesn't make that much
                    more than the average code thanks to the HMOs)
2001/6/26-27 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs] UID:21639 Activity:moderate
6/26    In emacs20 c-mode, how do I tell it to indent with an amount other than
        two columns?
        \_ M-x apropos indent
           \_ Yeah I did that, but I couldn't find anything that I could set
              to tell it to indent by every four columns when I press the
              <TAB> key.  Any more hint?
                \_ c-set-offset.  read:
                   info emacs/ccmode/Customizing Indentation
2001/6/19 [Computer/SW/Languages/C_Cplusplus] UID:21574 Activity:nil
6/18    Association game.  Place one of Republican, Democrat, Commie, Libertarian
        after each term:
        Microsoft         D (omnibus)
        Linux             C (bike), Fascist (kernel)
        Unix              L
        Bill Gates        D
        Steve Jobs        D
        C++               L (harrier jet)
                             \_ wrong! harrier jet == ada
        Java              L (dog and pony show)
        Lisp              C (steam engine!)

        Microsoft         D emocrat
        Linux             I ndependent
        Unix              C ommie
        Bill Gates        K lu klux klan ass sucking fuck
        Steve Jobs        L ibertarian
        C++               I ndependent
        Java              C ommie
        Lisp              K indergarten
2001/6/15 [Computer/SW/Languages/C_Cplusplus] UID:21532 Activity:high
6/14    anyone know of good docs, online or otherwise of the c++ STL
        templates?
        \_ http://www.sgi.com/tech/stl/index.html
           \_ wound up there via google.  how long has this been around?
              it is tres' useful.
2001/6/13 [Computer/SW/Languages/C_Cplusplus] UID:21503 Activity:high
6/13    Is there a way to pass in a C++ object's method to pthread_create
        as the function to call?  I want to do something like this:

        pthread_create(...,o->myfunc,...);

        where myfunc is a method of the object o.
        \_ Yes, but it's a pain in the ass.  You have to create a plain C
           wrapper function that invokes the object's method function, and
           pass that in.
           \_ So the void * arg in pthread_create has to be a pointer to the
              object right? I tried that but the compiler didn't like it.
2001/5/29 [Computer/SW/Languages/C_Cplusplus] UID:21384 Activity:nil
5/30    How is C function filelength() implemented?  Does it actually do byte
        counts of a file (slow) or simply read file attribute (faster?)
        \_ OS?  Library?  I see no filelength()...
          \_ there is no C funciton filelength(). there is probably sone
             microsoft bullshit or some turbo c leftover. you want to use
             stat(). -ali
             \_ http://www.eskimo.com/~scs/C-faq/q19.12.html
2001/5/14 [Computer/SW/Languages/C_Cplusplus] UID:21266 Activity:nil
5/13    Who is linden@Eng?
        \_ he's just this guy, you know?
        \_ I think it's Peter van der Linden at Sun, author of Just Java
           and Deep C Secrets.
           \_ yes it is. -alexf
           \_ Correct.  He works in the building next to mine. -alan-
        \_ One of the greatest C programmers ever born and sometime
           humorist on sun.junk.
        \_ http://www.best.com/~pvdl
2001/4/29-30 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:21134 Activity:very high
4/28    I haven't really use C++ in the last 3 years.  Can someone remind me
        how to initialize a dynamic array of template class pointers?

            class Bar;
            template<class T> class Foo;

            //
            // Is this the right way to initialize this:
            //       ---
            //    -> | | -> Bar
            //       ---
            //       | | -> Bar
            //       ---
            //       | | -> Bar
            //       ---
            //        .
            //        .
            //        .
            //
            Foo<Bar> **barArrayOfFooPtr;

            int size = 5;

            //
            // Forgot how to initialize the following line correctly.
            //
            // barArrayOfFooPtr = new Foo<string>* [size];
            //                    \_ Since you just want an array of pointers,
            //                       try Foo<string>*
            barArrayOfFooPtr = ???

            for (int i = 0; i < size; i++)
            {
              barArrayOfFooPtr[i] = new Foo<string>;
            }                                 \_ Try "new Foo<Bar>"
                                                 \_ Typo.  I do have Foo<Bar>.

        does not seem to be the correct way of doing it.
        \_ the right way to do what you're trying to do is:
           vector<Foo<Bar>*> arrayOfFoos(number_of_elements);
           most other ways are flawed in many ways. -ali
           \_ Correct answer moved to the top.
        \_ Compiler Error message please.
           \_ The problem is I forgot how to initialize a dynamic array of
               class pointers.  I remember that a static array of class
        \_ the right way to do what you're trying to do is:
           vector<Foo<Bar>*> arrayOfFoos(number_of_elements);
           most other ways are flawed in many ways. -ali
               template pointers can be initialzed as
                 Foo<Bar> *barArrayOfFooPtr = new Foo<Bar>[10];
               but I forgot how to initialize a dynamic one.
        \_ Try Foo<string> **barArrayOfFooPtr; .
2001/4/28-30 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Misc] UID:21132 Activity:low
4/28    LaTeX question:  How do I write a macro to add to numbers?
                                                       \_ two
        I can't seem to find how to do math operations with macros.  Thanks.
        \_ See Appendix A.4 of "The LaTeX Companion" for one way.
           \_ I don't happen to have that book handy.  Is there a URL
              or a sample latex file available to illustrate this?
              \_ Sorry, I don't know. If I were to do a websearch,
                 I'd search for the TeX commands "advance" and
                 "multiply", or the LaTeX package "calc" by Thorup
                 and Jensen.
2001/4/26-27 [Computer/SW/Languages/C_Cplusplus] UID:21109 Activity:high
4/26    What are some good reasons to use C fptr over regular method calls?
        \_ Data directed programming allows you to do function calls
           in constant time. Of course, many modern compilers will
           take switch/case statements and implement them in constant
           time.  Look at examples of C function pointers and you can
           see why they're used.
           \_ dude, read the fucking post. VERSUS METHOD CALLS. are you
              fucking awake?
              \_ Well, maybe if he/she DEFINED C METHOD CALLS...
                 \_ Method calls are what the Java people use to call
                    functions associated with a certain class because
                    they're "too cool" to just call them member functions
                    or just functions. Kind of like the whole "Java doesn't
                    have pointers, they have references" bullshit. Even
                    Hilfinger thinks the guys at Sun are full of it.
                        \_ Hilfinger thinks anything which doesn't involve
                           400 macros is full of it.
                    \_ but C is not OO, and hence does not have classes or
                       methods.  Even if the original poster meant "functions"
                       instead of methods, the question makes no sense.
                    \_ It has nothing to do with being "too cool".  Method
                       call is the terminology from Smalltalk, which predates
                       the C++ "member function" terminology.
        \_ Cool people use function pointers.
        \_ you should use method calls whenever you can.
        \_ methods?  in C?  what?
           \_ farms? in berkeley? what?
              \_ moo.
                    \   ^__^
                     \  (og)\_______
                        (__)\       )\/\
                            ||----w |
                            ||     |b
2001/4/24-25 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:21079 Activity:moderate
4/23    Anyone know of a pretty print util for Windows 2000?  (I had a2ps for
        so, where can I get it?  (Please, no suggestions to change OS.)
        \_ print utility to do what?
           \_ Sorry, meant "pretty print" for source code (c++ perl, etc.)
              \_ You meant something like enscript?  If your printer driver
                 supports two pages per sheet, you can simply open your source
                 file as plain text and print with that feature.  Otherwise,
                 You can create a template in M$ Word to use landscape
                 orientation, two columns, and a small mono font.  Then open
                 a new document with that template and paste in your source
                 code.  Then print it.  (The latter was how I printed enscript-
                 like output on my 9-pin printer years ago.)  Either way, don't
                 forget to also utilize any two-sided printing feature to save
                 even more paper.  -- yuen
                 \_ But dumbya told me that cutting down trees is good for the
                    economy.
                    \_ Young troll, remember: to find enlightenment you
                       must hit where it hurts.  Ad hominem doesn't hurt
                       anything except your chances of walking the true
                       path to great trolldom.
                 \_ http://gnuwin32.sourceforge.net/enscript.htm
                 \_ Enscript is similar to a2ps--I was under the impression that
                    enscript had been absorbed into a2ps.
        \_ emacs
           \_ Wow, emacs sends to the printer?  And formats the code like a2ps?
              Are you sure about this?
              \_ M-x print-buffer/ps-print-buffer/ps-print-buffer-with-faces do
                 send output to the local or network printer.  Don't know about
                 formatting.
                 \_ yes, emacs does format like a2ps
2001/4/20-22 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs] UID:21037 Activity:nil
4/20    If I want to insert a TAB character, what's the escape key in Emacs?
        \_ C-q TAB
        \_ C-i
2001/4/15 [Computer/SW/Languages/C_Cplusplus] UID:20984 Activity:low 66%like:20979
4/14    How to create a macro in emacs?
        \_ CTRL-x ( to begin, CTRL-x ) to end
           \_ M-x name-last-kbd-macro  to give it a name so you can actually
              invoke it (with M-x <the name you gave it>)
        How to to recover a autosave in emacs?
          \_ C-x e to execute the macro that was recorded using C-x (
        \_ ESC-x recover-file <ENTER> filename
        How to change permissions on a file in emacs (no shell)?
        \_ the phrase you want is "How do I"...
        \_ M-X apropos
           \_ capital X or lower-case x?
              \_ Yes.
2001/4/14 [Computer/SW/Languages/C_Cplusplus] UID:20974 Activity:very high
4/13    For those who answered my earlier C++ question, I created
        /tmp/plato.cpp to illustrate. Am I a moron? Don't let me down easy.
        and stop overwriting me, tax ranter.
        \_ hi dcs!
          \_ yeah i had to break my veil of secrecy. yes i am normally
             extremely cowardly. -dcs
        \_ dude, you're refering to objects you haven't declared yet.
           just shift your definitions around until you don't refer to
           members before they're called!
           \_ are you joking? it's a circular dependency
        \_ the problem you're having is with the inline methods. declare
           them in the class, but define them out of class. -ali
           \_ I attempted this but got the same error.
           \_  look at /tmp/nitwit.cc. you're not getting paid for writing
               c++ code, are you? -ali
                \_ don't be an asshole ali
                  \_ i give up the right to his gratitude in exchange for
                     the right to be an asshole. fuck off. -ali
                \_ easy horsey, easy
2001/4/9 [Computer/SW/Languages/C_Cplusplus] UID:20908 Activity:very high
4/8     In C++, is there a better way of doing this?
        double **dbl;           // this line should not change.
        dbl = new (double *)[SomeVar];
        for (int i = 0; i < SomeVar; i++) {
                dbl[i] = new double[SomeOtherVar];
        }
        \_ Yes:
           double **dbl,*dbl_temp;
           dbl = new (double *)[SomeVar];
           dbl_temp = new double[SomeVar*SomeOtherVar];
           for (int i = 0; i < SomeVar; i++)
                   dbl[i] = &dbl_temp[i*SomeOtherVar];
           This should decrease OS overhead for repeated new/malloc
           calls. -alexf [fu initially obtained from mconst]
           \_ This is particularly useful on certain vector architectures
              that support strided loads and stores.  The arrangement of
              data allows you to efficiently perform matrix multiplications
              on either column major or row major matrices without having
              to do successive merges and unpacks like AltiVec does.
              But who do we care. None of us have vector processors at our
              disposals.
              \_ this is useful regardless. it lets you write matrix
                 multiplication using only one loop which increments the
                 matrix pointer by 1, and increments the vector pointer
                 by 1 modulo its length. your matrix multiplies will fly! -ali
                 \_ I just rented it.  It was better on DVD.
                 \_ how do you mean? doesn't this just give you the diagonals
                    of the result?
                    \_ but the math will fly!  all the way to the stars...
                       \_ Per Aspera ad Astra, motherfucker.
2001/3/19 [Computer/SW/Languages/C_Cplusplus] UID:20839 Activity:kinda low
3/18    For const vs. #define thread that someone deleted below, here's my
        answer.  #define is much more flexible than const. It lets you
        take in paramters, or generate a series of function calls (const
        will only let you create a value). #define also lets you refer to
        other #define's and will accept command line -D arguments passed
        into the compiler.
        \_ thanks, but I was really asking about the use of #define vs. const
           for the specific situation of constant values.  obviously #define
           can do things that const can't (like macros). (similarly, #define
           can do things typedef can't, but typedef clearly is preferable.)
           misha's answer was more what I was looking for.
        \_ There's No const. There's Only mconst.
2001/3/17-18 [Computer/SW/Languages/C_Cplusplus] UID:20827 Activity:high
3/16    Why does so much C sample code use #define instead of const?
        \_ because any good C code will use a bunch of preprocessor
           anyways. you can't be a good C programmer and eschew the
           preprocessor. For that, you need a language which fills those
           gaps with other constructs (c++ templates go a long way to
           obviate the need for preprocessor for example). you
           should not be afraid of the preprocessor in C. it should be
           a well accepted compromise when using C.
           \_ I have no qualms about using the preprocessor.  I love macros.
              I'm not asking about the usefulness of the preprocessor.  I am
              asking why much code uses #defines for constants when the
              language already "fills those gaps" with its own const construct.
              \_ cuz K&R used defines, not const.
                 \_ K&R r0x mah nuTz!
                 \_ bah.  I don't care for how k&r encourages declarations
                    like "int *x" rather than "int* x" either.
                    \_ Uh.  I wish _I'd_ been taught the former in 61B.  For
                       a long time I was confused, because we were taught that
                       char* foo;  meant "character pointer...   foo"
                       So I declare   char* foo, bar, baz;  sigh.
                       \_ it's something that should be mentioned so that
                          people know to avoid that quirk, but otherwise it
                          makes more sense the second way.
                          \_ why does the second way make more sense?
                             \_ because pointers are types
        \_ Because in C, const variables aren't const expressions; you
           can't use them in array declarations for example.
           const int SIZE = 20; char c[SIZE]; won't compile.  You need
           to use #define (or compile as C++ code).  -- Misha.
           \_ What is useful information doing on the motd?
                \_ Mistakes were made... villages bombed.
2001/3/9 [Computer/SW/Languages/C_Cplusplus] UID:20739 Activity:very high
3/9     XOR is the same as || right? (i.e. exclusive or)
        \_ no. i recommend buying a copy of K&R --aaron
        What are ways to write "inclusive or"?
        \_ questions like these elicit good response following the bike shed
           principle.
            \_ I am unfamiliar with "the bike shed principle".  Also, i don't
                really care about the differences between XOR and ||.
                basically i just want to know short hand to write inclusive/
                exclusive or.  So that i can say "is A XOR B true?" or "is
                A IOR B true".  where, if A and B or true the answer to the
                A IOR B true?"  where, if A and B are true, the answer to the
                former is NO and the answer to the latter is YES.
                \_ RTFM you dumbass. What are you talking about? Are you
                   even asking about a programming language? Which one?
                        \_ NO I AM NOT.  If i was i would have specified.
                   You can say whatever you want but || is logical or in C/C++.
        \_ yes, get K&R, but in the meantime, a quick lesson.  in C/C++/Java:
                || : short-circuiting, logical, inclusive OR
                |  : bitwise inclusive OR; doubles as non-short-circuiting,
                     logical, inclusive OR
                ^  : bitwise XOR; doubles as logical XOR
2001/2/27 [Computer/HW/Memory, Computer/SW/Languages/C_Cplusplus] UID:20713 Activity:high
2/26    Hey folks, I'm looking for something like Purify but cheap.
        What do people do for C programming to guard against memory
        bashing and leaks, other than write their own malloc and
        buy expensive software from Rational?
        \_ wasn't there some kind of program to analyze C code for
           no no's. I think it was called something like lint.
              \_ uh, lint is a syntax checker. it does not figure
                 out if your code has memory leaks.
           \_ memory bashing.  memory leaks.
              \- wasnt there something called electric fence or something
              like that? --psb
                \_ Yes.  -lefence on some Linux systems, or you can go
                   and get the library.  However, efence just puts illegal
                   pages before and after every memory allocation.  This
                   means that if you write outside of the bounds of any
                   allocation, it seg faults immediately there, showing
                   you the memory error immediately if you're using a debugger.
                   This is VERY demanding of memory however, and slow.
                   Memory use will 10x, speed will .04x.  efence is in NO way
                   as good as purify....  --PeterM
2001/2/21 [Computer/SW/Languages/C_Cplusplus] UID:20640 Activity:nil
2/19    I want to use pair, string, and list of SGI's STL at
          http://www.sgi.com/tech/stl
        with VC 6.0.  I am having a hell of a time trying to compile the
        source, and using it.

        QUESTIONS:
        1) Are all of the STL's out there uses/have the same interface?
           \_ what part of S don't you understand
              \_ SGI's STL has some non-standard extensions, although
                 these are documented.
        2) Other than the not intuitive docs availalbe at the site, are there
           any recommended online/offline references which I can use without
           spending like months trying to figure things out?
        3) Are there more intuitive STL's out there besides SGI's?
        \_ There's a semi-standard interface that's defined with C++ (I
           believe it's part of the standard). I would rely on what's in
           the latest Stroustrup ("The C++ Programming Language", 3rd ed.,
           which for the record is considerably better than previous
           editions) both for the "standard" interface as well as the docs.
           It would be difficult to learn STL from what's on the SGI site
           (although it is a good reference). Stroustrup does a reasonably
           good job.
           As far as VC++ goes, the way we do it is to include the header
           files you want (all without .h's; i.e. #include <list>,
           #include <string>). When you do this, everything is in the
           std namespace, so it is probably easiest for you to do
           "using namespace std;" in your include headers so you can declare
           lists instead of std::lists. When you do this you use the std
           ostream and istream operators, which differ from the regular
           ones, but you probably won't notice much difference. Good luck.
           \_ Thanks for the tips.  That's very helpful.
              One more Q.  If I want to put all of the templates in the same
              dir as my project as in D:\myproject\, do I need to anything
              special since all of the STL files refer to each other as
              <file> instead of "file"?
              \_ Minus any special knowledge about what your situation is,
                 I would strongly urge you to leave the headers in the
                 VC++ directories where they are shipped. STRONGLY urge.
                 In answer to your specific question, include "" looks:
                 directory of included file, directory of including file,
                 compiler option /I paths, INCLUDE env. variable. include
                 <> looks: compiler option /I paths, INCLUDE env. variable.
                 So you might have a bit of trouble putting them in your
                 compiling directory. (This is all MS VC++ specific; actual
                 behavior of #include <> is "implementation defined".)
        \_ By the way, last time I checked MS VC++ shipped with a
           version of STL that didn't include hash_map.  If you end up
           using the MS VC++ STL and you need hash_map, you can get a
           stand alone copy from my web page at http://www.csua.berkeley.edu/~emin
        \_ MS's STL was actually written by the folks at DinkumWare
           (http://www.dinkumware.com ; they have (costly) upgrades if
           you are in need of them, since they're more recent than the
           MS ones. Of more interest are their "bug fixes" at
           http://www.dinkumware.com/vc_fixes.html: well documented and
           quite helpful. The sstream one was of particular interest to me.
        \_ Try http://www.stlport.org -- it's still free, and it should work
           better.  Read http://www.stlport.org/doc/README.VC++.html for
           VC++-specific issues.  -- misha.
2001/2/13-14 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs] UID:20577 Activity:nil
2/12    In emacs I can do C-X C-F *.cc and all my cc files get loaded in.
        How do I do this in XEmacs?
        \_ M-! gnuclient -q *.cc
        \_ ^X^Cvi *.cc^M
2001/1/28-31 [Computer/SW/Languages/C_Cplusplus, Academia/Berkeley/Classes, Computer/SW/Languages/Misc] UID:20454 Activity:moderate
01/27   EE department is teaching a course on intro to embedded programming/RTOS,
        as EE 290-O (letter O). Prereqs listed as "knowledge of C and familiarity
        with OS basics" -- presumably ~162.
        TuTh9:30-11 / 531 Cory / Christof Kirsch <cm@eecs>
        http://www-cad.eecs.berkeley.edu/~fresco/giotto/course
        \_ Can non-students audit the class or simply sit in the lectures?  I
           heard that Cory Hall requires card key access these days.  -- yuen
           \_ Card key access is for after hours and labs.
           \_ It should not be cardkeyed in the morning (that's 9:30-11 AM, of
              course). The prof is unlikely to mind an auditor or two, but
              you should email the prof directly to know for sure. -alexf
           \_ Card key access is for after hours, labs, and the colossal sexual
              encounters that occur there.
              \_ And if you're lucky you might see Hilfinger step out of his
                 shower stall.
                 \_ ew
                    \_ That's no slide rule he's holding.
              \_ Why do you think the first floor sounds like a vibrator?
2001/1/25-26 [Computer/SW/Languages/C_Cplusplus] UID:20431 Activity:high
1/25    C question.  I want to declare a variable p which stores the pointer to
        a malloc'ed array of 65536 elements.  Each of these 65536 elements
        in turn stores the pointer to a malloc'ed array or 16 int's.  What's
        the best way to declare p to include as much type information as
        possible?  Sure I can do "int ***p;", but that doesn't contain much
        type information.  Thanks.
        \_ int *** p is the most general way, it's impossible to make better
           recommendations without knowing how this will be used.  If you want
           type information badly, C is probably not the best language for you.
           May I recommend ML?
           \_ How about "int (*(*p))[16];"?
        \_ Using structs is the usual solution to this dereferencing problem.
        \_ if you know the size is 65536 and there at only 16 ints, then you
           could do "int ar[65536][16]". or is there a limit on the size of
           arrays in C? Or if you're using c++, you should be using vector<>:
           vector<vector<int> > ar;-ali.
           \_ But then I can't do "ar = malloc(...);" to allocate the array
              dynamically.
              \_ if you really need dynamically allocate the array (i'm
                 guessing you actually don't), the cleanest thing to do is:
                     typedef double bigarr[65535][16];
                     bigarr *ar = malloc(sizeof(*ar));
                     (*ar)[20][2] = 4;
                        -ali
                 \_ I do need to allocate dynamically, because in BorlandC for
                    plain DOS, the max. size of a statically defined array is
                    65536 bytes, while I can dynamically allocate a block
                    bigger than that (via farmalloc()).
        \_ and what is this crap about ***? why can't use you just use **?
           or did you really mean 'alloced array OR 16 ints" instead of
           "array OF 16 ints". -ali
           \_ I meant the latter.  Basically I'll call malloc() once to
              allocate the 65536-element pointer array, then call malloc()
              65536 times to allocate all of the 16-element int arrays.
              \_ in that case, declare:
                  double (*ar)[16];
                  this declares a pointer to a 16 element array.
                  then ar = malloc(65535*sizeof(ar)) will give you 65525
                  pointers. -ali
2001/1/25-26 [Computer/SW/Languages/C_Cplusplus] UID:20427 Activity:high
1/24    At interviews, I've been asking, "Write a C program 'sum' that takes
        two integer arguments and prints out the result.  E.g., 'sum 5 12'
        should print 17 to the screen."  This is a gut check question, but
        everyone seems to have problems with one thing or the other.  Any
        ideas for a better 5-10 minute written C question?  Thanks.
        \_Ask them to construct a simple linked list using pointers. Your
        program should be a 30 second question. If people can't get that right
        then you shouldn't be hiring them. Maybe it's the way you ask the
        question.
           \_ 30 seconds eh? you must write sloppy code.
        \_ Right, no one should miss that question, so... How *exactly*
           are you phrasing it?
           \_ I phrase it just as I've written above.  Try the question
              yourself.  You have 7 minutes, you explicitly do not
              have a computer to test it on, and you do not have man
              pages or books.  Tell us whether you did it right given
              these constraints.
        \_ My favorite one is: write strcpy().  Tells you a lot about a
           person's understanding of C.
           If you want trick questions, take a look at
           http://www.xcf.berkeley.edu/help-sessions/c-tricks.html -- misha.
           \_ The alpha geek at our company notes:
                xxxxx: but the paradigm of x[y] = *(x+y) is actually used
                quite a lot...  especially when you're not sure the size of
                x in which case long x; x[5] is actually *(x + 5 * sizeof(x))
              You learn something new every day. -- Marco
                \_ Hilfinger grilled this sort of thing into us in 60c.
           \_ let us hang our heads for the xcf requiem.
        \_ what kind of problems do people have with this???
           \_ main(int argv, int argc)
              main(char **argv, int argc)
              sum = argv[1] + argv[2];
              x = (int) argv[1];
              several other bad things

              did not:
              initialize sum
              include any header files

              I don't like my question, so I'll try the strcpy() question
              next.  Thanks, misha.
                \_ You don't need header files to printf sum.  You'll get
                   a compiler warning but it will print when executed.
                   If they can't do sum(), they sure as hell can't do a
                   strcpy rewrite.  I suggest a series of 30 second questions
                   in the Hello, World or sum() realm and then give them a
                   shell, gcc, vi/emacs, and 30 minutes to write, and
                   successfully compile something more serious.  After all,
                   they *will* have a computer once they're doing their job
                   on site so why deny them that during the interview?  Just
                   another random viewpoint.  BTW, I assume this is for junior
                   level positions.
        \_ I've been in the industry for 7 years, and every time I need to use
           trivial things like fgets() I still need to look up the man page.
        \_ Knowing what the heck you are building is the hard part.  The
           programming language is the esay part.
        \_ Your question is too easy.  It should sum an arbitrary number of
           arguments from the command line.
           \_ and then compute the last digit of pi.
2001/1/9-10 [Computer/SW/Languages/C_Cplusplus] UID:20279 Activity:high
1/9     Is C++ pretty much dead?  Java has finally killed it?  I don't know
        of any commercially successful software written entirely in OO fashion
        in C++.  Everything I'd seen use C++ to encapsulate data structs and
        member functions.  Like C programs that do foo->bar() a lot.
        \_ Um, no.  C++ is still EXTREMELY popular.
        \_ Who cares about "entirely in OO fashion"?  As if OO is a requirement
           for commercial success?  Has BH finally taken over the CS Dept?  Is
           this a lame troll attempt or are CS kids just completely devoid of
           all rational thought today?
        \_ Um, no.  C++ is EXTREMELY popular.
        \_ Get your head out from your ass.
        \_ not with COM around..
        \_ Jokes aside, aren't all the Microsoft Office apps as well
           as Windoze Netscape 4 written in C++/MFC?
           \_ yes.
                \_ no one uses MS Office anymore, we all use Corel Office
                   written in Java.  Get with it!
                        \_ No, I'm still trying to get my new 50 ghz i786
                           running, ya know, the new quantum chip that self
                           replicates as needed with IntelNanoBot technology
                           to increase computing power in real time?  I could
                           run Corel's Java Office almost as fast as my 486
                           runs Corel's C/C++ Office.
        \_ C# rules.
2001/1/5-6 [Computer/SW/Languages/C_Cplusplus, Computer/SW/OS/Windows] UID:20236 Activity:low
1/4     Any suggestion on where to find open source implementations of
        Chinese input methods for English keyboards (free or not)?  Thanks.
        \_ for what o/s?
           \_ No, I need an implementation so that I can port it to my OS.
        \_ emacs 20 -pld
           \_ Got it, thanks.  But I need source code in C.
        \_ http://www.register.com has a way to let you register asian language
           characters with English keyboards--maybe ask them?  -John
        \_ http://X.org/XFree86.org
        \_ On a related note.  Is there such features as spell checking,
           grammar and thesaurus in MS Word Chinese version?
2000/12/26-28 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:20177 Activity:high
12/26   Does any one have any suggestions for debugging programs?
        \_ try /csua/bin/clue
          \_ printf is your friend!
        \_ are you looking for debugging strategies or debuggers?
        \_ If you are looking for debugging strategies, I would recommend
           sprinkling assertion checks throughout your program.  For example,
           if you have a data structure, write a function to check that the
           internals of the data structure are consistent.  Then use the
           assert macro (man assert for details) to verify that the
           data structure is consistent when you modify it.  You can also
           use assertions to check that the inputs and outputs of your
           functions satisfy your assumptions about what they should be.
           Assertion checks are one of the best tools for finding bugs.
           \_ aka: printf.
            \_ Yes. Because we want to run helper debugging functions for
               every little data structure we use.  That's much easier
               than using the gdb print command.
              \_ print(3) doesn't call sigabrt for you.
        \_ if your data structures are weird, try DDD (gui wrapper on GDB)
        \_ on a somewhat related topic: whenever I try to use lint, it
           complains that it can't find llib-lc.ln.  How do I fix this?
                \_ Install the lint libraries package(s) for your OS.
           \_ you don't use lint. you use gcc -Wall -O3 (turn on optimization
              for data flow)
2000/12/21 [Computer/SW/Languages/C_Cplusplus, Recreation/Food] UID:20144 Activity:nil
12/20   Does anyone know of a good internet source for indian recipes?
                \_ try these. (student's guide to cooking)
        http://www.cs.cmu.edu/~mjw/recipes/ethnic/indian/indian-coll-1.html
        http://www.cs.cmu.edu/~mjw/recipes/ethnic/indian/indian-coll-2.html
                -- sagarwal
2000/12/4-5 [Computer/SW/Languages/C_Cplusplus, Computer/SW/OS/Linux] UID:19996 Activity:high
12/4    What would cause a SIGBUS on linux x86? The classical misaligned memory
        access doesn't. Post a minimal C snippet if possible.
        \_ Using a shared memory mapping to write past the last page of
           a file:

             int f = mkstemp(strdup("/tmp/sigbus.XXXXXX"));
             char *x = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, f, 0);
             *x = 0;

           (If you really want to do that, use ftruncate(2) to extend the
           file before you write to it.)  --mconst
           (If you want to do that, use ftruncate(2) to extend the file
           before you write to it.)  --mconst
           \_ this sounds like a protection problem, because you're hitting
              part of the addr space that's not mapped. why does it produce
              a sigbus? -ali
              \_ It is mapped -- that mmap call maps 4K, regardless of how
                 big the file is.  If we'd used MAP_PRIVATE, then that 4K
                 region would be backed by swap, and the code would work
                 fine; but with MAP_SHARED, the region is backed directly
                 by the file.  Since you can't change the length of a file
                 with mmap, there's no backing store for anything you write
                 past the end of the file.

                 This means that nothing you write past the end of the file
                 will be saved.  You can try it: create a file with some data,
                 mmap it, and write to a few bytes just past the end of the
                 file.  As long as you stay within the last page of the file,
                 your writes will succeed but they'll be silently discarded
                 when the page is written out to disk.

                 Unfortunately, writing past the end of a file is a common
                 programming error.  Although it would be hard for the kernel
                 to detect this in general, it's easy to check for writes
                 beyond the last page of the file -- so linux does, and sends
                 you SIGBUS when it happens.  --mconst
        \_ netscape.  Not minimal, though.  Sorry.
           \_ thus the inquiry
                \_ In netscape's case, usually kill(pid, SIGBUS) after it
                   detects a fatal error & wants the "talkback" error catching
                   & mailing software to run.
                   \_ the talkback software executes the same command
                      on itself just before doing anything useful.
        \_ how about kill -s SIGBUS <pid>?
           \_ funny. cough. funny. and it's "kill -BUS pid" on a lot of systems
2000/11/30-12/1 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:19960 Activity:high
11/30   In java, if int a=10 and:
        a) a = a + a++;
        b) a = a++ + a;
        The result of a and b SHOULD be the same, but are not. What's up?
           \_ Think about it, its not always going to be the same. Mostly
              likely it will be similar to the following:
              a) 1. fetch value from addr of a and store in reg 1
                 2. fetch value from addr of a and store in reg 2
                 3. increment value stored at addr of a
                 4. add reg1 and reg2 and store at addr of a
                 -> a is 20 (10 + 10)
              b) 1. fetch value from addr of a and store in reg 1
                 2. increment value stored at addr of a
                 3. fetch value from addr of a and store in reg 2
                 4. add reg1 and re2 and store at addr of a
                 -> a is 21 (10 + 11)
        \_ The ++ is executed immediately after its original value is used?
           a) a = 10 + 10 (a now = 11, but very temporarily)
           b) a = 10 + 11
           \_ This is correct: Java (unlike C or C++) specifies that the
              increment happens immediately after its value is used.
        \_ Whoever writes code like this that relies on the implementation
           of execution order should be shot.
              \_ Um, there is only one possible execution order for the code
                 given above according to the rules of precedence.
                 \_ Oh yeah?  Just for "a = a + a++" alone I can get two
                    different results:
                    \_ Those results (and more) are both valid in C++, but
                       in Java only the second can happen.
                    1) Fetch value of "a" on the left of '+', 10.
                       Fetch value of "a++" on the right of '+', 10.
                       Do increment for "a++".  "a" becomes 11.
                       Write result of addition to "a".  "a" becomes 20.
                    2) Fetch value of "a" on the right of '+', 10.
                       Do increment for "a++".  "a" becomes 11.
                       Fetch value of "a" on the left of '+', 11.
                       Write results of addition to "a".  "a" becomes 21.
                       \_ I did not say that a and b are equivalent. I
                          said that there is only one possible order of
                          execution based on the rules of precedence.
                    \_ I guess this falls under the part of the ANSI C spec.
                       that says that the order of execution of subexpressions
                       in an expression is implementation defined. I suppose
                       the following would be possible as well:
                       incr a, fetch a, fetch a, store a -> a = 22
           \_ Oh, you can write code that is independent of execution order?
              You rule.
              \_ No, but I can write code that only relies on execution order
                 that is implementation-indepedent.  E.g. I can write C code
                 like "if (foo() || bar()) {......}" and rely on the fact
                 that foo() is executed before bar().  But I won't write code
                 like "baz(bar(), foo());" and assume that foo() is always
                 executed before bar().
        \_ Wanna really have fun? Run this in C, using native compiler,
           gcc, and others and you'll get a DIFFERENT result. TRY IT!!!
           \_ Okay, I don't see how a and b can ever be the same. You
              are asking for two different actions to be performed.
        \_ Ok, I just tried it on a sun box with gcc.  the answer is 11 in
           both cases.  How can this be?
2000/11/30 [Computer/SW/Languages/C_Cplusplus] UID:19954 Activity:high
11/29   On NT, how do you find the IP address on the machine you are on.
        (without using a system call to "hostname" or "nslookup").
        I'm talking not at the command prompt but inside of C/C++ code.
        \_ command prompt> ipconfig
        \_ start->shutdown, boot with OpenBSD floppy, install,
           then look at ifconfig source code.
           \_ thanks.  ipconfig source may work.
                                \_ open MS source?
                                        \_ MS source is available if you have
                                           enough $$.
                                   \_ M$trace
                                   \_ He's the 311T3 .RU H@X0R what
                                      0WNZ M$.
2000/11/21 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:19871 Activity:very high
11/21   All java class inherites from class *Object*, if I have three classes
        A, B, and C all have one same method showErr().  If I want to have a
        function that can call showErr() depending on the object that I passed
        in, eg.
                public void handleErr(Object o) {
                        o.showErr();
                }
        This code won't compile because Object doesn't have method showErr();
        Question is is this possible?  Type casting won't work because we don\
        don't the object type at compile time.  I don't think c/c++ can do th\
                          It works fine in C++: _/

                          template<typename T> void handleErr(T *object) {
                              object->showErr();
                          }

                          You don't need to create an interface, and you don't
                          need to use run-time type checking; it just works.
        In Java, there's Object.getClass(), however I don't think it'll help
        here...Does anyone know if the above code can be tweaked to work?
        \_ use an interface
           \_ I guess you could have A, B & C implement the interface but
              you can be more hacker style with instanceof and casting.

              if (o instanceof A) {
                ((A)o).showErr();
              } else if (o instanceof B) {
                ((B)o).showErr();
              ...
              \_ That's not hacker style, that's tjb l4m3r-style.
                 Use reflection.  -pld
                     \_ is reflection available in 1.0 or 1.1?
                 \_ how dare you call me a l4m3r you lu53r. - tjb
                 \_ how dare you call me a l4m3r U 1u53r. - tjb
                 \_ dumbass, if it works, I should get 100% for it.
                    It's about getting it to work, not showing off your
                    "elite" style.  -tjb #1 fan
                    \_ whatever happened to the effort to get tjb
                       a soda account?
2000/11/17 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Misc] UID:19829 Activity:nil
11/16   If the keys are integers, then bucketize each array (not even a
        full integer sort: just count the # occurences of each key).
        That's 2N. Then, just subtract the occurence buckets and populate
        C with the contents of the subtracto. Three passes through.
        If the contents are not integers, then do exactly the same thing
        but use a hash table to maintain key counts, instead of an array
        (and universal hashing is cool).
        (if the integer keys are sparse, use hash or sparse array, tossup
         which is faster)
        [trivia: the preceding is an answer to what lazy motders question?]
        [trivia: who conceived universal hashing]
2000/10/9-10 [Computer/SW/Languages/C_Cplusplus] UID:19448 Activity:low
10/09   How do I get emacs to reread the contents of a file
        and junk the contents of the buffer corresponding to
        that file? I know I can C-x C-f to re-read, but I'm
        looking for something like C-r in Lynx.
        \_ I can suggest M-x revert-buffer (you could bind it to some other
           key sequence, though C-r is not recommended).  --sowings
           \_ I won't use C-r, C-x r maybe. Thanks.
2000/9/19 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Misc, Recreation/Music] UID:19283 Activity:nil
9/18    http://www.director-file.com/cunningham
2000/9/16-18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs] UID:19264 Activity:high
9/16    What's the benefit of joe over vi/pico?  It seems like it contributes
        the worst aspects of both.
        \_ joe is a minimal version of jove.  jove is a supposedly minimal
           version of emacs.  It's for people who know emacs key commands,
           but don't use any of emacs' useful features.  If you're considering
           it, you have enough clue to use (and should be using) vi.
                  \_ uh, no. You should be learning emacs.
                int he unix world? --psb
                \-what is the point of using an editor other than vi or emacs
                  in the unix world? --psb
                  \_ You dont need 20 megs of quota/free space to install jove.
                           \_ ED! ED is the STANDARD EDITOR!
                        \_ emacs configuration is ridiculous.
                            \- configuration is not the same as extension.
                                by ridiculous do you mean "hard"? what is an
                                example of something that is ridiculous? the
                                only think i can thing of is "there are some
                                subtleites to swapping DEL and BKSPC". --psb
                                \_ here's an example of a minimal .emacs
                                   to solve emacs' most egregious configuration
                                   problems:
(set-variable 'make-backup-files nil)
(set-variable 'auto-save-default nil)
(global-set-key "\C-h" 'delete-backward-char)
(setq default-major-mode 'text-mode)
(setq initial-major-mode 'text-mode)
                                   Besides the fact that the defaults are

                                   stupid, the syntax is horrendous.  -tom
                                        \-emacs has made a conscious trade off
                                        in power for simplicity ... e.g.
                                        functions which dont naturally take or
                                        require numeric arguments behaving
                                        differently when called with an arg, or
                                        0 or a negative arg. but what it does
                                        do tends to be well thought out ...
                                        which is different from "easiest to
                                        use". i find programs that bury stuff
                                        on some random nested pull down menu
                                        to be far more annoying. there are some
                                        legit complaints [many which have been
                                        fixed since say emacs 18.59] but i
                                        havent heard them from the people
                                        complaining. [e.g. it did kind of suck
                                        when you wrote stuff in the scratch
                                        buffer and typed C-xC-c and lost your
                                        changes. --psb
                                        \_ the thing is, it's "well thought
                                           out" by a fuckin' lunatic.  -tom
                                        \_ So dont complain when people want
                                           a ferarri instead of an F350 truck.
                                \_ I believe that he is referring to the
                                   extent with which one can configure emacs
                                   as being ridiculous.
                  \_ Because something better needs to come along.
                     \_ no little grasshopper, the best is already present,
                        and its name is ED!
                        \_ Does ED have C/C++ context highlighting?
                              \_ If you need context highlighting then your
                                 fu is really weak. REAL MEN don't need pretty
                                 girly colors to tell them what is a struct,
                                 int, void etc. REAL MEN understand C code by
                                 looking at it.
                           \_ context hilighting is for sissys. Real men
                              use ED. You are obviosuly not ready for the power
                              and responsibility. Go back and play with your
                              pirated copy of Visual Studio. Weenie.
2000/9/13-14 [Computer/SW/Languages/C_Cplusplus] UID:19245 Activity:nil
9/13    Anyone know the Sparc Instruction Set that'll do array-out-of-bound
        check? Also if it is possible define such in C? Thanks.
2000/8/31 [Computer/SW/Languages/Java, Computer/SW/Languages/C_Cplusplus] UID:19138 Activity:high
8/31    What is the equivalent of java's "final" keyword in C++?
        \_ java's final keyword has several uses in java. which one
           aare you talking aobut?
        \_ C++ (Purely Virtual Method)  Java (Abstract Identifier)
           C++ (Virtual IDentifier)     Java (Default)
           C++ (can't be overrideen)    Java (Final Identifier)
                (by default)
        \_ If you are using 'final' in a variable declaration, then the
           equivalent C++ keyword is 'const.'
           If you are using 'final' in a class declaration, then there is
           no C++ syntax that will do what you want.
2000/8/23-24 [Computer/SW/Languages/C_Cplusplus, Computer/SW/OS/Solaris] UID:19072 Activity:high
8/23    I have an application (o.k. weblogic) which came with a library, but
        when i start the application it scrolls by with a mesg. that the file
        /directory/path/to/file/filename.so doesn't exist. BUT IT DOES! and is
        mod 777,  What could be causing this?
        \_ SEE!  I *told* you weblogic was an administrative nightmare!  No
           one with any clue ever listens to the sysadmin.  --sysadmin
        \_ bad startWebLogic.sh or weblogic.properties file.  Base dir set?
            \_unlikely since it knows WHERE the file is & just says it !exist
        \_ All the directories to the filename have permissions?
            \_yes.
                \_ don't make it mode 777, that will fuck up loaders if you're
                   root on some OS'es.  If you're on IRIX, welcome to library
                   hosedness.  -tom
                    \_good to know. I guess i should have mentioned that i'm on
                        Solaris (7) and running it as a user: weblogic
        \_  I had this problem when I was running weblogic on
            Solarisx86.  The library was for sparc.  -brianm
        \_ or..maybe..ld isn't configed? (not sure how weblogic is setup)
        \_ if this is .so, you have to set LD_LIBRARY_PATH (Solaris) or its
           equivalent on other platforms. WebLogic startup scripts do this
           for you. If this is a Java library, then it's a lot more complicated
           due to the classloader hierarchy used by WebLogic. Read the docs.

-/--    It wasn't here for very long before getting trunc'd, but for the person
        looking to teach programming to a 10-yr-old: http://www.toontalk.com
        "ToonTalk is a video game for making video games." -David Kahn, 10
        "It's an animated world where kids can make, run, debug, and trade
        programs."-Ken Kahn, David's dad and inventor of ToonTalk
        --mogul
        \_ C!  C is the STANDARD!  Programming language.
           \_ ANSI or K&R?
                \_ ISO/ANSI C99
                \_ Any worth while compiler will deal properly with either
                   or a mix of the two in most cases.
              \_ MS C(#) - bg
2000/8/22-23 [Computer/SW/Languages/C_Cplusplus] UID:19065 Activity:moderate
8/22    Looking for studio in downtown San Jose.  anyone knows the average
        rent there?
        \_ Expect $1200-$1500/month
        \_ 1000000000000000000000/mo.

-/--    It wasn't here for very long before getting trunc'd, but for the person
        looking to teach programming to a 10-yr-old: http://www.toontalk.com
        "ToonTalk is a video game for making video games." -David Kahn, 10
        "It's an animated world where kids can make, run, debug, and trade
        programs."-Ken Kahn, David's dad and inventor of ToonTalk
        --mogul
        \_ C!  C is the STANDARD!  Programming language.
           \_ ANSI or K&R?
                \_ ISO/ANSI C99
2000/8/9-10 [Computer/SW/Languages/C_Cplusplus] UID:18931 Activity:kinda low
8/8     Someone please explain 'extern "C"'? Tech URL prefered. Thanks.
        \_ It specifies a C function interface -- this affects linkage,
           mangling, and parameter convention.  Theoretically your compiler
           could also accept extern "Pascal" or extern "Scheme"
        \_ It tells the C++ compiler you're including old fashioned C code.
           \_ bzzt, not exactly, thats just what most people use it for.
              Specifically it does exactly what the first responsder said...
              this means C++ code could call a C function or a C code could
              call a C++ function... and the linkage, mangling, and
              parameter conventions are used appropriately.
              \_ Second responder.  I put it first because I was correct. -!ali
2000/8/9-10 [Academia/Berkeley/Classes, Computer/SW/Languages/C_Cplusplus] UID:18929 Activity:high
8/8     How well do UCB EECS and CS newgrads know C/C++? (in general)
        \_ If it makes you feel any better, Stanford undergrads start out
           take 3 quarters of "Introductory Programming" in C instead of
           SICP.
        \_ on average, better than other schools' new grads, with a
           lot more upside
        \_ That's right.  They stopped teaching C/C++ in 61B in favor
           of Java right?  So you have to learn C/C++ somewhere else
           or in 61C or the upper division classes.
        \_ Well, they know VB and VC++. They know java 1.1 and some swing.
           they should know ansi C.  That's it.
           \_ If you don't know what you're talking about, shut the fuck
              up. No one here teaches V-anything except for the occasional
              160/169 lab group that picks it up on their own. Swing isn't
              taught almost at all either.
              \_ you are stupid.  Look at the original question.  you _must_
                 be a class of 2k|2k+ grad.  Say, nerdboy, he asked what do
                 you _know_ now what you are _taught_ and if you've been a
                 good little nerd eecs boy then you've had internships, and
                 guess what you're learning on those internships?  It ain't
                 BSD. (and don't bother erasing this, I've got a perlscript
                 to keep placing it back).
                 \_ last I remember, people were concerned about learning
                    asp, jsp, servets, and oracle stuff.  This was more
                    of a concern than C, C++.  I assume they'd know C from
                    60b, or 61c.  And some C++ (but not much about templates
                    and certainly not much about makefiles. - paolo
           \_ C/C++ is dead. Everybody is learning the new Microsoft
              Language C- --social science major
        \_ Many classes still use C++.  Also, really, a berkeley grad should
           be able to learn languages quickly. -nweaver
           \_ Indeed.  I learned LISP from scratch (with no prior LISP/ELISP/
              Scheme knowledge) in a few days when I took my CS164 which used
              LISP to write the compiler.
              \_ When(/where?) was this?
              \_ Now you are ready to learn K   -muchandr
        \_ Well, C++ the OOP language is getting whacked by Java
        mindshare-wise. I think the GP stuff might grow popular enough to
        give it a new start though. We'll see.  -muchandr
2000/7/28-29 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Unix] UID:18798 Activity:high
7/27    I love GNU indent as a code beautifier.  Is there anything
        better? or perhaps for C++?
        \_ heresy, but what about Visual C++?
           \_ Alt-F8?  It pales compared to GNU indent.
        \_ emacs --batch --exec '(indent-region (point-min) (point-max))' FILE
           \_ Is this better than GNU indent?
              \_ That was only one of the questions.
        \_ Vim = cmd.  use: vim -c "norm 1GvG$" -c wq yourfilehere.cpp
2000/7/27-29 [Computer/SW/Languages/C_Cplusplus, Computer/HW/Memory, Computer/SW/Unix] UID:18795 Activity:very high
7/27    Where can I find an explanation of what usually causes a core dump,
        bus error etc. ?
        \_ core dump = just that. core memory used to me a type of volatile
           storage which died out quick but the term still lives on (hence
                        \_ As opposed to current storage which dies out quick?
                           Get your story correct or don't try to sound leet.
                                \_ As opposed to current solid-state memory
                                   technology which has been used for decades.
                                   Get a clue before you flame.
        The point, which you missed utterly, is that "a type...  _/
        which died out quick" also describes modern memory, and neither
        distinguishes between core and solid-state nor accurately
        distinguishes between core and solid-state memory nor accurately
        explains why it was called core in the first place.  Twink.
                \_ modern memory technology has not died out slowly or quickly
                   it's still used all over the place.  No one has used core
                   memory in decades.  It doesn't explain why it was called
                   core, but does distinguish a short-lived, long-dead
                   technology from a long-lived, still-used technology
                   \_ Why are you talking about the technology and not
                      the storage itself?
     [a place for twinks on the web:  http://www.twinkparadise.com ]_/
           core dump, out of core, core map, etc...) core dumps are usually
           a result of an illegal operation and can be enabled and disabled.
           bus error = i think means misaligned address (obviously illegal).
           segmentation fault = there are only certain segments a user
           program can read and write from.  these access bits are usually
           written to the TLB and automatically cause an exception when you
           access a segment in a way you're not supposed to.
        \_ Get this book, it kicks ass:
           Peter van der Linden, Expert C Programming. ISBN 0131774298
        \_ you mean you want something more to know about getting a bus
           error because you are accessing memory which is "not valid"
           (note the quotes).
        \_ I was looking for an answer like "This happens when you dont
           allocate enough space to an array, or you look past the end of
           and array" etc.
                \_ accessing null pointers, accessing memory out of
                   bounds (reading past allocated memory), etc.
                   Its good idea to check a pointer's validity before
                   accessing it (like a->foo()).
                   \_ no, you can get core dumps from lots of uncatched
                      exceptoins. i don't have to deref NULL or an address
                      outside my addressspace to get a SIGABRT for example
                      (which coredumps).
                      \_ true but the original poster probably wanted to know
                         common reasons.
                         \_ Yes, Thank You.  Now what is a Bus Error?
                                \_ As explained above, a bus error is caused
                                   by attempting to read an address/size your
                                   memory bus considers illegal, such as a
                                   32-bit word at an odd address.  Usually
                                   caused by utter garbage in your pointers,
                                   due either to not initializing it or
                                   overwriting it with other data.
2000/7/16-17 [Computer/SW/Languages/C_Cplusplus] UID:18689 Activity:high
7/16    Back from Microsoft PDC in Orlando.  I feel so dirty.  Giant
        hype machine; .Net strategy an entirely unimplemented joke.  C#
        combines the worst parts of C++ and Java; MS showing definite signs
        of embracing VB as their primary development language.  Thousands
        of clueless and lazy ("fear change!") developers.  Don't let this
        happen to you.
        \_ wtf is C#?  Can't find anything on the web about it.
          \_ MS's answer to Java.  Has a runtime environment, looks like C,
             no direct mem access (not sure about the last one).
             \_ it uses the "unsafe" keyword to run pointer arithmetic code.
                C# adds a bunch of unwieldy features and disables the strengths
                of Java, while still using a virtual machine.
          \_ Funny thing is they're calling it C-sharp (as opposed to D-flat?)
             instead of C-hash or C-pound.
             \_ Or B-double-sharp.
        \_ So what's the story or non-story on the .Net thing?
           \_
           \_ it uses VMs to run binaries compiled from a variety of languages
             and it's "platform independent," meaning in MS case that it will
             run on any MS platform.  COM+ is dead.  Note that none of this
             actually works yet.  MS projects library inclusion by 2002 or 2003
             so start buying those books NOW so you'll be ready, slave!
                \_ Fuck that.  I'm not MS slave.  I was just curious what the
                   Evil Empire was doing lately.  Anyway, I don't see how
                   compiling C and running it on a MS/VM and compiling C++ and
                   running it on a MS/VM is any different than just compiling
                   and running directly on the OS.  What's the VM for if it's
                   all MS underneath anyway?
        \_ the most awful thing about this is that MS claims this is the
           "innovation" the Justice Department is trying to stop.  So fellow
           Sodans unite; apparently all "innovation" is nowadays is copying a
           bunch of other technologies, renaming them, then making a bunch of
           PR announcements before any code is written.  I'm thinking we could
           do that easily.  We must code PhilOS.  Or at least write the PR for
           it.
            \_ I ll help if anyone is serious. -- ilyas
                \_ Damn dude... it's the stars!  Of course this isn't serious.
2000/6/30-7/1 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Unix] UID:18571 Activity:very high
6/30    Anyone know of an a2ps/enscript port for WinNT?  If so, where can I get
        it?  (I'm mostly interested in the ability to print 2 or more pages of
        text onto a single page--any other utilities on win32 that do this would
        be appreciated.)
        \_It's built into the postscript driver. Install one and when you
        print, go to the "properties" and select 2 up or 4 up.
        \_ Go to GNU website and download GNU enscript.  Or, go to http://google.com
           search for "enscript"
           \_ Having done both first (I can't find binaries or source on
              http://gnu.org, and google pops up useless sites with dead links) I
              inquired here.  Any other suggestions--like something that works?
        \_ Open a blank documentin in M$ Word, change it to landscape layout,
           two column format, and a small font.  Save it as a template.  Then
           paste your plain text file into a blank document opened from this
              http://gnu.org, and google pops up useless sites with dead links) I
              inquired here.  Any other suggestions--like something that works?
           template.   Then you can print the way enscript does.  Works even
           on non-Poscscript printer.  -- yuen
        \_ Upload to UNIX machine. Convert. Download to NT.
2000/6/28 [Computer/SW/Languages/C_Cplusplus] UID:18559 Activity:nil
6/28    To replace the previous question -- is there a way to force gcc to take
        a certain part of a .c file and treat it as C++?
        \_ Why do you have C++ code in a .c file?
                \_ good question.  You can do extern "C" in a C++ file.
2000/6/22-24 [Computer/SW/Languages/C_Cplusplus] UID:18528 Activity:low
6/22    Where's a good place (newsgroup?) to ask stupid and not-so-stupid
        C programming questions?
        \_ C# IS THE STANDARD PROGRAMMING LANGUAGE
                \_ I've been using C# since the beginning. It's awesome!
           \_ It's really less of a C-sharp, and more of a D-flat if you know
              what I mean
        \_ alt.csua.motd
        \_ comp.lang.c
2000/6/22 [Computer/SW/Languages/C_Cplusplus] UID:18519 Activity:nil
6/22    C#!!! C#!!! C# IS THE NEW STANDARD LANGUAGE!
        \_ The phonetics is [kAIg].
           \_ You mean [{k^h}ej{d3}]. IPA! IPA! IPA IS THE STANDARD PHONETIC
              ALPHABET!!!  -motd linguistics god
           \_ lngEurHUNGARIAN! lngEurHUNGARIAN verbIS prepTHE adjSTANDARD
              nounComNOTATION!
              \_ HUNGARIAN! HUNGARIAN IS THE STANDARD UGROFINNIC LANGUAGE!
2000/6/21-22 [Computer/SW/Languages/C_Cplusplus] UID:18506 Activity:very high
6/20    I have a variable inside a struct.  I want to be able to initialize
        that variable ONCE and not write to it again.  Any subsequent writes
        should not be permitted.  Is there a way to do that in C?  I know
        about "const int foo = 5;" but the value I need to pass in is dynamic
        and happens at runtime.  Declaring a variable as const doesn't let
        me assign anything to it at all.  Thanks.
        \_ No.  -pld
        \_ There is but it involves changing the variable to a pointer. You
           make the pointer point to a big array of these variables that are
           all alocated from a section of memory that you have mprotect()ed
           to disallow writes. Then you have to worry about the exception
           that happens when you get the write...Who are you trying to stop,
           anyway? Plugins? Your program has a lot of power over its own
           address space. Are you trying to prevent mistakes or what? I hate
           these questions where people pose some narrow problem instead of
           their goal. --aaron
        \_ Uh... since you're coding it why not just not write to the var
           again?
           \_ you are a fucking moron. "gee, if you're writing the code,
              why bother with abstraction and documentation?" -ali
                \_ Still waiting for your answer, asshole.  "you are a fucking
                   moron but I don't have a working solution any better than
                   yours!"  I'd rather be a fucking moron than an asshole
                   *and* a fucking moron like you.
                   \_ i'd rather be an asshole than say things like "uh...
                      i don't know what i'm talking about, but i'll tell
                      you that your question is irrelevant anyways." -ali
                        \_ Yup.  You're an asshole *and* a moron.  Thanks for
                           clarifying this.
                 \_ ali is the asshole supreme my friend.  the egomanic
                    of all egomaniacs.  and, oh yeah, a moron. if you're
                    going to post on the motd you have to expect some
                    flames like that.  don't let it bother you.
                       -- bitter alum who loathes ali and wishes him ill
                    \_ dude. you are pathetic. -ali
                    \_ uhm.  ali has clue, and enough spine to give technical
                       advice on the motd.  you haven't proven shit -- so
                       siddown and shaddup.
                       \_ uhm.  ali does not have clue.  why?  because I
                          said so! -logician extraordinaire
                          \_ Still waiting to see ali's fantastic technical
                             advice on this matter.  "you are a moron" isn't
                             technical advice, even on the motd.
                             \_ please see below. i'm offering two solutions.
                                one of which seems to be under dispute, though
                                the antagonist's position isn't clear. -ali
                                \_ My position is clear and I think it doubly
                                   funny that *you* would call anyone else an
                                   antagonist after starting off by calling
                                   someone else a moron.  Seek help.
        \_ Use ML or prolog.  All variables behave like that by default in
           these languages.
        \_ cast it to mutable for the initialization.  cast it to const
           for the routines that shouldn't change it.  as close as you
           can get to "not permitted" in C for anything...
           \_ just declare it const and when you initialize it, cast the
              constness away. i can't think of any way a machine could
              magically put ONE field in a struct in read-only memory. -ali
              \_ it could optimize the const and eliminate the field.
              \_ you are a fucking moron.  "im too dumb to know about compilier
                 optimization so ill just ignore it!"  -!ali
                 \_ look dumbshit, i forgive you this one time but please don't
                    make adhominem comments unless you know what you're talking
                    about. to the fellow who replied first, try writing:
                    struct S { const int field = 45; };
                    in C. you will notice that this is not valid C. in fact
                    until a few years ago, it wasn't even legal C++. now, if
                    i declare
                    struct S { const int field; };
                    there is NO WAY for the compiler to know at compile time
                    what the value of "field" is. hence the field cannot be
                    optimized away.
                    to the dipshit who replied second: i can teach you C if
                    you like. i'm very patient. -ali
                                  \_ coulda fooled me!
                                    \_ i'm just saying.
                        \_ Duh, you're wrong *again*.  Just give it up, ali.
                           \_ what's wrong with what i'm saying? is
                           struct S {const int field; } not valid C? -ali
                           \_ Depends.
        \_ another disgusting thing you can do:

                struct S {
                        /* int X */
                #       define X x_setter*1

                        /* private */
                        int x_setter;
                } s;
                func(s.X);
                s.X = 3   /* doesn't work because s.X => s.x_setter*1 */  is an
                rvalue. there are of coruse problems with the precedence of
                *. -ali
                \_ This falls miles outside the bounds of "good coding
                   practice".  I hope you don't write code like this for real
                   world use.
        \_ All this argument is grating. C/C++ can get disgusting,
           fast. Why bother with the horrid details? If you're not writing
           something that is very dependent on super optimiziation,
           just make a bool and switch it once you write to the value,
           and check the bool after all writes.
           \_ The idea is to catch this at compile-time. Otherwise, you can
              just as well say "well don't write to it more than once"
                \_ And there's nothing wrong with that.
           \_ man, i wish more poeple who are wrong would at least display
              a certain level of uncertainty in their argumentation so that
              the rest of the world doesn't feel like they have to retort
              with all their might. start your arguments with something like
        \_ summary: suggestion from aaron, an anonymous person, ali, and pld..
           moron motd dumbshit say "it won't work" without explainign why.
           idiot flames grammar.
           \_ Shutup ali.  Nobody cares about you or your hairy scrotum,
              if you even had one to begin with.
              "i don't know much about good programming, but..." and you
              WILL get a good answer from someone who does, and it will be
              polite and pleasant one. Aver shit like "THIS IS USELESS JUST
              FORGET IT" and you'll get the kinds of answer you deserve and
              you encourage harshness on yourself.
                \_ Huh?  English?  Some speaking Engrish goodly on motd!
                   \_ what part of the above don't you understand? i'm sure
                      people can teach you english as well as C.
                        \_ me think you not know article part of engrish and
                           need help much on using pROPER cAPS aND use,,, of,,
                           a c,om,ma,, or two and me wonder whats word phrase
                           "Aver shit like" mean and general bad grammar from
                           coming is.  hypocrite bad speaking you telling
                           other people me needing engrish resson.
2000/6/17-20 [Computer/SW/Languages/C_Cplusplus] UID:18490 Activity:high
6/16    Anyone use modena c++ std lib? is it the rule? -ali
        \_ ML.
          \_ can I use ML to generate wicked fast numerical code?  -ali
             \_ No, it is dog slow.
               \_ you know where my scrotum is. -ali
                  \_ what scrotum?
        \_ i did not put this back. -ali

soda user was here.
2000/6/15-16 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:18481 Activity:moderate
6/15    About how long will it take for someone who has several years
        experience with C/C++ to be decently proficient in Java?
        \_ syntax, 10 minutes, methodology, 3 months
           \_ methodology will take half that long if you're actually using
              Java full time [ie 8 hrs/day]
                \_ methodology: 10 minutes if you're not a goomba.
                        \_ I believe it takes a bit more time with
                           the GUI portions of Java.
                 \_ although 3 months is way too long if you use c++ as
                    anything more than c with classes you will find yourself
                    doing stupid tihngs in java for a while just because not
                    all the same tricks work.
2000/5/20-22 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs, Computer/SW/WWW/Browsers] UID:18306 Activity:high
5/20    In your experience, what's the best search engine for finding
        technical information (C library functions, examples of code, etc.)
        \_ I use altavista, but some people prefer google. I haven't
           tried raging extensively, but it seems the same as altavista
           but with less graphics. I don't like raging since it doesn't
           support Lynx.
        \_ i use altavista because google seems to strip out a lot of
           characters. for example, it's impossible to look for chips
           on google.
           \_ Hmm, maybe you should read the instructions on advanced searches
              \_ Software should just fucking work when you tell it what
                 you want.  It is not acceptable to expect the user to become
                 you want.  It is unacceptable to expect the user to become
                 l33t on the esoteric details of the software at hand before
                 he can get anything done.  -blojo
                 \_ do you use emacs?
                        \_ No.  Don't be stupid.  People who need to get work
                           done don't have time for emacs.
                           \_ YOU're not very smart. most people who need to
                              get work done decide to invest their effort in
                              tools that will make them more productive in the
                              long run. -ali.
              \_ why? it's a lot easier for me to type "altavista" than to
                 read instructions on "advanced searches". -ali
        \_ In general, altavista gives you way too many irrevelent hits,
           and google works great EXCEPT if what you want is something they
           happen to be filtering.
           Which is why I always start with hotbot
           \_ he's asking a specific question about source code. read the
              fucking post.
        \_ @Sk jeEvEs D00D!!!!! iTS gOT AI N StUFf!
        \_ I use a meta search engine called Dogpile (http://www.dogpile.com  It
           sends your query to about 10 major search engine.  You can also
           configure it to present results from the different engines in
           a particular order or do other cool things.  -emin
           \_ http://www.metacrawler.com

emacs user was here.
2000/5/16-17 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:18276 Activity:very high
5/15    I need to write some c++ client/server code using sockets.  Is there
        a nice library to use or do I need to roll my own.  I want something
        which makes it easy to set up a connection and then have the
        client and server communicate via << or >>.  Thanks.
        \_ Idiot.  C++.  READ!
        \_ actually, I have some really sleek Pacsal libraries that
           I've managed to fine tune for above average performance.
           If you're interested, post a followup....
        \_ If you want to use Java, there is an easy way to do it... look at
           the Socket class.
           \_ Thanks, but I was planning on using c++.
        \_ It's pretty easy to do in Tcl.
                \_ Idiot.  C++.  What's wrong with you people?  READ!
        \_ you can buy libraries like Roguewave.  Or, you can create your
           own classes and perhaps buy the Steven's book.
        \_ Using C code, it wouldn't be hard to write your own << and >>
           operators.  Get some sample C code and go from there.  Is this for
           Unix or another operating system?
        \_ Might be useful:
                http://www.gnu.org/software/commonc++/CommonC++.html
           \_ Thanks.  This is exactly the kind of thing I was looking
              for.  Unfortunatl, the documentation is a bit sparse.
        \_ I know this asian chick that does killer COBOL.  I'm
           sure I could get her to send along a pointer or two if
           put up your email addy.
        \_ Perl is perfect for socket programming. Perl is perfect for
           replacing Java and C.
                \_ Idiot.  C++.  READ!
                \_ Yer welcome.  -mogul
        \_ All non-CC+ replies purged.  --not original poster
2000/4/28-29 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:18134 Activity:very high
4/27    Thanks for the job interview suggestions the other day.  I asked
        the "Write a program that sums integers given at the command-line".
        That was indeed a good thing.
        \_ You have got to be ***FUCKING KIDDING***.  What position
           were you hiring for, janitor?  -blojo (intoxicated)
        \_ I'm glad it helped.  blojo: face it, people are fucking morons.
           -dans
                \_ Original post was looking for a warm body that can do some
                   \_ Shit, where can you find such personnel? Ours only
                      know how to inadvertently jar loose power cords.
                   basic coding in C/C++.  Dunno about your janitors but ours
                   can only admin 95/98/NT.
                   \_ Shit, where can you find such personnel? Our custodial
                      staff only know how to inadvertently jar loose the
                      computer power cords.
        \_ How did it go?  We want the gory details...
           \_ Well, I'll be strictly factual since this might filter back to
              them.  One person was unhappy doing it in C, and thought
              "command-line arguments" meant cout << "Please enter # of
              integers to be added".  The other person got it more or less
              right except they had main(char *argv[], int argc) and they
              didn't initialize int sum.  I gave them both 5 minutes.  What
              this told me was that the first person may have problems with
              C programming and communication, and the second person is
              so-so.  Incidentally, the first person had a GPA of 3.8 and is
              a grader for a C++ course and the second has a GPA of 3.2, and
              they were both MS students.  Don't ask which school.  ("When I
              grow up, I'm going to Bovine University!")
                \_ All my faith in the world is destroyed.  -blojo (ibid)
                   \_ I once knew an MSCS from CMU who couldn't grasp the
                      concept of moving a file from his AOL account to his
                      home machine with net access. -- ilyas
                        \_ Proving what?  That a degree means nothing?  We
                           all knew that already.
                           \_ The motd is not a proving ground.
                        \_ Maybe he was into theory and never used a computer.
                           \_ Hi paolo
                           \_ You know, I am interviewing people now, so I
                              have some actual data to bring to bear.  And
                              you know what, a math degree generally entails
                              a greater degree of clue than a CS degree.
                              How about that?  -- ilyas
                              \_ Clue about the stars?  Tell us about them.
                  \_ "People Are Stupid (TM)".  I was at a company that did
                      UCB on-campus interviews and they asked CS undergrad
                      seniors if they could write an algorithm to insert
                      into a linked list in sorted order.  >50% couldn't --oj
              \_ Huh. maybe there IS an actual IT shortage after all.
              \_ hey most modern computer guys don't need no command lines
                \_ You meant to say, "Most button pushing monkeys only need
                   a mouse".
                   \_ congratulations you missed the sarcasm
2000/4/26-28 [Computer/SW/Languages/C_Cplusplus] UID:18123 Activity:high
4/26    Any recommendations for good questions to ask for live interviews
        for a C/C++ coder position?  We're having some tomorrow and I
        wanted to see what people thought.  We don't want geniuses; just
        bright people who have good habits.  E.g., questions one or two
        difficulty levels below asking them to compare timings for
        common sort alogorithms.
        \_ Compare strcpy vs strncpy - when is it better to use each.
           Minus points for insisting strncpy is always better, plus points
           if they mention/know strlcpy.
        \_ ask them to describe why virtual descructors are useful. the
           question usually uncovers a lot of misunderstandings and weaknesses.
            -ali.
        \_ Ask them to explain how pointers and deferencing works.
        \_ Ask them to write a C program that reads in a series of numbers
           as command-line arguments, sums, and prints them.  It's a really
           basic clue check, but you'd be surprised how many people can't
           do it. -dans
           \_ Then tell them they can do it in either C or C++.
              Don't hire the goobers that try to make a C++ class to do
              the job.
        \_ Ask to see some of their code.  Ask about const correctness.
           \_ what is people's opinion about this? it's a pain to do it right,
              but do any APPLICATION programmers suffer from not doing it?
              (don't tell me it's critical for library programmers, i know) -ali
2000/4/19-20 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Misc] UID:18057 Activity:high
4/18    How does one print bold characters to the terminal?  Specifically,
        is there any way to do it from a shell script command such as
        echo or printf?
        \_ The code on most terminals is <ESC>[1m. To stop bold, use
           <ESC>[0m. To input "<ESC>" from a modern shell, use ^V-Esc.
           [1mHere[0m is an example (will not work under less; use
           cat or head to view the motd to get the effect). -alexf
        \_ man tput. Then look for examples, because it will be
           incomprehensible to a termcap newbie.
        \_ ~ali/discourage.c is an example. you get the "make it bold"
           character from termcap then echo it. -ali
2000/4/12-13 [Computer/SW/Languages/C_Cplusplus] UID:17984 Activity:moderate
4/11    C question: is the type "const char *" different from "char const *"?
        I faintly remember this being so.
        \_ #1 is you can't modify whatever is being pointed to,
           #2 is the pointer can't be modified
                \_ #2 should be "char * const"
        \_ These are syntactically identical.  You can remember how these
           declarations work by simply reading them backwards:
           const char * : pointer to char const
           char const * : pointer to const char
           char * const : const pointer to char
           -emarkp
           \_ this language is SO FUCKING broken. i went through the
              standard to figure out why "const char" and "char const"
              are the same, and it occured to me there there are a lot
              of ways to declare the same "cv-qualified compound object".
              We so desperately need a programming language that provides
              a nicer interface to c++.
              \_ Amen.  The fact that tim toady causes problems for me
                 every day.  It is SO FUCKING b0rken!
           \_ What does syntactically identical mean?  They produce the
              same parse tree?
              \_ he means "semantically"
2000/4/12 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:17975 Activity:nil
4/11    question: if i declare (pseudo code):
        Interface1 *pInterface1;
        what do these return: &pInterface1 and *pInterface1?
        \_ &pInterface1 - the address of the memory location that holds
                 pInterface1
           *pInterface1 - the value stored in the memory location whose
                address is stored in pInterface1
           (since you didn't say assuming C - the answers would be very
            different in another language such as perl)
            \_ thanks, i really appreciate it. - comdude
           \_ wow, you people are fast.  I see unedited motd and when I edit,
              someone already wrote this.
2000/4/7 [Computer/SW/Languages/Misc, Computer/SW/Languages/C_Cplusplus] UID:17948 Activity:high
4/6     In C, how do I get the offset of a field in a struct?  E.g.
                typedef struct {
                        char MS_foo;
                        int MS_bar;
                } MyStruct;
        I want to use the offset of MS_bar (which is 1) in compile-time.
                \_ It most likely isn't 1 on any modern architecture.
                   The compiler will pad it so the int starts on a 32-bit
                   boundary on almost all 32-bit machines.
        \_ ((MyStruct*)0)->MS_bar
           \_ don't you mean (int)(&((MyStruct*)0)->MS_bar) ? -ali
              \_ This works.  Thanks!
        \_ MyStruct crap;
           bar_offset = &(crap.MS_bar) - &crap;
        \_ You don't wanna go there.  This is machine specific stuff.  If you
           want to write portable code, there are lots of other ways to do
           what you want.
           \_ no, the ways outlined above are not machine dependent. what
              are you talking about? maybe there's some fine print in the
              standard that says the above won't work, but really, it works
              doing this is using C++ and using member objects.
              and you shouldn't be pedantic about it. another good way of
              doing this is using C++ and using member objects. -ali
              \_ Dude.  You don't know what you are talking about.  The
                 way in which variable sized members of a struct are
                 positioned within the struct are, and should be,
                 implementation specific according to the standard.  Shut
                 up and go away.  You know nothing.  Don't give advice here.
                 You are a fool.  Sign your name.
                 \_ ok, you go and underline for me in the above specified
                    code the machine specific stuff that is susceptible to
                    padding differences and data type size and reordering.
                    \_ Sure.  The above data structure has a character
                       (generally 8 bits), followed by an int (generally
                       16 or 32 bits).  Depending on how the memory on the
                       target computer is arranged, the offset of the second
                       member (the integer) could be 8, 16, 32, or maybe even
                       some wierd non-power-of-2 number.  You have said this
                       yourself, the implementation is free to pad (I am not
                       sure it is allowed to reorder though).
                    ok? -ali. And sign your name yourself.
           \_ Example?
              \_ What are you trying to do, exactly?
                 \_ I want to print out all the fields in a variable of
                    a certain big struct, so I think I should make a table
                    of field informations, like this:
                        typedef struct {
                            char *FE_string;
                            int FE_offset;
                            int FE_type;
                        } FieldEntry;

                        FieldEntry fieldTable[] = {
                            {"MS_foo", <offset of MS_foo>, TYPE_CHAR},
                            {"MS_bar", <offset of MS_bar>, TYPE_INT},
                            ......
                        };
                    Then I use printf() to print the fields according to the
                    types.
                    \_ Why do you need field offsets in the first place?
                       \_ Then I can just traverse the table to print
                          out all the fields passing the appropriate format
                          strings to printf() according to the field type,
                          rather than writing 100 printf()'s for 100 fields.
                          \_ Use a macro, then cut and paste from the struct
                             definition.
                             \_ But I think using a table reduces code size
                                a bit.
2000/4/6-7 [Computer/SW/Languages/C_Cplusplus] UID:17942 Activity:very high
4/6     C vs. Java vs. Perl comparisons:
        Conclusion: C is still the fastest. Java is not as slow as people
        think it is. Perl is nowhere close to Java performance.
        \_ Apples, Oranges, Bananas, and Trolls who like to delete
                \_ Multithreaded java with native threads with a
                   decent rt gives you functionality that you can
                   only dream about in perl and groan about in C.
                   Debugging a multithreaded java server is much
                   easier than an equivalent c/c++ server. If
                   I'm running in an enviroment where CPU cycles
                   are important, c/asm is the only choice, c++
                   perl and java don't even enter the picture.
                   In every other environment the easy of development
                   and maintenance overrides speed concerns.
                   If you are concerned about performance
                   get better algorithms.
           postings, look only at implementation languages and not the
           entire problem to be solved.  -- tmonroe
        \_ What about php4?
                \_ who mentioned web application development?
        \_ You're right.  Compiled perl is much faster than java.
           \_ Multithreaded java with native threads with a decent rt gives you
              functionality that you can only dream about in perl and groan
              about in C.  Debugging a multithreaded java server is much easier
              than an equivalent c/c++ server. If I'm running in an enviroment
              where CPU cycles are important, c/asm is the only choice, c++ perl
              and java don't even enter the picture.  In every other environment
              the easy of development and maintenance overrides speed concerns.
              If you are concerned about performance get better algorithms.
              \_ How exactly is c faster than c++?
              \_ Formatting widened.
                 \_ c++ has more language overhead if you classes/exceptions/op.
                    overloading. Also the binaries for a c++ app are larger than
                    those of a c app. In a severly memory/cpu constrained env.
                    c is better than c++ in terms of size (smaller ex. image) and
                    speed (less instr. to execute for straight c vs. c++ using
                    objs.)
                    \_ this is completely false. the only execution overhead
                       you'll see in c++ is from virtual dispatch, which ONLY
                       happens with virtual functions. there is NO overhead
                       in overloaded functions (unless virtual), none in using
                       class's instead of structs. there is overhead in using
                       exceptions, yes. but the rest of your comment is full
                       of shit. and the only reason why your executables might
                       be bigger is because symbol names are longer in c++,
                       so unstripped binaries will be larger. if you don't
                       know what you're talking about, say so in your post,
                       please, so people won't go around spreading your
                       shit. oh, if you want to talk about code bloat, you
                       ought to be mentioning templates, not the crap you
           \_ on the other hand, I think Larry Wall or some high mucky-muck
              has been quoted as saying "dont byte-compile perl, its broke"
              \_ Perl is normally byte-compiled every time you run it.
                 \_ gimme a breakhere.i'm trying to differentiate between
                   "compiling perl" as in "installing", vs
                   "precompiling your perl" forspeedgain, as hinted at by
                   the above poser
                   \_ He didn't mean "installing" and you don't deserve a
                      break, loser.  You're probably the same idiot who made
                      the "c is faster than c++" comment.
                      \_ I (the "idiot" in question) did not make this comment.
        \_ Apples, Oranges, Bananas, and Trolls.  -- tmonroe
        \_ I could an implementation on my TI-85 pseudo-BASIC that will kick
           the crap out of any of those. Take an algorithms course. That's
           the conclusion.
           \_ Yeah, according to algorithms course radix sort should run
              faster than quick sort on large data sets.  That is, until
              you take CS 252 and actually run the algorithms do you find
              out otherwise.
        \_ They're defined recursively, but you don't want to compute them
           that way...
        \_ PEOPLE! JESUS FUCKING CHRIST, LEARN PROPER ENGLISH!
                \_ what's wrong?
                       mention. but then, most people don't know how to use
                       templates so they don't use them. -ali.
                       \_ I heard that you almost never need to write your
                          own templates since the standard and useful ones
                          are usually already supplied by the development
                          environment.  Is that true?
                        \_ I though that an object in c++ contained a copy
                           of each of its parent classes, thus a class
                           requires more memory to store than a struct.
                           \_ gee, in C,

                              struct A {... };
                              extending things are in C, without requiring
                              struct B { struct A a; ... }
                              struct B is pretty damn big too.
                              i don't understand what you're asking. if you
                              want to argue "C++ hides the fact that things
                              get large by making it easy to bloat your code
                              with only a few keystrokes" i might concede,
                              but i don't see what the alternative way of
                              extending objects are in C, without requiring
                              identical bloat. -ali
                                \_ YOU ARE BLOATED, ALI
                                        \_ man, give ali a break, he's a
                                           good guy - ali #2 fan
2000/4/6-7 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages] UID:17938 Activity:very high
4/5     How do I concatinate two integers together into a long.  If I do
        something like
        (a << 32) | b then this will only work on little endian machines
        but not on big endian machines.  How do I make concatination
        machine dependent?
        \_ This will work on both little and big endian machines, if a
           contains the high order bits.  The question is, where do a
           and b come from?  If they're being read from a file or some
           stream, that's where your endian dependency comes from.
           \_ this is bullshit. first of all, on your machie, int's
              are probably the same size as long's (this is to the original
              poster). To the responder, show me a definition for how
                \_ 64-bit Unixes define int as 32-bit & long as 64-bit.
              little endian and big endian machines store 64 bit entities.
              the way i'd do this is use what he has up there, but at the
              beginning of my program, write a routine that asserts that
              it's the right way of doing it, and abort() at runtime if
              it's not the case.
        \_ #ifs
        \_ don't you mean independent?
        \_ if they are unsigned, can't you do (a*(2^32))+b
           \_ This is equivalent to the code above; both work.
           or if you need it to work in every situation, you need to look
           in limits.h to see the true sizes of an int and a long on your
           system, as well as endianness, and work it for the different
           situations, have fun.
           \_ Well, not true. On a big endian machine, if shift left
              a long (which was promoted from a 32-bit int) wouldn't
              the lower order bits fall off the left side.   A perfect
              solution would be to barrel rotate one of the numbers
              and OR them together which will guarantee that it will
              always work but I know of no barrel rotate function in
              the standard C libraries.
                say you've promoted ABCD from 16-bits to 32-bits.
              - big endian:    0xDCBA0000 << 16 = 0x00000000
              - little endian: 0x0000ABCD << 16 = 0xABCD0000
              \_ You moron.  First of all, that's not promotion, that's
                 reinterpretation of bits.  Second of all, endian-ness
                 works on the byte level, not the nibble level; so the first
                 byte of a little endian 0xabcd is 0xcd, not 0xdc.  Big
                 endian systems are intolerant of lazy casting.  That's where
                 your problem lies; it's not with the shift operator.  -pld
              \_ You moron.  You've mixed up big-endian and
                 little-endian.  Plus, endian-ness works on the byte
                 level, not the nibble level; so the first byte of a
                 little endian 0xabcd is 0xcd, not 0xdc.  This should read
                 - little endian: 0xCDAB0000 << 16 = 0x0000CDAB
                 - big endian:    0x0000ABCD << 16 = 0xABCD0000
                 And both those are the same number.  -pld
                 \_ moron? who's the moron. look in P&H A-48. The lower
                    order bytes (CDAB) are one the right side for
                    order bytes (CDAB) are on the right side for
                    a little endian machine so it should be the other
                    way around.
                    \_ Have fun the next time you look at a memory dump -pld
              \_ This is incorrect.  shift left treats the entire int
                 as a unit.  The high order bits fall off, regardless of
                 endian-ness.  You need to go read K&R again.
        \_ Size of int is NBPW*8 in sys/param.h, or simply sizeof(int)*8.
           BYTE_ORDER is defined in machine/endian.h.  You can also use
           ntohl() and others in that file.
           \_ but endianness DOESN'T FUCKING MATTER.  Try it.  Come on
              it is a simple c program.  Now go compile it on a linuix box.
              Now on a sun.  Ohh look.  See the pretty results.  Idiot.
2000/4/5-6 [Computer/SW/Editors/Vi, Computer/SW/Languages/C_Cplusplus] UID:17930 Activity:very high
4/5     I want to improve my C coding skill. Would it help my
        understanding to read the spec or is there something better to
        increase my understanding and use of C?
        \_ download the cs61c assignments and do them.
        \_ practice with it and give yourself projects to motivate you to
           learn.
        \_ Take 164, 170, 172, 174. Read the Art of Computer Programming.
           A good algorithm will beat any C and compiler optimizer trick.
           You can hiring a lot of people and a lot of cheap hardware
           to make things run fast, or you can hire one Phd. Take your pick.
                                                        \_ academia sux0r!
           \_ Dude.  A good bachelors is a better coder than most CS PhDs
              from Berkeley I know.  The strength of a PhD is not in their
              coding skill.
                \_ Agreed. BS and MS guys are much better coders than PHDs.
                   Some PHDs are good designers, but some just have thier
                   head up thier ass since they haven't every had to get
                   anything to work with a deadline/customer on the phone.
        \_ Use 4 spaces (or tabs) to align code properly.
           Use carriage returns before and after brackets.
           Be consistent with other white-space use (parentheses).
           Now even if you do write crappy code, others will be able to
           identify the crap quickly.
           \_ the use of spaces (instead of tabs) is bad.  Recommend using
              tabs to indent.  8 is more standard than 4, but yes, 4
              looks better.
              \_ Use Of Spaces Instead Of Tabs Considered Harmful.
              \_ Oh..... how I *DESPISE* how some code editors represent tabs
                 as 4 spaces in the default setting.  Tabs are goddamn 8
                 spaces.
              \_ Why?  Because they take more bytes to store?  With disk prices
                 these days is that really a concern?  Can any editor not handle
                 the spaces?  Hell, at least everyone sees it formatted the
                 same.  You have a problem with maintainable code?
                 \_ imagine an environment where people use MS Visual C++,
                    vi, emacs, notepad, etc.  Each one treats tab a certain
                               \_ notepad always treats tabs as 8 chars,
                                  and god forbid i look up the tab spacing
                                  command in vi
                    way.  Its easy to use across different editors. Also,
                    emacs, for example, has a special mode which works
                    very well with tabs.  See C-Mode in emacs.
                    \_ The fact that each one treats tab (sic) a certain
                       (and different) way is why spaces are better.
                    \_ Are you arguing for or against tabs?
                        \_ for tabs
                    \_ All my editors handle spaces/tabs as whitespace for
                       indenting/hilighting, etc.  Of course, I don't use emacs.
                       This just seems like a cry not to break your .emacs --
                       sorry but not all of us use emacs.
                        \_ I believe if you looked through industry code
                           most use tabs.  And most of those coders were
                           probably not emacs users.
                           \_ Uh, I am in industry.  And many people I know have
                              agreed with me on this one.  Hence many uses
                              spaces instead of tabs.
                                \_ Industry is mostly divided between vi and
                                   emacs, with some companies favoring one
                                   more than the other. At Sun I heard its
                                   mostly vi, while at Cisco (from experience)
                                   its recommended that you use emacs (lots
                                   of homegrown lisp for development).
          \_ Just use C-Mode in emacs. It does all the indenting correctly,
             and you can easily tell when one of those vi lusers edits your
             source files since the indenting will be off.
             \_ .emacsrc foo required?
          \_ Reading through K&R is worthwhile, but nothing beats writing lots
             of code. -dans
          \_ "Deep C Secrets: Expert C Programming" is a much more useful book
             to read than the spec.  (And I recommended it even before I worked
             for one of the companies involved in publishing it.)  -alan-
                \_ This is an excellent book and should be required
                   reading for everyone who is programming professionally.
                   It also helps your fu!
        \_ you can't improve your C coding skill without understanding the
           big picture. A thorough understanding of machine architecture
           compiler, OS, networking, math, and most importantly theory is
           required. Being a good programmer is more than just reading
           "Learning C in 21 Days." If you want to be a good programmer,
           go to a community college. If you want to be a good computer
           scientist, go to Berkeley.
                \_ FUCK YOU! i learned perl in 21 days and i'm making
                   $80K/year and that's probably more than what you're
                   making as an academic sux0r
                   \_ You seem rather pissed off in spite of your $80K/year.
                      -dans
2000/4/5 [Computer/SW/Languages/C_Cplusplus, Computer/HW/Memory] UID:17919 Activity:high
4/4     JVM usually takes care of stack memory fragmentation right? (Sun's
                \_ Wrong.  You've confused stack & heap.
        JVM is mark&sweep with conservative compacting algorithm) What
        about compiled code? Let's say I have a C/C++ server running that
        keeps doing new+delete, some big, some small. Eventually, there will
        be a lot of fragmentation. What happens?
        \_ This depends on what your server is doing.  Depending on your memory
           allocation regime you may consider using a garbage collection
           library or implementing your own memory management layer.
        \_ C++ by default ends up fragging the heap.  In general, assuming
           you don't run forever, this isn't too bad a problem.  If the
           server is doing alloc/free's all the time and runs for a long time
           you should consider rolling your own memory allocator. - seidl
                \_ Yeah, it's like this: either you care a LOT about memory
                   performance, or you prefer to have ease of use.  If you
                   want ease of use you just alloc away and don't care.  If
                   you want performance you write your own allocator that
                   does exactly what you want.  In games we use a mixture
                   of these two things based on how frequently a particular
                   allocation is going to happen.  -blojo
                        \_ blojo, what game are you talking about? Solitaire?
                           \_ If yer gonna say something dumb at least sign
                              your name so I can laugh at you.  -blojo
                              \_ Yeah, you never say anything dumb, John.
                                \_ It helps if you can spell his name --oj
                                \_ When I say dumb things, i sign my name
                                   to them, dammit.   -blojo
2000/3/24-25 [Computer/SW/Languages/C_Cplusplus] UID:17838 Activity:kinda low
3/23    (x+y)(!x+z) = xz+(!x)y  muhahah
        \_If implemented with logic gates, they actually are not the same.
        Statically yes but dynamically no. Do you know why? (Hint: hazards)
        \_ What is ! in this context?
           \_ supposedly this statement can be proved w/o using truth
              tables.  ! is not.  xz is x and z. x+z is x or z !z is not z
              \_ So, who claims it can be proved w/o truth tables?
           \_ christ, this is elementary... are you a non-tech major?
              \_ i dare you to prove it algebraicly. -ali
                 \_ *pshaw* I dare you to prove it blindfolded with two
                    broken thumbs.
                 \_ Either you are joking, or one of us doesn't understand
                    how predicate calculus works.
        \_ the cool people in the world call this DA SELEKTAH.
           the first statement says "if x, then ignore y, because the first
           factor is going to be true, so the whole thing evaluates to the
           second factor. but !x is false, so the second factor is always
           z. So when x, z, and by symmetry, when not x, y.
           the rhs is the same shit.
           and "can be proved w/o using truth tables" is a bogus statement
           the operators are defined in terms of truth tables, hence any proof
           requires proof tables.
           \_ Interesting. So what do da cool people use da selectah for?
              Can't imagine it's programming since (if x y z) is so much
              simpler....
              \_ yeah, I think this is an important example of
                "Why to not use macros to make one language look like
                 another language". It should have been written like
                 (x or y) and (!x or z)
                 in the first place
                \_It's a damn mux...not everything is code...
2000/3/18-20 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:17795 Activity:high
3/18    Rookie C++ question: Is the following circular situation allowed -
        defining a ClassA with a member variable that is a pointer to an
        object of ClassB, and also defining ClassB with a member variable that
        is pointer to an object of ClassA.  If it is allowed, how do I go
        about with the #include, #ifndef, etc.
        \_ not to forget to mention that many data-structs use this
           circular pointer of classes of different types (red-black trees)
           so it wouldn't make sense to design one of the most versatile
           languages without this feature.
        \_ Yes, it's allowed.  You need to do a forward declaration for the
           classes that haven't been defined at the point where you're using
           them.  For example:
                // A.h
                class ClassB;
        No preprocessor pain is necessary.  This works for reference members
        as well. And they don't have to be in separate files.... This works
        too:
                class ClassA {  ClassB *pB; };
                // B.h
                class ClassA;
        Good luck... -mogul
                class ClassB {  ClassA *pA; };
           No preprocessor pain is necessary.  This works for reference
           members as well. And they don't have to be in separate files....
           This works too:
                class ClassB;
                class ClassA { ClassB *pB; };
                class ClassB { ClassA *pA; };
           Good luck... and sign your frickin' name, punk! -mogul
           \_ Hehehe!  Thanks for the answer!  It's kind of embarassing
              to put my name when it's such a dumb question.  I know
              there is function declaration, but didn't know about
              class declaration, having always used the #include, #ifndef
              stuff.
           \_ real men use "typename" for forward decls. or something. -ali
              \_ Whatever.  Real men know when to use typename.  And that's in
                 template functions and classes when the type name might not be
                 easily derived as such.
              \_ real men use real languages that don't have this sort of BS.
2000/3/12-14 [Computer/SW/Languages/C_Cplusplus] UID:17749 Activity:kinda low
3/12    Someone offered me a job in logic design verification.  For those
        who are in it, what do you think?
        \_ lousy job.  mindnumbingly dull.  you look at other people's
           bad documentation and even worse code to try to figure out
           what's going on.  few people want the job, and a good dv guy
           can make a ton of dough on the contract market.
           \_ Isn't DV for ASIC, SOC, CPU, etc... much different than DV
              for software?
       \_ aren't most cs jobs mindnumbingly dull?  Can't imagine spending
        life doing type 162/164 garbage til the end of time.
        \_ C is for Cookie, and it's good enough for you!
2000/3/8 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:17718 Activity:moderate
3/8     Could someone give me links to c or Java source code that
        encodes JPEG files from a bitmap? I also need links on how a JPEG
        file is structured?  --curious freshman
        \_ http://ask.com
        \_ Read about Fast Fourier Transforms.  CLR (the 170 text book)
           chapter 32 covers them. -dans
2000/3/6-7 [Computer/SW/Languages/C_Cplusplus, Computer/HW/Memory, Computer/SW/Compilers] UID:17696 Activity:nil
3/4     What does a Segmentation fault mean? I have a program with and gdb
        reveals that the program segfaults at
                while (x == 0) {
        It seems to segfault on one machine each time but never on another.
        \_ what's "x"?
        \_ did you malloc enuf space?
                \_ IOW, did you allocate memory for x?  Is x defined, or
                   just declared as a variable?  What type is x?
        \_ Illegal reference to memory not owned by the process
2000/2/26 [Computer/SW/Languages/C_Cplusplus] UID:17638 Activity:nil
2/25    How do I get hilit19 in emacs to not screw up in highlighting when
        I am editing a c++ file with the following line:
                //*((u_int16_t*) &mh->dh_fc),
        (emacs then thinks that this is the beginning of a c style /* and
         not the c++ style of //)
2000/2/11-13 [Computer/SW/Languages/C_Cplusplus, Computer/SW/OS/FreeBSD] UID:17493 Activity:high
2/11    Responce to C, C++, new grad, love for comp sci, love for $$$, 1 word:
              \_ The smart ones learn to spell or run a spell checker.
                \_ And how to count words.
        The dumb and greedy ones work in the industry
        \_ think C++, Bell Labs.
                \_ C++ is a perfect example of industry stupidity.
        The smart ones go back to academia
        It is as simple as that.
        \_ the smart, greedy ones go work in 'XYZ labs'
        \_ Have a cookie, troll.
        \_ This is not true, as all of the major contributions to cs have been
           mostly performed by industry. Without AT&T there would be no Unix
           (BSD or otherwise). Without Sun we would be stuck with RFS.
           \_ And without Berkeley we wouldn't have the 50 million BSD
              derivatives, RISC, RAID, IEEE 754, yadayadaya.  Incidentally,
              they all seem to come from Berkeley.  So you can conclude that
              all major contributions come from Berkeley and industry.
                        \_ Stanford is usually given equal credit with UCB
                           for RISC (look at Patterson & Hennssey for example)
                \_ I would concur that the Berkeley <-> Silicon Valley has
                   created the Academic-Industrial Complex.
              \_ RISC?  RAID? 754?  Hardly as important as UNIX.  Nice but
                 trivially obvious and would have been done by someone, some
                 where in due time.
                 \_ Two other contributions of industry include OpenFirmware
                    and FireWire. I don't think that academics ever came up
                    with ideas like those. But at the same time, X windows
                    was quite a good idea from academia. Sun would have saddled
                    us with news or openlook or some other stupid interface.
                    \_ Uh, I think most people agree that the X architecture
                       is ... well broken.
                        \_ NeWS was a much better architecture, but X was open
                           source, so it won unfortunately.
                                \_ RIDE BIKE! wins again for no particular
                                   reason.  One day the 'best' software will
                                   win.  Not the most politically correct.
                        \_ Not sure I agree.  When it came out it was amazingly
                           overweight and bloated, but by modern standards,
                           it's fairly svelt, and it's suited to transparent
                           network redisplay, which I thank X for almost
                           every day.
              \_ Oh, and there was also that stupid visiting prof who
                 discovered how to matrix multiply in O(n^2.7) instead of
                 O(n^3) which in many implementations turns out to be
                 slower anyway but only wacked out math people like ilyas
                 care about crap like that.
                 \_ Variations on Strassen's algorithm are pushing on
                    O(n^2.3) or something like that now.  At any rate, while
                    I am not sure if anyone actually uses Strassen's in
                    practice, I do know that sometimes a tighter upper bound
                    on the running time can make all the difference in the
                    world.  Fast Fourier Transforms and Pearl's belief
                    propagation algorithms come to mind as good examples.
                    -- ilyas
                        \_ Strassen's is pointless on today's hardware,
                           where mults are as cheap as adds. In the past,
                           \_ aren't multiplies still slightly more expensive
                              due to the 32 or 64 element carry save adds.
                              i don't think any digital design allows for
                              a 64 level deep logic in one clock cycle
                              for power and performance reasons.
                           and maybe again in the future, Strassen's
                           might actually be useful :) -nick
                        \_ Yawn.  Oh, were you saying something?
                           \_ Shove it, asshole. If you're so ignorant as to
                              completely disregard the importance of strict
                              mathematical thinking in CS, go to the industry,
                              bury yer ass in some QA dept and be a mindless
                              drone as much as you wish. Otherwise, have a
                              cookie. -- not ilyas
                                \_ tell us about the stars
                                \_ "Do it my way or you're an ignorant QA
                                    drone!!!  My way is the only way to the
                                    Purity and the Truth!  I am CS Tao!!!"
                                    Oh uhm, were you saying something?  I
                                    was distracted by a passing fleck of
                                    something more important than your
                                    opinion.  I think it was a bit of pocket
                                    lint floating gently to the floor.
           \_ Or Andrew.  God forbid!
                \_ or Mach and Kerberos.
        \_ Do the smart ones go back to academia and GET A FUCKING DICTIONARY
           or SPELLCHECKER?!   --greedy dummy in industry with SPELLCHECKER
2000/2/11-13 [Computer/SW/Languages/C_Cplusplus] UID:17485 Activity:very high
2/10    I get an impression that new grads coming out of berkeley don't
        have much exposure to C.  I mean pure C, not C++.  How do most
        people feel about this?  I guess I'm asking alumni who are hiring
        and also current students.
        \_ I've spent the last year doing project in only C or Java, no C++.
        \_ they don't necessarily have much exposure to C++ either...
        \_ old grads are better than new grads.  New grads are for the
           most part java weenies who bitch about assignments being
           "too hard."
           \_ No, new grads are pussies who call themselves EECS majors
              but wouldn't take a single EE class if it killed them.
           \_ That is so true.  At least the Java portion.  I've been going
              back to recruit for quite a number of years.  Recently I've
              noticed that a lot of them don't know how to use malloc.  My
              company does almost all straight C.  No C++ and only a little
              Java. Looking at stacks of resumes of newgrads with Java
              experience has become rather tiresome.
              \_ Hey, I know C.  Wanna give me a job?
        \_ Perhaps a one hour session about the differences between C++
                and C is sufficient.
        \_ I wouldn't hire a Cal CS grad if I had another choice.  Not a
           current/recent grad.  I'd hire almost anyone who graduated from
           about 93 or so and earlier.
               \_ There's some truth to that.  But you have to understand
                  that only 90% of Cal CS grads are idiotic morons.  The
                  other 10% are worth looking at.
                \_ why do you say that?
                        \_ I say that because the program has become even
                           more worthless over the years than when I was here.
                           Or maybe they're just dumbing it down to match the
                           quality of the students.  Either way, same result.
                \_ what other choice would you take instead of a cal grad?
                        \_ Sigh.  I said "93 or earlier".  If I had a spot for
                           some youngster to fill, I'd take the one who seemed
                           to be the brightest and easiest to get along with,
                           no matter what degree they had or where from.
        \_ Compared to the other grads out there, Cal CS grads aren't half
           bad.
           \_ I agree. You could do a lot worse. A lot of Cal State
              schools were teaching in Ada as recently as 1996 (the last
              time I worked with someone attending such a school). There
              are probably better programs, but Cal's is one of the better
              ones. The rest depends upon the individual. You're just
              spoiled living in the Silicon Valley. You should see what
              they're dredging up in places like Virginia. --dim
              \_ Pfft.  Don't bother going all the way to Virginia -- just go
                 to a job fair at San Jose State!
              \_ What's bad about Ada?  -- Ada illiterate
                  \_ it's a pointless waste of time that no one uses, not
                        even people like Hilfinger who helped develop it
                        \_ We did some ADA in 60c with Hilfy.
          \_ I don't run my company's division by comparison.  Excellence is
             an absolute.  It's exactly that sort of half assed, two bit,
             slacker moron attitude that so pervades current educational
             'thought' that makes me want to vomit and then just train kids
             fresh from any random high school instead.  At least they'll
             know that they don't know anything unlike the current twit
             brigade churned out in droves today from places like Cal.
                \- just out of curiousity, why do you guys feel there is
                difference between a 1990 and 1995 grad? do you think the
                dept has made a change due to a faculty personnel change, or
                there has been differnt selection criteria for the students
                or was there a change of requirements to complete the major
                or what? --psb
                \_ Because *they* (the people asserting a difference) were
                   students in 1990, but had graduated by 1995.  Simple as
                   that.  "Kids these days . . . *I* had to walk UPHILL in
                   the SNOW -- *BOTH WAYS*!!"
                   \_ How do you walk uphill both ways?
                        \_ Obviously you've never walked around Berkeley much
                                \_ heh.
                   \_ No, "*they*" graduated in 1987.  Now go take your low
                      grade promoting of the mediocre and "it's all relative"
                      pseudo social promotion self esteem raising crap elsewhere.
                \_ I get the impression that it's also a case of the CS dept.
                   being far more impacted than in 1990.  Since there's a lot
                   of money in IT in general, CS in school tends to attract
                   a lot of people who're not in it for the fun so much as
                   for the "glamour" and the cash.  I think part of the
                   underlying attitude is that in every field, someone who
                   is fundamentally enthusiastic about it will probably be
                   of higher professional value than someone who is able to
                   survive a factory, correct me if I'm wrong.  -John
                   \_ I think this is entirely correct.  The people who are in
                      it for the love say "Cool, I get to learn C.  Now I can
                      hack on *fill in neat C-based open source project here*.
                      The ones who are in it for the money say "I don't want to
                      learn another language.  I'm just going to do the project
                      in Java.", or, if forced to work in something != Java,
                      they do enough to simply eek by.  Usually this consists
                      of writing a flawed, buggy piece of code that may or may
                      not work, begging someone with some C clue to help them
                      debug their syntax errors, not even bothering to clean up
                      programmitical and logic errors, and then begging for
                      points because "We did a good write-up.  It doesn't
                      matter that the program doesn't actually run."
                      Additionally, some of the more clued folks are more prone
                      to hack code than worry about grades so, at least for L&S
                      CS, some of them are being driven out by considerablly
                      less competent but more grade-driven lamers.  With this
                      environment, it's not surprising that many of this type
                      of clued individual is very tempted to drop out and work
                      since so many companies are willing to take them, and the
                      compensation is very nice.  All that said, just because
                      the lamers to clued folks ratio has grown doesn't mean
                      its approaching infinity so don't jump to the conclusion
                      that all current Cal CS grads suck. -dans
                        \_ But you just said yourself that the better ones are
                           likely to just quit school and take my job offer.
                           \_ The problem with this is that without the degree
                              there is no way to distinguish between someone
                              who dropped/flunked out because they were too
                              creative/talented/involved to be academically
                              successful, and those who did so because they're
                              just plain not real bright or motivated.  -John
                                \_ And with the degree you can distinguish the
                           generally interviews at all.  Generally.
                                   talent from the grade whores how exactly?
                              \_ There is a very EASY WAY to distinguish,
                                 that almost noone does. Sit the applicant
                                 down in front of a computer, and say
                                 "here, write code to do this task".
                                 "here, write code to do this task". Of
                           theory stated earlier about highing the bright HS
                                 course, this is only easy if you aren't
                                 a PhD that has no clue about programming.
                                 \_ That isn't clue.  Any child can learn to
                                    code in a few weeks at most.  Clue is about
                                    higher level stuff like choosing the right
                                    algorythm, data structures, language, and
                                    code/engineering principles of design.
                           This is hardly any different from my half-serious

emacs user was here
that's it, no more motd
go away
cat /dev/null > /etc/motd.public

emacs user was here
                           theory stated earlier about hiring the bright HS
                           kids and training them on site.  I don't see much
                           in your statement that promotes current CS grads.
                           Grade whores?  Who needs 'em.  I never once asked
                           an applicant what their grades were.  The ones who
                           put GPA on their resume in the 3.7+ range don't
                           generally get interviews at all.  Generally.
                           \_  Actually, I'm inclined to believe your HS kids
                              theory, but mostly because I believe kids are a
                              lot smarter than they are credited with.  I said
                              that SOME of the better ones are LIKELY to quit
                              school.  This doesn't mean they all do.  My goal
                              was to point out that not ALL Cal CS grads suck.
                              I agree that many do, but I didn't want to see
                              it left as a blanket statement.  I have no
                              intention of promoting the large quantity of
                              grade whores out there.  I agree.  Who needs 'em.
                              But not all of us are grade whores.
                              -dans
                                \_ No problem.  I did say "generally" a few
                                   times.  I do understand the concept of
                                   unfairly labelling an entire group of people.
                                   I did go to Berkeley afterall.  :)
                \_ c/lisp vs c++/java
                   hacked interesting kernel or device driver code vs
                   getting enlightenment to run on linux box at home

motd police was here (watch out)
1999/12/31-2000/1/1 [Computer/SW/Languages/C_Cplusplus] UID:17131 Activity:very high
12/30   Survey: I'm spending the Millennium
        a) w/ family            0
        b) w/ friends           3
        c) w/ spouse            5
        d) alone                3
        e) w/ co-workers        1
        f) getting paid massive overtime to babysit computers 1
        g) getting paid nothing extra to babysit computers 0
        h) at an awesome party  1
        i) masturbating furiously 36
        j) at work              2
        k) I'll figure that out a year from now, when this millenium ends
           and the next one begins      1
           \_ Although this isn't the new millenium, it is the new Millenium.
              \_ So it happens a year earlier if you capitalize it?
              \_ Not content with being wrong, you insist on being boring
                 as well.
                 \_ I'm not wrong.  It is exactly as I stated it.  Boring was
                    the pedantic twit who said it wasn't the millenium in the
                    first place.
                    \_ Let me get this straight -- You believe that it isn't
                       the end of the "millenium", it is the end of the
                       "Millenium", and that the *other* guy is pedantic?
                        \_ One is about calendars.  The other is about the
                           mass media label.  Yes.  The *other* guy is a twit
                           and pedantic but I live in the real world.  I know
                           it isn't the new millenium by the calendar but I see
                           nothing wrong with people enjoying it as if it was.
                           How fun would it be celebrating 2001?  Only Arthur
                           C. Clarke geeks would see anything special about
                           that.  And oh yeah, the pedantic calendar geeks.
                           \_ Ah, so you place more value on mass media
                              labels than reality -- Got it.
                                \_ No.  I acknowledge that I live in a world
                                   with other people in it.  This is more
                                   important than the artificial nature of the
                                   calendar.  /usr/bin/cal isn't my best
                                   friend.  Keep your snide elitist crap to
                                   yourself.  You're not 1/1000th as clever as
                                   you seem to think.
                                   \_ Oh, agreed.  Far more clever to
                                      simultaneously think you're in two
                                      different milleniums.
1999/12/1-6 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:16987 Activity:nil
12/1    friend told me about this internet startup job opportunity but it's
        not what i'm looking for - figured someone here might be interested:
        "Join the leading information-based portal site with e-commerce and
        e-community services for Chinese Internet users worldwide.   Located in
        Irvine, CA, looking for talented web developers with the following
        experience: 2-3 yrs UNIX OS and SQL interface, proficient in java,
        C/C++, shell code dev, web programming & e-commerce site dev."
        email jng for more info.
        \_ Do I need to be Chinese or fluent?
        \_ shouldn't this go to the /csua/pub/jobs soon?
1999/11/14-15 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Misc] UID:16874 Activity:nil
11/12   Is there a way to write macros or functions in HTML?  For
        example, assume that I want something like
                #define author( person ) Created by <B> person </B>
        How would I do that?  Thanks.
        \_ <!--#include "person.html">
        \_ most people would think that you should know something about
           the way javascript does it, but there are also a lotta other ways
           that are web server / web server extension specific
        \_ No.  HTML is not a programming language.  Your web server
           probably has a built in scripting language you can use to generate
           HTML (or if, it's apache, a choice of dozens, like PHP & perl),
           but HTML itself has none.
           \_ or you can write your web page originals in a macro language
              (i.e. M4) and then run the macro processor to generate the
              HTML.  Server side includes as recommended above work but
              they do put a significant performance hit on the web server.
                \_ which is completely irrelevant for 99% of web servers. -tom
1999/10/1-4 [Computer/SW/Languages/C_Cplusplus] UID:16644 Activity:low
10/1    I'm trying to port some UNIX C++ code to Windows Visual C++.
        My code uses the hash_map template from the Standard Template
        Library, but Windows doesn't seem to support the hash_map in
        its STL.  Anyone know of a way I can get some kind of STL
        hash table in Windows?  Alternatively, pointers to stand alone
        free source for a C/C++ hash table would also be great.
        Thanks. -emin
        \_ Someone deleted this comment:  hash_map is *not* part of the
           standard.  It is a vendor extension.  Whatever solution you
           look for, don't depend on it being in a specific
           implementation of STL.  Look, for example, for a solution
           that depends on the STL but is implemented as a separate
           libarary.
        \_ Check out http://www.dinkumware.com
           I know they provide an STL implementation, so they may provide
           a package that includes a C/C++ hash table of some sort.  I don't
           believe they're free source though. -dans
           \_ Dikumware releases only the STL, no hash_table.
        \_ God has it out for Taiwanese bourgeiousie heathens.
        \_ Should add: turkey earthquake: 7.6 NO EFFECT ON RAM OR AVOCADO.
        \_ It marks you forever as a pinhead.
        \_ pacbell is cheap, and you almost get what you pay for.
1999/10/1-4 [Computer/SW/Languages/C_Cplusplus] UID:16643 Activity:low
10/1    opinions on dsl providers?
        \_ wow, finally a use for the old crap sitting in my closet.
        \_ The scale is exponential, plus shoddy construction in Taiwan.
           \_ Not to mention the area of Mexico that was hit was more flat
              and less densely populated.
        \_ Check out http://www.dinkumware.com
           I know they provide an STL implementation, so they may provide
           a package that includes a C/C++ hash table of some sort.  I don't
           believe they're free source though. -dans
        \_ pacbell is cheap, and you almost get what you pay for.
        \_ Well, Taiwan has shanties, and mexico has tijuana.
        \_ God has it out for Taiwanese bourgeiousie heathens.
        \_ Should add: turkey earthquake: 7.6 NO EFFECT ON RAM OR AVOCADO.
           \_ Any linux equivalent of this useful list?
              \_ http://www.linuxdoc.org/HOWTO/Hardware-HOWTO.html
        \_ I recently got DSL via rythms. It seems okay so far.
1999/9/19-21 [Computer/SW/Compilers, Computer/SW/Languages/C_Cplusplus] UID:16550 Activity:very high
9/18    what does the term "co-ed" mean?
        \_ Co-Education. It is a old term used to differentiate those
           who studied in single-sex (boys only or girls only) classes
           and those whose classes had both sexes. In the vernacular
           a co-ed means "a sexy little sorority slut".
        1: a sexy little sorority slut
        2: a sexy little sorority slut
        3: a sexy little sorority slut
        4: a sexy little sorority slut
         \-  dude, you got it all wrong.  there are some fucking ugly bitches
           in a sorority who are getting no dick whatsoever.  for example,
           i remember some fat chicks shaking their groove thing at a
           fashion show, and all was not well.
           \_ Not all sorority girls are there to get dicks.  It's only the few
           \_ that's why the term does not apply to them.
           \_ BOOL Chick::isSexy() { return !this->isUglyBitch(); }
              \_ Back in the old country, people would be grateful for
                 any pointers they could find.
              \_ Get with the program.  "bool" is now a fully qualified
                 type.  You don't need to use "BOOL."
                 \_ Since when?
                    \_ Since November 1997.  Of course, windows still
                       depends on it....
                          \_ true/false (all lowercase)
                       \_ This is ANSI C/C++ right? What are the values
                             ANSI C++ compiler - which last I checked no
                          for bool (true/false of TRUE/FALSE or 1/0)?
                          \_ ANSI C++ only.  And only if you have a true
                                to work in egcs-2.91.66 19990314 (egcs-1.1.2).
                                I think that I'll stick to BOOL or int until I
                                can confirm that the SunPRO compilers handle it
                             C++ compiler had been certified as 100% compliant
                \_ Only on the csua motd would a rant about ugly sorority
                   chicks which started as a simple semantic query turn into
                   a lesson on the latest aspects of coding.
                   \_ Which, of course, is why I started it.
                      \_  heehee, this garbage is too funny.
9/
16      How do I pipe to an rsh? Say I want to do
        sort file | rsh machine -l user cat > file.sort
        \_  Assuming you have rsh set up properly do something like
            sort file | rsh machine -l user "cat > file.sort"
            or
            sort file | rsh machine -l user dd of=file.sort
            -ERic
                             \_ I just tried a simple program and it seems
                                correctly.
1999/9/15 [Computer/SW/Languages/C_Cplusplus] UID:16523 Activity:very high
9/15    Is there a good online reference for passing pointers to functions
        in C? The C book I have is inadequate on the topic.
        \_ yes.
           \_ no, pain is taking searle seriously.
                 |_ lol
        \_ Everything in here is wrong except the bits about
           "pointers", "inadequate", and "topic".
           \_ I see trouble brewing...
        \_ Find a copy of Peter van der Linden's Expert C Programming: Deep
           C Secrets. It answers all the C questions you never thought you
           had. -alexf
           \_ "the Butt-Ugly Fish Book!"
1999/9/7 [Computer/SW/Languages/C_Cplusplus] UID:16480 Activity:nil
9/7- Seen on UseNet-

*-----------------------------------------------------------------------*
|                 N O T I C E    T O    S P A M M E R S                 |
|                                                                       |
| Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227 any |
| and all unsolicited commercial e-mail sent to this address is subject |
| to a download and archival fee in the amount of US$500.00.  E-MAILING |
| THIS ADDRESS DENOTES ACCEPTANCE OF THESE TERMS.  For more information |
| go to http://thomas.loc.gov/cgi-bin/bdquery/z?d105:SN01618:@@@D      |
|                                                                       |
*-----------------------------------------------------------------------*

        Is this for real?
        \_ Yes, and the url they list is most informative.
           also, you can do research on CBPC 17538.45 in the CA
           penal code.
        \_ Yeah, but try to enforce this.  We'll be getting spammed until
           there's a real law against it and a few folks pay some fines for
           it.  There'll still be low level out of country spam after that but
           nothing like today.
1999/8/30-31 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs] UID:16434 Activity:high
8/30    Simple Emacs question:  In C++ mode, I have this in my .emacs:
        (setq default-tab-width 4)
        However, subsequent tabs, doesn't tab 4 spaces.  Thanks in advance.
        \_ You are evil.
        \_ Depending on your problem, the solution is to modify c-basic-offset
           or to M-x edit-tab-stops.
        \_ "M-x describe-variable default-tab-width" says:
           Default value of `tab-width' for buffers that do not override it.
        \_ ED! ED! ED IS THE STANDARD! tab-width.
                \_ so who IS this Ed guy?
                        \_ He has a cat named 'bin'.
           This is the same as (default-value 'tab-width).
           So try setting tab-width while in your C++ buffer instead.
1999/8/28 [Computer/SW/Languages/C_Cplusplus, Health] UID:16408 Activity:insanely high
8/28    Now this is true csuaer dedication (worthy of danh's disturbed-mind
        award): http://www.CSUA.Berkeley.EDU/~keithyw/letter.htm
        \_ Wow, do a search on Yahoo for her and you come up with keith's
           web page as the first link
        \_ 5'6" and 150 lbs... quite the chunky chick.
           \_ that's not fat.  Look at the picture.  It's all muscle.
                \_ I said chunky.  She's chunky.  That's not a svelte chick.
                   C-H-U-N-K-Y C-H-I-C-K
                   \_ kate moss is unattractive anyway.  But the letter he
                      wrote is kinda funny, kinda sad..
1999/8/23-24 [Computer/SW/Languages/C_Cplusplus] UID:16377 Activity:kinda low
8/23    Anyone else anticipating the C&C: Tiberium Sun release?
        \_ Nope.  Am anticipating Homeworld, though.
        \_ You want a copy?  I picked it up this weekend.
1999/8/20 [Computer/SW/Languages/C_Cplusplus] UID:16355 Activity:high
8/19    Is it true for every "new()" there should be a matching "delete()"
        in C++?  (My bad, after the first response I relized the question was
        not specific enuf).
        More specifically,
        ...
         struct a {
                ...
                int i;
                ...
        }
        void fn(a *i) {
           ...
           printf("address of I: %#x, value of I: %d\n", i, i->i);
           delete(i); // <--see how i is passed in
        }
        void main() {
           a b;
           b->i=3;
           fn(new a(b));
       }
        \_ no Java will just garbage collect it for you.
           \_ Oh my.
           \_ obviously this fool does it in C++, too.
           \_ Lemme guess... Microsoft employee?
           \_ Genius, they said in C/C++, not Java and there's no new/delete
              in C unless you wrote your own for some reason.
                \_ Moron, when the Java comment was added they didn't say C/C++
                   It was added after the Java comment was made.
                   \_ Yeah yeah yeah whatever.  You're full of shit.  I replied
                      to what was there and since I archive the motd, I know
                      you're lying.  -not eric who also archives the motd
        \_ There should never be a new() or delete() in C.
1999/8/20 [Computer/SW/Languages/C_Cplusplus] UID:16352 Activity:kinda low
8/19    Is it true for every "new()" there should be a matching "delete()"
        in C/C++?
        \_ no Java will just garbage collect it for you.
           \_ Oh my.
           \_ obviously this fool does it in C++, too.
           \_ Lemme guess... Microsoft employee?
           \_ Genius, they said in C/C++, not Java and there's no new/delete
              in C unless you wrote your own for some reason.
        \_ There should never be a new() or delete() in C.
1999/8/18-20 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:16336 Activity:nil
8/19    C question: I rarely, if ever, remember to include stdlib.h, which
        includes malloc, atoi, etc. But I use these functions on a regular
        basis. I haven't encountered a problem until I tried using atof(...)
        also in stdlib.h. Once I included stdlib.h, my problems went away.
        So why didn't I have problems with the other functions?
        \_ your compiler was assuming that undefined functions returned an int.
                          \_ I think you misspelled "may have been"
           that was not a valid assumption in the case of atof.
           you should pay attention to those warnings from your compiler
           instead of ignoring them.
1999/8/4 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Unix] UID:16247 Activity:nil
8/3     For those who thought Unix was written to provide an environment for C
        & C++, a history lesson from the creators:
        http://www.cs.bell-labs.com/~dmr/primevalC.html
        http://cm.bell-labs.com/cm/cs/who/dmr/hist.html
        http://computer.org/computer/thompson.htm
1999/8/3-5 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Functional] UID:16238 Activity:very high
8/3     What do people think about STL (Standard Template Library) for C++?
        I used it recently and it looks pretty cool.  -emin
        \_ STL is a good advance in terms of API, but the implementations
           will need a while to mature to avoid foiling compiler
           optimizations.  This will come soon from KAI, Sun, et al. -mel
        \_ for more docs try:
           http://www.sgi.com/Technology/STL
           --jeff
        \_ for Java "port", see http://www.objectspace.com/jgl and forget all about
                them java.util collection classes       --petr
        \_ It's pretty convenient.
        \_ I think it tends to be arcane. (And I'm a Unix bigot, so I have
           a high tolerance for arcana.) Having a copy of the C++ standard
           handy helps. Failing that, Stroustrup is your friend, sort of.
           -brg
        \_ In my humble opinion if there is a real need to use templates
           for what you need to do, Lisp may be a better language than
           C++.  -- ilyas
           \_!!! You're kidding, right?  A good portion of the reason
             for using templates is for inlining code while providing
             \_ huh? inlining code?  stl has nothing to do with inlining.
                \_ Try again.  It has *a lot* to do with inlining.  That
                   is what your functors do when you pass them to
                   classes like map, priority_list, etc.
             \_ Even with STL, C++ is much much harder to write and maintain
             than Lisp.  Furthermore, there is little evidence that
             explicit memory management outperforms a good garbage collector
             receiving hints from the programmer (something Lisp allows and
             encourages). -- ilyas
                   \_ The STL is about not having to write general-purpose
                      code any more.  Efficiency is a requirement, not the
                      goal.
                      \_ My point is that we've had things like qsort()
                         in the standard library for a while, but you
                         had to pass a function pointer.   That meant a
                         function call for every compare.  Inlining the
                         code makes a *huge* difference.
             flexibility.  I don't need or want the overhead of a
             garbage collector and closures.
             \_ Even with STL, C++ is much much harder to write and
                maintain than Lisp.  Furthermore, there is little
                evidence that explicit memory management outperforms a
                good garbage collector receiving hints from the
                programmer (something Lisp allows and encourages). -- ilyas
                \_ "C++ is much harder to write and maintain than Lisp"?
                   Please list your sources for this ridiculous
                   assertion.
                   \_ This is not an academic point, but a practical one.
                   In practice, me and many of my friends and coworkers
                   found the assertion to be true.  If it is not true for you
                   I would be happy to know why. -- ilyas
             \_ ilyas loses THREE POINTS. -1: One of the biggest benefits of
                templates is typesafe containers. LISP does not have type
                safety at all. LISP can't compete.
                -1: Large LISP programs are MUCH harder to maintain than
                c++ programs.  -ali.
                \_ Given two programs of equal size (down to a line), a
                   Lisp program will probably have a LOT more
                   functionality than a C++ program due to Lisp's
                   inherent terseness.  I don't see a single thing that
                   will make C++ easier to maintain in the long run.
                   Not only will a given amount of C++ code express a
                   lot less than the same amount of code of Lisp, but
                   the C++ maintaner is forced to cope with bugs on two
                   fronts -- memory and logic, whereas a Lisp programmer
                   only needs to worry about logic.  Strict type safety
                   can be easily implemented in LISP using CLOS methods,
                   if the programmer wants it. -- ilyas
                \_ The industry didn't side with typed languages like
                   C++ and Java over Lisp/Scheme on a whim.  They did
                   it because the C++ projects were getting done on time
                   and on budget and the Lisp programs weren't.  That's
                   why Lisp has been consigned to academia and think tanks
                   while C++ programmers have jobs. -mel

                   \_ This may be the case, although I certainly wouldn't
                      say industry sides with things for a good technical reason.
                      Witness clueless executives gather around NT like scared
                      cubs around their dead lioness mother.  I don't know if
                      anyone actually did a rigorous in-depth study of software
                      development times across languages.  It may be that Lisp
                      is consigned to Academia and think tanks, but remember that
                      this is generally where the best and the brightest make
                      their living. -- ilyas

                \_ This is much like English vs. Spanish.  People often
                   claim that Spanish is much more consistent and simpler
                   than English hence better.  The problem with LISP is that
                   although simple and consistent, it's too simple and
                   consistent making it visually difficult to distinguish
                   different constructs and mechanisms easily (too many
                   parens and no type declarations).  You can argue that
                   declarations are a bad part of language but on a large
                   scale they tend to help a lot whereas languages lke LISP
                   and LOGO or acceptable for grade school pedagogy uses.
                   \_ Declarations, type safety and private data members
                      are useful features of a language, but they tend
                      to be used as crutches by programmers who are not
                      careful.  Which language looks visually more
                      intuitive is a very subjective thing.  Moreover,
                      one shouldn't need a type declaration to be able
                      \_ I find type declarations very useful for various
                         reasons.  It's ability to restrict space and
                         functionality of a variable helps increase it's
                         compactness and computational efficiency.  Plus,
                         I don't mind having an explicit reminder of what
                         type something is.  The alternative is to use
                         \_ I am saying that often these features are not
                         as necessary for programming as people say, and often
                         may be more trouble than they are worth.  In
                         particular, static typing is often a cludgy,
                         complicated affair that really only tells the
                         programmer that he can't stick a round peg in a square
                         hole (something he ought to know anyways if he put
                         sufficient thought into design).  Btw,
                         ad hominem has no place in a mature discussion.
                         -- ilyas

                         the Hungarian notation and I would rather declare
                         types any day over using the Hungarian notation.

                         \_ Hungarian notation is just one convention, and
                         a rather cludgy one at that.  Also, if you remember,
                         this convention is mainly used in languages with
                         explicit types like C++ and Visual Basic -- if type
                         declarations were as helpful as some people say the
                         convention wouldn't need to be used in such languages.
                         Furthermore, it is not true that a language with
                         static typing has to have type declarations, remember
                         ML?
                         And it is not true that a language with dynamic types
                         has to be inefficient.  Good programming practices and
                         a good compiler will make sure that most things you
                         care about, such as arithmetic, will be fast. -- ilyas

                      to distinguish variables, else one doesn't know
                      how to name variables correctly.  That Lisp is a
                      pedagogy language is a serious misconception.  --ilyas
                      \_ "tend to be used"?  You're saying that because
                         some features are used by bad programmers in
                         the wrong way the language is flawed?  Please
                         crawl back under the hole you came out of.
                         \_ I am saying that often these features are
                            not as necessary for programming as people
                            say, and often may be more trouble than they
                            are worth.  In particular, static typing is
                            often a cludgy, complicated affair that
                            really only tells the programmer that he
                            can't stick a round peg in a square hole
                            (something he ought to know anyways if he
                            put sufficient thought into design).  Btw,
                            ad hominem has no place in a mature
                            discussion.  -- ilyas
                            \_ Neither do baseless assertions belong.
                               Go away.

                \_ That's only TWO POINTS.  You owe ilyas a point,
                   bitch.
                        \_ Everyone loses a point for taking part.
                \_ Static typing is not especially useful.  It requires
                   a lot of work for very little benefit.
1999/7/29-31 [Computer/SW/Languages/C_Cplusplus] UID:16199 Activity:kinda low
7/28    Are there any programs that will convert c++ source code to
        c source code?
        \_ cfront, developed by AT&T
                \_ f&%k. no licenses for cfront. any other way?
                  \_ Hire 10,000 Indian programmers.
                  \_ At 2.50/hr, it'll only cost you 25,000
                        \_ $25,000 per hour...
                           \_ No, 25,000 per hour
                \_ If you have an Instructional account, /opt/CC/bin/CC is
                   cfront. -brg
                   cfront, on HP systems. -brg
        \_ None that will produce code you want to maintain.  Why would
                you want to do this?
1999/7/15-16 [Computer/SW/Languages/C_Cplusplus, Computer/SW/OS/Solaris] UID:16139 Activity:high 52%like:16095
7/15    Does anyone know of some good freely available tools
        for finding memory leaks and memory errors in c/c++?
        I have "Electric Fence" but it leaves a lot to be desired.
        \_ purity (freeP)
        \_ purify (not free, but excellent)
           \_ Unfortunately, purify is worthless for interactive
              applications (e.g. games), and nearly useless for
              apps that already take a lot of CPU time before you
              instrument them.  The old sparc purify wasn't too slow
              but it just got worse and worse as time wore on.  -blojo
        \_ there are a bunch of different tools for this.  do a web search.
           i've used some malloc replacement libraries such as dmalloc.
           also, depending which compiler/OS you're using you may get some
           analysis tools already.  Solaris dbx and AIX heapview exist,
           i dunno about other platforms --oj
                \_ See also "watchmalloc" on Solaris.
        \_ Good coding practice.
        \_ boehm gc
           \_ i just wrote a freebsd port for this. i'll be submitting it
              but contact me if you want it. --aaron
1999/7/10-12 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:16101 Activity:low
7/9     Know of any C++ compilers for Linux/x86?
        Please add to the list:    (--PeterM)
        \_ egcs
        \_ Kai C++ (KCC)
        \_ Fujitsu C++ (FCC)
        \_ Portland Group C++ (pgCC)
        \_ Yermom C++ (ymCC)
           \_ This one sucks.
              \_ I thought it blows.
1999/7/9 [Computer/SW/Languages/C_Cplusplus] UID:16095 Activity:nil 52%like:16139
07/09   Are there any freely available programs to detect memory leaks
        in C/C++ programs besides Electric Fence?
1999/6/24 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:16011 Activity:nil
6/23    Here's a question.  I'm trying to send and receive a large file from one
        machine to another.  To do this I've used a SOCK_STREAM with TCP
        protocol.  It works fine normally as I read away from the socket.
        However when I get transfer-encoding:chunked, for large files.  I get
        a portion of the file, but soon the sysread returns 0 bytes read.
        However its not done with the file yet, it never finishes, the socket
        stays open but it never sends the rest of the data.  I'm doing
        this all in Perl but C solutions will work too.
        \_ for large amounts of data you can end up reading only a portion
           of the data you want in one read call, and need to wait for more
           data to arrive (the sysread of 0 means no data currently in the
           buffer, but you might get some more in a few hundred milliseconds)
           \_ I thought of that.  So I looped the read until I got the chunked
                exit value.  No luuck I get an infinite loop.  Nothing ever
                comes in on the socket again.
                \_ Could be a problem on the send-side (not sending
                   subsequent chunks). Could be you're not properly
                   recognizing the 'chunked exit value' on the
                   receiving side (the bunches of bytes you read
                   won't necessarily be grouped as they were sent).
                   Could be a lot of things -- are you writing
                   both sides of the transfer? Is this HTTP/1.1?
                   Feel free to drop me an email w/ more details. -gojomo
1999/5/10-16 [Computer/SW/Languages/C_Cplusplus, Academia/Berkeley/CSUA] UID:15775 Activity:nil
5/9     C S U A    G E N E R A L    M E E T I N G   &   E L E C T I O N
        Results:  The Fall 1999 Politburo is:
                    President       -  Paolo Soto (paolo)
                    Vice President  -  Mike Howard (mikeh)
                    Treasurer       -  Rhys Cheung (reeser)
                    Secretary       -  Dan Silverstein (dans)
                    Librarian       -  Jon Kuroda (jon)
1999/5/7-9/19 [Computer/SW/OS/FreeBSD, Computer/SW/Languages/C_Cplusplus] UID:15771 Activity:nil 83%like:14040 85%like:16551
FreeBSD 2.2.6-STABLE #0: Sun May  3 22:30:48 PDT 1998

TODAY! C S U A    G E N E R A L    M E E T I N G   &   E L E C T I O N
        Friday, May 7th - 6:00pm - Wozniak Lounge 4th fl. Soda Hall
             Come vote for (or run for) next year's Politburo
          and hear Entrepreneurship Guest Speaker Sameer Parekh
1999/5/3-7 [Computer/SW/Languages/C_Cplusplus] UID:15737 Activity:nil
5/2     C S U A    G E N E R A L    M E E T I N G   &   E L E C T I O N S
                      Friday, May 7th - 5:30pm - 306 Soda
                      Come vote for next year's Politburo
             and hear Entrepreneurship Guest Speaker Sameer Parekh
1999/4/2-5 [Computer/SW/Languages/C_Cplusplus, Industry/Jobs] UID:15687 Activity:very high 50%like:15685
4/1     Informal Soda Salary Survey.  Please join in.
        \_ Do you want the nominal or real hourly rate?
           (i.e. no over-time, work 60 hours a week).
                \_ If you're on a salary, put that down, not including
                   options, etc.  If you're a contractor, put down what
                   you get per hour.  The amount you work is assumed
                   to be ~40 hours per week.  If it isn't, put a note
                   that you work >> 40.

        Title                   Years Experience        Salary/Hourly rate
Hrs/wk  Title                   Years Experience        Salary/Hourly rate
        English Majorz          3                       $6/hr + food (sometimez!)
        CEO of MSFT             ~20 years               Let's see I own 1b
                                                        shares of MSFT.  The
                                                        stock moved up $3
                                                        yesterday, which means
                                                        I made $3b yesterday.
                                                        That works out to be
                                                        $375 million per hour
                                                        (8 hr a day).  Or about
                                                        $6.25 million a minute
        CAD Engineer            1.5                     $53K/yr + stocks + opt
                                                        or about $100K a
                                                        second.  More than
                                                        what any of you and
                                                        any of your descendants
                                                        will make for the
                                                        next 1000 years.
                                                                -billg
                                                        shares of MSFT.
                                                        \_ not including
                                                           options, etc.
                                                           [deletia]

        Drug Dealer             High School + 2 ys      $250k/yr + marijuana
                                                        option.some occupational
        Sr. System Admin        4 + EECS/C              $97k/yr + bonus +
                                                           weak options
                                                        hazards.
60      IT everything guy #2    3                       $36k/yr + pain
        Sysadmin                BS from UCB + 0 yrs     $65k/yr
        IEEE engineer @SunMicro MS from Stanford        $62K /yr starting
        Student Intern @Sun     0, no degree            $48k/yr
                                \_ makes that stanford MS look pretty worthless
        English Majorz          3                       $6/hr + food(sometimez!)
                \_ go away tpc you're not funny.
        English Major:          2 50-60 hours/week      $50k/yr + stocks
        English Major           4                       $85K/yr + great stocks
        Gradushit student       4.5 (shit!)             $15k/yr (shit**2!!)
                 \_ oh, and yes, >>40 hours/week
        Sr. Solaris Admin       7                       $80/hr
        Sr. System Admin        6                       $85k/yr + uberstock
        Sr. System Admin        3                       $83k+stock+ann. bonus
        DBA                     5                       $102k/yr + stocks
        TAOS Whore              5                       $90k/yr + "SAR's"
        Another Taos Whore      4 + EECS/C              $97k/yr + overtime +
                                                         weak options ("SARs")
        TAOS Bitch              5                       $125K/yr + 5K bonus +
                                                        "SAR's" + overtime
        TAOS Whore #3           2 + EECS/C              $75K/yr + S*R's +
                                                        overtime
        TAOS Assistant Crack Ho on Move Team    0       $18/hour
        Software Engineer       2 + MSCS                $82K/yr + 7K options
        Software Engineer       ~1 + EECS               $68K/yr + Great Stock
        Software Engineer       ~1 + EECS/C             $55K/yr + bonus
        Software Engineer       ~2 + EECS/C             $64K/yr + options
        Sr. C/S Engineer        4                       $75K/yr + stocks
        CAD Engineer            1.5                     $53K/yr + bonus
                                                        + stocks + opt
        Bitch of The Man        All my life             free + no beating
                                                        before dinner, if I'm
                                                        lucky
        web front end grunt     4+                      $55k + $1.4m in stocks
        Web Developer (Taos)    1 + EECS/C              $80K/yr
        \_ caught them in a frenzy of desperation
        Microsoft Janitor       1                       $90K/yr + super stocks
        Beggar outside M$       2                       50cents/min + see Gates
                \_ not quite as good as Gate$ who makes > $550/sec
                   \_ But at least the beggar gets some.
        Software Engineer       2+                      $75K/yr + Great Stock
        Mathematician           3                       $58K/yr + stock
                                                        (not bay area)
        Sr. Engineer (software) 7 (including co-op)     $80K/yr + stocks
        \_ Sheeeeeit, I'm making too little.
        Student Intern          0                       $48k/yr, but no benefits
        Start Your Own Company  2                       -$150K/yr
        consultant              4                       $70/hr
        IT everything guy       2                       $70k/yr + stocks
        IT everything guy #2    3                       $36k/yr + pain
        all my friends who work on crab boats(HS dropouts) $60-$120k/yr
        Husband                 2                       -$30k/yr - freedom
                \_ only if you marry lame - my wife is +$70k/yr
        Consultant (software)   3                       $88k/yr + bonus
        Consultant (hardware)   10                      $150/hr
        Sys Admin (econ degree) 1(real)5(resume)        $47/yr +tinystock
                                        \_ On behalf of honest peoople
                                           everywhere, fuck you.  --sowings
                                           \_ well hey at least he's not
                                              making that much...
                                           \_ diff could be grad school
                                           \_ based on what he's making, they
                                              don't believe his resume either
                                          \_ gotta remember if its a gov't
                                              job (i.e. UC) the benefits are
                                              great and the hours are like
                                              half time.
                                              \_It's not, and they never
                                                looked at my resume which
                                                I will soon be sending out
                                                because, it is low $'s.
                                                because, it is low $.
                                                \_ How do you know your resume
                                                   wasn't looked at? And why'd
                                                   you lie in the first place?
        Jr Sys Admin            2                       $46k + options
        Software Engineer       10                      $55k + bonus + options
1999/3/29 [Computer/SW/Languages/C_Cplusplus] UID:15659 Activity:nil
3/27    What are good books for learning C/C++ and/or Java?  --katster
        \_ "Teach Yourself Java 1.1 Programming in 24 Hours", published
           by http://sams.net, is the most straight-forward Java book I've
           come across.  Although a good introduction, it only covers
           the basics.
        \_ "C++ How to Program" by H.M. and P.J. Deitel is unmatched.
           Brewer used to recommend it in CS 169.
           \_ That is the most complete yet unreadable book on C++ ever.
              \_ Personally, I find it very readable.  So do a couple of
                 friends who wanted to learn how to program, and a couple
                 of co-workers who were looking for something more readable
                 than Stroustrup.
        \_Also, if you're going to be working in C, I'd reccommend picking up
          a copy of Kernighan and Ritchie's The C Programming Language,
          Second Edition (If you do stumble across a copy of the First Ed.,
          I'd grab it anyway for nostalgia's sake, but that's just me), aka,
          K&R C.  Most beginners find it to be really terse, but it's a really
          useful reference.
          \_ as a nonn-programmer who has had to program and was given that
             book to learn from, i can say that that is absolutely terrible
             advice.  to a beginner, that book is nothing more than a poorly
             organized and badly written man page.  programmers need to
             stop recomending it to non-programmers to learn C from.
                \_ The K&R is what's known as a spec.  It's a very
                   important document to have for a language.  But
                   they tend to be more useful for compiler writers and
                   people who argue about obscure language details.
                   Specs should never be used as a beginner's guide.
                   \_ I've never read it myself but many of those language
                      details are pretty important in C as opposed to many
                      other programming languages.  There are a lot of pitfalls
                      and fallacies that novice C programmers fall into that
                      they should be aware of.  It's not like Java which is good
                      at easing novices in.
                        \_ K&R shouldn't be used as a spec either - the
                           authoritative spec for C is the ISO/ANSI C
                           Standard, which is much more detailed than K&R.
        \_ I like "C: A Reference Manual" by Harbison and Steele.  Once it
           helped me solve a hardware interface related problem dealing
           with the memory positions of fields in an array of structures.
           Very clear explanations and nice index.  So far it has provided
           answers to all my C questions without forcing me to read a
           whole bunch of extraneous stuff.  I haven't found an equivalent
           C++ book in that regard.
        \_ I like "Practical C++ Programming" by Steve Oualline. It's not
           complete, by any means, but it gets you started, and it's easy
           to read. -brg
1999/3/29-30 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Virus] UID:15655 Activity:nil
3/29    Why is CMU making such a big deal out of this new email virus?
        \_ because they can.
        \_ Yet another reason why email that is not 100% pure flat ASCII
           is a BAD IDEA.  All that javascript, MIME, and attachments are
           unnecessary.  uuencode/uudecode works for me man!   -old hack
        \_ because it's a macro "virus" in a Word document.  Half the people
           in IT are at least wary when they get an .EXE attachmt from someone
           they don't know.  However, this one will appear to be sent to you
           by one of your close friends, and it will be a Word doc (list.doc).
           If you open the doc (and if you have macro security on it says
           this doc has macros do you want them to execute), executes VBA
           code that installs the virus on your NORMAL.DOT
           template, then uses MAPI calls to take your Outlook/Outlook
           Express address book, using the first 50 e-mail addresses to send
           out list.doc again to your 50 friends and associates on your net
           connection, with the line:
           "Here's that important document you wanted ... don't show anyone!
           ;-)"  Now ain't that a trip?  It was first reported last Friday,
           and has spread like wildfire since then.
           \_ why the fuck would you open a document that had an
                introduction like that?
              \_ cuz the From: header says it's from your ol pal from college
                 that you haven't heard from in a while (it'll really have
                 their e-mail address up there), you figure he/she sent
                 the e-mail to the wrong dude, and you're just so curious
                 what your bud is up to
                \_ anyone dumb enough to use microsoft products for email
                   deserves what they get.  -Anti-Microsoft bigot
1999/3/29-30 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Security] UID:15649 Activity:moderate
3/29    How do I test to see if a file has "other" +"read" permissions in C?
        \_ man 2 stat?
        \_ or check out the access(2) manpage.
           \_ stat doesn't have anything to do with accessibility and access uses
              user ID to check for access
                \_ which part of "mode" don't you understand?
                \_ stat has this:
                        mode_t st_mode /* File mode */
1999/3/12-13 [Computer/SW/Languages/C_Cplusplus] UID:15583 Activity:low
3/12    Does anyone have a simple pthreads example written in C I could look at?
        -jefe
        \_ Ya, look on the EE122 web site.
           \_ That more has to do with socket programming than phtreads.
        \_ pthread_mutex_lock(&mutex);
           pthread_create(work);
           pthread_destroy(life);
           pthread_mutex_unlock(&mutex);
              (read, if work is a critical section, it destroys life) -nick
1999/1/29 [Computer/SW/Languages/C_Cplusplus] UID:15318 Activity:high
1/28    Ok, I admit, my fu is weak. Proble,: in my c program, I do a
        #include <math.h>. But when I try to use any of the functions,
        like tan(x) or pow(x,y), I get Unsatisfied Symbol errors when
        compiling. What could be the problem?
        \_ use "-lm" in the arguments to the compiler
           \_ specifically, add " -lm" to the *end* of your compile line
           \_ If you want to improve your fu, read "Expert C Programming,
              Deep C Secrets" by Van der Linden. This particular question
              is answered in Chapter 5.
1999/1/6-7 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Unix] UID:15172 Activity:nil
1/4     hi.  i dont really know quite how to compile this program
        that i found this morning.
        here are the first 7 lines (out of 15 output) that im
        getting when i compile (the rest of output is in
        ~/hahnak/mmv/errors):

        % make -f Makefile
        cc -o mmv -O -pipe mmv.c
        mmv.c:115: conflicting types for `lseek'
        /usr/include/sys/types.h:161: previous declaration of `lseek'
        mmv.c:365: conflicting types for `memmove'
        /usr/include/string.h:55: previous declaration of `memmove'
        mmv.c: In function `init':

        can anybody point me to a particular man page or a web
        page or simply tell me what i need to do to compile this?
                thanks, hahnak (still learning)
        \_ pick up a C book or man lseek and memmove(for the first 2
           errors at least). BTW, permission of the log file
           isnt set up correctly either.
1998/11/1 [Computer/SW/Languages/C_Cplusplus] UID:14871 Activity:nil
11/1    Uh oh.. bad news for Grim Fandango:
        Red Alert got a 9.4 from:
                http://www.gamespot.com/strategy/redalert/index.html
        Grim Fandango got a 9.3:
                http://www.gamespot.com/adventure/grimfand/index.html
        Red Alert was a hi-res poorly done butchery of C&C.  In short,
        RA sucked your mother's balls, but still got a higher rating
        than the much motd-hyped Grim Fandango.
1998/10/6-7 [Computer/SW/Languages/C_Cplusplus] UID:14740 Activity:kinda low
10/06   1 0V3RKL0CK3D MY C=64"S 6502 T0 ___ THR33 M3GAHERTZ ___!!!!1!!
        D3TA1LS AT <DEAD>B1FF.N3T/SUP3R-KRAD-C-64.HTML<DEAD> !!11!
        \_ d00d, b3 kar3ful!!!1!!  1f u 0vercl0ck, u w0n"t b3 abl3 2 play a
           l0t uv y0ur fav0r1t3 gam3z and war3z, b3cause y0ur c=64 will
           b3cum *** TOO FAST ***!!!!!!!1!!!!1!!!!  u sh0uld put 1n a sw1tch
           s0 that u kan us3 th3 l0w3r sp33d 2 play gam3z, and us3 th3 h1gh3r
           sp33d 0nly wh3n u n33d 2 -- l13k wh3n ur try1ng 2 crack a l1st 0f
           passw0rds fr0m a bb0ard.
           \_ Is there a utility that converts regular English text to
              code like this?  Thanks.
              \_ no, some people aparently have way too much time to blow
1998/9/29-10/1 [Computer/SW/Languages/C_Cplusplus, Academia/Berkeley/Classes] UID:14702 Activity:kinda low
9/29    I'm timing an algorithm for cs170. The only library functions I
        could find in c/c++ are time_t which is not precise enough.  Is
        there something that measures milleseconds? -thnx
        \_ If this is that benchmarking thing for the strassen project, it's
           totally bogus, there's no easy way to benchmark the way they
           suggest.  I just wrote something like what they said they wanted
           and ran with it..  ~dbushong/pub/bench.c  --dbushong
        \_ In any case, _don't_ try running this on soda.. there are far
           too many processes running for you to get any sort of accurate
           timed benchmark.
        \_ Try playing on EECS instructional machines.  -- Grumpy
        \_ try playing with gettimeofday(). -ERic
        \_ getrusage() does microseconds and measures only time actually
           spent on your process, not other processes
           \_ gettimeofday() will get you absolute system time.  getrusage()
              gives you the amount of time the system kernel allocated to
              your process, which on a heavily used multiuser system, could
              be very different. --ERic
              \_ How about /usr/bin/time, or the shell built-in "time"
                 command?  -- yuen
                        \_ Those report both.
1998/9/28-29 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages] UID:14688 Activity:kinda low
9/27    I'm trying to output the binary representation of a ieee754 double
        in c/c++.  I'm using union { double x; long y; } and then
        shifting iteratively with a value.y >> i and then masking it with
        a value.y & 0x1 but that doesn't seem to work.  Any suggestions?
        \_ first problem:  a double is probably larger in size than a long
           on your architecture.  are you sure your compiler is doing ieee754
           doubles?  what you described is very dependent on what you're using.
        \_ printf("%08x\n", * (long *) &x);
        \_ printf("%qx\n", *(long long *) &x) is what you want on soda, where
           a double is 64 bits and a long is 32.  Other machines will vary.
        \_ Why not use a char array in your union?  That way you only have
           the length of the double to worry about.
           \_And the endian-ness.
1998/9/24-25 [Computer/SW/Languages/C_Cplusplus, Recreation/Dating] UID:14662 Activity:nil
9/23    How do I get a C program to read the default output of date?
        \_ char buffer[40];
           time_t now = time(NULL);
           strftime(buffer, 40, "%+", localtime(&now));
           printf("At the sound of the tone, the time will be: %s\n", buffer);
           You could also actually call /bin/date using popen(3), but that
           would be harder.
                \-i dont think that is what the question is asking.
                sounds to me he/she is trying to *parse* date output.
                i suppose youcan use mktime() ... what are you trying to
                do with the "default output" ... ? --psb
1998/9/15-16 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs, Computer/HW] UID:14600 Activity:low
9/15    Ok, I RFTM already, but I couldn't figure this out. How do I make
        emacs display lines that are too long for the screen onto the next
        line without it actually word wrapping? All I get is the $ at the
        end of a line.
        \_ "Fundamental" mode without any minor modes activated should
           work fine.  what kind of files are your editing/looking at?
           work fine.  What kind of files are your editing/looking at?
                \-this is not a mode issue, but depends on teh value of the
                truncate-lines variable in that mode. apropos truncate or
                do a C-hv truncate-lines. at least you know not to sign
                whenyou dont know what you are tlaking about. --psb
1998/8/23-25 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Security] UID:14498 Activity:nil
8/22    The Commission on Campus Computing report is now public.
        You can see it at http://ls.berkeley.edu/coc/report.html.
        Salient points (these are all recommendations--they have not
        been and may not be approved by the Chancellors):
        * Computer ownership should be required for new students starting in
          2000.
          \_ not everyone can afford a computer.
                \_ This is becoming less and less true.  (Read the report.)
                \_ If a computer is made a requirement, students can make it
                   part of their financial aid package.  -tom
        * Network connections should include a monthly charge starting in 1999.
        * All courses should have at least a skeletal web page.
        * All students should have a single account which includes
          disk space and Web access and which stays with them for the
          duration of their time at Cal.
        * IS&T should be moved under Carol Christ, and a new head of
          "Educational Technology" should be created.
                                                -tom
1998/8/17-18 [Computer/SW/Languages/C_Cplusplus] UID:14475 Activity:moderate
8/17    what books do people recommend for learning to write GUIs in MFC,
        assuming I know C/C++?
        \_ /csua/pub/cs-books
             \_ no.
                \_ no. there is no relevant information in there. if
                   anyone makes relevant comments here I will be
                   happy to add them to that file.
1998/7/24 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:14379 Activity:nil
7/23    What C/C++ compilers are being used in the workplace for Windows
        software development?
        \_ VC++ is probably the most widely used
        \_ Borland C/C++ or C++ Builder.
1998/7/22-23 [Computer/SW/Languages/C_Cplusplus, Computer/Networking] UID:14371 Activity:moderate
7/21    Is there some C/C++ library that allows you to interfact with
        TCP/IP?
        \_ libsocket++
           \_ what are the include file(s)?
        \_ libace ( see http://www.cs.wustl.edu/~schmidt/ACE.html )
        \_ was that "interact" or "interface"?
           \_ does it matter????  just fuck.. damnit..
        |_ Yes.  Many.  What platform?
        \_ http://www.kohala.com/~rstevens/unpv12e.html
1998/7/8-10 [Computer/SW/Languages/C_Cplusplus] UID:14305 Activity:moderate
7/8     Anyone know where I can find C++ libraries that handle infinite
        precision numbers?
        \_ Check out the gmp library from GNU.  I think gmp stands for
           GNU Multi-Precision.  I used this library and it works great.
           I highly recommend it over BigNums.  The gmp library
           is actually a C library but you can use it with C++ or write
           wrappers if you want object oriented stuff. -emin
           \_ What functions does it provide?  Only +-*/?  trigonometric?
              \_ http://www.delorie.com/gnu/docs/gmp/gmp_toc.html
                 It provides +-/*><, log, exp, gcd, and some others.
                 I don't think it provides trig functions. -emin
                 \_ What gmp lacks in trigonometry, you can compensate
                    for it with a polynomial approximation.  -- tmonroe
        \_ Um, unless you have a machine with infinite memory, I don't
           think you will find this.  I think you're looking for an
           arbitrary precision library.  GMP looks good.  -- Mr. Nitpick
           \_ I think Mr. Nitpick should meditate on the difference between
              a library and the platform on which it runs.  --pld
1998/7/8-10 [Computer/SW/Languages/C_Cplusplus] UID:14300 Activity:moderate
7/8  Does anyone have experience with STL (Standard Template Library)?
     A benchmarked their vector class about 6 months ago and it was
      twice as slow as my own version.  Also g++ didn't seem to support
     it very well.  If I want to compile with g++ is STL worth using?
     Thank you for the advice.  -emin
     \_ "their vector class"?  from what i know, STL has many diff
        implementations, it's not a generic C++ thing, it depends on the
        compiler vendor or the 3rd party provider.  -oj
        \_ Sorry, I meant the vector class in the STL that came with
           my g++ on FreeBSD. -emin
           \_ g++ is known to be ugly.
              \_ Do you have a better suggestion for a UNIX compiler?
                 \_ There are some commercial ones, if you want.
1998/6/3-5 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Functional] UID:14167 Activity:very high 66%like:14181
6/3  What are good books for teaching a ninth grader programming?
        \_ Intro to Programming for Dummies.                    -tom
        \_ cmlee, stop signing my name to your idiocy.  -tom
        \_ History of Programming: the Unsuccessful Cases.
        \_ History of Programming: the Unsuccessful Cases.-tom
        \_ _THE STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS_!!!!!!!!!
           THEY SHOULDN'T NEED ANY OTHER PROGRAMMING BOOK BUT THIS ONE!!!!!
           BH _AND_ RICHARD FATEMAN TOLD ME THAT IT'S THE BEST COMPUTER
           SCIENCE BOOK EVER WRITTEN, SO IT MUST BE TRUE!!!!!!!!!!!!!!!!!!!
                -tom
           \_ Actually is a pretty good computer science book.  It
              might be a little advanced for a ninth grader.  I would
              let the ninth grader take a look at the book, and if s/he
              can understand it then use it.  -emin
              \_ If it is, Simply Scheme is the CS 3 book and is slower
                 paced.  PNH is/was of the opinion that the 61a curriculum
                 was too much for the typical high school CS class.  But,
                 as the end says, "Computer Science != Programming".
                        \_ What?  Is BH a communist?  Are you?
                 any particular language you were thinking of? --Jon
        \_ I just wanna program Microsoft stuff, program cool warez and
        \_ What was that book used in CS60A?
                                        -A ninth grader
           stuff and get rich ($100,000/year) like all the programmers
           out there! I wanna attend Microsoft's Summer Camp, it is cool
                                        -A ninth grader (tom)
                \_ Goto BH's summer camp instead - get to use 5-year old
                        HP's, learn scheme, and listen to lectures on why
                        capitalism is bad.
                        \_ that makes it sound as if capitalism isn't bad.
                           \_ I'd rather be a part of a capitalist society
                              than living in bh's shiny happy communist
                              future.
        \_ Computer Science Logo Style - http://www.cs/~bh
                \_ Computer Science != Programming
                    \_ On the other hand, understanding CS makes you a
                       better programmer...
                        \_ Not necessarily.  Most CS grad students have no
                           ability to write code that actually gets used.
                           \_ Whereas those REAL MEN out in the REAL WORLD
                              ALWAYS write code that's a paragon of efficiency,
                              safety, and reliability!  Ask those satisfied
                              Therac-25 customers!  I'm sure that most
                              "developers" out there have no ability to write
                              code that actually gets used (but are doing it
                              anyway).  How can being a programmer _and_
                              having CS theory clue hurt?
                                \_ Safe, efficient and reliable? No, it meets
                                   the ship deadline in a sufficiently working
                computer science --> research, development, design architecture
                                   condition.  Stock price rises.  Bonuses all.
                           \_ Programmers who do not know computer science
                              are not very useful.  Would you want to use
                              a program written by someone who never bothered
                              to learn all that high falutin' stuff about
                              big O notation, quick sort, binary trees, etc?
                              Any fool can write a program, compute science
                              is for writing a robust, fast, efficient
                              program which can be maintained and extended.
                              \_ Yeah, but in the days of M$oft bloatware,
                                program efficiency doesn't count for shit.
                                Programs are developed to optimize development
                                time.  Doesn't matter how good your code is
                                if someone else is dominating the market
                                months before your product is even done. -ERic
        \_ Programming Perl.
        \_ i remember starting out with basica and gwbasic, I think that's
           better then diving into Scheme or LISP.  maybe visual basic is
                it too is not very useful to know.  -lila
           a good start?  good luck.
           \_   you are on fucking crack.  there is no reason to learn basic.
                scheme is actually a very nice introductory language, though
                it too is not very useful to know unless you are an elite
                emacs user.  (though it brings a warm fuzzy feeling to me,
                personally.)  -lila
                \_ Does lila know less about programming or emacs?
                \_ I agree with you that scheme is a good introductory
                   language to teach computer science.  However, programming
                   in scheme requires you to think in terms of
                   "functional programming".  Most people are not used to
                   this so it might be easier to learn something else first,
                   even though scheme teaches computer science better.
                   \_ Well, uh, most people aren't used to _any_ type of
                      programming philosophy when they start programming, and
                      it's not like BASIC is intuitively easier or anything.
                      Everybody has to start somewhere, and they might as
                      well start in the right place.  I think that the only
                      reason people still recommend BASIC for anything is
                      because of their misty far-away fond memories of when
                      they were learning to hack on their Apple ][ or C-64,
                      and it was the only thing available . . . "I started
                      out this way, so you should, too."  -- kahogan
                      \_ _i_ started with scheme and bh, so you should too.
                         nyah nyah.  -lila
                        \_ So did I.  Now look at me.  It launched me
                           on an incredibly profitable career doing
                           miscellaneous computer stuff based on things
                           I learned while trying to restart my netrek
                           client, which is all I did during CS60A because
                           it was so incomprehensibly boring :)  -John
                        \_ I'm sorry.  That's a terribly way to start.  Did
                           you ever recover?      \_ shut up, cmlee.
                                \_ I want cmlee's anus.  Madly.  I love its
                                   tight puckered (slightly brown) rosebud
                                   wrinkles.  Ooh, the smell of it!
                      \_ I started with basic, then learned C, then Scheme,
                         and even though Scheme was harder than basic I got
                         more out of it than the other two combined.
        \_ I think Java is a good start to beginning programming.  It's easy
           to learn.  After that can jump right into C/C++.
           \_ Teach computer science, not programming.
                programming      --> sys admin
                computer science --> research, development, design architecture
                        \_ Sys admins don't program.  They only setup,
                            configure, and maintain systems.
                           \_ ooh you're so eleet.  I'm sure it's never
                              necessary to write a program to maintain a
                              system.
                                \_ Agree with you...but try convincing to
                                   those hiring managers who are recruiting
                                   "programmers" or "developers" if you are
                                   a sys admin.
                                   \_ As a sysadmin, I can't imagine why I'd
                                      *every* want to be a full time
                                      programmer.  The very idea baffles me.
        \_ WTF would someone want to learn to program, anyway?
           Waste of time, IMHO.
           \_ Be a slob.  Write everything in shell scripts.  Spend rest
              of time saved by not learning to program with netrek.  Cheer.
                -John
1998/5/5-6 [Computer/SW/Languages/C_Cplusplus] UID:14053 Activity:very high
5/5     Who is the Asian chic with big boobs on
        /home/s/sameer/public_html/pictures? I think she's kinda hot.
        \_ peterm in drag
        \_ my friend and I are having a debate. I think she's cup C. He
           thinks she's cup B. What do you think?
                \_ i would say B cup.  this is the opinion of a C cup female.
                   \_ Sign your name, twink.
                                \_ identity or lack thereof in this matter is
                                   quite irrelevant.  i think you just wanna
                                   know what soda chicks are C cups.  -lila
           \_ I think she's cup B.  I've had "hands-on" experience on cup D
              and cup A, and this one looks closer to A than D.  Of course
              I dare not sign my name. :-)
        \_ I also say B, based on the other pictures. From the first one,
           it could be B or small C, but the latter ones clearly show B.
           What does it matter? They're still nice. --dim
        \_ Cup size does depend on rib-cage size.  I'm a 36A or 34B.  Same
           cups, but the 36 ones are set a little farther apart from one
           another.
        \_ Can I get there from his home page?
                \_ just download the pix, d00d.
           \_ What?  I thougth all A's are the same and all B's are the same.
              So you mean the cup of a 38B can actually be bigger than that
              of a 32D, etc.?
        \_ wow nice pictures of sameer in bondage, where the ONLY place
           he gets it.
        \_ Wow!  Some kind of sex party?
        \_ Who is this sameer guy anyway?
        \_ Most women would glad not to be CSUA members if they saw this.
           \_ You mean B/D with a crypto god wouldn't turn every sodawoman on?
        \_ it's lumchan
1998/4/20-21 [Computer/SW/Languages/C_Cplusplus] UID:13988 Activity:high
04/20   I'd like to have C/C++ macro which would replace any comma
        seperated list of variables with an expression which uses those
        variables.  For example:
        DO_SOMETHING(a,b,c,d) becomes=> expression a,b,c,d
        DO_SOMETHING(a,b) becomes=> expression a,b
        In other words, I don't know how many variables may be used ahead
        of time.  Any ideas?
        \_ Just what we need, wannabe C programmers want to write stuff
           the langauge doesn't support.
        \_ Use Perl, you idiot.
        \_ this problem is a trival one.  just make your DO_SOMETHING
           a function that takes varargs.
           \_ Thought of that, but it needs to deal with declarations.
              Also, I'd like to be able to expand MACRO(x,y,z) to be:
              A::x = f();
              A::y = f();
              A::z = f();
              Where x,y,z are static const members.
        \_ What about instead of D(a,b,c,d),
           #define DO_SOMETHING expression
           Then you can just use:  DO_SOMETHING a,b,c,d
1998/4/13 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:13946 Activity:nil
4/11    For a project, I need to convert a .bmp into a 2D array of numbers
        that represent each color. For example, say I have a 20x20 pixel
        .bmp with 256 colors. I need a 20x20 array holding values from 0
        (white) to 256 (black). Can anyone point me in the right
        direction? Any help would be greatly appreciated. -jkwan
        \_ Assuming you want to automate this (do it tons of times non-
           interactively, I'd suggest:  use ImageMagick (ick) to convert
           them to .xpm, which is acii format roughly how you describe,
           but with it's colormap specified first.  You could then do some
           perl on that to get what you want --dbushong
        \_ I suggest you go and get information on bmp file format.  There are
           already c libraries that reads bmp file header and data for on
           the internet.  I have a game book that came with a CD rom with all
           bmp classes.  So, I assume you get it from the internet.
1998/3/31 [Computer/SW/OS/Windows, Computer/SW/Languages/C_Cplusplus] UID:13881 Activity:very high
3/31    I should have went to CSU Hayward instead of Berkeley. This way, I can
        get my bachelor of SCIENCE in computer science and get discount on my
        auto-insurance. Because Berkeley gives bachelor of ART in computer
        science, people (ie. insurance) tend to fuck me around more.
        \_ Try EECS option C then.  BTW, eventhough I have a B.S. degree,
           I still pay tons of insurance(2200/year!).  Insurance
           rips you off no matter what degree u have.
        \_ Ride bike, and try to enjoy life and be less bitter.
        \_ Can't take a chick out on a date on a bike. Oh, then you must
           mean motorcycle.
           \_ Use a tandem.  If she doesn't ride, she's not worth your
              time anyway.
        \_ How did a moron like you even get accepted, let alone graduate,
           from Berkeley? You're right, you should have gone to CSU
           Hayward. I'm amazed there are people like this at Cal. --dim
        \_ CSU Hayward doesn't have the UCB CS department.  If you want to go
           to college "just to get a degree", go ahead and go there.
        \_ Get a mail-order BS for just these occasions, then.
1998/3/31-4/1 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:13877 Activity:kinda low
3/30    Anyone using Stroustrup's The C++ Programming Language, 3rd ed?
        I can't get the example code to compile, p61, the one about
        iteraters. gcc doesn't even recognize #include <iostream> and
        I was able to get the code to almost compile under VC++ 5.0 with
        one final error, cannot convert parameter... for the vector line.
        any hints? Thanks a lot.
        \_ a)  gcc doesn't even really support a lot of Stroustrup 2nd ed
           features.  Come to think of it, most C++ compilers are broken
           in one way or another.
           b)  Try #include <iostream.h>
        \_ C++ is dying.  Anyone know of a hugely successful commercial app
           written entirely in C++?  Netscape is written in C.  IE is written
           in C.  All of Windows API are in C.  So are the X windows API.
           C++ zealots, drop dead and die.
                \_ iostream.h doesn't provide namespace, etc.
        \_ troll deleted
        \_ gcc does not support STL.  iostream.h != iostream, the latter
           is an STL thing - android
        \_ so which compiler did Stroustrup use??#@$
           \_ I'm not sure if one exists.  C++ is in such a B0rKen state
              semantically, and I'm not sure if the ANSIfication won't make
              the problem worse.  I doubt you will see compilers
              properly supporting the whole standard for at least a year
              after the "standard" is formalized.
1998/3/25 [Science, Computer/SW/Languages/C_Cplusplus] UID:13858 Activity:nil
3/24    International Semiconductor Technology is looking for Java/C/C++
        programmers. Nowhere do I see jobs where I'm more appropriate, and this
        is true with a lot of companies nowadays. What the hell is going on?!?!?
        \_ You've become irrelevant.  Report to your nearest re-education
           camp to be re-engineered to new core competencies.
           \_ Will going to grad school just for a year or two and get an MS
              help?
                \_ That's a waste of time and money. Yeah go ahead.
              \_ Only if you learn something there.
1998/3/18-19 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:13828 Activity:high
3/18    looking at mi professors and tas and manager resumes, these people dont
        know how to c0de shit in perl and c/c++ and shell and java, yet they
        make/will make more $ than me, what the fuck?
        \_ I have actually heard a manager refer to programmers, unflinchinly,
           as "unskilled labor", by which I think he meant disposable/inter-
           changeable or something.   Im not sure
           \_ It depends on what kind of application you develop.  I would
              not call people developing optimized 3d game engine or
              financial application "unskilled".
              \_ No, people who develop financial applications are unskilled.
                 Gamers are pretty cool, though.
        \_ demand for a raise and see how high you can go
        \_ Because coding is for kiddies.  You can teach any idiot how to
           code.  It really isn't that hard.  Look how many idiots are doing
           it right now.  No PhD required.  If you wanted to make big bucks
           you went into the wrong field and now possess the wrong skills.
           Sorry, but you're pretty confused about the world and your career
           is already fucked.  Time to retrain I guess.
        \_ It doesn't matter anyway; when bh and his Communist GNU buddies win,
           you'll all be writing code for free.  (Hope you like doing
           support . . . )
                \_ POT STICKER POWER!  YEE HAA!  Actually I'm glad we have
                   self appointed victims like the FSF/GNU people but I
                   wouldn't want to be one.
                \_ If it weren't for GNU cc, our lives would REALLY be
                   fun. (you, yes you, could write your projects using
                   ULTRIX cc!) I, for one, am rather thankful to have
                   cross-platform tools that *work* for a change... -brg
                   \_ I did.  Thanks.  Wasn't much different except the
                      code ran a tiny bit faster.
1998/3/14 [Computer/SW/Languages/C_Cplusplus] UID:13808 Activity:nil
3/13    How would you find out what current path you're on in C, without using
        char *getenv()? When I invoke a C cgi-bin through httpd, the variable
        PWD is not set, thus I cannot use getenv. Thanks!
        \_ getcwd
                \_ motd god you saved my life again. THANK YOU!!!
1995/3/4 [Computer/SW/Languages/C_Cplusplus] UID:31784 Activity:nil
3/3     I need advice : Which do you go for when choosing between nice beautiful
        C++ code which may not run as fast, or quick dirty C-type hack code that
        runs about 10% more efficiently?
        (Time is important, but so are aesthetics)  -bwli
        \_ C >>>> C++
           \_ in the same way that Fortran >>>> C.  Get a clue.
         \_ no, in the same way kludgy >>>> way fuckin' kludgy
        \_ If the 10% more efficient is critical to the project, then
           you don't have much choice, but if it is not critical then
           a decent programmer wouldn't hack it into dirty C-type code.
           \_ Thanx -bwli
        \_ If your C is so ugly, why do you think you can make your C++
           so beautiful?
          *\_ Hey, beauty is in the eye of the beholder.  Actually, I was
           exagerating (on both ends) to make it more interesting. -bwli
        \_ I find it significant that Clancy seems to be the only professor
           that even condones C++, let alone likes it (as far as I know).
           \_ Berkeley is heavily invested into C, that's not surprising.
           People who run IBM mainframes like COBOL, too.
          \_ OO is just higher order functions with dynamic
             binding of methods. use Lisp or ML
        \_ yup, assembly's the way to go. :)
        \_ WTF is beautiful C++ code ???
           \_ Please see above (~ 10 lines *).
         \_ there is no such thing
        \_ Real programmers don't use damn languages.  Just type:
            cat - > mybin
          \_ I don't even do that, I write out my 0s and 1s on paper (in pen)
          and then run the program in my head.
          \_ C++ is to C as:
        a) a parasite is to a host organism
        b) lung cancer is to a lung
        c) theod0rk is to soda
        d) Micro$oft's BOB is to operating systems
        e) all of the above

      _            _ _     _                   _
          __| | ___  _ __( ) |_  | |_ ___  _   _  ___| |__    _ __ ___  _   _
         / _` |/ _ \| '_ \/| __| | __/ _ \| | | |/ __| '_ \  | '_ ` _ \| | | |
        | (_| | (_) | | | || |_  | || (_) | |_| | (__| | | | | | | | | | |_| |
         \__,_|\___/|_| |_| \__|  \__\___/ \__,_|\___|_| |_| |_| |_| |_|\__, |
         |___/
      _ _      _          _ _
          __| (_) ___| | ___   _| | |
         / _` | |/ __| |/ / | | | | |
        | (_| | | (__|   <| |_| |_|_|
         \__,_|_|\___|_|\_\\__, (_|_)
             |___/
           \_ Even if I could find your insignificant member, I wouldn't
              touch the thing.
1995/2/9 [Computer/SW/Languages/C_Cplusplus, Computer/SW/SpamAssassin, Computer/SW/Unix] UID:31751 Activity:nil
2/9     Christ on crutches, Spamter & Siegel are at it again...

        Spam them hard, flood-ping 'em, mail 'em /dynix
        That's http://cyber.sell.com, 199.98.145.99 -- floodping away.
        Also send em some false positives just to make the
        signal-to-real-signal ratio unbearably low
        \_ I didn't see it.  Did Robo take them out again?
           In any case, the subject alone seems fradulent.
        \_ here's the orig header.  is forged.  hit every group.  -hh
Path:
http://geo1.geo.net!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!caen!zip.eecs.umich.edu!panix!not-for-mail
From: ccapc@cyber.sell.com (Consumer Credit Advocates)
Newsgroups: alt.cesium
Subject: <ad> GUARANTEED CREDIT REPAIR BY LAW FIRM
Date: 9 Feb 1995 03:14:19 -0500
Organization: Consumer Credit Advocates, PC
Sender: ccapc@panix.com
Approved: postmaster
Message-ID: <3hcisr$t3p@panix.com>
NNTP-Posting-Host: http://panix.com
        and check out:
[soda] /~> fm ccapc@panix.com
[panix.com]
Login name: ccapc                       In real life: David Markowitz
Directory: /net/u/11/c/ccapc            Shell: /net/u/11/c/ccapc/spamsh
Last login Thu Feb  9 04:15 on ttypd from ts2.nyc.access.n
Plan:
This account has been disabled.  It was a trial account and was
used to spam netnews.  Our apologies.
         -hh
1994/6/9 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Editors/Emacs] UID:31618 Activity:nil
6/8     M-x center-ikirus-doc will center the entire buffer with value of the
        fill-column OR with the value you give it with C-u, if you specify
        something. It is bound ot M-q for ikiru, but the rest of you get it
        interactively-callable. sigh. --mr. emacs
        \_ don't forget to get your cookies.
         \eh, what cookies? what are you talking about? --psb
          \_ read the wall log
           \-searching for cookies returns no hits.
            \_ sounds like psb lost his cookies
1994/5/24 [Computer/SW/Languages/C_Cplusplus] UID:31609 Activity:nil
5/23    It seems that C&S have an account now at CRL. This brings them
        into the CSUA web of influence and control. wheeee
        \_ What's C&S? \_ Preemptive "Get a clue" included here.
        \_ But no more netcom for them!  Doesn't matter: no water ads yet
        \_ Get a Q, not a Qlue... C&S = Canter and Siegel, assholes
        \_ Hmm...Green cards must not be profitable these days for them to
           go into the thigh cream industry (:
        \_ the CRL admins know about them, and WILL squish them when/if they
           step out of line.
           \_ I believe they should be preemptively squished. BTW, what is
              the CSUA <-> CRL connection? Also, where does NAMBLA and the
              Trilateral Commission fit in? -gojomo
1994/2/14 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Unix] UID:31485 Activity:nil
2/13    GNU c++filt installed to demangle g++ link errors. -alanc-
1993/12/10 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Unix] UID:31438 Activity:nil
12/9    Anybody know of a good book on Unix network programming?  --SMurF
                                       ^^^^^^^^^^^^^^^^^^^^^^^^
        I believe that there is a book by that name...  -- marco
        \_ There is.  It and another good (but expensive) book called
        "Advanced Programming in the UNIX Enviroment" were written by
        Richard Stevens and are highly recommended. (Adv. Prog. isn't
        all that advanced.  If you've had 60b&c and know C pretty well
        you're probably ready for it)
         \_ yes, both are excellent reference texts. I highly
            recommend them. --vchang
1993/10/11 [Computer/SW/Languages/C_Cplusplus] UID:31411 Activity:nil
10/10   Would any of you 'C++' gurus know how to solve a problem I've
        been having?
        I'm compiling a rather large database program I created
        using Borland C++ for DOS (large memory model) and though
        it runs fine on my 486, it will not run properly on my 286.
        Strange things are happening, for instance 184.25 - 184.25
        suddenly equals -8.25.  This is obviously a problem with
        floating point variables that the mathco on the 486 is taking
        care of, but I have no idea how to fix it.  Any help would
        be appreciated.
        \_ try compiling it in 286 mode maybe?
          \_ I have been compiling it in 286 mode.  I have also tried
             compiling it in 8086 mode, and that doesn't help either.
             I am currently using the "floating point emulation" flag.
             Is that more clear?
1993/8/10 [Computer/SW/Languages/C_Cplusplus] UID:31379 Activity:nil
8/10    possibly buggy M-x wallall installed. Puts you in a compose buffer
        and C-c C-d anywhere sends it off. May hang if you are wallall -y
        in starting shell, but that is not an emacs problem. Also M-x wall
        still monitors the wall_log and M-x get-old-wall [0-7] exist.
        bugs and suggestions to me. --psb
2024/11/23 [General] UID:1000 Activity:popular
11/23   
Results 1 - 150 of 415   < 1 2 3 >
Berkeley CSUA MOTD:Computer:SW:Languages:C_Cplusplus:
.