Monday, 27 October 2014

Mysterious Incursion bug

In changes to Incursion back in August, I fixed compiler warnings related to casting. In theory, the changes should have been side-effect free. Testing of the specific lines of code, indicates this is the case. But people were reporting crashes related to the "room weights algorithm". In this case RM_Weights is an array of unsigned int, and c and tot are signed short.

    tot=0;
    for(i=0;RM_Weights[i*2+1];i++)
      tot += max(0,RM_Weights[i*2+1]);
    c = random(tot); 
    for(i=0;RM_Weights[i*2+1];i++)
      if (c < RM_Weights[i*2+1])
        goto RM_Chosen;
      else
        c -= RM_Weights[i*2+1];
    Fatal("Strange Error in room weights algorithm.");
RM_Chosen:
    RType = RM_Weights[i*2];
    RM_Weights[i*2+1] = -1;

I was unable to reproduce the crashes, although others reported doing so up to 15% of the time.

Were the crashes always there and were they merely hidden by all the other crashes, which have previously been fixed? Or are they caused by some unreproducible nuance of the casting? I'm guessing the former.

There's an obvious bug in the above logic. Points to whomever spots it without looking at my fixes on bitbucket.

Thursday, 9 October 2014

Self-sown opium poppy seedlings

Opium poppies last summer.  These were grown in dirt dug from the drainage ditch at the front of the house, and it was likely sprayed at some point.  So I didn't bother to save any seed.


And the surrounding area as of today.  The green frilly leaves that dominate the area around the barrow are poppy leaves, from self-sown seedlings.  I'm quite happy with how well they've come up, given that my feathered gardeners do a pretty good job of weeding by scratching up all dirt they can access, either covered or uncovered.


I'll scatter some more seed over the top and perhaps get a succession of poppies coming up. Maybe I'll get enough poppy seeds this year to save for cooking.

Tuesday, 30 September 2014

Garden Beds

Two photos over half a month of my paddock hugelkultur bed #1. It isn't obvious but these have really taken off, and the brocolli is likely as big as it's going to get. Not sure how to tell when it is ready to pick.

Garden Bed, Paddock NW - 2014-08-13

Garden Bed, Paddock NW - 2014-08-29

Two photos over half a month of my house north garden bed. You can see how much the peas, kale and cauliflower have taken off. The seaweed tea helped a lot with that, as well as.. watering the obviously dehydrated cauliflower.

Garden Bed, House North - 2014-07-31 - 01

Garden Bed, House North - 2014-08-13 - 01

And finally, I cleared my hut corner garden bed. This is where I am going to plant a herb garden.

Garden Bed, Hut Corner - 2014-09-02