RSSAmplifier

Blog

Flother

Flother is the online home of Matt Riggott, a programmer and map-maker living in Reykjavík, Iceland.

flother.isRSS feed ↗10 posts

Latest posts

How to get quick access to dictionary definitions using Spotlight on MacOS

It’s 2014 and I want to check the spelling of a word. I’m on my MacBook, so I can simply hit Command - Space and search for the word with Spotlight. Because I’ve configured dictionary definitions to appear at the top of Spotlight results (using the UI shown here ), the word appears right at the top of the list. I love computers! It’s 2015 and Apple have released El Capitan (aka OS X 10.11). I want…

How to automatically format acronyms according to The Economist’s style guide in Typst

I love Typst . It’s a markup-based typesetting system that has the readability of Markdown with the power of LaTeX. I enjoy writing in it, and its PDF output is excellent. For my academic writing, Typst has replaced a homemade system of Markdown, Pandoc, and LaTeX that always felt clunky and brittle. When I’m writing in Typst I try to follow The Economist’s style guide. It’s a well-regarded set of…

How to customise the styling of em-dashes in Typst

Typst is a modern, markup-based typesetting system designed as a successor to LaTeX. If you need to produce PDFs — particularly for academic or technical writing — then it’s an invaluable tool. Writing in Typst is much like writing in Markdown: you write primarily in plain-text, adding lightweight markup only when you need it — _italics_, *bold text*, that sort of thing. It stays out of your way…

How Leicester City failed to reach 100 points

It was a season of emotional highs and baffling lows for Leicester City Football Club. From the heartbreak of Premier League relegation to the euphoria of clinching the Championship title, the Foxes’ 2023/24 campaign had it all. While their charge for the title seemed destined to break records, an unexpected slump dashed those dreams, leaving them nine points shy of the all-time Championship…

Election fever in Iceland: a presidential race too close to call

On 1 June Icelanders will go to the polls to elect their next president. The contest feels fresh but familiar at the same time: while the incumbent, Guðni Th, said in January he wouldn’t stand for a third term, most of the candidates are household names. Katrín Jakobsdóttir was, until a few weeks ago, prime minister; Jón Gnarr is a former mayor of Reykjavik; Ástþór Magnússon is attempting to take…

How to use DuckDB’s ST_Read function to read and convert zipped shapefiles

DuckDB is a (relatively) new RDBMS designed for in-process analytical queries, but really it’s useful for all kinds of things. As a database it’s most similar to SQLite, but DuckDB’s killer feature for me is that it comes with a spatial extension . That makes it really approachable for geospatial data processing — think PostgreSQL + PostGIS but without the hassle of running a server. DuckDB’s…

What audio formats are supported by Raylib?

A couple of weeks ago a friend convinced me, without much difficulty as it happens, that making games in Go and Raylib is an enjoyable way to spend your free time. I started off by recreating that stalwart of the 1970s, Pong . Raylib’s documentation is as minimal as it gets. There’s a dense cheatsheet and a suggestion that if you want to learn you should read the code . And so, when I wanted to…

When was Red Dwarf at its best?

The cult BBC sitcom Red Dwarf played a large part in my teenage years. I watched every episode over and over on VHS, quoted the best lines, read the books. But the long gap between series VI (1993) and series VII (1997) meant that eventually I ended up moving on to other obsessions. Recently I discovered that, although I gave up on it after series VI, they carried on and made a lot more episodes.…

How to use JSDoc to add type contraints to generic function arguments

The other day, while working on a Typescript/Javascript codebase, I found myself writing a function that took a single argument. That argument might be one of two types, and the function would return an array of the same type. For example, if the function was passed a string, it would return an array of strings. But if the function was passed a number, it would return an array of numbers. I…

How to search a GitHub repo using regular expressions or case-sensitive matching

Here’s a little hack I’ve discovered. You’ll need to be logged in to GitHub for this to work, but it’s possible to search a repo using case-sensitive string matching — or even a regular expression — from GitHub’s website. Here’s a hypothetical (and slightly contrived) example: let’s say you’re browsing through a repo online at https://github.com/example/foo . There’s a class…