Slashdot Mirror


User: ggvaidya

ggvaidya's activity in the archive.

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

Comments · 904

  1. Re:300 Years? Feed Those Pigeons! on 300 Years to Index the World's Information · · Score: 1

    Well, pigeons is an improvement over snakes. On the other hand, as a camel devotee, I think your parrot idea has much to commend it ...

  2. Re:Please Warn When Linking to The Register on No Office Suite Google · · Score: 1

    Heh. After I saw the picture and read the last paragraph ('Not of a word of that is true - but feel free to speculate anyway in 4,500 word blog post headlined "Google's Next Move"'), I had to go back to the top and check that it wasn't a joke/The Onion article.

    That said, Slashdot conversation has always struck me to be a lot like bar talk: a lot of people shouting all at once, with some people shutting up once in a while to let some other (higher moderated) people have the floor, lotsa war stories, fistfights, and attempts at humour with various degrees of success. So linking to a website like that *from here* might not be such a bad idea after all ;)

  3. Re:wtf? on Protothreads and Other Wicked C Tricks · · Score: 5, Informative
    Okay, I'll try and see if I can figure this thing out (you have to admit, it screws with your mind just looking at it ...):

    You can implement a simple memcpy function like this:
    void copy(char *from, char *to, int count) {
      do {
          *from++ = *to++;
          count--;
      } while(count > 0);
    }
    So far, so good. Now Duff's problem was that this was too slow for his needs. He wanted to do loop unrolling, where each iteration in the loop does more operations, so that the entire loop has to iterate less. This means the 'is count > 0? if so, go back, otherwise go on' part of the loop has to execute fewer times.

    Now, the obvious problem with this is that you don't know how much you can unwind this particular loop. If it has 2 elements, you can't unwind it to three elements, for instance.

    This is where Duff's Device turns up:
    int n = (count + 7) / 8; /* count > 0 assumed */
     
      switch (count % 8)
      {
      case 0: do { *to = *from++;
      case 7: *to++ = *from++;
      case 6: *to++ = *from++;
      case 5: *to++ = *from++;
      case 4: *to++ = *from++;
      case 3: *to++ = *from++;
      case 2: *to++ = *from++;
      case 1: *to++ = *from++;
            } while (--n > 0);
      }
    First, we check to see how much we can unroll the loop - for instance, if count is perfectly divisible by 5, but not 6, 7, or 8, in which case we can safely have 5 copies inside our loop without worry that the copy is going to move past the end of the array. Then - and here's the magic trick - we use switch to jump into a do loop. It's a perfectly ordinary do loop; the trick is entirely in the fact that if count==6, for instance, then C considers the do-loop to begin at 'case 6:', causing 6 copies of '*to++ = *from++' to be executed before the 'while' returns the loop position to the 'case 6:' point which is where, as far as C is concerned, the do-loop began.

    Thus, the loop is unwound to a level that it can handle.

    I think.

    Feel free to correct/amplify/mock. :)

    cheers,
    Gaurav
  4. Re:How is this a confirmation? on Google Declares War on Microsoft · · Score: 4, Funny

    Yeah, that's what I thought too, but you've just gotta read between the lines! From the first link:

    GOOGLE HAS confirmed that it will ... take on Microsoft. ...

    The other day, when Sun's Scott McNealy and ... Google ... met up, ... wary ... point blank, McNealy said ... was something to be investigated. However Sun's Australian spokesman Paul O'Connor was a little more forthright ... he ... bubbled ... wa[r]s ... for Microsoft.

    See, there ya go!

  5. Re:Wait for it... on When to Leave That First Tech Job · · Score: 1

    Thanks, tktk! :)

    /quits ggvaidya

    (p.s. mods - parent is FUNNY, not offtopic ...)

  6. Re:Slashdotting In Action on When to Leave That First Tech Job · · Score: 1

    Your wish is my command.

    Anything else I can do you for?

  7. Re:FIST SPORT! on When to Leave That First Tech Job · · Score: 5, Funny
    Got fired from work?

    1. Write an article on your situation
    2. Get the link posted to Slashdot
    3. Watch as the server sets itself on fire!
    4. ...
    5. Loss!
  8. Funny, the first thing which I thought was ... on 20 Million Year Old Spider Found · · Score: 1

    Oooh .. Ahhh .. That's how it always starts. Then later there's running ... and screaming ... and bug spray ...

  9. Okay, I'm confused ... on StarOffice 8 May Be MS Office Killer · · Score: 5, Funny

    So: FreeBSD is going to kill Linux, Linux is going to kill Sun, Sun is going to kill Microsoft, Microsoft is going to f-ing kill Google, and Google is going to ... kill evil?

    My, America *is* a violent place these days, isn't it? :P

  10. MOD PARENT UP on Voyager 1 Sends Messages from the Edge · · Score: 1

    Totally agree. And nicely said.

  11. Don't be silly! on FBI Agents Put New Focus on Deviant Porn · · Score: 1

    FBI agents always signs on as 'FBI'. :)

  12. Re:Tower of Babel on Space Elevator Gets FAA Clearance · · Score: 3, Funny

    Our apologies; the people responsible for the last post have been fired. Entirely new posts discussing the future ramifications of space elevators will replace them shortly. Meanwhile, here are some delicious pictures of a traditiønal møøse picnic from the wild snøw covered peaks of Nørway.

  13. Surely ... on Space Elevator Gets FAA Clearance · · Score: 1

    You mean Arthur C. Clarke? :)

    </fanboi>

  14. Re:XAML? on Flash, Meet Sparkle · · Score: 1

    Was hoping those in the know would be tempted to click in and improve it, obviously :). Was kind of disappointed at how short the article was.

    cheers.

  15. XAML? on Flash, Meet Sparkle · · Score: 4, Informative

    XAML.

    "the user interface markup language for Windows Vista, the next version of Microsoft Windows." ... "XAML is a declarative XML-based language optimized for describing graphically rich visual user interfaces, such as those created by Macromedia Flash" ... "This Microsoft Windows article is a stub. You can help Wikipedia by expanding it."

  16. Re:No plaintext protocols for login, please on Yahoo To Update Mail Service · · Score: 1

    *blinks

    I thought you were supposed to do that, if you couldn't afford to get a SSL key/for small websites where the money could be better spent? I been doing it wrong all along?

  17. Re:Wikipedia link on Google Hires Vint Cerf · · Score: 1

    FUCKING. BRILLIANT.

    You just made my day :D

  18. Re:Maybe... on MySQL and SCO Join Forces · · Score: 1

    Hey, just cos you haven't paid up your 699$ for Linux(TM) ...

  19. Re:NYT reg bypass on Google's Turn To Be The Villain · · Score: 1

    4. ???
    5. Profit


    Oh, no, it's not!
              -- The NYT

  20. Re:More to come... on Windows 95 Turns 10 · · Score: 1

    3010: 10 year anniversary of Windows Vista.

  21. Re:Yet again idiots win! on Lockheed Martin Hardware to Protect NYC Transit · · Score: 1

    you are by default (as written in the Koran) an enemy Allah and must be killed

    wtf is an enemy Allah? Allah == God, yeah?

    And FYI. Islam comes from the root word of Aslama which translate to "to surrender, resign oneself" in arabic. In other words, you don't live your life for yourself. You live your live for the sole purpose to be directed and guided by Allah. In return for your unbridled loyalty, you are promised salvation.

    From Luke 22:42: "Father, if you are willing, take this cup from me; yet not my will, but yours be done."

    Surrendering is imho a fairly common concept in most religions.

  22. Re:Wanted: a few billion algae to help me move on Algae Can Carry Cargo · · Score: 1

    Congratulations to parent and GP! :)

  23. Re:Linux Obligatory Joke on Algae Can Carry Cargo · · Score: 1

    Surely you mean: can they carry Linus?

  24. #13371337!! on Sun Spearheads Open DRM · · Score: 1

    by ianturton (655126) on Monday August 22, @10:15AM (#13371337)

    Man, that's LEET! :D

  25. Re:A friend's comment: on Reintroduce Megafauna to North America? · · Score: 1

    "Where is the megafauna? Behind the rabbit?"
    "It *IS* the rabbit, my lord!"