2009/4/24-28 [Computer/SW/Languages/Functional] UID:52902 Activity:nil | 4/23 what book is this?
"I'm reading this horrible horrible book about a programmer
from silicon valley that gets magically
transported into some world where magic is real
and uses computer programming skillz to become the world's
greatest sorceror … in book 1 of the series
...
|
2008/4/2-6 [Computer/SW/Languages/C_Cplusplus] UID:49645 Activity:moderate | 4/2 Is there an interpreted version of C or C++ that can be used for
educational purposes? It doesn't have to be full-featured or
strictly adhere to the standards, but it's painful for students
to change a variable in a for loop and then wait for a compile
to see how it changes the result. Something really lightweight
would encourage them to play around a lot more and learn more in
...
|
2007/8/30-9/3 [Computer/Theory] UID:47837 Activity:nil | 8/30 what AI is editing the motd? that's some next level shit.
\_ Sorry. -- ilyas
\_ ilyas -> i l y a s -> s l y a i -> Sly AI
\_ ilya shpitser -> lisp hysteria
...
|
2007/3/7-11 [Computer/SW/Editors/Emacs] UID:45897 Activity:moderate | 3/7 In emacs 21, is there a way in Emacs-Lisp to detect whether emacs was
started with the "-r" switch? In C mode, the syntax colors are
different when I start emasc with and without "-r". I want to do the
same in my elisp code, but I can't find how this is done in cc-mode.el.
Thanks. -- yuen
\- are you sure what you are talking about is being done by the cc*.el
...
|
2006/8/11-14 [Computer/SW/Languages/Perl, Computer/SW/Languages/Functional] UID:43974 Activity:low | 8/11 How do you find out the max # of file descriptors for a process,
thread, and entire system?
\_ Dep on OS. Are the youth today assuming "linux is the standard"?
That is kinda sad.
\_ LINUX RUUULES! W1ND0ZE DR000LEZ!
\_ while(true) { do(something that uses a fd) if (good rc) counter++; print }
...
|
2006/2/21-23 [Computer/SW/Languages/Java] UID:41939 Activity:nil | 2/21 What is the best way to get the current method name in Java? So far
I have seen 3 approaches:
1. Create new Exception, grab the first frame off its stack trace.
Inelegant, requires creating a stack trace (expensive).
\_ Yeah it sucks. Yeah it does much more work than you need.
Yeah it is really fragile and may break when you switch java
...
|
2005/7/15-18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:38653 Activity:moderate | 7/15 Is it possible through JNI to write a function which takes a float[]
array and through the magic of c casts it to an int array and then
returns the int array to Java, not modifying the actual data?
If not, is there a good Java way to do the C equivalent of:
int* i = (int*) f; ?
Don't ask whether I really need to be doing this because there is a
...
|
2005/6/21-23 [Computer/SW/Languages/Perl] UID:38230 Activity:high | 6/21 My math and/or perl fu is weak. Is there a way to get integer
multiplication in Perl the way it's done in C? i.e. limiting
to 32 bits. Like 1588635697 * 1117695901 = 1166976269 in C.
\_ Can't you just multiply and then mask all but the last 32 bits?
\_ I don't think so; that's not the same as mult overflow.
> perl -e 'print (1588635697 * 1117695901)'
...
|
2004/9/9-10 [Computer/SW/Languages/OCAML, Computer/SW/Languages/Perl] UID:33448 Activity:high | 9/9 Why are there so much politics on the motd? Isn't this the
CSUA? Doesn't the C stands for something computer??
\_ Its stands for Computer Stuff and Unrelated Arguing
\_ Golf clap.
\_ I didn't know there even was such a thing as a golf ho,
and you're telling me they've got their own VD's?
...
|
2004/7/1-2 [Computer/SW/Unix] UID:31106 Activity:insanely high | 7/1 Using sed, how do I do the following? I want to replace the
first line containing a particular pattern with the 2nd line
containing said pattern. For example, if "line" is the pattern,
then I want
this is the 1st line
this is the 2nd
...
|
2004/6/25-26 [Computer/SW/Languages/Java] UID:31013 Activity:insanely high | 6/25 What percent of security holes would be solved by banning strcpy()
in favor of strncpy()?
\_ probably not much, since they're all coming to be php bugs these
days.
\_ Or using Java instead of C (no buffer overrun)?
\_ It is not always possible to use java. I have customers
...
|
2004/5/21-22 [Computer/SW/Compilers] UID:30345 Activity:very high | 5/21 I was not a CS major and never took the compiler class. What is
a good book to help me write a compiler? And what about interpreter?
Do they basically involve the same issues except code generation and
optimization?
\_ Use the book by Robert Mak, called "Writing Interpreters and
Compilers in C++." It's a practical, hands-on "lab" type book which
...
|
2004/5/20-21 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/OCAML] UID:30334 Activity:insanely high | 5/20 I have seen some ocaml comments on the motd. What about Haskell?
Is it better/worse/about the same? I know it is supposed to "pure"
but don't know what this translates to in reality.
\_ Haskell is the only language I want to know something about, yet
know almost nothing about. I know it's not speedy, unlike ocaml,
but has lots of clean ideas, and you can write really short code in
...
|
2004/5/11-12 [Computer/SW/Languages/OCAML, Computer/SW/Languages/Functional] UID:30169 Activity:very high | 5/11 To FP activists on the motd, if currying is such a great idea, why
it's not implemented symmetrically in say Caml? It seems more
natural to treat the arguments of a function more symmetrically.
\_ If by 'symmetric' you mean that if, for example, I have a function
f of two arguments a and b, I should be able to curry on either
a or b, then Ocaml does this using labeled arguments. Caml does
...
|
|