planet jayne

Subscriptions

May 11, 2012

Matt

GCN OpenCL memory fences update (and inline PTX)

This is an update for my previous post about the global behaviour of mem_fence() on existing GPUs for ones which have started existing since then.

On previous AMD architectures the caches were not really used except for read only images. The latest Tahiti/GCN GPUs have a read/write, incoherent L1 cache local to a compute unit. Since a single workgroup will always run on a single compute unit, memory will be consistent in that group using the cache.

According to the OpenCL specification, global memory is only guaranteed to be consistent outside of a workgroup, after an execution barrier, i.e. the kernel is finished, so memory will be consistent before the next invocation. I found this to be really annoying and would ruin my kernels, and in some cases had a high overhead from the multiple kernel launches.

The write does seem to be committed to memory like the IL documentation would indicate, however the read is still problematic outside of the workgroup. You must bypass the L1 cache in order to ensure reading an updated value.

For some cases I found it faster and more convenient to use atomics to bypass the L1 cache (e.g. read any given int value with atomic_or(&address, 0)).

Use atomics to bypass the L1 cache if you need strong memory consistency across workgroups. This is an option for reads that aren't very critical. This was true for one of the N-body kernels. For another it was many times slower than running a single workgroup at time to ensure global consistency.

In the future when the GDS hardware becomes available as an extension, it will probably be a better option for global synchronization. It's been in the hardware at least since Cayman (and maybe Evergreen?) but we don't (yet) have a way to access it from the OpenCL layer.

On the Nvidia side, there is the potential that mem_fence() will stop providing a truly global fence in a future compiler update. Since CUDA 4.0 or so the OpenCL compiler has supported inline PTX. You can get the same effect as __threadfence() by using the membar.gl instruction directly:

inline void strong_global_mem_fence_ptx()
{
    asm("{\n\t"
        "membar.gl;\n\t"
        "}\n\t"
        );
}

May 11, 2012 11:26 PM

April 20, 2012

Tim

A Cupertino Carol

ul.tripList li { color: #555; } ul.tripList li.special { color: #111; } ul.tripList li a { color: #5AF; } ul.tripList li.special a { color: #38E; }

After having not seen each other for almost a year, Carol came out to Cupertino for a whole week! I took the week off, and we had pretty much the busiest, most amazing week ever together. I'll write about some of the things in more detail later, but here's a linkified extremely-brief summary: (there are a few pages of pictures on Flickr, as always)

Friday, 2012.04.13 Saturday, 2012.04.14 Sunday, 2012.04.15 Monday, 2012.04.16 Tuesday, 2012.04.17 Wednesday, 2012.04.18 Thursday, 2012.04.19 Friday, 2012.04.20 Saturday, 2012.04.21 Sunday, 2012.04.22

April 20, 2012 12:52 AM

March 31, 2012

Tim

(Walking) Trips

Having lots of time to think about the web and little time to create content, I took a few minutes out of this weekend to make a silly little thing with d3.js.

Not being a driver, I find myself walking around a lot - to work, to visit people, to find food. Some of those walks are longer than others, and I thought it would be neat to be able to visualize and compare them!

I built trips.hortont.com to do that. The map on the right is a little confusing, because it is four cities, superimposed, with my "home" in each centered in the same place (using our 15th St. apartment for "home" in Troy, since I had three). Lots of things respond to hover, and clicking the different sorting options provides a few different ways to look at the trips (and adds a splash of color!).

The most interesting thing that sticks out of the data (to me!) is the relative shapes of the four cities. Cupertino and La Jolla are way younger than Troy and Colchester, and are clearly more "designed"; La Jolla with swooping curves all around, and Cupertino with a strict grid (except around IL, of course).

March 31, 2012 08:49 PM

January 21, 2012

Tim

Initial Experiments in Molecular Gastronomy

A while back, I watched the No Reservations episode filmed surrounding the final days of el Bulli; the Catalonian restaurant often called the best in the world.

Since then, in the back of my mind, I've known that food can be more interesting than we usually make it, through the introduction of chemistry! Those who know me probably realize that the passion and culture of the food (which drove el Bulli) wouldn't be nearly as exciting to me as the application of science — not the most noble reasoning, and certainly not the takeaway anyone involved in that episode intended, but still very exciting from my perspective!

I left that knowledge alone for a while, moved out here, and became extremely lazy about cooking. Recently, though, I decided I'd play with some of the basic techniques of molecular gastronomy, just to see how it worked. After some trouble I managed to acquire a supply of basic ingredients — after all, they're not the kinds of things you can easily find in an ordinary grocery store.

I'm beginning with just the simplest techniques first, attempting to learn separate components before combining them into anything actually interesting. I imagine what I've managed so far might appear more boring than normal food, from the outside, but the possibilities are what excite me!

In fact, I've tried just two techniques so far, out of the many yet invented — the simplest: spherification and gelification, and only in their most basic forms.

Spherification

Spherification involves constructing a skin around a liquid, using calcium lactate and sodium alginate.

1/3 cup lemonade
4 grams C6H10CaO6

The target liquid is combined with calcium lactate, then frozen in small spherical portions. I chose lemonade simply because it was on hand, and seemed like a reasonable liquid to have "exploding" in your mouth.

1/4 cup water
2 grams NaC6H7O6
Next, the sodium alginate is dissolved in water, to make the spherification bath. While the spheres are freezing, the bath is refrigerated.

Once the spheres are completely frozen, they are removed from their molds, and dropped into the bath. After a few minutes, they are removed from the bath and washed in water, to prevent further growth of the skin.

Once the spheres have completely melted, they are ready for consumption:



There are a few things that I'm planning on changing next time:
  1. I left my spheres in the sodium alginate bath for too long; the skin was slightly thicker than I'd have liked. My understanding is that the reaction that creates the skin continues until it's removed from the bath and washed.
  2. The skin of my spheres was not particularly smooth. I believe that a rounder and smoother mold might have helped with this. Also, I didn't have a powered hand mixer to combine the sodium alginate and water; a more well-mixed bath might have helped in the smoothness department.
  3. There were air pockets in all of my spheres! They floated in the sodium alginate bath; I need to find a way to suspend them deeper without impacting their shape.
  4. My spheres were a bit too big. Luckily, there's an easy solution to this!
Verdict: more experimentation required! (and yet still delicious)

Gelification

While both gelification and spherification are often used to make spheres, there's one key difference: gelification involves turning the entire material into a gel! Agar is the key ingredient in this process; the same algae-derived material used to keep microbes happy on petri dishes!

Conveniently, gelification is extremely simple; a target liquid is heated to boiling, and usually watered down somewhat. Agar is added, in its powdered form, and mixed in thoroughly. This mixture is then shaped as desired, and then cooled; agar is a liquid above 85°C, so the cooling process is the key to bringing it back into its solid state.

The shaping process is where most of the differentiation happens; one relatively easy shape to make is tiny spheres, resembling caviar. In order to make small spherical gels, a mechanism for creating droplets of liquid is required. After reading a bit, I found that people commonly use chilled vegetable oil. In the end, using a pipette to drop the near-boiling liquid mixture into oil that had been sitting in the freezer for a while turned out to do just the trick:

1/3 cup water
1/2 cup honey
2 grams agar



Once the supply of boiling honey is depleted, the spheres are retrieved and washed in water.

After making "honey caviar", I made a few notes to myself:
  1. The balls were extremely uneven. I had used an unfortunately large and hard to control pipette; for later experiments, I found a more appropriate one, with a small tip.
  2. The honey taste was extremely subtle; perhaps cutting down on the water would help.

I took another stab at gelification today, in the construction of a ridiculously time-consuming burger:

1/4 cup water
1/2 cup mustard
2 grams agar

1/4 cup water
1/2 cup ketchup
2 grams agar

The only difference between the preparation of the ketchup and mustard was in the cooling stage; the ketchup was cooled in the same way as the honey; dropped from a pipette (more appropriately sized this time!) into freezer-chilled vegetable oil. The mustard, on the other hand, was fed into surgical tubing, which I then placed in ice water. After a few minutes I used a syringe to force air into one end of the tube, slowly forcing the mustard out the other, leaving behind a stringy spaghetti-like condiment that was so solid it could be picked up in your hands!

The two were then combined to great effect:



I'm quite pleased with how this, my third experiment, turned out; still, there are many more left to be done! If you have any ideas, let me know!

January 21, 2012 10:57 PM

January 08, 2012

Tim

Maeby and Me

January 08, 2012 06:16 PM

November 17, 2011

Tim

JoCo

In the world of Internet-driven geeky music, there are few with more of a claim to fame than Jonathan Coulton. Certainly some are significantly more geeky, or nerdy, or whatever (the fact that I just had those two URLs available off the top of my head is rather sad), but none have the nearly universal success of JoCo — he's one of those rare nearly-universal geek idols. I was introduced to him a few years back by Robb and Savannah, probably around the same time Still Alive launched alongside Portal and the rest of the Orange Box, and I quickly collected a set of favorites which can still be commonly heard playing around my apartment today.

Savannah, Robb, and Matt have all had the opportunity to see him in concert, usually in the Boston area; for some reason, I was never in the right place at the right time... until this weekend! Opening for They Might Be Giants (another geek favorite, if not nearly as extreme, and much more popular!) at the Fillmore in San Francisco, he did a short show, hitting a bunch of his newer material and some of the classics. Having opener play everything you want them never happens — they'd never have enough time even with a full-length show, in most cases!

Still, there was much excitement to be had in the room when he opened with Code Monkey (I predicted this quite successfully), much jumping during I Feel Fantastic (for good reason!), and goofy faux-romantic swaying to Still Alive (which is insane considering the context, but I get it...)

All-in-all, it was a great time! I'll be keeping my eyes peeled for a full-length concert if he returns to the Bay Area.

The They Might Be Giants portion was also great; they did the entirety of an old album (from 1990!) — my only experience with them has been through their science-themed children's album, much more recently (well worth it, too... ignore the fact that it was aimed at children), so I didn't have as much context for their part of the show. Still, it was lots of fun; the floor was filled with excited fans, and that's all it takes to make it enjoyable!

After the concert, I had to get a cab ride back to Cupertino (Caltrain shuts down really early on Sundays...), which... is another story in its entirety!

November 17, 2011 12:44 AM

November 16, 2011

Tim

Halloween 2011

I forgot to post this two weeks ago; this was my Halloween (I got home from work slightly too late to feed more than one group of children sugar-filled goodies):



All of the Halloween episodes! And yes, I made it through all of them.

November 16, 2011 12:00 AM

November 12, 2011

Tim

Flickr Top 15

There are over 15,000 photos in my Flickr photostream... here are the top 15 (the top tenth of a percent!) in terms of view count (almost all because of posts to reddit!):

#1: The BSG Cake

For my 20th birthday, Amy made me an awesome cake in the shape of the Battlestar Galactica logo. Earlier in 2009, Amy and I had watched Galactica together, inspiring her choice of cake design for my birthday. As you might expect, it was as delicious as it was awesome-looking! This cake tops the list primarily because we posted it to reddit, garnering a comment from none other than geek legend Wil Wheaton (Star Trek's Wesley Crusher) himself!



#2: Ben's Sandwiches

One of my RPI cohorts decided that it would be cool to graduate a semester early; in order to exact our revenge, a few of us got together and made ridiculous sandwiches for his going-away party. Forget Subway, forget all of the gourmet sandwich houses in Troy (note: there are none!), Carol's was the place to be that night, bar none.



#3: Amy's Firefly Cross-stitch

For my 22nd birthday, Amy was 3000 miles away, so a cake was quite out of the question; instead, something much more lasting: a cross-stitch for my wall, comprised of everyone's favorite characters from Joss Whedon's Firefly! It sits in the entryway to my apartment, and has inspired me to vaguely dabble in pixel art.



#4: My Minecraft Animals

Late in the Minecraft Alpha phase, Robb introduced our apartment to it, leading to 48 straight hours of nothing but crafting. While the furor died down quickly, most of us still play once in a while. For our last Christmas together, I made everyone painted wooden renditions of the mobs from Minecraft. Also comes with a reddit post.



#5: Robb and Savannah's Hand-XKCD

Robb, Savannah, Matt, Gino, Andrew, and I visited everyone's favorite east-coast city for the first-ever ROFLCon. Some (Robb and Savvy) were more bold than others (myself), and went up to Randall Munroe (who needs no introduction), asking him to "sign their friendship". Besides thinking that Robb was a girl, and mentioning them in his closing speech, I'd say he did a good job, considering the medium involved. No need to explain why this one is on this list.



#6: gnomines-clutter screencast

For GSoC 2009, I (vaguely) worked on some GNOME Games. One which never totally came to fruition was a Minesweeper/Gnomines clone in Clutter/JavaScript. This video got posted to Planet GNOME, and got up the hopes of a lot of people, only to be dashed by my return to RPI and distinct lack of time.



#7: Amy and I posing with the cake from #1

This is just spillover from #1, people clicking the "next" button on Flickr when visiting that image. It is pretty adorable though!



#8: Matt's Eyeball, Take Two

A few months after taking #11 and posting it to reddit, Matt and I decided (or, rather, I decided, and pinned Matt down 'till he agreed — it's not clear humans enjoy being flashed in the face) to try again. I'd say this one came out a lot better!



#9: Scallops and Chorizo

Another one of my cooking adventures with Carol (adventures which I dreadfully miss now that I'm so far away!); we made scallops and chorizo for dinner one night, straight out of Nigella. Another one with a reddit post... almost like there's a theme here.



#10: Peter and the Cookie

Please don't ask me what this is doing here; finding it here earlier today is what inspired me to do this post. Peter says he posted it to Twitter... I'm not sure that excuses it. Weirdo MobileNotifier fanbois...



#11: Matt's Eyeball, Take One

Inspired by a really cool eyeball picture that I can't find right now, I wanted to see if we could find as much detail in Matt's eye. Turns out... we can't. But that didn't stop us from trying!



#12: Mom's Glowman

There's no story here; I found a translucent Christmas ornament, put it on top of my flash, and took a picture, hoping it would come out looking pretty. It did!



#13: A Hopping Bird, in the San Diego sun

Another victim of reddit. If memory serves me, this was at one end of San Diego's Old Town. I accidentally caught it at just the right moment, hoverhanding the bird bath...



#14: A Spinning Bird, in the San Diego Zoo

It's odd to me that all three of these bird pictures make up the bottom of this list; I guess /r/birdpics is very consistent in view-count! This was in one of the aviaries at the all-around-awesome San Diego Zoo, and was a surprise to me when I got back to sort through my pictures.



#15: A Majestic Bird, in the San Diego Zoo

Of all the pictures from the San Diego Zoo aviaries, this is one of my absolute favorites. I don't know why, it's just a pretty bird and a pretty picture (making good use of my beloved 180mm f/2.8).

November 12, 2011 10:24 PM

November 08, 2011

Tim

8-Bit Whedonverse

I wanted a background based off of Amy's beautiful cross-stitch that sits on my wall, so I grabbed Pixen and went to town on a digital copy:



I quickly realized that I needed to do the rest of the Whedonverse too. I'm not done yet, I still have Angel and Dollhouse (and Dr. Horrible!) to go, but here's what I got out of Buffy, which I've been spending a lot of time watching over the last few months:





These were a lot harder to do since I didn't have anything to go by, but it ended up being a lot of fun! I'm most happy with Faith and Anya (the last two, for those unfamiliar with the show), I think they're the most immediately recognizable besides Spike.

The Pixen source files are on Github. Feel free to fix things (especially Cordelia and Xander!) or make whatever use of them you'd like!

November 08, 2011 12:35 AM

October 22, 2011

Tim

Web Toys

I wrote a SVG filter builder during a weekend a few weeks ago, which someone might find entertaining. You'll need either a WebKit nightly (it absolutely will not work in shipping Safari) or maybe a very recent Chrome. It'll work best with the WebKit nightly, though, I promise.

I also hacked up a really dumb game which is mostly rigged so that only Amy can possibly do well, but you can try if you want! "Match A Smudge to a Moment". This one should work anywhere (but best in Chrome and Safari). Make sure you turn your volume up (and click the play button as many times as you want to replay the sound you're currently trying to match to a smudge, and click on the smudge to match it (or click again to unmatch); there are no instructions on the page, you'll figure it out!)

Fun!

October 22, 2011 02:07 AM

October 08, 2011

Robb

Hello everyone!

Long time no blog? I thought I would fill everyone in on what I’ve been up to, and that I’m back in the free software world.

I kind of disapeared, in my final year of school… engaging in a mad rush to actually graduate. Luckily, in May of 2011 I actually graduated (from Rennselaer Polytechnic Institute)!

Then I spent the summer, in Beijing studying the game go. Amazing experience, loved being in Beijing (though don’t think I would want to live there…) and finally got my go obsession a bit out of my system. Any Go players out there? Let’s play a game on KGS :) Also willing to teach anyone who wants to learn.

Nooooooow, since September I’ve been working at Canonical! I’ve spent most of my time working on Unity bugs. The last few weeks I’ve been in to some exciting new stuff, all over place. Currently finishing up some patches to add support for Isolated Worlds to the WebKit GTK+ API. I think I’m going to be taking a more active role in maintaining Seed again as well (sorry about that guys, and thanks to all the people who have kept the project going!). In a few weeks, I’m off to UDS Orlando, and sometime around then you will probably hear more about what I’m working on!

On some other notes…currently living in Pennsylvania with my family waiting on my UK work permit, and then I’m off to London! no exact date yet, but I’m hoping to move to London around January. Really excited about it! Was in London for 2 weeks recently and made it to the GNOME Beer meetup :)

Off for now! Hope to start posting every so often describing what I’ve been hacking on.

by racarr at October 08, 2011 04:12 PM

September 21, 2011

Tim

Hello!

September 21, 2011 10:42 PM

August 15, 2011

Tim

California, for good

California

For the first time in my life, there's no clear "next step", and, finally, really no need for one, either. In June I moved across the country, all the way from Vermont to Cupertino, California, following the call of the most amazing job offer I could have imagined.

I spent the summer of 2010 in San Diego, so I'm at least somewhat acquainted with living in California; the Bay Area seems to be a little quieter, but I'm all for that! Plus, it puts me smack dab in the middle of what is quite literally the epicenter of the software world; the PARC and Stanford are to the west, with hundreds of startups dotted along in that direction, stretching all the way to San Francisco; Google is only a few miles north; Apple is less than a block east; and the home of pretty much every American tech company that matters is within biking distance.

Home

I decided quite quickly that it would be best to live as close to campus as possible, as I don't enjoy driving, don't have a car, and hate depending on public transit to get to work (it's fine if you're not on a schedule, like weekend trips, but not for getting to work). When I called to see what was available, there weren't many options; of the four apartment complexed I called, only one had any space, and even they only had two units available at the time.

Luckily, I managed to acquire one of those, and now call home the corner of Homestead and Stelling, right on the border between Cupertino and Sunnyvale, along with five hundred other people! It's a simple apartment, more than big enough for one person (it easily fit two when Matt was here, and we're going to get to see how well it fits four this week when my family comes out!).

I guess I'll take you on a brief tour of what I've done with the place:



It's got a couch, which Peter and I built the first day I moved in, and I've slept on way more than once; a back porch, with some chairs that let me hang out outside occasionally, and a few plants that mom put there when she was out, some of which have died, and some of which have lived happily.



This one is my favorite, because it's the least dead and seems to be the easiest to take care of, and because it doesn't shed purple stuff all over everything like one of the others does.



I have a projector, which projects a 100+ inch image on the wall for when I want to watch Doctor Who or Game of Thrones, or random movies with Peter/Alex/James/Charles/etc. (all of whom are leaving me in the next few weeks to go back to school). Plus the requisite receiver and speakers, with wires running all over the house. And I can stream video and audio to it from any of my Apple devices, wirelessly. Pretty awesome. The convenient thing about a projector is that it gets almost completely out of the way when you aren't using it.



And my extra iPhone as a remote (which is pretty awesome; one remote, just the few buttons I actually need, customized exactly how I want it — no mode switches or other crap like everyone (especially at Vivian's or at home) is used to, and there's a keyboard for the Apple TV if I want to search for something!)





After a rather harrowing experience driving home from IKEA with it, I also have the requisite computer desk, new home to Jayne and Trinity, and with plenty of space for paper and laptops and tablets galore. And speakers, attached to a legit soundboard, which merges the audio from 1) a cable to plug into random devices 2) Jayne and 3) an AirPort Express, so I can play music from anywhere to it and not have to worry about going under my desk to move the cable around like I had to in Troy. A bit overkill, but it works with no fuss.



Grandma's table and chairs sit in my dining room, which is not so much a dining room as it is an extension of my living room. I don't have many opportunities to use the table as anything but storage; I usually eat at my desk or on the porch.



When I was packing, I found the printed pictures from my closet door in Davison, so I carefully packed them away and put them on my bedroom door here, along with some bits of DJ's pen art. I've also got a little spot on the wall in my room with pictures of past homes; Colchester, Cary, our apartment on 15th St., and the complex in La Jolla. I'll add Hurley if someone finds me a picture.



I've got a second desk in my bedroom, adorned with random electronics, a soldering iron and power supply, and various related things. I haven't had an opportunity to do much here, but as I don't generally feel like working on software when I get home (except on the weekends!), I expect that to become a more common hobby.



The little dresser in my room was also by far the hardest piece of furniture to build. To anyone who complains about IKEA construction: you don't know what you're talking about. Chair, living-room desk, tables, couch — all IKEA, all relatively straightforward. That dresser, though, ... I got it from some random company on Amazon, and I swear I had holes in my hands by the time I was done constructing it, and I'm still surprised it hasn't fallen apart. But, it does its job.



My bike sits just out my back porch, near the mailboxes. Sometimes I take it to work, or to the bank, or to the bay, or wherever.



Every time I leave my house and venture into the apartment complex instead of immediately out to the main road, I get quite lost; I'm getting better at it, but I've been here long enough that I think there must be something wrong with their design (there is! the uniformity!).

Work

Work is fantastic. I noted before that I won't talk much about it here, but I can at least say that I have the best team I can imagine and that I love it here! A whole variety of different things have happened over the past two months that solidify my belief that this is exactly where I want to be.

I think it's going to be really bizarre at the end of August when I'm still doing the same thing, at the same desk, instead of returning to dear old RPI, but I'm quite convinced it's going to be a good bizarre.

I've made friends with a bunch of interns through Peter, but these are their last weeks; in just a few days, there'll be none left, and I'll have to make more friends! (as well as wait and see who comes back!) It's easier to get to know the interns, since we were all new at the same time; I wonder if starting work outside of intern season would have made it more straightforward in the first place.

The Bay

Despite being here for two months, I haven't done much exploring of the bay yet. A day trip to the South Bay, a day trip to Saratoga, a few into San Francisco and San Jose. I don't feel the urgency to get out every day of every weekend like I did in San Diego (to be fair, I'd be packing up to leave in another week or two, were it last summer again), which is leading to a more relaxing time, for sure!

Places I've been entertained by so far include the San Jose Repertory Theatre (to which I'm certain I'll be returning), the island in the middle of Stow Lake, Sammy's on Second (a little sketchy at first, but delicious, and then you can walk to the gardens and eat your sandwich), both the Computer History Museum and the Tech Museum (though the latter seemed like a distant shadow of the Boston Museum of Science), some cute little park just off the main road in Saratoga, a variety of different modes of public transit (compared to Boston, they're mad here, with a zillion separate companies running a zillion different services; the subways aren't run by the bus people aren't run by the light rail people, it's all crazy), a mysteriously missing trail by the Steven's Creek Reservoir, the Steven's Creek Bike Trail itself (gotta visit Google and the Bay!), and a wide variety of little places in and around the city of Cupertino.

Eventually some of these will get their own stories, but for now they sit as a simple list.

I'll probably be making a map in the near future, to add to and use to remember things, and I'm sure I'll post it here.

Back to work tomorrow!

August 15, 2011 11:14 PM

August 04, 2011

Matt

OpenCL vs. CUDA GPU memory fences

Update: This information is only partially useful on the most recent Tahiti/GCN GPUs, and a safer option is now available for Nvidia

I've been working on the Milkyway Nbody GPU application using OpenCL, mostly basing it off of a CUDA implementation of the Barnes-Hut algorithm. The port (and addition of a slew of other minor features and details to match the original) to OpenCL has been quite a bit more painful and time consuming than I anticipated. In it's current state, it seems to work correctly on Nvidia GPUs (somewhat unsurprisingly).

The most recent problems I've been exploring is an apparent "tree incest" problem which seems to happen quite frequently in situations where it should not. In the traversal of the tree to compute a force on a body, it should enter nearby cells and perform a more accurate force calculation based on individual bodies (as opposed to the center of mass of a collection of farther away bodies, which is how this is an O(n log n) approximation and not the basic O(n2) algorithm. Logically, the cell a body itself belongs to should be entered and forces calculated from it's neighbors while skipping an interaction on itself. If when calculating forces on a body it doesn't run into itself, there's something wrong. This can happen ordinarily depending on the distribution of bodies, usually when bodies are very close to the edges of a cell. It happens most often with the classic cell opening criterion, particularly when using opening angles close to the maximum of 1.0. This is happening nondeterministically and in all cases on AMD GPUs (usually for some small number of bodies relative to the total I'm testing with), so something is slightly broken.

The CUDA implementation uses in several places the __threadfence() and __threadfence_block() functions. The CUDA documentation for these functions is mostly clear. It stalls the current thread until its memory accesses complete. The closest equivalents in OpenCL are the mem_fence() functions. According to the AMD porting CUDA guide says of __threadfence() that there is "no direct equivalent" in OpenCL, but that mem_fence(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE) is an equivalent of __threadfence_block(). My guess was that the potentially different behaviour between mem_fence() and __threadfence() might be responsible, so I went looking for what actually happens.

Ignoring the supposedly identical __threadfence_block(), and mem_fence(GLOBAL|LOCAL) I went looking at __threadfence(). According to the CUDA documentation

__threadfence() waits until all global and shared memory accesses made by the calling thread prior to __threadfence() are visible to:

According to the OpenCL spec, a mem_fence() "Orders loads and stores of a work-item executing a kernel. This means that loads and stores preceding the mem_fence will be committed to memory before any loads and stores following the mem_fence." Earlier in the spec (section 3.3.1 Memory Consistency), it states that "Global memory is consistent across work-items in a single work-group at a work-group barrier, but there are no guarantees of memory consistency between different work-groups executing a kernel."

This says that there's no concept of (device) global memory consistency. The global memory accesses are completed and visible to other threads in the same workgroup and only at a barrier, which this is not. I guess that means the writes could be trapped in some kind of cache and only visible to threads in the other wavefronts executing on the same compute unit making up the workgroup. This is quite the difference from the much stronger __threadfence() where the writes are visible to all threads in the device. From this it unfortunately sounds like what I need to happen can't be done without some unfortunate hackery involving atomics or splitting into multiple kernels to achieve a global weak sort of "synchronization." Breaking (some of) these pieces into separate kernels isn't really practical in this case. It would have been kind of painful to do and slower. I figured I would look into what actually is happening.

Since things seemed to be working correctly on Nvidia, I checked what happens there. Inspecting the PTX from CUDA and my sample OpenCL kernels, it appears that the CUDA __threadfence() and __threadfence_block() compile into the same instructions as OpenCL's mem_fence() (as well as read_mem_fence() and write_mem_fence()) with the different flags. Any of the fences with a CLK_GLOBAL_MEM_FENCE compiles to membar.gl, and mem_fences with only CLK_LOCAL_MEM_FENCE compiles to membar.cta. I thought the PTX documentation was more clear on what actually happens here.

According the PTX documentation, membar.cta "waits for prior memory accesses to complete relative to other threads in the CTA." CTA stands for "Cooperative Thread Array," which apparently is a CUDA block (an OpenCL workgroup). This would seem to confirm the same behaviour with mem_fence(LOCAL). More interestingly, membar.gl waits for prior memory accesses to complete relative to other threads in the device confirming that __threadfence() and mem_fence(GLOBAL) have the same behaviour on Nvidia. If the problem I'm debugging is this issue, this explains why it does work as expected on Nvidia.

Since now I was sure the correct thing should in fact be happening on Nvidia, I checked the AMD IL from my sample kernels, and found fence_lds_memory in the places I was most interested in. AMD IL instructions are built up out of a base name (in this case "fence") and then have modifiers prefixed with underscores appended to the name. In this case, the _lds modifier is the local fence around the workgroup. The LDS is the "local data share," and is the same as OpenCL __local memory. Once again, mem_fence(GLOBAL|LOCAL) appears to have the same expected behaviour as __threadfence_block() as expected.

Specifically, it states that:

_lds - shared memory fence. It ensures that:

What I'm actually looking for is the global behaviour, as given by the _memory modifier:

_memory - global/scatter memory fence. It ensures that:

I supposed I should also have checked the final ISA to be sure, but I'm lazy and gave up on finding the Cayman ISA reference. Tthere does appear to be some sort of waiting for the write:
  03 MEM_RAT_CACHELESS_STORE_DWORD__NI_ACK: RAT(11)[R0].xy__, R1, ARRAY_SIZE(4)  MARK  VPM
  04 WAIT_ACK:  Outstanding_acks = 0
I guess this might kill my hypothesis about the different mem_fence() behaviour. I would feel a bit better if it included the phrase "in the device" at the end, but my reading of this is still that it does what I hoped. It does appear that a mem_fence() is consistent across the device with AMD and Nvidia's GPU implementations of OpenCL, so now I need to do more work to find what's actually broken.

So now I'm relying on implementation detail behaviour beyond the spec (it's not the only place...), but oh well. It's much nicer than the alternative (more work).

The conclusion of all of this, is that relying on OpenCL implementation behaviour, a mem_fence() with CLK_GLOBAL_MEM_FENCE should work among all threads in the device for both Nvidia and AMD GPUs (at least on current hardware) and as far as I can tell from chasing the documentation.

August 04, 2011 10:43 PM

July 29, 2011

Tim

Firefly, from Amy's Hands



For my birthday. "We are not gonna die. You know why? Because we are so... very... pretty."

July 29, 2011 10:15 PM

July 24, 2011

Tim

Going imageless!

In the interest of being able to easily change the outdated buttons along the top of the page without going back to Illustrator and regenerating the image files, I recreated them in CSS! Sort of; I had to change the font to one that Google had.

Anyway, I've only changed them on the front page, in hopes that people could check and see if it works in their browser, and let me know if it doesn't (or if it does, if you just want to be friendly!) so I can fix it before rolling it out to the universal top bar.

So, uh, do that, if you want to!

Also, a few weeks ago, I implemented a history view because I often have a hard time finding old posts to refer back to them. So, if you remember a post you haven't been able to find (yeah, right!)... you probably still won't be able to find it! (because you have to know the title! and those are often vague or obscure or complete nonsense!)

July 24, 2011 04:41 AM

July 21, 2011

Tim

Shutter Sounds

A few notes:

Kodak Retina



Ihagee Exa



Ihagee Exacta



And my normal trusty companions, for good measure:

July 21, 2011 11:22 PM

May 30, 2011

Tim

RPI Ω

I can now collapse the RPI folder in Aperture, which now stands at 8,440 photographs over four years - almost perfectly consistently gaining 2,000 pictures per year (1354, 2015, 2013, and 2900, respectively). Here's one of my recent favorites:



We're all college graduates now!

May 30, 2011 01:59 AM

May 24, 2011

Tim

Spirit



Tomorrow marks the last day NASA will try to get ahold of Spirit, the eldest of the pair of Mars Exploration Rovers.

Dad and I listened to the landings way back when I was just one semester through high school; Spirit's end-of-life is just days before I'm due to graduate from college. The discoveries of both Spirit and Opportunity have provided Martian wonders to observe and ponder throughout the last seven years: dust devils, blueberries, blueberries, blueberries, blueberries, panoramic landscapes, portraits (both self- and otherwise), meteorites, and many more.

It's hard not to anthropomorphize Spirit and Opportunity, as they've been such good friends for so long. Randall, as usual, does it best. Still, when they landed, we were promised 90 sols. Ninety. Spirit's official death will be after 2,628 sols... I'd say that's a life to be proud of.

May 24, 2011 09:45 PM

May 18, 2011

Tim

The Pony 828 Experience

I recently took a trip with Connor and Carol to the home of both Connor, and the Eastman Kodak Corporation: Rochester, NY. One of the first things I noticed about his house was that it was decorated in the most awesome way possible: with a variety of ancient cameras, on every shelf and coatrack. Apparently his parents acquired a box full of antique cameras at a yard sale years ago, and put them all around their house.

One day while we were sitting at his table, Connor grabbed one of the cameras and started playing with it, trying to figure out how to make it work. We got it working pretty quickly, as even though it's about as old as all three of us combined, the basic concepts of photography haven't changed much.

Connor decided that he wanted to see if we could take pictures with it, so, after shopping around (and after contemplating cutting down some rolls ourselves), I found a single roll of 120 format Kodak Portra-160 which had been cut down to 828 format.

I loaded it up in the dark, accidentally rolled past the first frame, and then took the remaining seven exposures over the course of the following week. PhotoGarden had some fun trying to figure out what to do with it — developing it wasn't a problem, but printing it was going to be impossible. They said they could scan it, but it would be expensive because they'd have to do it by hand because of the odd size... I took it home and scanned it on my film scanner instead.



I very quickly noticed a focus problem: there wasn't any. I'm not sure what's up with this... maybe the camera was dropped at some point in its long life? Maybe I'm using it wrong? I don't know...



You'll note that this picture, at the camera's closest focus (2.5'), has the distant background in focus, which is bizarre (and suggests that the lens is way out of whack):



This only reaffirms my attachment to modern digital photography; the slow turnaround time and expense aren't worth the added romance of film!



I also really don't understand how people use non-TTL-preview cameras (i.e. anything not SLR or EVF); not being able to adjust the focus through-the-lens just seems insane to me, and must have made things — especially macro photography — very difficult to pull off.





Yep...

May 18, 2011 06:31 PM

May 13, 2011

Tim

All Done

May 13, 2011 03:25 AM

May 05, 2011

Tim

SAND

The game I've been working on all semester, SAND, is "done" (in the sense that Gamesfest is tomorrow, not in the sense that we're even remotely finished with it). I made a quick trailer for it which is a little bit bizarre because it only shows off 1v1 multiplayer, while the game doesn't work at all without 3v3. Still, it gives a pretty good idea about what the game looks like, if not how it plays.

If you're using Safari, it should show up below, otherwise view it at YouTube. Crank up the volume (you have to hear Pete's awesome music!) and quality and give it a watch.

May 05, 2011 10:33 PM

April 24, 2011

Tim

Andros

This Thursday will mark four years since our little group of CHS kids returned from the Bahamian "Big Yard". This year's trip just got back, and it reminded me that I still hadn't done anything with the journal-book-thing I'd been compiling so many years ago. Since it's clear now I won't be printing it, I figured I'd just post the PDF here!

So, here it is! I don't know what kind of sillyness lies within, as it's been years since I've read it, but enough work went into it that it's worth keeping somewhere!

April 24, 2011 09:15 PM

April 14, 2011

Tim

On RCOS and Getting a Job

A year and a half ago, I wrote a little bit about RCOS, mostly explaining what it is and why it's so important in the context of RPI. Recently, though, I've had the opportunity to experience another of the virtues of RCOS; one which the faculty will never see, and which the younger students can only dream of.

The first two months of this year were spent frantically submitting job applications via all possible means, responding to multitudes of emails, fielding phone screens from quite a few companies, and finally ending in on-sites. The majority of this went exactly as you or I would expect; however, looking back over all of these conversations, I noticed an interesting pattern:

They don't care about school.

Sure, they wanted someone with a Bachelor's. But to all of them, that part seemed to be entirely uninteresting. Besides brief, passing references ("What was your favorite class?"), there was nearly no discussion of formal education. I could likely have had an English degree and they wouldn't have cared; my answer to "What was your favorite class?" was often something in ARTS or COMM, and that didn't even begin to phase them. Grades didn't even come into the picture.

What did we talk about? We talked about Notebook, we talked about Seed, we talked about the code that runs this site, we talked about all of the random stuff on my GitHub. We even talked about RCOS explicitly, because they like to hire people who do things.

The thought of a single place to go to find people who actively participate in software projects outside of what is required to graduate, and to have the added benefit of being able to instantly investigate their code had some of these engineers and hiring managers salivating. I had one manager ask me about explicit internal details of one of my projects — things he couldn't have known had he not looked at the code, and things that would have been impossible for him to know had said code not been open-source.

The takeaway from this is simple, and bipartite:

April 14, 2011 02:54 PM

April 01, 2011

Matt

Milkyway@Home for iPhone / iOS

Milkyway@Home has now been released for iPhone / iOS! Now you can not only use your GPU to figure out the structure of our galaxy, but your phone too! You can get install instructions on the news post.

Technically, the new client is only semi-functional. The actual important core code is there and working, but the BOINC pieces are missing which are necessary for it to be to more (sort of) useful. It downloads 1 of about 5 sample workunits (which also happen to be 1000x smaller than the real versions so that they actually can complete on the phone). Checkpointing and some other stuff still works normally. There wasn't really time to port BOINC / the libraries, so there isn't any accounting or actual task fetching. The results also are just optionally emailed to me at Milkyway4iOS@gmail.com. I'm curious what results I'll get back.

The small tests that run in about 10 seconds on my desktop take over 20 minutes on my iPhone 3g, and drain the battery about 8%, so it's about 2 orders of magnitude slower. I do not think the full size units will complete in a week, although I haven't actually tried it.

April 01, 2011 02:40 AM

Tim

Milkyway@Home for iOS

Just in time for the end of the semester, Milkyway@Home, Matt's distributed computing project, has been ported to run on iOS, complete with the ability to download tasks from the Internet and submit results back to the project.

You can now contribute to humanity's understanding of the universe — on the go!

Visit the forum post if you want to install it on your (jailbroken) iOS 4.0+ device.

April 01, 2011 02:29 AM

March 30, 2011

Tim

A Tiny Bit of Awesomely Good News

Good news, everyone! Matt will be attending RPI's Physics Ph.D. program, starting in the fall!

March 30, 2011 07:47 PM

March 25, 2011

Tim

Alrighty Then, All Set

In my last post, I mentioned my inability to write code on the iPad.

I've fixed this. Sort of.



Quite the abomination.

March 25, 2011 10:46 PM

Matt

Milkyway N-body 0.40

I've just finished making the next release of the Milkyway@Home N-body simulation. These should start going out soon along with new searches. The major change in this version is that Lua is now used for configuration instead of the old static JSON file. You can now script a totally arbitrary initial particle distribution, and you can run a simulation without the milkyway background potential, so it's probably more useful for anyone else to use now for other N-body simulations.

This all started one night when I was planning on finishing the few remaining issues with the new CAL/CAL++/ATI Separation application, but needed to get some reference results from the working OpenCL application on Nvidia. But then Tim Horton left Jayne (the system with the GTX 480 donated by a Milkyway@Home user) running Windows and disappeared somewhere. Then there was something of an obstacle to doing what I was planning on doing and I thought it would be cool to have an embedded dynamic language. My original thought was to use JavaScript after Seed, but JavaScriptCore isn't really split out from Webkit, and the full Webkit dependency was too much for what I needed. I considered Python, but the Lua libraries were an order of magnitude smaller, so I chose it and spent the next few days getting basic things working. I spent a long time writing boring bindings for many of the structs for the N-body simulation. I later found that if I had used LuaJIT, it seems it would have done most of the work for me. About a week later I had something working. Although the mini-API isn't really close to what I originally envisioned or wanted, you can now script any simulation you want. I'm considering making it possible to use a Lua closure for the external potential, but I'm not sure how much slower that will be.

This enables more complex models to be fit without a need to make new releases, and avoids a need to mangle the code every time the model changes to support more combinations of features. The current plan is to try multi-component dwarfs, with an extra component of dark matter which will be ignored in the final likelihood calculation.

I've fixed a few other small random bugs, such as in some cases on Windows some system IO error would happen when checkpointing, and there would be a "something something failed: No error" type error message. I'm also using newer BOINC libraries for Linux to hopefully avoid the random crashes which were coming from the 6.10.58 libraries.

I've switched to only using the multithreaded versions using OpenMP for all systems. The 64-bit Windows build is now actually 64 bit as well. Building on Windows is still an agonizing process (mostly getting dependencies and a functioning build environment, not actually building it) I don't understand, but it's getting better.

You can download the source here.

March 25, 2011 09:33 PM

February 19, 2011

Matt

Worst bug ever

Today I fixed the most time consuming bug ever. I believe I've spent well over 50 hours total actively trying to find it, and countless more thinking about it. I first encountered this problem some time in early December on my first pass through the new CAL/CAL++ for ATI GPUs Milkyway@Home separation application. The final results were differed on the order of 10⁻⁶, much larger than the required accuracy within 10⁻¹². I took a long break in December and early January to apply to grad school and other things, but I was still thinking of the problem. Nearly all the time I've spent working on Milkyway@Home since I got back to RPI almost a month ago has been trying to find this bug. It's stolen dozens of hours from me, but it's finally working.

The problem was errors that looked like this:
CAL++ version errors

This is the μ · r area integrated over one ν step in the integral from the broken CAL version compared to the correct OpenCL results.

It looks like there's almost a sort of order to the error, with the grids and deep lines at some points, though the grids are much less prominent when the full range of errors are plotted, except for the deep line in the middle of r. I spent many hours looking for something related to reading/writing invalid positions in the various buffers used (I find dealing with image pitch and stuff very annoying), and every time finding that everything was right after many hours of tedious work comparing numbers.

It also didn't help that for a long time, my test inputs were not what I thought they were, which finally pushed me to get the automated testing I've meant to get working since I started working on the project last May.

I eventually happened to find this this on the internet.

I vaguely remember finding this before and reading "Declaring data buffers which contain IEEE double-precision floating point values as CAL_DOUBLE_1 or CAL_DOUBLE_2 would also prevent any issues with current AMD GPUs." and decided whatever changes it was talking about didn't apply to me, since I was already using the latest stuff and using the Radeon 5870. Apparently this is wrong.

This claims CAL_FORMAT_DOUBLE_2 should work correctly, but it apparently doesn't. I also don't understand why I can't use the integer formats for stuff put into constant buffers. I spent way too much of my time searching for random details in ATI documentation. It's rather annoying. Switching to the CAL_FORMAT_UNSIGNED_INT32_{2 | 4} formats for my buffers solved the stupid problem. I guess some kind of terrible sampling was going on? I don't understand how that results in the error plots, with half the buffer being much worse, and the grids.

I really don't understand why this wasn't in the actual documentation, and instead I just happened to find this. Only one of the provided examples for CAL uses doubles, and it is a very simple example.

February 19, 2011 08:14 PM

February 09, 2011

Matt

Milkyway@Home Windows Dependencies

I'm posting these so I don't accidentally almost lose them again, since it's rather painful to make them again, and in the unlikely event they're actually useful for someone else. I have binaries for the Milkyway@Home dependencies, in particular popt built with Visual Studio (which I ported last semester, which mostly involved removing C99 features, and casting mallocs since MSVC brings in lots of C++ stupidity to C while somehow also not supporting C99 features that are in C++). For MinGW libraries, the BOINC libraries are 6.10.58 with my patch to fix the MinGW build from last June, which still hasn't been applied. Crlibm, as required by the N-body to get consistent math results, I never got to truly work on Windows. These have the crlibm_init() function stripped out, since headers it was using to set the x87 FPU control flags seemed to be missing. It's been on my TODO list to get Crlibm properly working on Windows (and maybe with MSVC too), but I haven't gotten to it.

These are binaries for MSVC 2010, and for MinGW with GCC 4.4 (from TakeoffGW), for use with the static runtime (/MT). I had some trouble recently when trying to link these with GCC 4.5 stuff (at least the BOINC/C++ parts since C++ linking tends to stop working with new releases of things) from the new MinGW installer, so I'm not sure it will work with those. MinGW dependencies
MSVC dependencies
Popt built with Visual Studio


February 09, 2011 10:52 AM

January 10, 2011

Matt

Random Friday Adventure

The evening started out with a simple goal: to avoid paying extra for an Apple approved video card, and get more screens to work for Peter. For his Mac Pro, Peter made the unfortunate choice of a Radeon 5750, as this GPU does not have doubles. Doubles are a critical feature for Milkyway@Home. Apple's OpenCL implementation unfortunately seems to be missing support for doubles on GPUs which is also problematic.

We started out leaving Open Source Software Practice class and headed to Peter's apartment, stopping for pizza on the way. Peter gave us a tour of his scary apartment in the sketchy parts of Troy, and showed us the demon GPU. Tim and Peter argued for a while about something dealing with backups and new hard drives. Earlier Tim had been giving out hard drives after giving up on Jayne's disk situation and getting a new NAS box, in addition to random sale drives Peter had. Peter was concerned about preserving his torrents; his ratio is important to him. There was some kind of copy that was never going to finish.

To use this random GPU from Newegg in the Mac Pro, it needed new EFI friendly firmware or something like that. It's not exactly clear to me why it needs to be different. I had suggested to Peter getting the 5830, since the 5830 a much more acceptable card, with doubles! I found a comment on a blog post about these hacky firmwares which claimed to have it sort of working with some weird caveats about which outputs worked. The correct, good GPU with no work would be a 5870 from Apple, though that would be more expensive.

We sat around Peter's apartment for a while before heading to our apartment to use my desktop for flashing purposes. Peter drove us, but there wasn't parking near our apartment. We went one street over, a strange place I have never been before. I have had to swap my GPU on a daily basis recently to work on Milkyway@Home, so I put in Peter's new GPU. While waiting to be told the next step to try, I played with the AMD OpenCL examples. To flash the video card, we thought we needed to get a DOS boot disk with the flash utility, which couldn't be used from Windows. It turns out this is close to impossible. I don't really remember all the nonsense we tried, but there was all kinds of boot sector hackery, and 16-bit tools which wouldn't run. We spent many hours making various disks and trying to flash with each one. Files would just mysteriously not show up and pretty much everything was failing. While the garbage utilities we were trying to use were old, the whole experience seemed like an adventure in computer use from the very early 90s. We booted off of Tim's camera, although it didn't actually help.

We eventually gave up and decided we could try flashing it again after it was installed in the Mac Pro and see if it would just happen to work. We went outside and couldn't find Peter's car. We walked up and down the street looking for it, and Peter came to the conclusion that it was towed again. It turns out it was; the fence we parked in front of was apparently a driveway of sorts. The next day Peter was supposed to drive some person he had never met through some extended relation, and didn't really want to do it. He now had the perfect excuse to get out of it, but for some reason was determined to go get the car now. We didn't have any other way to get there, so we were going to walk.

We stopped at the pizza place briefly so Peter could get money for the tow from the ATM. We then started our walking adventure through Troy after midnight. I haven't really wandered through Troy yet in almost 4 years. This walking adventure took a bit more than half an hour to the fabulous garage. Some random people in a car parked there said the guy was calling back, but Peter still called the guy, who confirmed he was coming back. We headed around back to where the cars were and paid the tow guy, where some kind of sketchy guy showed up behind.

Peter paid $200 I think for the tow. It would have been cheaper to buy the Apple 5870 in the first place and avoid all of this. After that, we went to Denny's. Peter had commentary on some of the other patrons here at 2 am. I noticed that many of the people were old and wearing fancy clothes which I found strange.

I ordered some kind of food which I didn't quite understand what it was, so I pointed to it on the menu using my formidable social skills. I didn't quite get the right thing, but close enough. While sitting there eating, Peter explained that he had talked to Netkas about something or other related to the original GPU problem. Tim and I got excited, and sort of asked in disbelief about this conversation with him. It was kind of sad and hilarious that we both instantly recognized this completely random OSx86 hacker. We left Denny's and still didn't have a working GPU in a Mac Pro so everything was a complete failure.

January 10, 2011 12:21 PM

May 13, 2010

Matt

End of the semester

I've mostly spent the semester doing homework; I didn't make as much progress on Clutterhs as I had planned. I hope once that I'm done with finals, I'll have time to make the various changes I want and finish binding Clutter 1.2. The release of Clutter 0.2 is still waiting on those, as well as a release of gtk2hs.

In total, I've completed 58 physics homework assignments, 3 essays, 6 tests, a large number of class exercises and quizzes, and 3 upcoming finals. I've spent countless hours doing nothing but math. On occasion, there was lots of help from Mathematica.

In the 3 physics classes I took this semester (Electromagnetic Theory, Intro to Quantum Mechanics, Thermodynamics and Statistical Mechanics), in total I did 315 pages of LaTeX/ Lyx homework at an average length of 5.4 pages each. Nearly all of that being just math, with an occasional graph or chart. This is in addition to the countless scraps of paper I occasionally used (although as time passes I find myself just doing nearly all of the simple algebra in my head and entering directly into Lyx.)

I'm rather disappointed to not be going anywhere this summer. I applied to over a dozen different research programs for the summer for physics and astronomy at a wide array of random places; I was rejected from all of them. I finally did get accepted to work on milkyway@home, which is what I'll be working on this summer. I'm glad to be working on this, although I really don't want to stay in Troy. It may be my ideal research project.

I accidentally got accepted to GSoC. I applied as a final fallback in case I didn't get accepted to do research with milkyway@home. I found out after the GSoC deadline, and some time before the selected students were announced I dropped out as a student, at least according to melange. A while later it seems I was accepted anyway to work on the gobject introspection based binding generator for gtk2hs. I'll probably end up doing some work on this over the summer; it might also become what I work on next semester for RCOS. One of the other rejected Haskell proposals is now taking my place.

May 13, 2010 11:53 AM

Tim

Three Quarters

May 13, 2010 03:25 AM

May 08, 2010

Tim

My Once-in-a-Lifetime Bug

Two days ago, I received what ended up receiving an email which detailed what I believe to be the single most coincidental and epically ridiculous bug I will ever manage (I hope) to contribute to this world.

It turns out (as Mr. German-person so politely detailed) that the very simple random pattern generator that Robb and I implemented for Lights Off generates an "offensive" pattern at some point.

Now I won't go off on a tirade about how insane it is that someone can be offended by a 5x5 grid of lights, nor how it might actually be illegal to display said grid of lights in at least three countries, nor how the pattern that Lights Off was generating is actually completely different from the pattern that this person stated it was, and actually approximates an ancient symbol for peace (or good luck, or some such). Those are components of the human condition which mostly just serve to infuriate me, so I'll leave them alone.

What's important to note here is that the generation of the pattern is not the epic part of this bug. The fact that the level number which contained this pattern happens to also be a number often used as an identifying code within (despicable) groups of people who subscribe to the worldview symbolized by the "offensive" symbol... that is truly incredible.

That's also what made my fabulous new friend quite positive that I was one of those people.

Which I most certainly am not.

You can be assured he got an earful. Well... inbox-full.

I promise I was polite.

Sort-of.

In any case, he replied with a very polite, very over-apologetic response, even retracting his request that the "bug" be fixed. I fixed it anyway, as a side-effect of applying a patch that someone else wrote to improve the level generation algorithm (and make it significantly more complex).

If you're really interested in being "offended" (and you have to promise me that you won't take it out on me, I promise it's all totally random — you can inspect the source if you want!), you can start up Lucid, install lights-off, and go to level 88 (this will be fixed in GNOME 2.32, which will be in Maverick). Or, click here.

It's just not reasonable.

May 08, 2010 01:48 AM

May 07, 2010

Matt

Cornify!

One of the primary features of this blog from near the beginning was the addition of the Cornify button, currently at the top of the page. It makes unicorns happen. Last weekend at ROFLCon I had this picture taken of me with a unicorn, and with the guy who made Cornify right behind me wearing a unicorn shirt.



Unicorns are pretty cool.

May 07, 2010 10:37 PM

Tim

My Favorite New WebKit Bug!

Watch the window decorations!

HTML5 video below; will only work with very recent browsers. Otherwise, here!

May 07, 2010 02:04 PM

Horton Slab Writeup

Introduction

Don't expect this to be anything... it's just a bunch of relatively-disconnected words about what was going through my head at various times during the project, and how I fixed it, which I'm writing at the request of the professor. More or less...

Glyph shape

Each glyph is a Python class which, when instantiated, knows the properties of the glyph (weight, cap-height, slant, etc.). Using this information, it constructs the geometry of the glyph, which is made by combining two different primitives: line and circle. Both of these primitives can also be clipped by arbitrary polygons (this is how the C is constructed, for example: by taking a circle and clipping out a triangular wedge from it).

Geometry manipulation (basic boolean stuff; almost always either union, intersection, or difference) is done with the Shapely library, because I really didn't want to do that myself, as it's not very interesting.

Each glyph has a function which calculates its width relative to one em, information which is used heavily during the drawing phase.

The glyph shape function can be either very complicated (like, say, 2) or very simple, like that of the lowercase l:

    mainLine = Line(self.p(0.5, 1.0), self.p(0.5, 0.0),
                    self.weight(), serif=5)
    return [mainLine]


That's a very simple one. 2, in comparison, is about 50 lines long...

The line constructor that you see above takes three required arguments: the location of both endpoints, and the weight of the line to be drawn. The optional serif argument adds serifs, which we'll talk about later.

The 'p' function (I needed a really short name because I call it hundreds of times and wanted it to be neat - think of it as 'position') that I call there takes a percentage position (0.0 to 1.0) in x and y (measured from the bottom left, like things should be done) and turns it into coordinates in the glyph's coordinate space. p also takes another argument which determines whether it should consider the top of the glyph to be at the cap-height or the x-height.

Many of the glyphs have small adjustments that are made to the shape of the glyph as the weight changes, in order to correct for unpleasant effects.

So, the l above makes a line from the top, halfway across the glyph, to the bottom, halfway across the glyph, at the full weight of the glyph, with the 5th serif type, which will be described below.

You can look at the rest of the glyph functions on GitHub: Capitals, lowercase, numerals, punctuation.

Strange or Missing Glyphs

I added center-dot (for multiplication) and interrobang (at the request of my roommates) to the normal set of glyphs. My 0 is too wide, but I couldn't bring myself to make it an oval (or, more likely, similar to the shape of the 6 or 9). My angle-brackets are huge. HUGE! Maybe I'll fix them someday. I'm missing curly braces, because they'd be really annoying to draw. Much worse than 2, which was enough of a pain that I don't want to endure it again.

Serifs

Serifs are actually added by the line drawing logic - each character doesn't really need to know how to draw a serif, it just needs to know what kind of serif it wants, and asks politely for that. There are 6 kinds of serifs a glyph can ask for on one of its lines:

    0 - No serifs
    1 - A vertical half serif on one end of the line. (E)
    2 - A vertical half serif on both ends of the line. (T)
    3 - A full serif on one end of the line. (A)
    4 - A full serif on both ends of the line. (H)
    5 - A full serif on one end of the line, a half serif on the other. (l)
    6 - A half serif on one end of the line. (j)


The fact that glyphs don't know about serifs is neat, because it means we can turn off the serifs very easily, by just asking Line not to draw any! That's how we get the sans-serif variant, which isn't on the poster, but that's ok... it's just not as awesome.

Properties

PHI = 1.618... (golden ratio)

Fixed glyph properties are as follows:

    1 em = capHeight / PHI
    xHeight = capHeight / PHI


The defaults for variable glyph properties are as follows:

    weight = 3 (this is a unitless measure, where ultralight = 0.5 and heavy = 7)
    slanted = False (not really italic, it's more slanted than anything)
    outlined = False (this was more for testing, but turned it into outlines)
    color = Black (obvious)
    serifed = True (whether or not Line should draw serifs for this glyph)
    autoKern = True (you'll see, in a bit)


Italic

The italic variant isn't nearly as neat as all the rest, it's just made quite literally by shearing the character with Cairo while it's being drawn. Not interesting, not particularly awesome, but it worked out OK. There's a pretty good chance it will break the consistency of inter-word spacing, but I'm not totally sure how to fix that (without doing the shearing beforehand, with Shapely... or manually).

Weights

Technically, you can generate glyphs of whatever weight you want, because it's all procedurally generated. However, I blessed a few weights so that I didn't have to look at/tweak more than a few weights:

    Ultralight = 0.5
    Light = 2.0
    Regular = 3.0
    Bold = 5.0
    Heavy = 7.0


Kerning

Kerning was a stickling point for the first few days. At that point, I was just throwing glyphs down and advancing the x position by the reported width of the glyph. We all know why this doesn't work, though, with the AV pair being the classic example.

So, instead, I wrote an optical autokerner in a few lines of Python. It works by placing the two glyphs on a plane and shifting them back and forth until it finds the boundary where they're just touching, then adds the correct amount of kerning. There's a kerning table which gives adjustments relative to this value, but it only has a handful of entries (one case which was particularly problematic was +=, where the bar of the plus slid directly into the middle slot of the equal-sign, kerning them way too tightly). It could probably do with a few entries, but after all this, I didn't have a lot of time to work on the kerning table, and I didn't really think it looked terrible - at least not enough to worry about.

There's another issue with the optical autokerning: punctuation. Tiny little dots don't autokern well at all; also, quotes don't ever collide with lowercase letters, so that breaks things too... So I added a per-glyph override which instead kerns based on the bounding box of the glyph extended to basically-infinity in the vertical direction. This mostly fixes the problems with punctuation.

The autokerner is really quite slow (as you might expect), especially for large blocks of text, so there's a disk-based cache that stores the kerning values between runs. You have to delete it if you change the glyph shape, or your kerning will be horribly wrong. Also, the cache is per-capHeight-per-weight (as kerning values change slightly), so if you change the capHeight or weight, get ready to wait again...

Layout

The space character is also a glyph - it's a square block which is special-cased to not be drawn at all in the drawing logic. This fixed a lot of trouble I was having when advancing words in the "stupid" way (just adding some amount of x-advance each time you see a space character), where the space between the words ended up varying significantly, which was really tripping up reading.

My line-breaking algorithm is horribly primitive: it just draws words at a time; when it gets to each word, it checks to see if it's past the edge of the layout box. If it is, it moves down by the leading and moves back to the left side of the box. This is a problem mostly because it means the last word on a line could be (and usually is) extending beyond the right side of the layout box. Also, it creates really crappy right rag unless you pay a lot of attention, because it's really not aware of the idea of rag.

If I had a ton more time, I'd implement Knuth's famous line-breaking algorithm (the one TeX uses), which is pretty much ideal, but since I don't have that kind of time, I decided against writing a poor knockoff. I've heard it's not actually that complicated, but... relative terms...

Input Format

The main program takes an XML file with a very simple format. For example, you can see the one that makes the description of the various weights that's on the poster here.

There are only a few tags defined:

    u, l, r, b, h = Weight (ultralight, light, regular, bold, heavy)
    i = Slanted/Italic
    br = Newline
    textbox (attributes x, y, size, width, height) = A reflowing text container
    leading, tracking, size (attribute px) = Obvious text properties
    color (attributes r, g, b, a) = Obvious color properties
    sans, serif = Turn on/off serifs


More Stuff

If you have any questions, feel free to email me.

The code is all open-source, under the relatively permissive 2-clause BSD license, which basically just says you can do what you want with it as long as you keep my copyright header around... (the terms are in LICENSE in the source directory, but they're exactly the same as all of the gazillions of other BSD projects out there). The code is here.

Libraries/Thanks

Python
GEOS + Shapely
Cairo + PyCairo
ElementTree

May 07, 2010 11:15 AM

May 02, 2010

Tim

Lots of Pictures

I made a little scatterplot of the number of pictures I've taken each day for the last four-and-almost-one-half years (I have data back further, but it's uninteresting before I had a camera, obviously!).



You'll have to click on it to see details; I've labeled various high-yield or interesting events.

A few things:

May 02, 2010 07:23 PM

Robb

Glide Update…

Glide has gained all sorts of awesome things in the last few weeks…I won’t try and enumerate them all here I guess, because I think the codebase has perhaps more than doubled in size since I last blogged…

But heres a picture:
Glide

Besides the UI overhaul, there’s an actor printing system (vector PDF export!), a new archive file format, a new animation system (with Vala?!?!), and this whole new inspector thing on the right…

Try it out?

by racarr at May 02, 2010 08:28 AM

April 29, 2010

Tim

Orbitals, Particles, a Font, and some Sheeple

Apparently the semester's nearly over, or so I've been told (repeatedly. naggingly.)! In any case, I've gotten a lot more done on some things than I expected, and a lot less on others... it's always hard to predict how the semester will go.

A Font

For Typography, I've been working on the font + renderer + autokerner that I just wrote about the other day. I won't post any more pictures, just scroll down a little further to see that post!

Orbitals

For Parallel Programming, I've been working on a atomic orbital simulation, using OpenCL to evaluate the electron probability density function for a hydrogen atom at many, many points. It makes nice smooth images like this:



It's showing approximately a 20x speedup, moving from Zoe's CPU to GPU (Core i7 @ 2x2.66/3.33GHz to a NVIDIA GeForce 330M GT). The move from Zoe's CPU to Jayne's GPU (the 4890) is even more awesome; it's something like 40x faster!

Eventually (soon), I'm going to make an animation with it, and then it's time to write a paper!

Particles

For Advanced Computer Graphics, I've been working on a particle system simulator that uses (surprise!) OpenCL to simulate tons and tons of particles at once (millions, anyway). And render them, attractively (the renderer is still in its infancy). And it comes with a tool to design them, too (also incomplete).

I don't have any really interesting examples to show now, because I just got emitters to work. Below is a picture of something like 1,000,000 particles being blown away from the origin by two "simple"-type forces (they just push outward from a point, with inverse-square falloff).



And a video (which will only work if you're using a very recent Chrome or Safari, probably) of the same simulation, though with only 128K points. This simulation really isn't interesting because there's nothing complicated going on. I've got gravity working, which is a gazillion times more interesting and more complicated, but I'll post pictures and video of that some other day (it's also much, much slower).

It also turns out that the overhead of OpenCL isn't worth it for simple forces; it significantly speeds up complex (O(n^2)) forces like gravity (I'm aware of many ways to speed up n-body simulation, I just haven't had a chance to implement them yet), but for O(n) forces like below, it really only provides a tiny-to-near-zero gain.



Sheeple

All of this (plus normal coursework) leaves less time than desired for other things, but I still manage to occasionally put a few hours in to work on Sheeple. I feel bad that I don't have tons of time for RCOS work, though I will note that all of these projects are open source (all of them are under the 2-clause BSD license except Sheeple, which is GPLv3), so the general idea of promoting/using/writing OSS is still there :-)

I recently wrote and pushed a partial implementation of a Google Contacts backend for Sheeple. It's a lot smaller (and nicer, since it's written in Vala), and it's what I'd like to use for the time being while developing the UI and backend stuff, since it's a lot easier to change.

Another thing that contributes to slow Sheeple development is that everything now takes place in a VM; I don't have a native Linux install anymore, and I consider that a good thing. I've gotten sick of wasting time with a broken system, and I'm just not going to do that anymore - I don't care enough nor have enough time to spend to fix things, and I'm just generally all-around much happier in OS X. So both of my machines are running OS X, and I'm pretty sure that's how it's going to stay for the foreseeable future.

I should thank Moorthy and Sean O'Sullivan for putting up with me, and for constructing RCOS and keeping it alive. I wrote a long bit about what I think about RCOS and the people involved a few months ago, and that all still stands. Given this semester's overload (which will likely continue next semester) and how RCOS has worked out within this semester, I find it somewhat likely that I'm not going to participate next semester; I feel guilty about being paid to do much less work than I feel like I should be doing. I'll still hang around, certainly, and I'll (obviously) still write OSS, I'll even happily talk about stuff I'm working on, but the absence of that feeling of guilt/obligation/deadline (and also the ability to bounce between projects as I feel like it) will be quite the load off.

April 29, 2010 02:29 PM

April 27, 2010

Robb

Looking for a summer job/internship…

So, I know this is really late, but my plans for the summer have, shifted around recently, and now I find myself looking for a summer job.

I was planning to stay in Troy for the summer, and continue my work with the Rennselaer Center for Open Source Software on Glide. However, due to a sort of perfect storm of a lot of things, and some personal reflection, I think I am going home for the summer, and taking some time to be in an environment where I can focus on developing a more healthy lifestyle. Need some time away from Troy too…

So, if anyone still has some summer positions available for a college student, and likes the idea of me working on open-source software (I would really love it if I could work on something in the GNOME ecosystem in particular) instead of flipping burgers this summer, I would love to hear from you! (racarr AT gnome DOT org). I would be looking to work from somewhere around June to August, but there is a little flexibility here.

To give people some background on me: I am currently a junior at Rensselaer Polytechnic Institute, majoring in Computer Science (though I expect to graduate with a dual in Pure Mathematics). I’m probably best known in the GNOME community for developing Seed, and I’m currently working on Clutter/GTK+ based presentation software, Glide (see a blog post back). I previously was an involved developer in the Beryl and Compiz Fusion projects. I’ve had some random (GNOME-y and not) dabblings too.

A position where I could work from home, would be greatly preferred…however…if anyone wants to relocate me to Europe…or maybe something like California for the summer…that would be pretty exciting also.

Anyway, if anyone has any prospects (or can maybe point me at some established things that are still open for application), it would be much appreciated. I have not updated a resume in a while, but I can prepare one in pretty short order.

Thanks!

by racarr at April 27, 2010 03:21 AM

April 26, 2010

Tim

Horton Slab?!

I've spent the last almost-exactly-one week working on my final project for Typography. During the first class, back in January, I decided that I'd try to put together a font for my final project.

I didn't get started as early as I perhaps should have, mostly because I have other final projects I've been working on all semester, so I decided to take this last week off from other projects and just concentrate on this.

Of course, there was no way anyone was going to get me to sit in a room with FontLab for hours on end (it's a horrible program), so I had to come up with something different to do, to make it an interesting project. I eventually decided to try a somewhat different approach: a procedurally-generated font.

Horton Slab (and its sans-serif variant, which you won't see here today) is implemented in Python; each glyph is a separate class with knowledge of its properties, and constructs its geometry from this knowledge. This means that — given enough care — you can automatically generate quite reasonable alternative faces (at different weights, with italics, with or without serifs, etc), reducing design time significantly.

Most of the ratios in the font are derived from phi, the golden ratio. The ratio of cap-height to x-height, serif thickness to stem thickness, height of the crossbar in A, E, F, G, H, etc. to the cap-height, the depth of the middle of M, and many, many other things. This isn't as strict as it could be, but I sometimes sacrificed phi-ness (the original guiding design property) for readability or beauty.

I also implemented a relatively primitive layout engine and an autokerner. There are only a few entries in my kerning overrides table (something like 10) — it turns out that a very simple approach to optical kerning actually works somewhat well.

All of the code is available on GitHub as always, and under a BSD license.

Everything you see below was designed in a silly XML-based markup that my layout engine accepts, and clicking on them will open the straight-out-of-engine PDF.



All of the glyphs I have at the moment:



Some pseudo-Latin filler text:



And a classic Sagan quote:

April 26, 2010 03:41 AM

April 22, 2010

Tim

Peanut

Almost exactly two months ago, I wrote about the loss of Punkin, Vivian and Margaret's cat; I also mentioned his brother, Peanut, briefly.



Unfortunately, it seems that Peanut was unable to cope with his brother's absence. It came as a surprise when Vivian told me that he was ill on Wednesday evening; they had mentioned that he seemed a bit lost without Punkin, but I didn't realize just how much. By Thursday, his organs had failed to the point where they had to put him to sleep.

Peanut was the skittish of the pair, for sure. He would often dart away from affection; though that tendency weaned significantly in his later years. Still, when you managed to catch up with him, he could be just as loving as his sibling.



It's hard to believe he's gone now, just a few weeks after I last visited him (on Easter weekend); we'll miss Peanut dearly, but I think he's probably happier now alongside his brother, as he always was when they were both with us.

Goodbye.

April 22, 2010 11:57 PM

Meet Zoe

It's no secret that my main machine, Kaylee, has been dying for quite some time. Between being bitten (for a second time) by the NVidia 8-series solder failure (which I've temporarily remedied by baking the logic board) and simple wear and tear from being beat on for many hours a day for the past almost-3 years, there wasn't much of a life left for that poor machine. I wrote a little bit about the various problems (and the many wonderful things we've been through)a few months ago, when I thought a replacement would be coming soon.

It took a bit longer than expected for Apple to launch Arrandale-based laptops, but they finally did, last Tuesday. Matt and I both ordered one on launch day; Matt to replace his RPI-issue ThinkPad, and myself to replace Kaylee.

I'm happy to report that I'm typing this on a shiny new black-and-silver keyboard: my new machine got here today! It's just as fast as I was hoping, between the Core i7 CPU and the Intel SSD that I installed in the optical drive bay and which is hosting my root partition!



I used the "Remote Install Mac OS X" tool that came out around the introduction of the MacBook Air to install (since I no longer have an optical drive in the machine)... it's definitely the slickest NetBoot interface I've seen; very cute!



And as for the name? Zoe, of course, keeping in the general naming trend (sci-fi characters, girls for Macs and guys for PCs). Zoe is the last (and second) of the Firefly girls who isn't either "Inara" (which doesn't roll off the tongue as well) or reeking of insanity and instability (River). So this is the end of the Firefly names, unless I get another PC before a Mac ("Mal! bad, from the Latin"). Luckily, Zoe provides an excellent jumping point into another (much larger) sci-fi universe:



This is a really bizarre picture (what in god's name is that thing on Daniel's face?) of part of the casts of Caprica and the recent reimagining of Battlestar Galactica.

In any case, Zoe Washburne, Zoe Greystone, let's say it's named after both!



Kaylee and Zoe meeting for the first time, this morning.



I got a 160 GB Intel SSD, and installed it in the optical drive bay. It's incredibly fast (incredibly; random read benches at something like 60x the speed of Jayne's disks, and more like 100x Kaylee's), and hosts my root partition, all of my applications, settings, things like that. It's incredibly rare that you get numbers like sixty times anywhere in the computing world, so I'm excited! I'm keeping my photos, music, and documents on the 500 GB magnetic disk that came with the machine (which also seems to be quite snappy as far as laptop hard drives go), since there's not nearly enough space on the root disk.

That's all I have to say for now. I'll definitely be back with more thoughts, after I've had a few days to play around.

April 22, 2010 10:24 PM

April 20, 2010

Robb

Introducing…Glide! Presentations for GNOME

This semester, with the (unfortunately blogless) Amy Wieliczka, I’ve been working sponsored by the Rennselaer Center for Open Source Software, on a project called Glide.
Glide
Excuse my broken GTK theme…

Glide is a Clutter/GTK based presentation application. I could go on for ages complaining about presentation applications, but um…maybe later, for now Glide is still a baby.

The code is on GNOME git, and, there is a fair amount there, and in fact, I think you could play with it today, using backgrounds+text/image elements, and some pretty Slide transitions, and probably make something a little more satisfying than you would in open office present. Build it, try it out. email me (racarr AT gnome), etc, etc…

Glide however is still in rapid development, within the next few weeks, there will likely be major changes. Probably an overhaul of the animations system, add a timeline editor for laying out transitions. An implementation of PDF export that doesn’t cheat. A templating/themeing system, along with an archive file format (containing all resources needed by the presentation! hoorah!). Then probably another pass over the UI…after this I’d like there to be some sort of 0.1 release.

Anyway, I’ve been putting off this post, and want to get it written…so…I’m going to leave it here. Thanks to Professor Moorthy and Sean O’ Sullivan for RCOS, a program which has perhaps been one of the defining experiences of my career as a student at RPI.

by racarr at April 20, 2010 10:06 AM

April 14, 2010

Tim

California Dreamin'

A Summer Job

Good news! I've been offered (and have accepted) an internship position at Qualcomm in San Diego for the summer. It's an excellent offer, including relocation to and from California, housing for the summer (sharing a 2-bed 2-bath apartment with another intern), and various other things.

I'm not totally sure what I'm going to be working on (I'll talk more about that in the future, if I can), but it sounds like I'm going to be writing C for some manner of embedded platform for a mobile device, which sounds like fun! I'm really happiest in C anyway, so that works out well for me.

One thing that I was a bit worried about was Amy's graduation: she's finishing high school this summer, and I'm going to be just over 3,000 miles away. My parents decided that they'd fly me home for graduation, in any case, so that I wouldn't have to miss it!

A New Machine

Apple finally announced new MacBook Pros yesterday; I'll write more when it gets here, but thanks to Mom and Dad and Vivian and Margaret, there's one headed my way! I got the 15" with the Core i7, the 7200 RPM 500GB disk, and the 1680x1050 display (a much-needed upgrade from 1440x900, but not the resolution I wish it could be...). I'm planning on — at some point over the summer — swapping the rarely-used optical drive for an Intel SSD, depending on how Matt's experiments with said drive go over the next few weeks (I expect drooling to ensue). I just have to remember to take my external optical drive to California with me!

Anyway; it's got a name, but I'll share that later, when it gets here.

April 14, 2010 01:48 AM

April 06, 2010

Tim

Typeline

Some silly thing I made in Flash (I'm so sorry, world!) for Typography...

Some of these are a bit of a stretch, but I needed it to fit!

April 06, 2010 05:37 PM

April 01, 2010

Robb

Hell.o blog world, long time no see…

Hello everyone! I know I haven’t been much around lately :( life as a student is kind of dominating me. I am working on a Clutter based slide show application now (for the Rensselaer Center for Open Source Software http://rcos.cs.rpi.edu/ :D , thanks Sean O’Sullivan and Professor Moorthy) and I’m pretty committed to making a release in about two weeks. I’m pretty excited about this, but that’s not what this post is about.

I wanted to take an opportunity to show some awesome stuff people have been doing, and thank them for it, because I’ve been bad about replying to emails. A lot of people have been doing some cool stuff with Seed lately, so in no particular order…some cool stuff.

Alan Knowles has created a Seed documentation site (http://devel.akbkhome.com/seed/) generated from the code at http://git.gnome.org/browse/introspection-doc-generator/. I think this has been a clear gap missing, as C documentation can be a little intimidating for some people (despite how easy we C hackers would find it to translate). Alan spoke to me recently about maybe moving this in to gnome-js-common and I am all for it, hopefully something to that effect will happen for the next few days.

Alan also has a blog at http://alsaf1.wordpress.com/, where he’s been writing up some Seed tutorials. I’m really excited to have this sort of documentation for Seed, as it was…another gap! which neither the examples, or the few documents really fulfilled.

Alan has also been fixing a lot of bugs and just generally being awesome.

On the other Alan front, Alan Forbes has been helpful on the mailing list and has written a very introductory level tutorial at http://live.gnome.org/Seed/Tutorial.

Alexandre Mazari has written something called http://gitorious.org/seedkit, which I think is a really cool concept, and one I’ve thought about since the inception of Seed, I haven’t looked in to the implementation much yet though. Alexandre also fixed some bugs. Thanks :D

A few other people have been fixing some bugs lately…I don’t want to name everyone for risk of missing someone, but thanks :D . I haven’t had much time to work on Seed lately, but have been excited lately to see people using it. Even though development has definitely slowed, I feel like a lot of the worst bugs have been solved, and as far as I know there are quite a few people out there trying to make applications with it (who occasionally send me emails!). I was excited to see the Seed based same-gnome rewrite on the 2.30 release notes, and I hope people are enjoying it :D

Speaking of clutter-gnome-game-wizards. A big thanks to Tim Horton too, Seed never would have happened without Tim, and he keeps it going when I’m too holed away to pay attention to emails. Maybe an apology to Tim also.

School is going well…have to finish a radiosity solver today :( . Summer is approaching fast! If anymore interesting summer jobs than staying in Troy and hacking from home…

by racarr at April 01, 2010 04:47 PM

March 30, 2010

Tim

Tim and Carol in NYC

About three months ago, She & Him announced a few tour dates for their then-unreleased second album, the aptly-named Volume Two. I was scanning the list, noticing a severe lack of "Albany", "Boston", or "Burlington", when two dates in New York City caught my eye. The Bowery Ballroom - March 29th and 30th, they said. I asked Amy if she could go, but - being a Monday, a school day - she wasn't going to be able to pull that off.

Once I got back to RPI (in late January), I asked Carol (and Nate) if I could steal her for a day at the end of March. She managed to get a day off from work, and we got tickets to the concert and various forms of transportation. Getting concert tickets was a bit of a pain — the internet has made it very easy for scalpers to immediately consume the entire supply of tickets, especially to very small shows like this — but we eventually got it all sorted out.

As March drew to a close, it became clear that the 29th was going to be a disgustingly rainy day, both in NYC and Troy. "Oh, well," we said as we boarded a Megabus nearby the local Amtrak station — we were determined to make something awesome of the day, regardless of the weather.

We rode, chatted, and tried to nap on the top level of the double-decker bus all the way to Penn Station, getting in at just after 1 PM. After getting out and getting oriented, we meandered up Seventh Ave., heading in the general direction of MoMA, one of our potential plans for the few hours we had before the concert. On the way, we decided that food might be nice, and stopped at a small Chinese place called Ginger's which Carol spotted. The food was surprisingly good for a Chinese place, and we moved on, satisfied.



After a filling lunch, the subway seemed like a good option — in addition, we knew we were going to need to figure out the MTA so we could get to the concert on time. In retrospect I'm very glad we did this, as it turns out they made the horribly unfortunate choice (unlike Boston's MBTA) of putting maps after you've gone through the ticket machines, which through me off significantly.

The subway eventually put us relatively close to MoMA (ordinarily this would have been walking distance, but the rain coupled with the fact that we only had a single gigantic awkward-for-tight-NYC-streets umbrella with us led us to opt for the subway). We got down to the museum, only to spot enormous lines of people with the exact same idea. Walking through the lobby observing the crowds only cemented my belief that we'd never get in if we waited there. So, we gave up on that idea — we'll be back another day — and headed towards another classic NYC museum: the Metropolitan Museum of Art. Carol had been to the Met before, but noted that there was so much to see that she'd happily go again; I've never managed to visit either, myself.

Heading towards the Met, we walked through the puddles and mud up Fifth Ave., past many sights I've seen a few times before — Trump Tower, the iconic Apple Store, FAO Schwarz, etc. — up to Central Park. We decided that the umbrella would be less painful in the park, which seemed relatively empty, so we left the road for the somewhat-depressingly-wet park walkways.

I should note now that while it may seem like we shouldn't have been having a good time, between the weather and the crowded museum, we were actually having a lot of fun just enjoying the city and hanging out and looking around and chatting and such. As you'd expect!



The walk through the park was greatly improved by the various flowers just starting to pop out of the ground — it's pretty clear spring is on it's way, even if we have a month of rain ahead of us. We eventually got to the seemingly completely deserted Met, only to read the sign stating that they're closed on Mondays. I feel like I actually discovered this the last time I was in NYC, but I'd forgotten until we got there. I suppose that this somewhat explains the ridiculous lines at MoMA, but was rather unfortunate for us; we managed to spend a few hours wandering the city with our plan of getting inside out of the rain for a while continually falling down around us.

We decided to forego that plan and head (by subway, thank god) to Times Square and wander around some more (a pretty reasonable NYC backup plan, I guess!), which went well. I don't think Carol was particularly entertained by my reluctance to enjoy the various crazy stores (Hershey's, the M&M store, Toys R Us, etc.) around there, but nobody ever is! Oh, well!



At this point it was getting late — time for dinner, and to find our way to the Bowery Ballroom for the show. We decided to combine these things; the Bowery is smack dab in the middle of the Chinatown/Little Italy region, so we once again went underground and found ourselves in a new part of the city. After a short bit of looking around, we found (by found, I mean the guy standing outside the door managed to entice Carol to come inside with his descriptions of various dishes, while I was fussing with my phone trying to find things with Yelp) an excellent little Italian place, Paesano's, which served fabulous — if somewhat overportioned — food. I don't think either of us came close to finishing our dinners, but we certainly both agreed that they were excellent, and were impressed that food wasn't the problem that it usually is on trips like these. The atmosphere there was nice, too... the waiters were really nice, and totally on their game the whole time. I'd definitely recommend it, if you happen to end up in the area.

Seven thirty eventually rolled around, and it was time to head over for the show, which started at 8 (or so I thought). We found the Bowery with no problem; it took us a minute to determine whether or not we could go inside, as there were tons of people standing around (apparently waiting for others). After making our way through the real-life-gigantic-scary bouncers, we found ourselves in a dimly lit room filled with the sort of crowd that frequents these sorts of things. I'm not totally sure how to describe them, but if you'd been there, you'd know exactly what I mean.

It turned out that the show didn't really start until 9:00, so we stood inside the ballroom for an hour, chatting and observing the crowd. Eventually the starting band came on — the super-hippie harmony group The Living Sisters. While it was clear that they were technically-competent and actually all had quite excellent voices, Carol and I were in agreement that it wasn't something we'd buy and listen to on our own. Still, they certainly entertained us... maybe nod in the way they'd hoped, but I suppose it was worth something!

It was at this point that we realized we had a serious problem — She & Him still hadn't come on at 9:30, and our train out was at 10:50, 20 minutes from where we were. We spend a good part of the intermission IMing and texting everyone from school trying to find someone who knew someone who lived in NYC, looking for a couch to crash on (there was no way I was going to leave without my concert!). After quite a bit of semi-panicked chatting, I decided to let Mom freak out, and sent her a text asking if she had any ideas. Luckily, I CC-ed Amy, who — after a bit of searching — found a bus company who had a 12:01 AM bus to Albany. Success!

If it hadn't been for Amy, we would have ended up camping out in Penn Station or the 5th Ave. Apple Store, neither of which would have gone over well with the staff, I suppose.

As it was, we only got to see about half of Zooey & Matt's show, but it was enough to make me very happy — it was exactly what I was hoping for, and I had a great time! Zooey is still adorable in person, they all sang/played very well, and thankfully played a mix of songs from both Volume One and Volume Two. You could tell when a song was from Volume One, as the whole crowd was able to sing along; Volume Two came out like a week before the concert, and nobody's really familiar with it (except for In The Sun, which was released as a single) yet!

All in all, it was one of my favorite concerts, even considering the fact that I missed half of it (she covered a lot of the awesome stuff; I only really missed Sentimental Heart, my personal favorite)! I'm really, really glad I went, I'm glad I dragged Carol along with me (I'm not sure the whole day would have worked out as well/smoothly with just about anybody else), I'm glad we waited, and I'm glad it all worked out.

So, yeah, the concert was excellent! Hopefully at some point in the future I'll get to take Amy and stay for the whole thing :-)



Most of the rest of the evening went off without a hitch; we got to the bus just on time, having taken a taxi (some random people saw Carol's distress at trying to hail a taxi and got one for her; that's something I probably wouldn't have been able to pull off at all!) to the Port Authority Bus Terminal. Once on the bus, we realized that we should probably look up where it was going to, since it seemed unlikely to take us to the train station, where our car was. Indeed, the bus was destined for the Greyhound station in Albany, on the wrong side of the river (though only a mile from the car, it was 3 AM, not an ideal time to make that walk!)... back to AIM, searching for people at school who would still be awake at 3 AM!

Ryan had already been planning to stay up all night, so he came and saved us (for which we are eternally grateful!), shuttling us over the bridge to Carol's car. We got home at around 3:30, grabbed water, and promptly fell asleep (some more soundly than others, apparently).

All-in-all, it was an absolutely awesome day for all involved. We had a lot of fun, and perhaps we'll do something similar again (in a few months, after we've recovered from this trip!)...

March 30, 2010 10:32 PM

March 23, 2010

Tim

A Miraculous Recovery

Or, How I Baked My 400$ Logic Board In An Oven For Ten Minutes And Successfully Repaired It...

Take One

On one day nearly two years ago, one year after I'd acquired my current MacBook Pro, Kaylee, I opened the lid to a black screen. A black screen which stayed black, no matter what I tried to do. It was booting, though — using ioreg over ssh, I determined that it thought my video card (the now-somewhat-aging but still powerful NVIDIA 8600M) had suddenly become an integrated Intel X3100 — something which, barring the existence of gremlins or elves, had certainly not happened.

At that point, few people had heard of the NVIDIA 8-series solder failures. Approximately a week after my machine died, NVIDIA took a 150 million dollar hit to predicted revenue for that quarter to cover the fact that some of their mobile GPU lines were failing at "higher than usual" rates. Some people today believe that the entire 8-series was affected, even the desktop chips, but that the mobile chips failed at far greater rates because of the inherently more unfortunate thermal conditions within a laptop. It turned out that some of the solder connecting the GPU to the motherboard (or to the discrete card, in the case of the desktop chips) was of poor quality, developing cracks over time with repeated heating and cooling cycles.

I took my machine to Small Dog Electronics, who subsequently sent it to Apple for a logic board replacement. This was before Apple knew what was going on; before (almost a year, actually) the repair program was in place, so I convinced my parents (thanks, again!) to pay for the repairs.

Take Two

Fast forward to Saturday; almost two years after the first failure. Wake up Kaylee, no backlight. Power off, try again. Black screen, no backlight, but the disk sounds like it's booting just fine. I eventually managed to enable SSH (by pulling the disk out and attaching it to another machine) and noted that — once again — my video card reported itself as a Intel X3100. Grr...

This time around, I didn't really see repair as an option. While Apple now has a free repair program for this problem, I've beat my machine far beyond the point where any sane company would accept it for repairs even if I were to throw money at them. I didn't bother to even try. Besides, I'm really just waiting for new models and then I'm going to replace it, so it's hard to justify much effort to keep this machine alive.

On Sunday I stripped the MacBook Pro down, disconnecting everything from the motherboard, removing it, applying heat from a hairdryer and massaging the GPU... I figured, at this point, I've got nothing to lose, so I'll try it. I had to reapply thermal paste and reattach the heatsink, all that fun stuff. After reconnecting everything, no dice. I offered bits and pieces to other people (battery and memory are still useful), and put Kaylee in a box.



Monday rolled around, and my father pointed out that BGA solder doesn't actually melt at a temperature that you can achieve with a hairdryer, but that an oven at around 400°F should do it... so I decided that I'd try that as a last-ditch attempt.

Strip the machine back down, remove the motherboard again, throw it in the oven at 380°F for 10 minutes, wrapped in aluminum foil except for a small hole above the GPU.

Put it all back together, turn it on. The power light blinks... that's not right! I eventually realized that I forgot to put the RAM back in. Fix that, hit the power button again... GRAY SCREEN! And it booted, happily.

I still don't believe it worked — it's by far the most incredible and amazing repair I've ever performed, and I'm incredibly happy that it both didn't melt the CPU and actually managed to fix the GPU (I'm sitting here waiting for class to start, typing away on Kaylee...).

March 23, 2010 01:17 PM

March 07, 2010

Tim

Things I'm Excited For, Early 2010 Edition



There's all sorts of exciting things to think about right now!

First off, this is spring break, so I have a nice week to relax without too much worry about school stuff. Second off, it's also show week for Amy, so that means there's going to be an awesome Colchester Theatre Company production to partake in at the end of the week! Dad says the set is enormous, and Amy hasn't started worrying about things coming together as much as she usually does, so it should be excellent! Being home also means getting to see Kaitlyn for the first time since winter break, which should be awesome :-) All wonderful things!

Next, Carol and I are going to New York City (center of the universe!) in three weeks (on the 29th)! I acquired tickets to see Zooey Deschanel and M. Ward (as She & Him) at the Bowery Ballroom in Manhattan, and I'm super excited! I haven't been able to stop playing Volume One since I first heard it (shortly after (500) Days of Summer was released). I think we're going to go down early enough to also spend some time in NYC — it's always a treat to hang out with Carol, doubly so with her only being in Troy on weekends this semester!

Ah, yes, there's an Apple logo up there. There really ought to be MacBook Pros coming out... this is coming close to being the longest time between MBP/PowerBook updates ever (or at least since ~2002)... just when it's time to upgrade. Come on, guys! But that makes me even more excited to see what they're working on (I hope!)... Luckily Dad's display clamps seem to be holding Kaylee together for the time being, so my last post about this topic was a little premature.

And finally, games! I was excited for Supreme Commander 2, but that already happened, and didn't totally deliver on the excitement (I don't like it when they dumb down übercomplicated games after you've gotten used to the complication). Valve, however, most likely won't fail me, so I'm allowed to frantically anticipate the recently announced Portal 2 as much as I want to! Portal is one of my favorite games, and was actually my first WASD+mouse game (make whatever of that you will), so it holds a special place in my heart (and how could you not adore the companion cube? it even speaks to you!). On top of that, they seem to be hinting at (with awesome fake Apple ads) an announcement of — gasp — a port of Source and Steam to OS X, which would be totally awesome, especially with a new laptop to go with it!

EDIT: Valve officially announced Steam + Source for Mac, as well as the ability to play games you've purchased in Windows on OS X for free. Awesome! They never disappoint... except Ep. 3...

March 07, 2010 03:51 AM

Slow Transition to S3

I finished another part of my slow transition away from Dreamhost and on to Amazon's S3 for this site last night: I deleted everything related to this domain from Dreamhost. This meant setting up the Google App Engine proxy I've been thinking about for a while (which ended up being a just slight bit of horrific hackery upon shrub), and moving my DNS stuff back to the much-less-flexible 1and1 servers (which I get for free with my registration). This is a really ugly solution, because it adds another bounce for all HTML pages, but it still seems to be faster than Dreamhost, somehow.

It's mostly all working - unfortunately, GAE apps can't run on a naked domain, so the www is required now - any links to a subdirectory of hortont.com will redirect to the toplevel page. But I decided the temporary inconvenience was well worth the ~10$/month savings, so that's OK.

Also, links from more than 8-10 months ago are completely invalid now (I had a bunch of redirects, before, but they're gone now too in the shuffle). But that's OK, too. Really, who keeps around links to my blog? All of the internal links should be valid... I guess the big issue is things subscribed to RSS feeds with the naked domain. (I've already fixed a few random things I've found with this... I should check on Planet Gnome and stuff, too...)

I just have to move Carol and Matt, and then everything will be great - I've spent less than a dollar over the course of 2 months or so of S3... excellent!

I expect to find things broken over the course of the next few days... if anyone else runs into anything, let me know!

The proxy code is on Github.

March 07, 2010 02:52 AM

February 26, 2010

Tim

Sheeple, One Semester In

Last semester, during RCOS, I started working on a contact-management application for GNOME (Seed is mostly in maintenance mode, at this point), called (for lack of a better name, at the moment) Sheeple. I keep a carefully-organized, constantly-updated address book, so I spend a bit of time in whatever contact-management program I'm using, so this is something that matters a good bit to me personally.

The de-facto application for managing contacts on GNOME at the moment is, of course, the behemoth personal-information-management suite, Evolution. Evolution has a long history, and is a large codebase, written by a lot of people, over a very long time. It also looks a little bit outdated:



Not a pretty sight. Not to me, anyway, not in 2010, when my alternative is:



Another fundamental difference between the two is in their editing functionality. Address Book provides the ability to edit contacts inline; Evolution requires you to edit contact information in an overly-limited (while it can store more than four email addresses per contact, you can only edit four in the editor window... what!?) separate window.



I decided to start working on a more Address Book-like application for GNOME. After a bit of deliberation, I decided to have it backed by Evolution's evolution-data-server, so that people's contacts would transition over smoothly. This might have been a mistake, because the EDS API isn't beautiful, and there are very few complete, working bindings, but I've made it mostly work.

It's written (mostly - the EDS-related code is straight C, unfortunately) in Vala. It's my first Vala program, so it's been a learning experience — Vala seems nice, though there are a few bugs (I've reported one glaring bug which was acknowledged, though it hasn't been fixed yet), and some bindings are a little sketchy.

During the development, I discovered that Nokia was developing libosso-abook (for Maemo), an address book library that provides a lot of the functionality that I was planning for libsheeple. Unfortunately, libosso-abook is currently closed-source. Not cool, Nokia... Anyway, if they open-source it (it's under consideration, at the moment), I'll probably ditch most of libsheeple and base the Sheeple UI on top of that, because it's a ton of annoying code already done.

After the end of last semester, I had the following:



Lots of things are broken, but it's something. I don't have working syncing yet, and I believe writing back to EDS is broken at the moment (so no persistence of changes!), but those are things I plan on working on this semester...

There are slides and stuff available, too.

February 26, 2010 01:36 PM

February 19, 2010

Tim

Punkin'

In September of 1997 — long before I can really remember — Vivian and Margaret adopted two then-very-young kittens, Peanut, and Punkin. Over the course of the last 13 years, we've visited them more times than I can possibly count, quickly becoming good friends.



Punkin was always the more friendly of the two. Peanut was often skittish, hiding from deluges of affection which his brother would take rather in stride and return tenfold, every single time.

While we all certainly love Punkin, Peanut, and their adopted sister Troi immensely, it's not — by any means — a stretch to say that Punkin was first in most people's hearts, if only because of his ridiculous capacity for affection.



Unfortunately, he was also first to get sick. A few years back, he developed diabetes; Vivian and Margaret have since given him insulin twice a day and continued to provide a wonderful home and all the love he — or anyone — could possibly want.

Punkin had to be put to sleep yesterday, due to various complications from his diabetes. It was a sad day for everyone — this has been very hard to write — but as he leaves us we can keep in mind all of the incredibly adorable and fun times we all shared with him during the last decade. He was certainly my closest animal friend by far, and may always be. He will be missed by all, and never forgotten.

Goodbye.

February 19, 2010 02:21 PM

February 14, 2010

Tim

Someone Special

February 14, 2010 10:15 PM

February 05, 2010

Tim

Typography : Computer Modern



A little something I made for our first Typography project: the double-slit experiment out of Computer Modern characters. Click on it to view the rest of the project...

February 05, 2010 01:45 AM

January 26, 2010

Tim

Jumpin' Right In!

Already getting to work! Mondays, Wednesdays, and Thursdays are going to be really boring, Tuesdays and Fridays are going to be really long but really, really awesome.



That's the output of my first graphics project (the "getting GL set up" project, nothing particularly annoying).

Finished this week's homework today; yay! Tomorrow is a day to relax (no Bio lab this week), hang out, get concert tickets, watch the Apple keynote, and do a phone interview for my Mathematica certification. FUN!

January 26, 2010 11:26 PM

November 29, 2009

Matt

Clutterhs 0.1 Released

I've made an early release of Clutterhs, and it's on Hackage. There's still a fair number of things that don't work yet, and lots of messy code that needs to be cleaned up, but most of the core stuff should work. There isn't a tutorial yet, but overall usage is similar to gtk2hs. If you want to try it, the best thing to do would be to look at the simple demos in the git repo. They aren't very good examples, and just sort of use a bunch of random stuff but they should help with the general idea of how to use it (which is still quite likely to change).

November 29, 2009 11:06 AM

November 16, 2009

Matt

Clutterhs Update

Sometime between last night and this morning I may have had something of a Eureka moment about all of the problems I've been wondering about. I've realized I made a huge mistake when dealing with GObject Properties / Attributes that should be easy to fix. I missed something huge when looking at how gtk2hs deals with properties. I think I  can now easily avoid doing dirty things which I was very unhappy with to deal with functions which take GValues  (except for maybe the Model stuff).  I'm going to redo the animate* functions so you no longer have to deal with the dirty named property stuff directly, which is very unHaskelly and an obvious source of mistakes, as soon as possible.

November 16, 2009 09:16 PM


Powered by Planet!
Last updated: May 19, 2012 05:00 AM