Slashdot Mirror


User: BigBadDude

BigBadDude's activity in the archive.

Stories
0
Comments
99
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 99

  1. Re:The good old shareware days on John Carmack's Cell Phone Adventures · · Score: 2, Funny

    Please dont use John Romero and feeling in the same line. Brings back bad bad memories...

  2. Re:Y'know on John Carmack's Cell Phone Adventures · · Score: 1

    He said at the bottom, and for what we know, that list could contain 6.2 billion names.

  3. Re:Another interesting misshap made by APB. on Anti-Piracy Bureau of Sweden Planted Evidence · · Score: 1



    didnt you just made the same mistake by posting the mp3 file to slashdot? :)

  4. Re:Rouge? on Anti-Piracy Bureau of Sweden Planted Evidence · · Score: 1


    this is slashdot, the land of truely geeks

    ok wait...

  5. In other news... on Classic Math Puzzle Cracked · · Score: 5, Funny

    "A decade ago, a self-taught computer genius from Finland [...] There's more on the Finish computer guy here."

    (I think you get the point)

  6. Re:I'm thinking... on Three Rings Releases Open Source Java Game Toolkit · · Score: 1

    not to mention SCO

  7. Re:you asked for it... on Will Sun's Java Go Open Source? · · Score: 2, Interesting
    Nop, you havent made a point. Unless your point was that there are always crappy programmers misusing OOP and Java.
    for(String s : new File(".").list() ) if(s.endsWith(".gz")) do_something(s);
    now, we just did something that does not have immediate support in the language, demonstrating the flexibility of Java. How easy is it to do that in your-favorite-programming-language ?
  8. correction on In-Game Advertising Coming to Anarchy Online · · Score: 1



    FUNCOM is Norwegian, not Swedish.

  9. Re:International relations on US to Pay to go to ISS · · Score: 1


    can someone explain to me what this list means?

    and where the hell is Macedonia?? Macedonia is a part of Greece, as far as I know.

  10. Re:Three? It's actually Five on Prince of Persia 2 On Store Shelves · · Score: 1


    but, that was like just in the beginning...

  11. java first? on JDK 5.0: More Flexible, Scalable Locking · · Score: 1


    dont know about first mainstream, but when it comes to a cross-platform threading model, i think ADA was first

  12. Re:I just RTFA... on Fun with Prime Numbers · · Score: 2, Informative


    check this one out:

    http://cvs.sourceforge.net/viewcvs.py/buddy/budd y/ src/prime.c?view=markup

    (there are zillions more, but this page was the one that i had in memory)

  13. Re:Why 3D? on 3D Election Results Map by County · · Score: 1



    http://www.princeton.edu/~rvdb/JAVA/election2004 /

  14. Re:"Expert Programmer" on Funniest IT Related Boasts You've Heard? · · Score: 1

    dear mr coward:
    of course you are an amateur programmer. not only that, you are not a very nice person either so i cant even think of you as an "project manager" since you are not a team player.

    I said the list is VALID. if you read the list from seperate places but write to it from a single thread you will be fine. This is the way, for example, the linux kernel worked before 2.3.

    now, if you want your list to also allow parallell writes, yes you need to lock the list first. but this is like BASIC programming stuff, you shoulnt be so porud for pointing it out if you were not an amateur.

    (from http://www.kernelnewbies.org/documents/kdoc/kernel -locking/lock-avoidance-rw.html)

    Avoiding Locks: Read And Write Ordering

    Sometimes it is possible to avoid locking. Consider the following case from the 2.2 firewall code, which inserted an element into a single linked list in user context:

    new->next = i->next;
    i->next = new;

    Here the author (Alan Cox, who knows what he's doing) assumes that the pointer assignments are atomic. This is important, because networking packets would traverse this list on bottom halves without a lock. Depending on their exact timing, they would either see the new element in the list with a valid next pointer, or it would not be in the list yet. A lock is still required against other CPUs inserting or deleting from the list, of course.

    Of course, the writes must be in this order, otherwise the new element appears in the list with an invalid next pointer, and any other CPU iterating at the wrong time will jump through it into garbage.
    [...]


  15. Re:"Expert Programmer" on Funniest IT Related Boasts You've Heard? · · Score: 1

    thank you my friend for those nice and warm words :(

    this shows how dumb these "expert programmers" really are.

    The code is thread safe becuase if you interrupt it at ant location, the list is still VALID. and that without using any monitors or semaphores.

    read Rusty's guide about locks in the linux kernel and you will understand what i am talking about.

    of course, you didnt get a thing of what I just said, huh?

  16. Re:"Expert Programmer" on Funniest IT Related Boasts You've Heard? · · Score: 1

    Oh my god, cant people even write a single list-insert without making a fool of themselves ?


    Item first = ... (first node in the list, could be null)

    // NOTE: thread-safe code (can you see it?)
    Item item = new Item();
    item->next = first;
    first = item;

  17. Re:Stupid stupid stupid. on Project Gutenberg Threatened Over PG Australia · · Score: 1

    this is what i get:

    Access Denied
    You don't have permission to access "http://www.georgewbush.com/" on this server.

  18. of course i wait !! on Do You Go Out to the Movies or Wait for the DVD? · · Score: 1

    ... until the DVD files are available on DC++.

    but that usually happens before the movies come out. so no, i dont wait. i stay home AND see the movie :)

  19. Re:Luckily, people don't seem to pay attention on Football Fans For Truth · · Score: 1



    just wondering,

    how much better is that Bush dude?

    (not that it does matter when it comes to politics)

  20. Re:the complete answer :( on Google's Math Puzzle · · Score: 1

    damn lameness filter. i want to be lame, dont you get it??

    #include <gmp.h>
    #include <stdio.h>
    const int LEN = 10, PREC = 30000, LIMIT = 10000;

    void approx(mpf_t out, int n) {
    mpf_t tmp1;
    mpf_init(tmp1);
    mpf_set_d(out, 1.0);
    mpf_set_d(tmp1, 1.0);
    for(int i = 1; i < n; i++) {
    mpf_div_ui(tmp1, tmp1, i);
    mpf_add(out, out, tmp1);
    }
    mpf_clear(tmp1);
    }
    void test1(const char *num) {
    int len = strlen(num);
    char buffer[LEN + 1];
    for(int i = 0; i < len - LEN; i++) {
    strncpy(buffer, num + i, LEN);
    buffer[LEN] = '\0';
    mpz_t n;
    mpz_init_set_str(n , buffer, 10);
    if( mpz_probab_prime_p(n, 10)) {
    gmp_printf("%Zd is a prime!\n", n);
    return;
    }}}
    int sum(const char *str) {
    int ret = 0;
    while(*str) {
    ret += (*str - '0');
    str++;
    }
    return ret;}
    void test3(const char *str) {
    int x = sum("7182818284");
    int len = strlen(str);
    char buffer[10 + 1];
    int j = 0;
    for(int i = 0; i < len - LEN; i++) {
    strncpy(buffer, str + i, LEN);
    buffer[LEN] = 0;
    if(sum(buffer)== x) {
    printf("%d. %s\n", ++j, buffer);
    if(j > 4) return;
    }}}

    int main() {
    mpf_set_default_prec(PREC);
    mpf_t a;
    mpf_init(a);
    approx(a, LIMIT);
    char buffer[10240], *input = buffer;
    gmp_sprintf(input, "%.10220Ff", a);
    input[1] = input[0]; input++;
    test1(input); // test2(input);
    test3(input);
    return 0;}

  21. the complete answer :( on Google's Math Puzzle · · Score: 1


    took me 15 minutes to break it. lets see if the lameness filter likes it...

    NOTE: include gmp.h and stdio.h, link with gml
    const int LEN = 10, PREC = 30000, LIMIT = 10000;

    void approx(mpf_t out, int n) {
    mpf_t tmp1;
    mpf_init(tmp1);
    mpf_set_d(out, 1.0);
    mpf_set_d(tmp1, 1.0);
    for(int i = 1; i 4) return;
    }
    }
    }

    int main() {

    mpf_set_default_prec(PREC);
    mpf_t a;
    mpf_init(a);
    approx(a, LIMIT);

    char buffer[10240], *input = buffer;
    gmp_sprintf(input, "%.10220Ff", a);
    input[1] = input[0]; input++;
    test1(input); // test2(input);
    test3(input);
    return 0;
    }

  22. i think there is a place for both movies on War of the Worlds Remake Already Shot Overseas · · Score: 3, Insightful



    spielberg will probably make yet another blockbuster.

    and that other dude will do a great movie without the overused hollywood cliches...

  23. Re:Remember when C# came out... on Java 5 RC Available, Gold Targeted for this Month · · Score: 0

    most of the stuff you mentioned had been planned to be included in the next releases of java long long time before C# was born.

    I use both Java and C#. And to me it looks like Microsoft put every possible feature into C# without thinking so it could say "look, unlike Java, C# has xxx and yyy".

    as a whole, the java implementations are much more usefull in practice (and less dangerous)

  24. Re:autoboxing ? on Java 5 RC Available, Gold Targeted for this Month · · Score: 5, Insightful


    ok, wait.

    how much time do you save for writting

    int i = e.next();

    instead of

    Integer ii = (Integer)e.next();
    int i = ii.intValue();

    probably few mintues per working day. I am not sure if this makes you code more clear because most of the time when you put something in a List/Array/whatever, you want to change its value and you cant do that with an automatically boxed type:

    e.next() ++;

    will simple not do what you intended so you will have to go back to casting Integers again. now THIS mixed use of two different methods will make you coding unreadable.

  25. autoboxing ? on Java 5 RC Available, Gold Targeted for this Month · · Score: 4, Interesting



    why is autoboxing so darn important to some people??

    i will probably never use it because if i want a hash-table of integers or a binary-tree of doubles, i will write it myself with the native types. it is faster, and eats less memory.

    the whole idea of hiding complexity by converting int to Integer and vice versa automatically is kinda scareing.

    not to mention the waste of memory for creating those stupid wrapper objects...