uC++ and Shooting Yourself in the foot

Published 2009-10-09 on Farid Zakaria's Blog

Almost at midterms....
One of the most enjoyable courses this term have been my concurrency course CS343. In the class we are using uC++ (mico C++); which is an extension by the University of Waterloo to add high-level concurrency in an object oriented language. So far what we have covered is the ability for "Coroutines" to maintain a separate stack through execution. Using this feature we have been able to solve some interesting problems in novel ways.

Here is an example of some uC++ code. Every coroutine must have a main method which is executing upon calling the inherited Resume() function of every couroutine on the this object. Once inside main(), you can suspend() the coroutine and execution will then unwind back to the original caller. Further resumes() cause the coroutine to start from the same location where the suspend() had occurred ("partial coroutines").


#ifndef _Q2_
#define _Q2_ 1
#include 
_Coroutine StringLiteral
{
    public:
        enum status { CONT, MATCH, ERROR}; //possible status
    private:
        status stat; //current status of match
        char ch; //character passed by cocaller
        void main();
    public:
        StringLiteral();
        status next (char c);
}; //StringLiteral
//End of Q2.H
#endif

I am curious to see where the course leads us to in use of uC++. Would be perhaps even neater to learn some GPGPU "ultimate concurrency" in my opinion.

Shooting myself in the foot

Interviews have begun and I made the mistake of applying to 54 jobs. The result is that I now have tons of interviews. Sounds like a good thing? In theory perhaps; although I am finding myself short on time to complete assignments and my extra curricular activities. I will try and get a photo up soon of all the interviews I've had once they are complete.

Crossing my fingers