tl;dr: I found the AScore font in /Applications/Logic Pro.app/Contents/Frameworks/MACore.framework/Versions/A/Resources , installed it with Font Book , and can now open Logic’s PDFs in Affinity without rendering problems. I use Apple’s Logic Pro to produce written musical scores . Logic is a bit of an eccentric choice for this purpose: its scoring functionality has its share of quirks, and…
There has been much gnashing of teeth online over AI data centres and their water consumption. But just how much water does AI actually use, and how does this compare to animal farming? I looked into the numbers… One study predicts that AI water consumption globally will be between 0.38 and 0.60 km³ in 2027 . Animal agriculture, by comparison, is much, much worse, consuming 228 km³ annually . In…
AnimalRights.fyi is a news aggregator I built to pull together RSS feeds from animal rights and vegan news sources into a single location. The goal is to make this information easily accessible while linking to the people and organisations working to reduce animal suffering. This blog post write-up is both for my own future reference and for anyone else who might find it helpful. Your browser does…
I recently received my ZX Spectrum Next after having backed a Kickstarter in 2020. I began my computing life on a Spectrum +2A in 1989, and it’s also the machine I first learned to program on, in BASIC. I knew you could write things ‘in machine code’ (like most games produced for the platform were) but figuring it out was way over my head at the time. (Programs written in machine code are much…
This is the quickest way I’ve found to get a local instance of Drupal up and running on macOS. (Deploying to a remote server isn’t covered in this post.) Requirements If you have not already done so, install the following tools: Docker Desktop Homebrew : /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Composer : brew install composer Node / npm :…
ChatGPT really does supercharge your productivity as a developer. Code that would have taken maybe an hour or two (or more) to write and test using the power of human thought can now be produced by said human explaining the problem to ChatGPT and having it write the code. For this blog post I’ve chosen a practical, real-life example from my archive of ChatGPT conversations. The problem in this…
Disclaimer: I’m not a Drupal expert and share this post only to help others who may have a similar use case. I make no guarantees of best practice! This should work in Drupal 8 onwards. Refinements welcome in the comments. The scenario here is that you want to create a number of landing pages which, within the body of each landing page, list their immediate sub-pages. Along with a hyperlink, you…
Update (18 Feb): I’ve added a note about how ChatGPT works, and which may explain some of the nonsense it can produce. It’s not hyperbole to say that ChatGPT is revolutionary. It’s a significant leap over the often frustrating experience of using Siri or Alexa. Like Siri and Alexa, ChatGPT doesn’t always get everything right. It can state nonsense confidently as if it were fact. However, whether…
.com was once the most coveted of top-level domains (TLDs). For some, that might still be the case. To me, however, much more cool, fun — and often actually available to register 1 — are the spate of generic TLDs (gTLDs) that started appearing in the 2010s: .club , .guru , .dev , .buzz , .press , .band and .store , among many others . When coming up with a domain name for your latest venture, the…
I wanted to add some additional content to my home page : stuff that didn’t merit a blog post but which I thought was still worth sharing. I’d already been using GitHub Gist to record code snippets and other notes, so decided to look into using the GitHub REST API to retrieve that data and display it on the page. tl;dr: if you’d rather just dig into the code, and not bother with this blog post,…
There was an issue with the animated piano keyboard I built for my website JazzKeys.fyi in that the audio and visuals were out of sync when listening on Bluetooth headphones. I had assumed that latency would be taken care of automatically by the OS — there are no such issues when viewing an embedded HTML <video> , for example — but it seems that the Web Audio API does not handle this by default.…
I learned a couple of cool terminal tricks on Hacker News yesterday. Calendar The first is the cal program , which prints an ASCII calendar. cal by itself returns the current month with today’s date highlighted. cal 2022 returns a calendar for the whole of 2022. cal -3 returns the current and surrounding months. This may be the most useful default view for me: Running cal -3 returns a calendar…
I’m currently working on JazzKeys.fyi , a website of jazz piano tutorials. I wanted each musical example to include a simple on-screen keyboard that would animate as notes are being played. There didn’t seem to a solution that matched quite what I was looking for, so I decided to roll my own, a demo of which you interact with below. A working demo of the keyboard in action. Drag the vertical…
I use macOS to build websites and compose music . This post is a collection of keyboard shortcuts and modifiers that help my day-to-day productivity. macOS native shortcuts and modifiers Useful shortcuts already defined by the system. Window management Command - Backtick : cycle current application’s windows Command - H : hide active application’s windows 1 Command - Option - H : hide all windows…
At the turn of the year I set out to finish Tripods , a game I started making back in 2013. It’s a 2D puzzler built for the web using the DOM and SVG. 1 Screenshot of level 2 of Tripods. I wrote the original prototype in 2013 using jQuery, but it’s now 2021 so the first task was to refactor the codebase to use vanilla JavaScript. 2 For the animations — previously handled by jQuery’s animate()…
I’m creating an HTML5 puzzle game and need to prevent mobile users from zooming in, either via double-tapping or pinching. Normally, for accessibility reasons, you’d not want to have this restriction. But in terms of the game it was making the user experience worse and even messing up geometric calculations the game makes to detect a ‘win’. If memory serves, what used to be sufficient was adding…
I’ve been working on a new side project of late, and its landing page is now live . I’ve described it as a ‘toolkit’ for jazz keyboard players. Basically it’s a bunch of patterns, licks, philosophies and techniques I’ve acquired over the twenty-or-so years I’ve been playing jazz. I remember earlier on in my musical journey thinking it would be great if I could just find a ready collection of blues…
I’m working on a side project that uses the Web Audio API . However on iOS the Web Audio API can’t produce a sound if a device is muted. (I think this is a feature rather than a bug.) HTML 5 Audio plays sound no matter a device’s mute state, but you don’t get the same level of programmatic control that Web Audio affords. A workaround is to use Web Audio but simultaneously play a silent audio file…
I’m building a Scots glossary app using Fuse.js as the fuzzy-search algorithm. The data is currently in the form of a JavaScript object literal , and I wanted to check whether feeding Fuse JSON instead would result in faster searches (as I jaloused it might). Fuse.js is already plenty fast but I wanted to identify further opportunites for optimisation as I (slowly) add more words to the…
wrestle.buzz is a PHP and JavaScript web app I built that presents a ‘river’ of pro wrestling news, inspired by sites like Techmeme and NBA River . It uses SimplePie as the RSS feed parser, and Google’s natural language API analyzeEntities method to parse news headlines and generate a real-time trending-topic list. (You can use a simple curl command to test the API for yourself .) To provide a…
Cron jobs are commands or scripts that run on a web server automatically at set intervals (every 15 minutes, once a day, twice a month etc.) My site wrestle.buzz uses a few of them (including to run an API call and clear the cache). I thought I’d document the process of setting one up. Primer You can add cron jobs directly in a file called crontab ( here’s an example doing that on Ubuntu ), or via…
Squiz Matrix is a content management system I’ve built stuff with for several years now. I’ve found the keyword replacement and conditional functionality to be consistently useful, so I thought I’d share some tips and tricks thereanent. What are they? Keyword replacements are templating-style keywords used to add dynamic values to pages (or ‘assets’ in Matrix parlance). They start and end with the…