Sunday, 15 November 2015

Bottling My Apple Cider Vinegar

I was a little hesitant to pick most of the reachable apples from the one of the better roadside apple trees last autumn, but I did it in small amounts, and no-one else seemed to want them.  Most of the roadside apples I gathered from that tree, as well as all the others were juiced and put into containers under the hot water cylinder.

There the most attention they saw, was the mice climbing on top and leaving droppings.  Yum!

I bottled one too soon, and it turned into rather undrinkable apple cider.  Not acidic in any way, just a bit musty in flavour.    The other, I left in there ignoring it, hoping it wouldn't get moldy.

Here it is:

2015-11-10 - 03

And bottled up, turning out to be around 3.5 litres:


A huge success.  I reused the Bragg's bottles I bought, and they are still accurate.  They would indeed be organic raw unfiltered apple cider vinegar.  And the liquid inside looks pretty much the same as the original Bragg's vinegar.  Next year, I'm going to double the amount I make.  I just have to find a use for it.

Intellisense Bugs

I've posted about this before, but my use of C in Visual Studio isn't supported by Intellisense, however it is supported by the compiler.  This means that my code compiles without warning or error, but it's more difficult to edit as the editor falsely claims there are errors.

So I sent a report to Microsoft via their easy to use customer feedback menu:

Some time later, perhaps several weeks, I received email from a program manager on the Visual C++ team asking for further detail.  I compiled two cases, both in the same narrow usage of C, and send them in.

Here's one related to struct initialisation.

And another related to anonymous unions.

I don't hold out hope that Microsoft will fix them any time soon, or even fix them at all.  Their focus is on meeting more recent C++ standards, from reading their blog posts, and this is a niche part of their C support.

But fingers crossed.

Saturday, 31 October 2015

Planting out an apricot seedling

Following internet instructions, which are sketchy at the best of times, I dug under the old existing apricot tree and found three apricot seeds.  I cracked them open, and only the one pictured below was intact and almond looking.

Apricot Seed, Unknown - 01 - 2014-01-16 - Seed From Existing Tree
Apricot kernel

I put this in a container and left it out exposed to the weather, watering sporadically.

Apricot Seed, Unknown - 01 - 2014-01-23 - Seed From Existing Tree
Apricot seedling

A year and a half later, I found the larger container it'd been transplanted into, extremely dry but the seedling looked alive.  So I planted it out in the windbreak, it's hard to see in the picture below, but it's center right beside the clump of grass and wiry.

2015-10-18 - 04
Apricot seedling planted out

Thursday, 29 October 2015

Bloody Butcher corn

One of the problems with unfenced chickens, is that they scratch the ground wherever they are able and feel obliged to.  This is my short term solution until the corn is large enough to survive chickens scratching around them.  Then I can put it up on posts and use it to give wind support to the broad beans.  This approach saves the need to fence off the area, but leaving it there too long is a mistake, because the plants it's laid down on may grow too big and make it impractical to remove.  I had this problem with potatoes last year.

Another problem is that I germinated the corn outdoors under an eave where the frost doesn't hit, so only two thirds of it has grown so far.  The rest is either still small, or is yet to sprout.  So there may be some time difference in when the corn is tasseling and cross-pollinating.

Corn, Bloody Butcher - 01 - 2015-10-18 - 03
Corn var. Bloody Butcher

Tuesday, 27 October 2015

Sheepses in Spring 2015

I used to work with a Chinese girl, Sharon.  She spoke, like other English-as-a-second-language speakers I met in China, a little like Gollum.  She used to say monthses, and I wonder if she would have also said sheepses.

Anyway, the only place the neighbour's sheep can get some shelter, is the south side of my property under the shadow of either the hedge or garage.  At the moment, their paddock is full of sheep and lambs.  Speaking to him the day before yesterday when it was quite hot, he was happy we hadn't seen any thunder storms, as the latter kills lambs.

2015-10-12 - Lambs
Sheepses and lambses

Sunday, 25 October 2015

Blueberries in Spring 2015

There are two blueberry plants in the orchard.  There was three, but the third died of.. I guess prior neglect would be the crime if the perpetrator were taken to plant court.  The year before last, the fruit was enjoyed.  But last year, due to laziness, the fruit went missing - most likely because of free ranging chickens.

As far as I can tell, there's not much difference between the two varieties, Powder Blue and Climax.  But they're supposed to be pollinators for each other.

2015-10-17 - Blueberry 1
Blueberry var. Powder Blue

Note the pine mulch around them.  Someone swept up the leftover material from the pine cones I used to collect for the coal range, and I took it and scattered it around the blueberry plants.  The theory is that they prefer acid soil, and pine trees are supposed to be much the same.

2015-10-17 - Blueberry 2
Blueberry var. Climax

Friday, 23 October 2015

Invicta gooseberry in Spring 2015

This is the sole surviving gooseberry as of the start of Spring.

2015-08-29 - Gooseberry - Invicta
Gooseberry var. Invicta
And here it is approximately 40 days later, and it's looking pretty good so far.  Last year I was too lazy to cover it with bird netting, and one day the fruit were there and the next they weren't.  Was it the free ranging chickens?  Was it the birds?  Did they just fall off unnoticed?  No idea! An interesting contrast was the Chilean guava, which has delicious fruit, yet nothing ate them.

2015-10-17 - Gooseberry - Invicta
Gooseberry var. Invicta
I originally planted two. Where did the second one go? I don't know. Maybe the stoats, possums and/or rabbits ate every inch of it.

Wednesday, 21 October 2015

Californian thistles

The Californians have many things to answer for, and the worst of their crimes are their thistles.  These have root systems underground, you can mow them but they'll grow back.  And you can grub/dig out the roots, but every fragment you leave down there will turn into a new root system.

2015-10-17 - Thistles
Flattened californian thistles
People say grub them out, but have they tried?  And if they have, is their ground as stony as the ground in this field can be?  That white clump in the center back of the photo to the top left of the apricot tree, is a giant pile of large (and varying smaller sizes) of rocks.

I'm hesitant to put roundup on the thistles, grubbing them is impractical, and when mown they often grow back from the stubs, so I take the casual grinding approach.  Whenever I'm walking through the paddock and I pass a thistle, I just stand on it and twist the gumboot.  Bonus points if the weather is wet, as then they're 30% more vulnerable to fungal conditions.

While boot grinding isn't covered in the literature (like Lincoln University's page on non-chemical management of californian thistles) I rate it as more effective (at least in theory) than mowing.  When I cut/mow thistles early in the season, they grow back from the stumps.  When I mow thistles later in the season, then they're large and fill the field full of dried thistle foliage that remains for at least a year (try grabbing a handful of grass containing dried thistle..).

One comforting fact about the linked Lincoln University page, is that it gives good argument that the wind dispersed seeds are nothing to worry about.  Which is a good thing, as my neighbours hill (starting beyond the cattle in the photo) is covered in thistles as is the fields beyond it, and come a windy day late summer/autumn, the skies are filled with thistle seeds.

Monday, 19 October 2015

Orchard apricot trees in Spring 2015

I've planted three apricot trees in the orchard, a Royal Rosa, a Moorpark and a Cluthagold.

The Royal Rosal flowered first, at the same time as the older apricot tree.  Unfortunately, while I covered it along with the later flowering trees with frost cloth, a heavy frost occurred on a night when no-one was here to cover it and none of the flowers survived.  Last year one apricot ripened on this tree.

2015-10-17 - Royal rosa
Royal Rosa apricot tree
The Moorpark is the next oldest orchard planting.  Flowering later than the Royal Rosa the nightly coverings of frost cloth started in time, and it has the most young green apricots on it.

2015-10-17 - Moorpark apricot tree
Moorpark apricot tree
Lastly, is the Cluthagold tree which was planted within the last year.  It also has a decent number of young green apricots on it, considering.

2015-10-17 - Cluthagold apricot tree
Cluthagold apricot tree
All the grass has been cleared from around the apricot trees and a layer of mulch put down.  People say (like robots) that the reason for any problem is the grass is not having been cleared from around the trees, but lets look at the facts.

  1. If the grass is cleared from around the trees, the lack of rain dries out the soil and cracks the ground.
  2. When the long grass is cleared from around the trees, the trunk is often wet despite lack of watering or rain.  Likely from the dew.
To me, the belief that the grass is bad seems to be a religious one.  I think it does more help than harm.  I'd put a photo of some of the cracked ground here, but it just rained this morning for the first time in ages and it won't look as convincing as it would if I had taken a picture yesterday or a day from now.

Saturday, 17 October 2015

The old apricot tree in Spring 2015

At time of purchase, this property had one old diseased apricot tree, a walnut tree and a black boy peach.

This tree below is an unknown variety of apricot, and to the left of it out of frame is the walnut tree.  The walnut tree has fruited well every year, and in the cupboard I've both jars of walnut in form suitable for cake decoration and also pickled in malt vinegar.  The apricot however, was rather lacklustre and provided about five albeit tasty fruit last year.  In the photo below it can be see seen flowering, it flowered early and suffered little effect from the weeks of frosts which followed.

Old apricot tree at start of spring

The next picture is three weeks on, and while it's hard to make them out, it is covered in young green apricots.

Old apricot tree first fruit photo

Here's the tree four weeks on, note that behind it to the right is a sycamore tree.  This is the only real place I've seen bees this Spring and even then only yesterday.  Seriously.  I've been out in the paddock daily looking around, and while there might be the odd bumblebee, mostly it's flies that seem to be pollinating the flowers.

Old apricot tree second fruit photo 3

This is a close up of the tree at four weeks on.

Old apricot tree second fruit photo 2

And another.

Old apricot tree second fruit photo 1

This year is looking good for apricots.

Tuesday, 1 September 2015

First day of Spring

It has been raining or drizzling for the past couple of days.  Today, we get the first of the Spring snows.  It's snowing pretty decently outside at the moment and has been for the last half hour - hopefully the ground is saturated enough that it melts as it falls.

Monday, 3 August 2015

The water race and helpful chickens

I have a water race at the far end of my back paddock.  Somewhere uphill to the north, there's a river and some of the water is redirected down this water race.  The neighbours have animals grazing in their paddocks, and they just walk up and drink from it.   And through it, and back, and certainly defecate in it while they're there.

Unfortunately, as time passes it fills in with muck the animals send downstream, the clay at the sides eroding and water weeds growing on top, and it fills in. The end result is that the water is now at the level of the ground alongside the water race, and it floods areas of the paddock.  At this point it needs to be dug out.  If I had grazing animals in my paddock, I wouldn't have this problem. What I would have though, is grazing animals rubbing up against and breaking my orchard trees.

Here's a comparison shot which shows my dug out area on the left, and the overgrown area on the right.

The length I've cleared so far.  Really, in an ideal world I'd dig it all a meter wide all the way along, and I'd do it while it's all sodden from being flooded all the way along.  But in this world, the less hours I spend digging muck is better.

The area on the right-hand side between the olive tree and the water race, back to the fence was the where the worst of the flooding was.

What I really like though, is the brown area in the foreground.  It's where the chickens have scratched the grass clear and now there's hay on top of powdery dirt.  This is a huge advantage to me for the upcoming spring, as it means I don't need to clear grass to make new garden beds.  The area ahead will likely be used to plant bloody butcher corn or a range of broad bean varieties.  While they've scratched up that area all on their own, I might see if I can start sections in the foreground and get them to clear more of that area.

Here are the chickens at work scratching up another area of grass they've already cleared pretty well.  This area and all around where I am standing to take this photo will likely be where I plant a wide range of pumpkins, all of which are cucurbita maxima varieties.

Some time in the coming week, the chickens will be getting treated with diatomaceous earth.  This involves putting them up to their necks in a pillowcase, and shaking the pillowcase around them.  Classic internet advice.  Maybe it will work, or maybe it won't.

Tuesday, 28 July 2015

Imaginary Realities volume 7, issue 3 is out!

The latest issue of Imaginary Realities is now available for reading.  Volume 7, issue 3.

It features the following articles:

  • A text MUD with a working ecology system
  • Dispelling the gloom
  • How integral are letters and text to ASCII gaming?
  • Legend and the lore
  • The bonds of mudding
  • The mercurial temperament at the end of the world
  • Where do I begin?
With one article related to roguelikes, another to interactive fiction and the rest to mudding, it should provide our most diverse collection yet.

PDF and EPUB e-books are not currently available.  The new website generation creates these automatically, rather than manually as they were made before.  But unfortunately, getting them to look nice enough to be worth distributing requires a little more work.  They'll be added back to the website before (or with) the next issue hopefully.

Announcements have been made on:

Tuesday, 14 July 2015

IncursionScript and the Accent Compiler Compiler

When I got a few minutes, I spent a bit more time looking at replacing the Accent usage in Incursion.  For the most part, Accent works pretty much the same as yacc or bison, but does so in a much more user friendly way.  Yacc and bison use BNF grammars, where Accent uses an EBNF grammar.  This allows minor use of some of the regular expression syntax to avoid painful rule finagling completely.

This StackOverflow post quotes the type of work you have to do (from another web page), to convert from EBNF to BNF.  Looking at the one off case, it only seems mildly inconvenient, but when you have several variations, it becomes painful.  Especially, if you're considering converting ~100k of rules for parsing IncursionScript.

  MONSTER { theMon->Attr[0] = theMon->Attr[1] =
            theMon->Attr[2] = theMon->Attr[3] =
            theMon->Attr[4] = theMon->Attr[5] = 0;
            CurrAttk = 0; CurrFeat = 0; theRes = theMon; }
  LITERAL<name>  { theMon->Name = name; }
  ':' cexpr3<n>    { theMon->MType[0] = n; }
    ( ',' cexpr3<n2> { theMon->MType[1] = n2; }
    ( ',' cexpr3<n3> { theMon->MType[2] = n3; } )? )?
    '{' (mon_entry)* '}' { theMon++; };
That was the initial part of a monster type definition. Note that the Accent grammar syntax for the left hand side of rules, embeds the parameter name in < and >, whereas bison has a much more limited support and uses [ and ]. Also, the right hand side of a rule can use the previously mentioned aspects of regular expression syntax. In this case ( and )? are used to indicate 0 or 1 occurrences of a match, and additionally + and * can be used similarly to indicate one or more, and none or more matches.  Note also that the parsed parameter values are used directly in the code blocks, without syntactical sugar, where bison requires that n be $n.

Any use of these regular expression syntaxes would when rewritten for bison, require more and more complicated contrivances and would break up the whole rule making the grammar less readable.  In theory, it should be possible to construct a bison grammar that parses the Accent syntax, with a matching lexer, and convert an Accent grammar to a more convoluted bison grammar.  The bison grammar for the Accent syntax isn't hard to do, in fact, the Accent author provides one in their documentation.  The bulk of the work would be in writing some subset of C parsing, to transform the code blocks, and then there's the flexible Accent parameter lists which bison cannot support at all.

Old with dated pre-ANSI code and using a GPLv2 license, requiring a commercial license to be able to be used freely, Accent is a not just a compelling alternative to bison.  It's almost impossible justify downgrading from it, if one ignores the unfortunate license.  But to become something where any inspired player, can open up a script and start modding, it needs to downgrade from it.

Translating the grammar from EBNF to BNF?  Not enough.  Bison doesn't offer the additional support required.  This solution would still require hours of painstaking rewriting of the custom Accent grammar syntax.

The only remaining alternative, is to write an Accent replacement.  Or to enhance bison or byacc, to support EBNF, and the additional functionality.  But then how many hours would that require?  It might be worth downgrading that 90k Accent grammar to a bison grammar after all.  Something to think about it.

That reminds me, I've searched everywhere three times and I can't find my Dragon parsing book.  It's gone.  I imagine it's with all my compact flash usb adapter, my micro sd card, my issue of Dragontales, and the other things I haven't noticed going missing yet.

Incursion progress report

For the most part, Incursion is pretty stable now.  There are still over a hundred "issues", but this is to be expected for an engine of it's depth.  The last work I did on it before the weekend, beyond a fix for a crash which someone kindly reported, was to try and get an example module put together.

That effort stalled, because what Incursion is, is a customised demonstration game, Halls of the Goblin King.

The source code does have pretty solid support for multiple modules, any of which can provide either new dungeons to explore, or new items, effects, classes, races or any other form of content.  But there are places through the code where it just looks at the first module with an accompanying comment saying just look at this, because it's the only module we have right now.

The source has unused support for multiple players, but it's not consistently used throughout the code, and that's ignoring the question of how multiple players in a turn-based game can even be done.

What I spent time on over the weekend, was just trying to better get a picture on more of the scope of the engine.  In order to do this, I started documenting the constants defined in the script, starting with those used for dungeons (see commit #c953cfe on Bitbucket).  These can refer to values, like the minimum and maximum room widths on the x axis, the density of torches in lit rooms and even references to other game content like features, regions, terrain and even other dungeons connected in some way.

The more time I spend learning more and more of Incursion's source code, the more it seems like the best engine to base a fantasy roguelike on, given certain considerations.  One is the expression relating to the last 10% of the project requiring 90% of the work, Incursion simply requires a little more work and some polishing before anyone who simply hopes to write some scripts and to make a unique roguelike, can do so.  Another is that the game must be OGL and as mentioned fantasy.

Even just spending a few idle hours searching for and commenting the usage of constants, while watching Wimbledon over the weekend, the flexibility and depth of the engine appeals to me.  And the work required to make what it can create less same-same, seems less of a burden.  By that, I refer to things like the depth of a dungeon scaling everything, with increasing depth being downward.  If you wanted to make a tower of ascending levels, then that should be a possibility.  And whether depth should imply a fixed scaling at all, should be another matter.

One idea I should note down, in case I forget to write it elsewhere, is to make it possible to hand edit loaded module data, or to hand author some.  This would not be a method of more easier development, but would lead to additional features like live visualisation of changes to things and how it affects level generation and so forth.  Just reloading the scripts isn't as possible, as they are compiled before use.

Tuesday, 30 June 2015

MSVC2013, Intellisense and anonymous struct/union bugs

One of the improvements in the C11 standard, is the addition of anonymous structs and unions.  This means that the unnamed element flattens, and all members of the struct or union can be referred to at the same level as the struct or union itself (as long as there are no naming conflicts).

A simplified example use I make of an anonymous struct inside an anonymous union is:

struct my_event_s {
    enum my_event_types event_type_id;
    union {
        struct {
            enum my_key_event_types key_event_type_id;
            union {
            /* Further fields here.. */
        struct {
            enum my_mouse_event_types mouse_event_type_id;
            union {
            /* Further fields here.. */
        struct {
            enum my_touch_event_types touch_event_type_id;
            union {
            /* Further fields here.. */
It's a pleasure to program with. But then you reach the stage where you have a different struct, and you want to incorporate a shared anonymous struct (and likely also union) in that. In my case, it was my complete key struct, excerpted from above:
struct {
    enum my_key_event_types key_event_type_id;
    union {
    /* Further fields here.. */
One thing you might try, is what I tried. Give the struct a tag, and than just place an anonymous reference to it in the encompassing struct or union.
struct my_key_event_s {
    enum my_key_event_types key_event_type_id;
    union {
    /* Further fields here.. */

struct my_event_s {
    enum my_event_types event_type_id;
    union {
        struct my_key_event_s;
        struct {
            enum my_mouse_event_types mouse_event_type_id;
            union {
            /* Further fields here.. */
        struct {
            enum my_touch_event_types touch_event_type_id;
            union {
            /* Further fields here.. */
This compiles cleanly, but intellisense will choke on it, and find errors in the code. Intellisense will accept an anonymous struct or union member defined this way within a struct itself. But the moment you try it within a union, then it will choke on not only the struct definitions it accepted up until that point, it will also choke on the union definitions.

It turns out that this is a non-standard (not part of the official C11 standard) feature that Microsoft supports.  It might be argued that usage of it should be avoided, because of this, but with GCC supporting it via the -fms-extensions flag, it is pretty portable.

Personally, I see anonymous structs and unions as a great addition to the C language, that reduce friction without introducing complexity.  And this Microsoft extension should have been a natural part of the standard.  The only downside to it, is that it's actually almost unusable when you're using Microsoft's Visual Studio!  If intellisense chokes on this, then a lot of the value of the editor is undermined, as it's help becomes misleading.

For the record, I'm using Visual Studio 2013, community edition, update 4.  There's a new release of Visual Studio 2015 coming up, which will hopefully mean fixes for this (but who really knows?)  And ideally, a new release of the community edition.

Friday, 26 June 2015

Generating e-books with Calibre on Hostmonster

One thing the new generated Imaginary Realities web site currently lacks, which the old hand-written version had, is epub and PDF versions of the published issues that can be downloaded and read at one's leisure.  Or put away for offline reference, if that's what you're into.

These e-books were generated by Calibre, which is a wonderful piece of work written primarily in Python.  It allows you to add a web page as an e-book, and it'll go through and follow the links and put it together as a HTML e-book.  Then you can convert that e-book into any number of formats, including the two formats I concentrate on, PDF and epub.  All this is done through a pretty standard media library interface for e-books.  But you can also drive the conversion by command line if you are willing to put in a bit more work.

As the new web site is generated into HTML using Jinja2, I wanted to take the output and then as a final step, push it through Calibre's ebook-convert command.  Compiling Calibre from source is a complicated endeavour which the author warns against the complexity of, so I wanted to avoid that.  Instead I downloaded and installed one of the Linux static builds.  By default, it installs to /opt, but it's possible to redirect it to use ~/ as the base directory instead.

Once installed, it's a somewhat straightforward matter to generate the e-books (see the source code). Take the command path, and the command arguments which map to the original conversion done in the GUI (you have to guess this somehow)

The command:

command = "/home/mememe/opt/calibre/ebook-convert"
The arguments:
    standard_arguments = ""
    standard_arguments += " --disable-font-rescaling"
    standard_arguments += " --margin-bottom=72"
    standard_arguments += " --margin-top=72"
    standard_arguments += " --margin-left=72"
    standard_arguments += " --margin-right=72"
    standard_arguments += " --chapter=/"
    standard_arguments += " --page-breaks-before=/"
    standard_arguments += " --chapter-mark=rule"
    standard_arguments += " --output-profile=default"
    standard_arguments += " --input-profile=default"
    standard_arguments += " --pretty-print"
    standard_arguments += " --replace-scene-breaks=\"\""
    standard_arguments += " --toc-filter=.*\[\d+\].*"
And then invoke calibre for each issue and each format:
        output_basename = "imaginary-realities-v%02di%02d-%04d%02d" % (volume_number, issue_number, year_number, month_number)
        for suffix in ("epub", "pdf"):
            output_filename = output_basename +"."+ suffix
            ret =[ command_path, html_path, os.path.join(output_path, output_filename) ])
Unfortunately, if you're on shared hosting, then you're at the mercy of whomever administers it. It turns out that PDF generation uses QT components, and if you're not on the right version of libc++ or some combination of libraries, then the PyQT extension modules that come with Calibre's static install, will simply fail to import. It's not so much a bug with Calibre, as Hostmonster offering a dated environment. The Mobi format is also affected by this problem.

Epub is about the only format which will generate without the use of QT. Unfortunate, but there's not much that can be done about it without investing a lot more work, and there's so many other things that I could do with this project. My iPad 1 (which is a poorly aging piece of junk) will accept both epub and PDF in Apples e-book reader app. Hopefully, most other modern devices can also handle the epub format.  We'll see!  It might also be that there's a different tool which can be more easily installed or compiled and which will generate PDFs of the same level of quality.

Thursday, 25 June 2015

Imaginary Realities source code

The Imaginary Realities web site is generated using Jinja2 from Python flat files.  I've changed the repository from private to public, as there's no real reason to keep it shelved away.  If my hosting goes down, someone else can easily generate their own version of the web site and host it, should that take their fancy.

The git repository is hosted on bitbucket:

Friday, 19 June 2015

Organic Apple Cider Vinegar

I gathered road side apples and juiced them this year, then put the juice in two containers in the hot water cupboard.

The first batch I added the remnants of a Bragg's Apple Cider Vinegar with Mother bottle to it.  It went straight to alcohol, and seems to still be alcohol.  I guess it is probably apple cider now.

The second batch (pictured below) was just apple juice.  Unfortunately, I didn't keep an eye on it, and while it quickly turned to vinegar, the mother went moldy.  As I understand it, as long as you remove the mold while it's still white on fermented products, it's supposed to be safe.

What to do with this?  It looks quite good, and similar to the Bragg's vinegar.

One use I've seen recommended for it, is to water the citrus or blueberries with, as both like an slightly more acid soil.

Winter Snow

I was hoping the ground was wet enough that the snow would melt.  Unfortunately, not.  The power has been out all morning, except for one brief interlude when I heard the washing machine turn on when I was outside.

The maple tree holds a fair bit of snow.

The chicken coop fencing is down.  It wouldn't have done much good to shut the chickens into their fenced area.  None of the chickens was keen to venture out into the snow.

The view of the back of the house from the field.

One lone chicken ventured out between my gumboot prints.  This one is headed for the shed to lay an egg, some of the chickens seem to prefer it to the coop, some days.

Every year branches drop off the eucalyptus tree in the front yard.  Usually it's because of wind.  The front hedge, which is 50% mexican orange blossom's, is somewhat depressed.

Some tree, maybe an ash, couldn't deal with the snow, around the found of house.

The sun has started to come out, so the snow is starting to melt, and I can hear it fall from trees around the house.

Off to call the power company to see what's up.

Friday, 12 June 2015

Imaginary Realities website updated!

I've finally found the time to give the Imaginary Realities website a more updated look.  The main change is that it's now generated by Jinja2, a Python templating library which I'd thoroughly recommend.  It made everything simple, up to and including picking out and including the featured article.

There's always more to do.  The next steps are likely to be taking advantage of the Reddit and Disqus Python APIs to make discussion of articles more readily discovered.

There's a whole lot of shenanigans with Disqus and something I think they call "Discover." At first you could opt out of it showing on your website, now you can kind of opt out of having your own posts discoverable.  It's unclear whether this means that you  will one day wake up and find giant rows of thumbnails of various trashy thumbnails and links to "top 10 celebrities who benefited from an all cabbage diet" and so forth.  I googled for ages trying to work this out, and they don't seem to appear at the moment, so fingers crossed.  The license for this site is Creative Commons non-commercial, so we'd have to look for a Disqus replacement if this started happening.

Saturday, 6 June 2015


I use mobile broadband, and reducing bandwidth usage saves me a lot of money.  So when I wanted to play with pypes after hearing that Yahoo Pipes was being shut down, I somehow ended up taking Peter Szabo's module, improving it a little, and putting it on a package up on PyPI.

It provides a good coverage of the Stackless API.  It's already been used as a backend for Peter Szabo's syncless project, and with the improvements I've made (adding the method, and fixing a greenlet/tasklet circular reference bug), it's even more capable.  But the devil is in the details.

It doesn't support the pre-emptive tasklet interruption that Stackless does, and can't as that is implemented via modifications to the internal Python VM source code.  Which is one of the few modifications Stackless makes in it's capacity as a fork of Python.  It is possibly possible to support this, as I believe Jeff Senn way back noted he had written a similar module with pre-emptive support based on the tracing hooks (with the downside that debuggers are unusable).

It doesn't support the threading model of Stackless Python.  This is derived by having a scheduler per thread, and most tasklets belonging to that scheduler at some level have slices of the stack of that thread and are therefore symbiotically attached to it.  It should be very possible to support this, with additional work, but that's something to set aside for when it's needed.

It doesn't support the module level properties, that Stackless implements.  And it can't unless it relies on hacks suggested in places like StackOverflow where classes are injected into 'sys.modules' to act as modules.

Future work I'm tempted to do is working out whether I can add the tealet project, as an alternative backend to the greenlet backend it currently has.  Greenlets are of course the stack slicing of Stackless extracted into an extension module.  tealet is the "next generation" version of the stack slicing intended for Stackless Python.  They're not using it already because it was such a wide ranging low level change to the workings of Stackless, that adopting it introduces potential instability which is not desirable at this time.

Kristjan Valur implemented a greenlet emulation module for tealet (in the same repo), so it may be that using it might be as simple as running stacklessemu on tealet.greenlets on tealet.  It's a pity it wasn't uploaded to pypi so I can try it out, but I don't think that's in Kristjan's wheelhouse.

Tuesday, 2 June 2015

Imaginary Realities article submission deadline reached

With the start of June, and coincidentally with it the start of Winter, we have passed the article submission deadline for the next issue.  Seven articles have been submitted, and are in the hands of the editors and proofers, for them to work their magic.

A loose deadline for publication is set for the end of the month, specifically July 1st.  But this of course requires the publication process to run its course.  Once the editing and proofing is done, then a draft version of the site will be put together by myself, and provided for authors and editors/proofers to give the thumbs up.  And at that point, the new issue will go live and will be announced.  There may be some delay, if things take longer and require a little extra time to get things done.

We will be replacing the Imaginary Realities subreddit with Disqus comment sections at the bottom of articles, unless something goes wrong.  The framework is in place for this to be done, it just requires the articles to be published for it to come into place.

Friday, 29 May 2015

Sony BDP S1200 Blu-ray/DVD player firmware

I purchased the Sony BDP-S1200 blu-ray/DVD player on special.  I need a region free DVD player, and there are none available within New Zealand.  It's possible to buy a universal remote, and to enter some codes and it's been reported to work - but it's claimed to work for firmware only for other regions.  There are reports of other models allowing you to put a shared library and a script on a USB key and to have it start the telnet daemon, but I don't have a router to connect the player to, via ethernet cable.

Malcolm Stagg has managed to modify the firmware for his S390, and provided detailed instructions.  I've downloaded five versions of the firmware.  Unlike the S390, which Malcolm has decryption scripts for, this is not encrypted with a simple substitution cipher.  It looks more like it has been XOR'd.

I've written a simple Python script to take what I assume the initial bytes to be, and look for the XOR key that matches in the rest of the file, hoping to find them over a sequence of null bytes.  But the longest match was four contiguous bytes in an unlikely location.

The five different firmware versions are (version numers are in the light coloured bar for first four):

  • UPDATE_M19R0071.ZIP
  • UPDATE_M19R0112.ZIP
  • UPDATE_M19R0116.ZIP
  • UPDATE_M19R0156.ZIP
  • UPDATE_M19R0164.ZIP (bottom right).

If the first 16 bytes are a general null-terminated text version ('MSB19\0\0\0...') then this implies at least 16 bytes that may be located elsewhere in the file, should there be a long enough sequence of null bytes.

I've already run a Python script over what I guessed the initial 16 bytes to be, and longest matched sequence is 4 contiguous bytes.  It's possible that the embedded files which follow the header are compressed, but I doubt it.  It's also possible they used a different firmware version string format.  But given the pattern of red differences in the screenshot above, it looks like the header is almost the same to what Malcolm found,

  • The 0x00 line is obviously still the firmware version, so will be something like 'MSB19\0\0\0\0...'
  • The 0x10 line is obviously still the text version of the release.  The only difference is the changed numbers, i.e. one difference between 116 and 156 on the two releases in the upper right.
  • The 0x20 line is the text release date.  I don't know the release dates, and expect they differ from the publication dates when the releases were made available for download.
  • The 0x50 line differs where the checksum is supposed to be.
  • The 0xC0 line is where Malcolm documents the size of the second embedded file.
In theory this gives large blocks of XOR'd zeros, which give XOR key sequences.  It should be possible to take the longest sequences and brute force them over the file to try and hopefully detect some readable strings and from that how long the repeat period should be.

So there's at least two things I can try before giving up:
  • Look for substrings of the known XOR patterns where they've been applied to null bytes, instead of matching on the start of the known XOR key.  It is possible that 0x00 doesn't start with 'MSB19'.
  • Apply the longest believed correct XOR key segments to the rest of the file stepping the application index by one byte.  Output any readable strings of decent length to a log and go through it later.
Anyway, if you're looking to reverse engineer this firmware, maybe you'll find this even if I don't get further. And if you've reverse engineered it already, maybe you'll add a comment or send me an email.  I do not live in the United States, in case you are reading this and thinking that the DMCA is relevant in any way.

Saturday, 9 May 2015

New Incursion roguelike web site

A new web site has been put up for Incursion.  This one is very simple, and is intended to meet a middle ground of preserving older links, with featuring the newer open source releases.  And of course, giving some illustration of what potential players might expect from the game.

Hopefully players will provide some interesting screenshots, to replace my quick initial efforts.  And perhaps even some Youtube videos of gameplay, to replace the one I located.  I didn't bother going into too much detail about what a roguelike is, I don't figure it will be converting new players to the genre.

Here's a screenshot of how the web site currently looks for posterity:

It's quite interesting to get back into more detailed CSS.  In the past I've tried to remain compatible with older browsers, but there comes a time when you have to ameliorate the pain of trying to get the CSS to do all the things you wish it to do, without hobbling yourself.

Getting CSS to go the last mile, is much the same as any other programming these days.  I encounter a problem like the footer background colour ending mid-page, and the page background colour then resuming until the end of the page.  But the natural inclination is to want the footer colour to extend down to the end of the page.  So I go to StackOverflow and find a solution, which generally involves abusing some language behaviour, and the CSS then does what I want it to, but it is left a little bit messier.

I considered using JQuery UI, but honestly, it is pretty clunky looking.  The themes don't help that much, and it seemed like a case of choosing the least ugly.  Then it broke on the CSS changes I had had to make to get my footer working as described above.  Deleted.

Next was the UI framework that Bitbucket uses, which can be seen providing things like the tab strip on Incursion's downloads page.  This is called AlloyUI.  The first warning sign was an 18MB download, compared to 500KB or so at most for JQuery UI.  The next was a "readme" file which instructed me to install a custom programming language, node.js, and to run the package manager that comes with it.  Completely unreasonable feature creep for a UI framework.  Deleted.

The same web page HTML and CSS skeleton is going to be reused for the Imaginary Realities, and in fact, it was actually the draft of the new Imaginary Realities web site repurposed for Incursion.  I'm hoping I can make use of the print media type, to generate the PDF and ePub e-books.

Saturday, 2 May 2015

Write an article for the next issue of Imaginary Realities

Are you involved with text-based gaming?  If so, whether your involvement is in mudding, roguelikes, interactive fiction, gamebooks, browser games or maybe even something else, please consider writing an article for Imaginary Realities.

Imaginary Realities is an online journal which first ran from September 1998 to December 2001, originally focused on mudding.  It has been revived, and had published a new issue just recently, which you can find here:

Find more details about suitable article topics here:

Please email me before writing an article, to confirm that the topic you are interested in writing about, is both suitable and within our range of coverage at this email address:

Articles should be in the range of 1000-4000 words, and need to be received by May 31st, 2015.  Longer articles are possible for serialisation, with approval required.

Monday, 13 April 2015

Imaginary Realities, volume 7, issue 2 released

Get Imaginary Realities volume 7, issue 2, at the usual place.
  • Bartering
  • Is Structuralism a Viable Critical Lens for Roguelike Games?

Wednesday, 28 January 2015

Write an article for Imaginary Realities

Are you involved with text-based gaming? If so, whether your involvement is in mudding, roguelikes, interactive fiction, gamebooks, browser games or maybe even something else, please consider writing an article for Imaginary Realities.

Imaginary Realities is an online journal which originally ran from September 1998 to December 2001, primarily focused on mudding. It has been revived, and had published a new issue just recently, which you can find here:

If you’re interested in the older issues, you can also find them here:

Find more details about suitable article topics here:

Please email me before writing an article, to confirm that the topic you are interested in writing about, is both suitable and within our range of coverage at this email address:

Articles should be in the range of 1000-4000 words, and need to be received by February 28th, 2015. Longer articles are possible for serialisation, with approval required.

Sunday, 25 January 2015

Imaginary Realities, volume 7, issue 1 released

Get Imaginary Realities volume 7, issue 1, at the usual place.

  • Choosing an Emoting System
  • The Dungeon Keeper
  • What Do I Do Now?
  • The Worlds in Which We Wander

Saturday, 24 January 2015

Rhubarb 2014-2015

The last garden bed I grew rhubarb in, grew two great crops.  Large luscious leaves both times.  The first time it rained hard, they sat in the water which pooled around their bed for days on end, and the leaves and stalks wilted.  They they grew back, and the second time the chickens accidentally sampled a leaf and decided they loved it.  Just like that, the rhubarb had leaves one day, and none the next.  The stalks wilted before I could harvest them.

Last year, I broke up the crowns and planted them out in a hugelkultur bed alongside the water race, fenced along the front and sides with chicken netting.  They didn't grow for ages, well into Spring.  Along the way I wondered whether my choice to lay old wood under the bed was hindering their growth, and the chickens worked out how to walk around the back and in, to scratch the bed out.  I fenced the back, and left it.  No watering, except for watering it in.

Now it's looking lush.  If it rains, the water will drain off into the water race.  One of the stalks was broken, so I picked it and offered the leaves to the chickens.  They may be stupid, but they are great at recognising things they like eating.

They've taken to drinking from the water race, rather than the water I put out for them with vinegar and minced garlic cloves in.  "Internet advice" has it that the rhubarb leaves will kill worms in their stomachs, probably randomly inspired by the fact that the leaves are poisonous to us humans.  I'd love to know for sure, as otherwise I'd probably make rhubarb leaf tea out of them, as a fertiliser.

Thursday, 22 January 2015

Bad internet advice #1 - Hang shiny objects, they scare birds

Whenever I read some forum, I see something like "I heard.." or "What you should do is.."  Unfortunately, it's common where "I tried this and it worked.." isn't so much.

One piece of "internet expert" advice I tried, was hanging shiny objects from my chicken coop in order to scare the birds away, so that they wouldn't share the chicken feed.  So I dug out several old CDs that were of no value, and hung them from the corners of the coop.

Big mistake!

Where before only small sparrows flocked to the chicken feed, suddenly black birds (starlings?) and magpies were coming, attracted by the shinyness.    I wish I had taken a picture.  Yes, they shine and sparkle - you can see them glinting better from the distance than from where I took the picture, like the far telephone lines in the back of the photo above.

What a shockingly bad piece of internet advice!  I doubt there's anyone out there who does this and actually goes around recommending it.  I suspect it was created and  perpetuated by the "internet experts".

Tuesday, 20 January 2015

Opium poppy seed harvest

This year, the opium poppies I planted didn't come up.  I suspect the chickens scratched over the beds where I scattered the seeds, and destroyed any germinating seeds before they had a chance to come up.  Luckily, the ones I left to their own devices last year self-seeded.

Poppies growing in wheelbarrow last year:

Self-seeded seedlings coming up in October 2014:

Live poppy straws and seed heads, after flowers petals have dropped, late December 2014:

Dead poppy straws and seed heads January 2015 that remain after my occasional harvest:

Harvested poppy seed heads, pre-seed removal.

Final poppy seed "crop":

All in all, harvesting maybe 50 seed heads, I ended up with a hefty bag of poppy seeds weighing in as shown, at 105 grams.  Removing the seeds from the seed heads is a matter of holding the straw ends and simply upending them and shaking them over a container.  If I had to harvest them on a larger scale, I'd simply get a supermaket bag, turf the cut heads into it, give it a good shake and then pull out the heads one by one making sure all were empty.

Buying them in the Greggs boxes at the supermarket, you purchase them at $2.29NZ / 40 grams.  So, at supermarket rates of 0.57c / 10 grams, my seeds would cost $6 NZ.

I invested no time at all in growing these poppies, and perhaps less than 5 minutes harvesting the seeds.  The only problem might be if they spread throughout your garden, but there are worse problems to have.  What I should have done differently is tagged the plants with the red petals, and save the seeds from those to sow for next year.