Automating this Hugo Blog with GitHub Actions

This Blog is built with the wonderful Hugo static site generator. It is hosted on GitHub pages too and uses the Soho theme - that’s a lot of great stuff for free. GitHub pages hosts a static site straight off your repo, either via a specific docs folder on master branch or a dedicated gh-pages branch. To build the static directory Hugo just has a simple hugo command to run. Up till now I would run that hugo command after making and changes and then commit and push the changes to my blog repo, simple right?

First experience with GitHub Actions

I want to share with you my first experience working with GitHub Actions. They’re really neat and definitely worth your time if you’re a fan of automation. Background This weekend I was working on a small personal project: a GitHub PR Comment resource for Concourse CI. That isn’t what this post is about really but first a little context. The project I was building is a Go project. When built, it consists of 2 built binaries check and in.

An introduction to hacking on Deno

I’ve recently been playing around with Deno - the “secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio”. The reason being is that this lies at the intersection of a couple of my main interests: JavaScript and Rust. I’ve been writing JS professionally now for around 5 years and Rust very unprofessionally for just over a year. Deno was created by Ryan Dahl, the also-creator of Node.js. Ryan introduced Deno to the JS world in a talk titled 10 things I regret about node.

Building and using a sys-crate with Rust - let's make a node clone (well kind of...)

Rust is an awesome language and platform to use, however there’s so much great software already written in c/c++. Luckily it’s not too complicated to make use of c/c++ projects in Rust. In this short post I’ll show you how. From a high-level perspective you can take any c/c++ project, for this example I’m going to use Duktape, the lightweight embeddable JavaScript engine. I’m choosing Duktape because it’s very simple to build it - it’s just 1 .

Ray Tracing: WebAssembly vs JavaScript

I’ve spent the last couple of weeks learning about the art and science of Ray Tracing. Ray tracing, for those who aren’t familiar is one technique for generating 3d computer graphics. Ray tracing isn’t the fastest way to generate 3d images but it’s appeal lies in both the realistic effects that can be achieved and in the elegance of simplicity of the technique. This technique is used in movies and for photo-realistic architectural renderings.

Supercharge your frontend with Rust 🦀 and Wasm 🚀

A quick guide to creating, packaging and using your first WebAssembly module with Rust, wasm-pack and friends… I’m guessing if you’re here you’ve already heard about WebAssembly and you just want to get started building something without reading pages of specification, complex explanations or stewing your brains in binary. If you don’t know what WebAssembly (AKA Wasm) is yet, it’s a new low-level language that can be executed by modern browsers, that traditionally only ran JavaScript.

Solving Towers of Hanoi with TLA+

Recently I’ve been reading Leslie Lamport’s Specifying Systems book. It’s free to read online, but I bought the hardcopy as I’m old fashioned like that. Ever since I discovered TLA+, I’ve been fascinated with the idea of using precise language to describe systems upfront. Often as developers we either don’t do any upfront specification and just hope to wing it, or we very imprecisely add comments to our code as we go.

Using hapi.js with and hapi.js are two great pieces of software for Node. There’s no official documentation on how they work together though. I’ve seen questions about this several times on Twitter and Github, so I thought I’d write a quick tutorial to show just how easy it is to integrate the two. The listener Every hapi server comes with a listener property: var Hapi = require('hapi'); var server = new Hapi.Server(); server.

BSprites: Combined web assets using Typed Arrays and Data URIs

Disclaimer: This was a weird idea I had one day and put this together the same evening. I’ve not tested it cross-browser or in a production environment. I’ve not benchmarked this either vs actually downloading all the images. It’s kind of a ‘what if’ project at the moment. If you think it’s really dumb or cool, I’d be really interested to hear your thoughts. Generally, whenever a browser loads a new image, it will make a new HTTP request to the server.

Express to Hapi.js

This isn’t an X is better than Y post. I love Express, I still think it’s a really great module and I’ve used it successfully in many projects. That being said, I’m hearing good things about Hapi.js (referred to as Hapi from hereon in) recently which is another HTTP server framework for Node.js. So I figured it was time to check it out. As most people who I imagine come to Hapi, I have experience with Express and I’m wondering how it differs.