Google Chat subtly encouraged its users to call home for Father’s Day:
![]()
Shared objects are great. Imagine you have several programs running that all make use of the same library. If they are all statically linked against that library, then there will be several copies of essentially the same code in memory. Shared objects allow all these programs to reference the same code, held in memory in only one spot.
I’ve recently been spending a lot of time trying to get a few key libraries compiled on a cluster, where the idea is to run jobs based on these libraries in parallel. As memory is particularly limited, and there are several cores per node, I figured it would particularly make sense to compile everything as a shared object. Also, a subsequent library depended on it.
A lot of different packages configure, build and install themselves in a number of ways and often don’t adhere to conventions. Despite trying every flag known to man into the configuration tools, I was unable to get a particular piece to build as a shared object. But I happened upon a particularly useful code snippet to save the day:
ar -x mylib.a
gcc -shared *.o -o mylib.so
One of the joys I was hoping to experience here in New York City was to go to a filming of The Colbert Report. Unfortunately, getting a ticket can be tricky. There are rarely tickets available, and so you have to sign up to receive notifications when they become available.
If you do not constantly sit on your email, your chances of going are greatly diminished. I’ve been trying for about a month, because as a computer scientist, I am often on my email and can usually respond pretty quickly (< 5 minutes). Today… was my lucky day. Sort of.
I responded within a minute of receiving a notification, and was pleased that today I had been fast enough. There were still 40 tickets left! By the time I had finished filling out the form, there were a mere 28 left. I’m sure that in a couple of minutes the whole thing had closed off. It would seem that Colbert’s a popular guy.
So, here’s the trouble… the filming is on August 23rd, about a week and a half after I leave the city, and mere days before returning to Saudi Arabia. Just… my… luck.
Endianness is one of those things that, as a computer scientist you learn about but rarely have to think about. It does occasionally come into play and I recently had some frustration with it.
For the uninitiated, it’s talking about the order in which bytes are stored in memory, and unsurprisingly, different processors have different philosophies regarding this.
The term itself comes from Gulliver’s Travels, when two groups have strongly-held beliefs regarding on which end it was best to crack a hard-boiled egg. And as in the book, it can cause tension.
I’m working with a library in which a server and client communicate over sockets, and they tend to prepend their messages with the length of the message to follow. In the code, it’s stored as a four-byte integer, and for the most part, it works beautifully. However, we recently ported it to the BlueGene/P, which uses PowerPC chips. These, unlike the common Intel chip, are big-endian, and so client and server would hang, waiting for an exceptionally large message when only a small one was sent. For example, there are some common messages that are 329 bytes long. If you interpret the value 329 using the alternative endianness, you’ll expect 1224802304 bytes, or about 1.2 GB.
I’ll admit that it took a while to catch, but we eventually got it figured out. We don’t use sockets much, but couldn’t imagine that this was a problem that hadn’t been encountered before. After all, the internet uses sockets, has been around for a long time, and it’s not as if big-endian devices aren’t allowed on. It turns out that there is in fact a convention – that information sent over sockets ought to be in big-endian format, but networking libraries provide you with functions to help out with this.
The functions htons, htonl and sometimes htonll convert Host to network two-byte, four-byte and eight-byte messages respectively. And the inverse functionality is encapsulated by ntohs, ntohl and ntohll.
Lesson learned.
My numerical linear algebra professor is sponsoring me to join him at SIGGRAPH Asia this year in Yokohama, which conveniently affords me the opportunity to return to Japan.
I went to SIGGRAPH for the first time this year, and am really excited to get a chance to go to another, especially in Japan. Thanks to Mrs. Redman, who arranged my flight. I’ll arrive about a day early, and then I’ve got about a week to myself after it. I’m planning to take full advantage of the snow, going to Nagano for five of those days – just booked the hotel.
I left Japan a few years ago not eager to return, but I’ve been feeling very nostalgic for it lately. And hey, it will be my second Christmas there!
Last night we got a nice bit of lightning out here and so I thought I’d try to grab some shots. I got lucky and got a few, but I wish I had stayed out there longer. You can see the rest of the series and others on my new flicker account.
Up to this point, my ray tracer had been limited to rendering spheres and triangles, and, while there’s a lot you can do with these primitives, it’s often more efficient and effective to use a lathe or surface or rotation. Imagine you’ve got a curve, and you rotate it around some axis, keeping track of the surface it swept out.
Alternatively, imagine a lump of clay on a clay wheel. As the wheel rotates, if you hold some shape against the clay, it will become a solid that’s symmetrical about the vertical axis. Here’s a sine curve rotated about $$x = 0$$:
I take another look at my Mandelbrot code because we recently did a project with antialiasing in a raytracer. I updated my project so that instead of bouncing light, it would instead sample a point on the complex plane, and determine if it was in the Mandelbrot set, and so on and so forth.
I ran the code with 10 passes and 16,384 by 16,384 pixels (~27 megapixels) on my desktop. It took about an hour and a half, but this is the picture that came out of it (it’s a little big):
I also have a couple of extra pictures that show portions of the set in their detail:
I made a lamp this weekend for Rachel as a belated Valentine’s Day gift. Made from balsa wood, vellum, hot glue and the electrical components, I got my inspiration from Instructables. It didn’t look well put-together, and so I made my own interpretation:
A little game I play with myself sometimes that’s somewhat along the lines of Desert Island is this (I don’t have a name for it): If you suddenly found yourself way back in time, what would you bring (intellectually, academically) back from modern times?
Try it for different time periods. For example, if it were 5000 B.C., would you, say, know how to smelt? I guess I try to put things in the context of the big ideas / advances of the time.
If it were the 1400′s, could you demonstrate that the earth was round? If it were the 1700′s or so, could you explain Maxwell’s equations? Late 1800′s – relativity? Quantum mechanics? Wave-particle duality?
This sometimes makes me wish I knew how to smelt.








