Building GTK4 Applications Like Websites

The modern web, broadly, consists of two distinct innovations: The technology for rendering and interacting with web pages (also known as the trifecta of HTML, CSS, and JavaScript) The client-server deployment model, which allows a single desktop application (your web browser) to alter its behavior using instructions sent over the network by a web server Whether you love it or hate it, web rendering and interaction technology is widely used, both on the web and off.

Hot Reload in Uno and GTK

Uno While playing around with Microsoft’s Uno Platform, I discovered its super-neat XAML Hot Reload feature. It basically does exactly what you think it would; while the app is running, changes made to any XAML file will be reflected automatically, without needing to re-build anything. This is basically the desktop development equivalent of LiveReload, and is a great way to tighten the feedback loop and enable faster development. Unfortunately, my laptop only runs Linux, and their documentation requires you to use the Visual Studio Add-in in order to use hot reload.

Building a Cloud™-Free Hashistack Cluster 🌥

Table of Contents Preface Getting Started Safety First: TLS Behind the Firewall Provisioning With Terraform Running a Website Final Thoughts Preface “Hashistack” refers to a network cluster based on HashiCorp tools, and after off-and-on spending a considerable amount of time on it, the architecture of my own cluster (on which this blog is running, among other personal projects) has finally (mostly) stabilized. In this post I will walk you through its high-level structure, some of the benefits provided, and hopefully show you how you can build a similar cluster for your personal or professional projects.

Running this Blog on Nomad

In an attempt to consolidate my various personal projects, and to be efficient about how much money I spend on VPS hosting, this blog is now running on my tiny Nomad cluster. The ID for this allocation is: The components involved are: Nomad Consul Vault Fabio multirootca The Nomad deployment guide recommends either three or five servers, but I’m not really running business-critical applications, so I currently only have one server and one client node.

GopherJS and RPC over HTTP

GopherJS enables web development using Go for both the backend server code and frontend browser code. One of the neat things this allows you to do, which the NodeJS community is all too happy to tell you, is share code between the frontend and backend. However, JavaScript is a dynamic language, and lacks many of the static analysis tools that Go provides. By taking advantage of Go’s static analysis, it is possible to develop HTTP endpoints in the backend and automatically generate frontend code for calling them, using Go models and types end-to-end.

Deploying openSUSE on Vultr

As an avid openSUSE user and fan, I wish more VPS providers supported openSUSE images. Linode and Amazon both do, and there’s nothing wrong with them, but I recently learned about Vultr’s custom ISO feature and decided to try to bring openSUSE to Vultr! Vultr provides guides for installing CoreOS and Gentoo, after all, so why not openSUSE?

Nomad Task Versioning

Lately I’ve been playing around with a lot of HashiCorp tools including Nomad, their solution to application scheduling. Despite its relative immaturity, there are a few things I really like about it: straightforward, readable configuration syntax; ease of integration with other HashiCorp tools; and flexible runtime drivers, including raw execution, meaning you’re not tied down to containers. However, there’s one area in which Nomad’s documentation seems to be severely lacking: versioning.

Running Fleet Without Docker

Introduction The CoreOS project is doing some very interesting work on how to build, deploy, and scale web applications. Their big focus is to keep the platform as minimal as possible, which means that everything must be run as a container. That in turn means that the stock OS doesn’t have to worry about any language runtimes or compilers, since those will be bundled with the app itself. This all sounds amazing on paper, but Docker isn’t without its flaws, and the kind of orchestration that CoreOS recommends comes with its own complexities.

Beer and Concurrent HTTP Pipelines

This post is going to be a variation of the famous pipelines and cancellation Go blog post, modified for crawling a website, and updated using net/http’s native support for request contexts introduced in Go 1.7. Downloading Beer Recipes My motivation for building a concurrent website crawler was to be able to download a catalog of all public recipes on Brewtoad. Each recipe can be individually exported as XML, but from what I could tell there was no API to be able to download them all.

Rusty Dynamic Loading

Introduction One of my favorite things that I’ve learned so far from Casey Muratori’s excellent Handmade Hero series of videos is his demonstration of how to load game code dynamically. This allows you to make changes to the running game without having to close the existing process, which enables very rapid iteration during development. However, Casey only shows you how to do it in C using Win32. In this post, I will demonstrate how to achieve the same basic effect using cross-platform Rust.

js/template

One of my favorite packages in the Go standard library is html/template. Not only does it provide a solid templating language equivalent to text/template, but it ensures its safety of any HTML or JavaScript you throw at it. Unfortunately, it can be a little limiting when working with external JavaScript resources, but there are a couple options for working around those limitations.

Building a Giphy-Searching App in GTK+ 3

Web applications get all the hype these days, so why not buck the trend and build a desktop application instead? In this post I’m going to use Vala and GTK+ to build a simple desktop program for searching Giphy, the popular GIF database.

Amazon Glacier Backups in Bash

Why use an official Java or .NET-based algorithm when you can write your own in Bash? This script uses the AWS CLI tool to back up a file to an Amazon Glacier vault, without the need for a heavy runtime.

Measuring C API Coverage with Go

About a year ago I started working on an initial batch of Go bindings to the Allegro 5 game library, and while I like the idea of producing a fully-functional foreign-interface library, I didn’t finish during the initial period of development, and the project lay dormant for months. Recently I began to revive it, but as soon as I did, I ran into a problem: how much had I already done?