Week 33: Bufio

May 7, 2023

I need buffered IO. At work this week I've gone back to an old PR. I've been trying to find a way to dump some bytes stored in an io.Reader to disk. However, the bytes need to be base64 encoded, and they need to be wrapped in a JSON value, and the implementation can't load the data into memory for a second time. I thought I had something working, but after digging into bytes.Buffer it turned out that I didn't... I think I need to look more into the bufio package next.

Take 2. I've also been recording some videos for Policy as Code Week. I suppose like anything else recording and editing videos gets easier with practice but right now I find it hard. I enjoy presenting live and in person as the work involved feels finite. If something goes wrong, you have to account for it then rather than trying to make something perfect.

Getting Sassy. I have added SCSS support to my Golang website binary. I've been using Embedded Dart Sass for this purpose, taking inspiration from the Hugo implementation. Generally, the site's styles are applied using the functional CSS framework Tachyons, however with the light and dark mode support and some other customisations it felt worth using SCSS to keep things a little more manageable. Sadly the Embedded Dart cant be natively embedded in a Go application and having it available as a binary in my container image was a bit of a faff (changing base image etc.).

Herefordshire. Escaping coronation London, this weekend we took a trip to visit my family. We visited a lovely rural farmers market and bought a new print for our 'plant wall'. We also visited my Granny, who was in reasonable spirits despite now having to have thickener in her food and drink. Trying to find a phone and radio she can use is an ongoing trial. We need something more like a long range walkie-talkie than a phone at this stage.

Chest Pains. After a bad cough some weeks ago I sprained a muscle in my chest and back. This continues to make Badminton and Running pretty uncomfortable. Running is less sore and more about being able to breath deeply. A permanent breathlessness isn't good for morale mid training block.