Tuesday, 17 June 2014

IncursionScript & the Accent compiler compiler

When I started working with the Incursion source code, which Julian released, one of the problems was that not all the source code was available.  The bulk of the game data, both for d20 elements and dungeon generation, is specified in scripts.  These "IncursionScript" files are compiled into a module, which Incursion can have more than one of.

The problem was that they are compiled using the Accent compiler compiler.  And Julian had a version of this, which had been custom modified to produce C++ compatible code, but no longer had the source code.  I downloaded the original Accent source code and proceeded to try and get it working.

The Accent tool takes a ".acc" file, and transforms it into ".c" and ".h" files which you can compile against.  But it is also generated source code, created using some tool called Gentile.  The correct way to do this, which it appears Julian also avoided, would be to modify the Gentile grammar for Accent, and to generate a new version.  Instead, the approach we both took was to modify the generated Accent source code.

Accent is old school C code.  Seldom having return types in it's own source code, and rarely producing return types in the code it generates.  Occasionally using uninitialised stack variables, and expecting the value to be NULL.  And it generated argument typing for function declarations the other way, where rather than including the type with the argument name in the parenthesised list following the function name, the variable is redeclared fully (in the same way as stack variables) following that list and preceding the function body.

function(argname1, argname2, argname3)
    int argname1;
    char *argname2;
    void *argname3;
{

It is really the fixing of these three things that makes Accent C++ compatible, rather than making it output C++ specific elements.  In any case, a modified version of the Accent source code is now checked into the Incursion repository.  This is built as a dependency of the main Incursion project, ensuring that if there are any grammar changes, then they are rebuilt as needed.

Wednesday, 7 May 2014

Corn predators & ripening

As the time to harvest corn for seed has come, I've noticed that some of the Blue Aztec, has been eaten by something.  The chickens are too dumb to know to peel back the corn to get to the kernels.  What has eaten the corn?  Rabbits?  Hares?  Magpies?  Something else?



It must be something ground-based.  Here's a Bloody Butcher cob which I peeled back, which is perhaps 1.5 meters off the ground.  I figured that pulling back the husk on this cob would serve a few purposes.  Firstly, if there were birds eating it, they'd easily find it and have a go.  And secondly, I'd be able to see if it would make a difference in ripening it from a yellow colour to the dark red it should be when dried.  It's been exposed for a week, and has gained some redness as can be seen.


The Bloody Butcher gave consistently big cobs.  Most of them are still on the stalks, as few have ripened sufficiently.  I'm not sure how well they'll do in the frosts.  And I'm not sure if they will ripen, or produce viable seed, if I tear them all out and dry them in the shed.

Monday, 5 May 2014

Kimchi attempt #3

Kimchi attempt #1 worked fine.  Kimchi attempt #2 acquired some yeast, probably through being stirred with wooden chopsticks that couldn't be thoroughly cleaned.

This is kimchi attempt #3.  It uses up a variety of the last vegetables of autumn.  The baby corn which hadn't matured, from my corn plots.  The green tomatoes from my dying tomato plants.  The radishes from my front garden.  The garlic I grew last year.  A red onion I grew last year.  And the rest, I likely bought.


Inspired by a chow chow recipe I saw, I skipped the chilli pepper flakes this time, and added yellow mustard seed.  I've also left it on the bench, rather than putting it in a dark cupboard.  The jars are reasonably sized, the chopping board however is oversized, so probably throws perspective out.

I'll see how this attempt goes..