Diamond of Death

I have spent the past numerous years working on a game engine that avoided the Diamond of Death. This is a phenomena that occurs in languages that support multiple inheritance.

I decided to take a look at how Microsoft Visual C++ implements the solution using virtual inheritance. This is expressed by using “class B : public virtual A”.

Continue reading

Arithmetic Coding

I have updated my github project with support for arithmetic coding.  It uses the algorithm provided by Malte Clasen and Eric Bodden.  It is an integer based encoder (32 bit unsigned).

I have made some changes to the original implementation to separate the statistical models more fully from the coder.  This allows substituting models on a per symbol basis.

An example of this behavior is provided in the ArithmeticStream class (paralleling the compression classes in System.IO.Compression).  This class uses two models: a zero order model and a new symbol model.  The former is only initialized with two symbols (stream terminator and new character).  The latter is initialized with all characters.

Continue reading

Canadian Maple Soda Bread

At the last Parents of Multiple Births Assoc sale I purchased A Pot O’ Gold which has a recipe for Irish Soda Bread.

Unfortunately that much lactose (and sugar) would wipe me out for a day or two. So I changed the recipe to the following:

  • 4 cups flour (I used bread flour)
  • 1/2 cup semolina flour
  • 1/3 cup olive oil
  • 1 1/4 cups maple syrup
  • 4 teaspoons baking powder
  • 1/2 teaspoon salt
  • 2 eggs
  • 1 1/2 cups of water
  • 1/3 teaspoon baking soda

The directions are pretty much the same except maple syrup is mixed with liquids instead. I didn’t include the raisins (undead grapes) as I can’t eat them. I didn’t have caraway seeds to include. Unfortunately this was still too much sugar for me but it was mighty tasty.

I used a bread maker on the sweet setting (2 lbs, light setting) and had to intervene in the middle to manually mix the ingredients as the bread maker wasn’t doing so successfully. I suspect it is because the liquid content was so much it wasn’t getting enough purchase to mix.  I’ll be making another loaf this weekend and I’ll include a picture then.