Des (deskitty) wrote,
Des
deskitty

  • Mood:

Random Useless Tidbits

In English today, the prof asked everyone who'd had a happy/useful/self-affirming/something-like-that thought today to raise their hand.

I was the only one.

Somehow, that scares me.

>>> Update 23:25

(23:23:04) CondorDes: Gods, I feel dirty.
(23:23:08) jennmenchi: ?
(23:23:08) CondorDes: I just wrote my first goto in C++.
(23:23:14) CondorDes: :p
(23:23:19) Jenn: >.> Ah?
(23:23:36) CondorDes: I've been using the language for how long, and I've never really used gotos before this. But using a flag variable for this case seems really silly.

// Remove this block's killed registers from its copyout.  (We'll add them
// back in later if they're copies that make it to the end of the block.)
foreach (ki, blk->kill) {
    std::map<Register *, Register *>::iterator ci;

kill_restart:
    foreach (ci, blk->copyout) {
        if (ci->first = *ki || ci->second == *ki) {
            blk->copyout.erase(ci);
            goto kill_restart;
        }
    }
}


[foreach is a macro I wrote that iterates over an STL collection from begin() to end()]


-- Des
Subscribe

  • The Definition of "Atheism"

    ::sigh:: I'm getting really tired of seeing this myth spread around. Normally I don't quibble over the definition of words, but I'm going to make an…

  • (no subject)

    Well, I'm off to Dreamwidth. I hope to see you all there! Nice knowing you, LJ. It's been grand. — Des

  • A fresh start?

    So I'm thinking of moving away from LJ. Every time I glance at my ad blocker, there are an uncomfortably-large number of advertising and tracking…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments