Threading ahh

Yeah, so I finished 312 finally. We implemented threading in ML (and used it to implement speculative memory). It is horrific, but it works.
The last error I had was a stupid one too, and it’s one that I really should have caught.

We have a function scheduler that goes through a list of threads and runs them, one at a time.
Its type should be 'data * 'data state -> 'b since the function never returns, it just calls the next thread when one is done executing.
The type of mine was 'data * 'data state -> 'data * 'data state
This should have been a tipoff for me that something was wrong with the function.
It wasn’t.
I spent like two days trying to figure out why things were encountering empty thread lists and trying to release locks twice.

As Dan said, “You are 8 characters away from being correct.” I had forgotten to do a recursive call to scheduler inside scheduler, which meant I was returning the result of computations instead of running the next computation, as desired.
GAAH.

Oh well, it works now, so I’m happy.

Um, not much else. I really should be studying for 21301 and 18100. Meh. And I have 18100 lab tonight, which sucks. Meh.

Wheee

It’s looking like this will be my final schedule for next semester. I need to find some alternatives for photo history (I probably won’t get it), but the two CS classes have pretty much been guarenteed to me by Mark, and I shouldn’t have any trouble with the two math.

I’ve been having the weirdest food cravings lately. Two nights ago, at India Garden, I had a craving for paneer (cheese cubes). You have to understand, the only thing I hate about Indian food is the cheese cubes… and meh. I’ve been snacking on a lot of junk food lately. And today I actually had a craving for Schatz and/or Taste of India buffet. And right now I’m sitting here wanting doughnuts, fried eggs, and salami. Meeeh. I think I’m pregnant :(

Classes are going relatively well. Got a 73/75 on my 213 exam, and finished malloc: the problem I was stuck on wasn’t in malloc or free…. it was in realloc where I was dereferencing a char* instead of an int*… stupid stupid stupid! Got a 67.5/70 on my 80180 exam. Doing fine in 18100. Photo is fun. Whee.

Guess my music wheee

Internship

Well, I guess someone does like me after all :D
I got the PSLC internship/research thing I applied for. I’ll be working here (in Pittsburgh/around CMU) this summer on “Automated Understanding of Algebra Word Problems,” which sounds amazing. The best part is meals and housing (and plane tickets to/from Pittsburgh) are provided… and I get a rather modest stipend for my work… as in more than I made all last summer, and this is much more interesting work.

So yeah, between that and the website I’m working on for the outreach center, I’m pretty much set work-wise.

Oh yeah, I also (finally) got my 312 elaborator working. I was just misinterpreting the rules for type matching. I was reading the left triangle as “the term on the right evaluates/checks to the left,” when it’s exactly the opposite (the list of types on the right is what the function needs to return). Once Keith explained that to me, it all made sense was was quite easy to write. Whee.
Blah, I always get hung up on notation.

Wheeee! So happy!

Food OMG

Yeeeah, so someone remind me never to do this again.
Today I woke up and had a couple doughnuts before heading to class.
After class, I had a sandwich and some cake and some cookies, along with a soda and a couple cups of water.
After more classes, I went to Oriental Express with Alisa and had a huge plate of beef curry with rice, and another cup of water.
After doing HW with Alisa for a while, I came to Wean and had 5 slices of an extra-extra large pizza.
Then I went to halfprice and had a chicken breast sandwich, fries, and 3 glasses of water.

My stomach is very, very, very unhappy right now. I don’t know if I can walk back to my dorm without barfing. Meh.

Blah more malloc, more typechecker, more unhappiness.

In about an hour it will be 01:02:03 on 04/05/06. Wheee! I should get a screenshot of my clock when it happens.

New York (Day 3)

Well, I’m posting this from New York… finally decided to spend the stupid $15 to get internet my last night here because I needed to confirm my flight tomorrow and such. You’ll notice two other backdated entries that I just posted… those were written in the previous two days here. Whee.

I am completely exhausted right now. Went on a 10-hour tour (8:45 AM to 6:45 PM) of New York today. Absolutely amazing. First we drove around this area a bit, looking around Times Square and such. Then we went to Battery Park and got on a ferry for the Statue of Liberty and Ellis Island. Spent about an hour on the ferry there and back, and about an hour looking at the Ellis Island museum. Went for lunch, and stopped to look at ground zero where the WTC towers used to stand. Then went to the United Nations for a guided tour. Then drove around for another 2 hours while the guide showed us just about every part of NY (from 1st street up to 115th street), including the cathedrals, ethnic neighborhoods, expensive shopping places, big scary tower things, etc. Wow, this city never ceases to amaze me.

There will be pictures later tonight. I need to go through and batch them. You’ll probably find them both on Alan’s Photos 2 and this journal (as a new page, complete with my comments and such). Not sure when I’ll get them posted though… I still need to eat and pack everything.

Speaking of eating, breakfast was an amazing yogurt parfait and fresh lemonade. Lunch was provided by the tour and was a chicken sandwich with fries. Dinner is a turkey pesto wrap with authentic New York cheesecake (with strawberries, of course) for dessert. I’d love to eat like this every day… except it’s cost me well over $40 for food for the past two days, so meh. Too rich for my blood, but as long as Fog Creek is paying for it, I feel like I can indulge a little.

Wow, that makes me sound like a terrible person. I mean, I’m on vacation, so I can indulge a little? Meh.

Heh, this is the longest I’ve gone without internet (two days) in, um… forever? Even when I was in Thailand two summers ago, I used my cousin’s computer the first few days, and then got an internet card (like phone cards here) to access it.