March 12th, 2009
Since I have a special guest coming into town tomorrow, I thought I should pull out all the stops and make some gourmet sandwich fodder, for a picnic on the beach. I settled on tri-tip steak, mainly because I’ve never tried cooking it before, but also because I have some good friends who serve tri-tip at their annual barbecue, and it always comes out good.
Read the rest of this entry »
Posted in Food | No Comments »
March 11th, 2009
Since I finally started playing the piano again after nearly two decades of not touching the thing, I decided that it was high time to finally get the thing tuned. (It was really out of tune…) Fortunately, the guy who used to tune our piano is still in business, so we called him up and scheduled an appointment. Tonight was the night, and right on time the doorbell rang.
Read the rest of this entry »
Posted in Music | No Comments »
January 23rd, 2009
Today the Caltech CS department is getting rid of some old (very old) computer and electrical equipment, and it’s always fun and entertaining to go over it and see if anything interesting is being tossed out. Sometimes you find stuff that’s really useful for a personal project (say, a couple capacitors rated at 50KV for that Tesla Coil you are building), but sometimes you just find something awesome. That happened for me today, because I found this:

This happens to be a 64-processor parallel computer, called the MOSAIC, that I programmed for CS20 during the third term of my sophomore year. It was a crazy little computer. The processors were connected up into a 2D mesh, and they could send messages left, right, up, or down. They only had about 64KB of memory per node, if I remember correctly, so you had to be pretty careful with your programming.
Communication and parallel computation were even crazier, because the communication channels between the processors were slack 1. That means you could send one message, and then the next send would block until the receiving processor actually read the message off of the channel. And the processors weren’t very bright, so it was very easy to have your program lock up the entire MOSAIC if you didn’t route your messages properly.
In CS20, the project was to simulate all of the components of a processor on this parallel computer. So, a few processors would be assigned to simulating ALUs, a few processors would handle stack operations, one would handle instruction decoding, a few would simulate heap memory, and so forth. It was such a fun project to work on, unlike anything I had ever done before, and I still remember it with great fondness to this day. Peter Hofstee was the teacher for CS20 that year, and I’m glad he came up with that crazy project.
I think I’m going to have to frame one of those boards and put it up on the wall!
Posted in Uncategorized | No Comments »
November 17th, 2008
A long time ago I was watching an episode of Good Eats all about squash (or “pumpkin” for my friends down under), and Alton Brown made these very yummy looking butternut squash dumplings. Since it’s the season for squash and we have a bunch of them floating around, I decided to give this dumpling recipe a try. Instead of using butternut squash I decided to use acorn squash, since we have a few extra acorn squash that hadn’t been spoken for yet.
Read the rest of this entry »
Posted in Food | No Comments »
November 15th, 2008
Lately I have been tinkering with a simple little 3D graphics program in my spare time. To support my various graphics and math projects I have put together a simple C++ math library including matrices, vectors, and the like. My matrices are stored in row-major order, like most matrices in C/C++ programs, but OpenGL uses column-major order. “Simple,” I think, “I just need to transpose my orientation matrices before passing them to OpenGL!”
But it just wouldn’t work. See if you can figure out why:
template<class T, int dim> class SquareMatrix {
...
/** Transpose the matrix. **/
void transpose() {
for (int r = 0; r < dim; r++) {
for (int c = 0; c < dim; c++) {
// Diagonal elements don't need transposing!
if (r == c) continue;
T tmp = getElem(r, c);
setElem(r, c, getElem(c, r));
setElem(c, r, tmp);
}
}
}
...
};
Posted in C++, Graphics, Hacking | 3 Comments »
November 4th, 2008
Guess what I saw at the Sydney Airport:
That’s the new Airbus A380! It’s one big plane! It can seat more than 500 people. Fully loaded it takes ~9K feet to get off the runway - nearly two miles, which is a little disturbing because the LAX airport runways are between 10K and 12K feet long. Not a lot of leeway there!
Well, everybody who knows me knows I’m already afraid of flying, so it’s not a big surprise that this thing scares me. But it is still really cool to finally see one up close!
Posted in Uncategorized | 1 Comment »
October 30th, 2008
Last night I was looking for interesting programming problems, and I came across this page about the Möbius Function. It’s a pretty simple idea, although I have no idea how August Möbius came up with the idea in the first place.
Given a positive integer n, the Möbius function μ(n) returns:
- 0 if the number is a multiple of a square
- -1 if the number has an odd number of distinct prime factors
- 1 if the number has an even number of distinct prime factors
The n = 1 case is a special case; μ(1) is defined to return 1.
I thought this would be a fun little problem to play around with; it’s all about generating the list of prime factors for the input value. A number is a multiple of a square if it has any duplicate prime factors; for example, 12 = 2 × 2 × 3, so it is a multiple of a square, and μ(12) = 0.
An interesting little related problem is to find runs of numbers for which μ(n) is 0. For example, the first run of three multiples of squares is {48, 49, 50}. The first run of six square-multiples starts at 22020.
So, I wrote a Scheme program to implement the Möbius Function, and to find runs of square-multiples; here it is if you want to take a look! It was pretty fun, although the program starts to get annoyingly slow when hunting for runs of 7 or 8 square-multiples. I would have to upgrade to a much faster language if I were going to do something like that. Or perhaps there’s something I can improve in my implementation…
Posted in Hacking | No Comments »
October 28th, 2008
If you ever liked Rubik’s Cubes, check out these beasts: V-Cubes
The short version is that some professor figured out how to make Rubik’s Cube puzzles with sizes all the way up to 11×11x11. Right now his company is selling up to 7×7x7 “cubes” (they are actually slightly rounded), with larger versions in the offing.
I decided I just had to check these out, so I went ahead and ordered the set that includes the 5×5x5, the 6×6x6, and the 7×7x7. Should be fun!
Posted in Uncategorized | No Comments »
July 31st, 2008
For about the last month I have been really working hard to rearrange my working area at home, because it was just unusable before. I didn’t have enough room to do much of anything, and what little room I had was really unenjoyable to use.
So, I got a new desk - a really nice large desk with plenty of filing space, and I have been cleaning things up and throwing things out like crazy. But the last thing I needed was a storage cabinet, for all the odds and ends that couldn’t really go anywhere else. Blank media, blank paper, tools, planispheres, that kind of stuff. (Actually, I already have a good place for my planisphere…)
I finally found the storage cabinet I wanted on Office Depot’s website, so I ordered it earlier this week. I got an email confirmation with details on how to check my order status, so I went ahead and checked out the order page.
Lo and behold, the very first order status, before anything has actually happened, is called “Buyer’s Remorse.” What’s up with that??
(The only thing that made me feel any remorse was that the estimate said it was going to take a month to get my storage cabinet.)
Posted in Uncategorized | No Comments »
July 30th, 2008
I was browsing through MSNBC.com (the CNN.com clone) this morning, looking at some of the pictures of the Chinese Olympics facilities, and lo and behold, I came across this picture of the aquatics center:
The pattern on the wall is called a Voronoi diagram, and is formed by taking a bunch of random points, and dividing the space into regions that are closest to a particular point. The boundaries are lines that are equidistant between two points.
The ceiling of the aquatics center uses the same technique:
Who knew?!
Posted in Uncategorized | 3 Comments »