Up to Main Index                         Up to Journal for September, 2018

                   JOURNAL FOR MONDAY 24TH SEPTEMBER, 2018
______________________________________________________________________________

SUBJECT: Broken dev branch fixed, recordjar decoder improvements & tests
   DATE: Mon 24 Sep 18:53:18 BST 2018

Last weekend, when I updated the public dev branch, I accidentally broke the
compile. Turns out that when I update the description attribute I missed out a
string to []byte conversion resulting in a failure:


  cannot use d.description (type string) as type []byte in argument to
  encode.Bytes


Not quite sure how I missed that, but it’s now fixed and the public dev branch
updated.

I have also committed and pushed out to the public dev branch all of my tests,
benchmarks and improvements for the recordjar decode package.

The improvements follow on from the encoder package — better handling of white
space, sorting of keywords and lists, and dropping of duplicate keywords. The
way the encode and decode packages handle data is also more consistent between
the two packages. There were also a few performance improvements along the way.

I’m still working on the recordjar package. Next up is writing some tests that
combine encoding and decoding to make sure the package can read everything it
writes and vice versa.

I also had a report of some issues with the encode/decode of DateTime values
in player files. Seems that using RFC1123 with ISO short codes for the local
time zones is a bad idea. I was asked to change to RFC3339 which is easier for
machines to handle, but is not very user friendly: 2018-09-20T20:24:33Z

In the end I stayed with the user friendly format but switched to using
RFC1123Z which uses numeric time zone offsets: Thu, 20 Sep 2018 20:24:33 +0000

I’ve updated the encoder to write a DateTime using RFC1123Z. The decoder has
been updated to read using RFC1123Z and fall back to RFC1123 if parsing fails.
That way existing player files will continue to work and will also be updated
automatically to use the new RFC1123Z format the next time they are saved.

--
Diddymus


  Up to Main Index                         Up to Journal for September, 2018