Up to Main Index                             Up to Journal for April, 2020

                     JOURNAL FOR TUESDAY 7TH APRIL, 2020
______________________________________________________________________________

SUBJECT: A quick status update on bodies
   DATE:

Last time I said that I hoped to have the body system ready to release “next
week”, which was actually last week. Didn’t happen — I still haven’t released
an update yet :( This is just a quick status update on where I am at.

I have working code. I can define items and wield, wear or remove them. The
item’s usage is even listed by the INV/INVENTORY command:


  >inv
  You are currently carrying:
    a knife
    a dagger (wielding)
    a staff
    a sword (wielding)
    a coin
    a leather jerkin (wearing)


So what’s been the hold up? I’m not happy with code :( The Body attribute
API seems overly verbose with many methods. The commands to wear, wield or
remove items need to do a lot more bookkeeping than I would like. As with
other parts of the system the attributes should mostly handle themselves and
do the heavy lifting while the commands are simple glue.

I’ll know when I’ve managed to sort everything out because the code will “feel
right”, as opposed to now when the code “feels wrong”. This “feeling” is
something very hard to quantify when explaining it to someone else. I hope
that if you code at all it makes sense and you know what I’m talking about :)

While I’ve been working on (re)writing my code, mid March saw the release of
Go 1.14.1 which should work around the mlock issue[1] I was seeing[2]. I’ve
only recently upgraded and need to see how it goes…

For now it’s back to making things simple, which can be really hard.

--
Diddymus

  [1] More details on the mlock issue:
        https://github.com/golang/go/wiki/LinuxKernelSignalVectorBug

  [2] Journal for Saturday 29th February 2020; Go 1.14 and Linux kernel bugs:
        ../2/29.html


  Up to Main Index                             Up to Journal for April, 2020