Slashdot Mirror


User: maxwell+demon

maxwell+demon's activity in the archive.

Stories
0
Comments
12,279
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 12,279

  1. Re:Assumptions on 4 Prominent Scientists Say Renewables Aren't Enough, Urge Support For Nuclear · · Score: 1

    Yeah, those flat panels are so much worse than the old energy-sucking CRTs. And those better isolated houses are so uncomfortable ... </sarcasm>

    Your mistake is that you assume saving energy necessarily means using less energy. It can just mean letting less energy escape unused.

  2. Re:permissions on Edward Snowden's New Job: Tech Support · · Score: 1

    FWIW, nobody knows what's best for me but me.

    Really? Say there is some poisoned food, but you don't know that it is poisoned, and you are hungry. But someone else does.

    According to your claim, that other person should not stop you from eating that stuff, because after all, you know best what is good for you.

    OK, now you will say "ah, but that's just a lack of knowledge, if I knew what is in that food, I'd certainly decide not to eat it." So let's slightly modify the situation:

    You know quite well that there's cyanide in the food, but you believe cyanide would be harmless. The other person knows quite well that cyanide will kill you. So should that other person still stop you?

    OK, let's modify again: The person doesn't know that there's cyanide in the food, but only firmly believes it. Should she still prevent your from eating it?

    OK, make another slight change: She doesn't believe that there's cyanide in the food, but she believes that God will throw you in hell if you eat that food. Should she still prevent you from eating it?

    Now I'm pretty sure that in the first scenario you'd say "prevent" (thus violating your own rule), and in the last scenario you would say "not prevent". But where would you make the switch, and why?

    Things are simply not as simple as you want them to make.

  3. Re:Look up "Window" from WWII RAF tactics on Why NASA Launched Millions of Tiny Copper Wires In Orbit · · Score: 1

    I'm pretty sure he meant the Royal Air Force, not the Rote Armee Fraktion.

  4. Re:Too little too late on MELT, a GCC Compiler Plugin Framework, Reaches 1.0 · · Score: 2

    "Great" in this case means "non-GPL" (YMMV, of course).

    That's a very strange definition of great. Virtually everyone relates that word to features, intuitiveness, absence of annoying bugs, etc. That is, to properties of the IDE.

    And no, that's not a question of mileage, that's a question of proper use of the language.

  5. Re:Also, MetaMELT 0.3 on MELT, a GCC Compiler Plugin Framework, Reaches 1.0 · · Score: 1

    But how can you define defmacro using defmacro before you have defined defmacro? (And afterwards, it wouldn't make sense because it already is defined).

  6. Re:Thanks for the reminder! on Slashdot Asks: What Are You Doing For Hallowe'en? · · Score: 1

    Buying more iphones or macbook pros or what have you just because it's Halloween.

    Can you think of something that is more scary? ;-)

  7. Re:Hmmm... on Car Hackers Mess With Speedometers, Odometers, Alarms and Locks · · Score: 2

    If your speedometer shows a higher speed than your real one, then whenever you are too fast, your speedometer will be showing a too high speed, and therefore you cannot claim not to have known that you have been too fast. However I'm not so sure what the ruling would be if the speedometer shows a too low speed (and it's not your fault for either negligence in getting the car serviced or proven active manipulation, and you weren't so much over speed limit that you should have noticed it even without reading the speedometer).

  8. Re:PC Lint anyone? on How Your Compiler Can Compromise Application Security · · Score: 1

    That is compiler and platform-independent, so there's no need to make separate tools.

    Actually, it's not completely platform independent. For example, does the following code produce undefined behaviour?

    int i = 256;
    i = i*i;

    On a 16 bit platform, it does. Of course, 16 bit platforms are basically obsolete (at least for desktop/server software; I'm not sure if there are embedded systems still using 16 bit architectures), and on 32 bit or 64 bit platforms, it will work fine.

  9. Re:-Wall on How Your Compiler Can Compromise Application Security · · Score: 1

    To be honest, in this situation I would like the compiler to inform me that it had eliminated some code as it is probably not what I meant. Why not write it like this instead?

    int foo(int a, unsigned int b)
    {
    a+=b;
    return a;
    }

    Then in the calling code:
    int *a;
    unsigned int *b;
    *b=10;
    *a = foo(1,*b);

    I understand that this is a simple example, but I prefer to write my code like this as it ensures that the pointers are only dereferenced within the scope in which they are declared.

    I can tell you at least one reason why you wouldn't want to write the code you did: Your assignment to *b is undefined behaviour because you never initialized b.

  10. Re:TFA does a poor job of defining what's happenin on How Your Compiler Can Compromise Application Security · · Score: 1

    I like even more the fact that, given that a diagnostic is sometimes required, but never disallowed, and the text of a diagnostic is not regulated, a conforming compiler may just output on every compilation:

    warning: This program might contain errors.

    Useless, but completely conforming.

  11. Re:TFA does a poor job of defining what's happenin on How Your Compiler Can Compromise Application Security · · Score: 1

    int avg(int a, int b)
    {
      return a/2 + b/2 + (a%2 + b%2)/2;
    }

  12. Re:TFA does a poor job of defining what's happenin on How Your Compiler Can Compromise Application Security · · Score: 1

    Isn't right shift for negative values implementation defined? So your code may work on some platforms, but not on others.

  13. Re:News flash on How Your Compiler Can Compromise Application Security · · Score: 4, Interesting

    While what you say is true, I think it's not what they mean. Instead what they mean is compilers taking advantage of undefined behaviour you didn't notice. The compiler is allowed to assume that undefined behaviour never happens, and optimize accordingly. The important point is that this can even affect code before the undefined behaviour would occur. For example, consider the following code, where undefined() is some code that causes undefined behaviour:

    if (a>4)
    {
      a=4;
      big=true;
      undefined();
    }
    else
    {
      big=false;
    }
    assert(a<=4);

    Now if a>4, the code inevitably runs into undefined behaviour, and therefore it may assume that a is not larger than 4 right from the start. Therefore it is allowed to compile the complete block to simply

    big=false;

    Note that even the assert doesn't help because the compiler "knows" it cannot trigger anyway, and therefore optimizes it out.

    I think it is not hard to imagine how this can lead to security problems.

    Another nice example (which I read on the gcc mailing list quite some time ago; not an exact quote though):

    bool validate_passwd(char const* user)
    {
      int tries = 0;
      char const* given_passwd = ask_password();
      char const* user_passwd = get_password(user);
      while (strcmp(given_password, user_password))
      {
        tries = tries++; /* undefined behaviour! */
        if (tries > 3)
          return false; /* allow only to try three times */
        printf("password not valid. Please try again.\n");
        given_passwd = ask_passwd();
      }
      return true;
    }

    Now if strcmp returns anything but 0, the code inevitably runs into undefined behaviour, therefore the compiler is allowed to assume that never happens, and therefore is allowed to optimize the code to simply

    bool validate_passwd(char const* user)
    {
      char const* given_passwd = ask_password();
      char const* user_passwd = get_password(user);
      return true;
    }

    So there goes your password security.

  14. Re:Irony not lost on me on GCC 4.9 To See Significant Upgrades In 2014 · · Score: 1

    I did not claim that I'd be allowed to distribute the binary without source. Rather I claimed that if I distribute the binary, then I distribute code, and therefore I'm then bound to the GPL which then requires me to give also the source.

    Please read more carefully.

  15. Re:trains on Google: Our Robot Cars Are Better Drivers Than You · · Score: 1

    You should look at the Karlsruhe system. Local and regional trains that use the same tram tracks through the town.

    What part of "rural village" did you not understand? Not everyone lives in a town.

  16. Re:You want all your eggs in one basket? on Ask Slashdot: Where Are the Complete Hosting Providers? · · Score: 1

    If it is that critical, maybe the way to go is to host it at two different hosting providers.

  17. Re:So what should the family do? on How an Astronaut Falling Into a Black Hole Would Die Part 2 · · Score: 1

    Of course we can get some angular resolution. However consider that for a shadow, the signal strength is roughly the shadowed area over the total area of your pixel. For 0,05 arcsec (according to Wikipedia, the best resulution VLA can reach, although probably not at the wavelength of the CMB) and a distance of 4 light years (about 4*10^16 meters; the distance to Alpha Centauri) this covers an era of about 9*10^19 m^2. On the other hand, a black hole of 1000 solar masses would have a radius of about 1500 km, that is, 1.5e6 m, which gives an area of about 2*10^12 m^2. Which would give a relative signal drop of about 2*10^-8. Note that this number goes down with the square of the distance, so at a more realistic distance of 400 light years, the signal drop for a black hole of the same size would be 2*10^-12. I strongly doubt that this would be above noise level.

  18. Re:Irony not lost on me on GCC 4.9 To See Significant Upgrades In 2014 · · Score: 1

    The binary is definitely code (indeed, it's the actual code). Therefore if I distribute a modified binary, I distribute modified code. Therefore that case is included in what I wrote.

  19. Re:Don't try to be more Catholic than the Pope... on GCC 4.9 To See Significant Upgrades In 2014 · · Score: 1

    If it's enabled by a speciality flag which documents the violation of the standard, then it's not broken. But if it's enabled by a generic -On option, I consider the compiler broken. And if the compiler doesn't explicitly document that the flag makes it non-conforming (yes, the documentation is part of the compiler, although it is not part of the executable), then the compiler is broken as well.

  20. Re:How would would he die? on How an Astronaut Falling Into a Black Hole Would Die Part 2 · · Score: 1

    even when it's a headline on one of the world's most visited sites.

    I wasn't aware that it was posted on Facebook. Or did you mean Twitter?

  21. Re:Way to proof-read the topic. on How an Astronaut Falling Into a Black Hole Would Die Part 2 · · Score: 1

    Chuck would chuck wood. And he would use that wood for making a ladder, which he then would use to climb out of the black hole.

    Which Chuck? Well, Chuck Norris, of course.

  22. Re:So what should the family do? on How an Astronaut Falling Into a Black Hole Would Die Part 2 · · Score: 2, Interesting

    Of course space isn't really black; rather it is completely transparent. It's the cosmic horizon behind it which is black. Actually at the horizon there's the glow of the big bang, but it is so heavily red-shifted that we only see it in the microwave range (the cosmic microwave background). Now in principle, when looking in the microwave range, black holes should be detectable as "microwave shadows". However I don't think we can measure microwaves in sufficient angular resolution for that.

  23. Re:Long before the event horizon on How an Astronaut Falling Into a Black Hole Would Die Part 2 · · Score: 1

    That depends on the mass of the black hole. A sufficiently large black hole will not spaghettify you outside the horizon.

  24. Re:Firewall? on How an Astronaut Falling Into a Black Hole Would Die Part 2 · · Score: 5, Funny

    Well, the firewall rules for a black hole are easy: You let every packet in, but none out.

  25. Re:So what should the family do? on How an Astronaut Falling Into a Black Hole Would Die Part 2 · · Score: 5, Informative

    and getting mass to 1/3 the speed of light is absolutely impossible

    FTFY: and getting mass to 1/3 the speed of light is currently impossible

    Actually, it's very possible; about every accelerator in the world does it regularly.

    Having said that, getting a macroscopic mass to 1/3 the speed of light is currently impossible. Well, at least when considered from the frame of reference in which it originally was at rest.