A ring buffer is a way of storing information from a continuous stream in a fixed-size container.  It’s called a ring buffer (or circular buffer) because conceptually, the two ends are joined.  There’s no beginning or end of the storage.  Imagine you hav a circular table.  There’s a pointer to where on the ring the next bit of data should be added by the data producer, and that pointer works its way around the ring.  But there’s also a pointer to where on the ring the next bit of data should be read by the data consumer, and that pointer works its way around the ring in the same direction, always consuming the oldest data and working its way to the newest data.  If the producer adds data and moves its pointer, and it hits the consumer’s pointer, you have a buffer overrun. The producer gets stressed out and forgetful. There’s data to store and nowhere to put it.  If the consumer reads data and moves its pointer, and it hits the producer’s pointer, you have a buffer underrun.  The consumer has read all the data there is and is starting to get bored and cranky.

In the world of computers, ring buffers are often used to hold data that comes in from an input device for a very short time until it can be processed.  It has the advantage of never needing to dynamically allocate or free memory, which is time-consuming.  The big disadvantage is that “full is full”.  You can’t easily make the ring larger without funky chaining and lookup tables, and then you’ve lost your performance advantage over keeping a pool of memory blocks around and reusing them.

Want to see how this relates to a really cool restaurant? Continue reading


From Digg: 16 of the Internet’s Weirdest Meat Creations. “From meat hats to bacon bras, giant burgers and outrageous barbeques, find out what the latest obsession really means.”

Usually I’m not into the whole food as a dare thing, let alone food as art or food as clothing, but as a collection, this one is interesting.  Maybe, like these meat creations, seeing a big pile of them isn’t quite as scary as seeing them one by one.

And because I like contrast, we have this.


First, we have The Bacon Explosion from BBQ Addicts.  It involves two pounds thick cut bacon, two pounds Italian sausage, and the second best cooking method ever invented (after engine block cooking, which combines cars and cooking).  I will carry this recipe around with me in my wallet, so if I am ever given the death penalty, I can tell them what I want for my last meal.
And it might just be worth it.

If that wasn’t controversial enough, we have bacon on a cat, from John Scalzi’s blog. I am against animal cruelty, but animal annoyance is just payback for all those furballs we have to clean up.

Now that you’re warmed up and in the theme, you’re ready for BaconCamp (modeled after BarCamp). They also have a blog, which includes wonderful posts like this one, with a YouTube video of bacon being made.