RSSAmplifier

Blog

Home on Matt Harrison

Recent content in Home on Matt Harrison

matt-harrison.comRSS feed ↗23 posts

Latest posts

LangGraph from scratch, part 2: streaming, subgraphs and dynamic fan-out

Picking up where part 1 left off. Streaming at the right granularity, subgraphs as Runnables, and the Send API for the moment you realise you need to fan out to N workers and N is not known until the LLM tells you.

LangGraph from scratch, part 1: state, graphs and humans in the loop

I have been building agents with LangGraph for a while and finally sat down to explain the parts that took me longest to internalise. Part 1 covers everything up to and including human-in-the-loop.

Obsidian Headless let me rebuild Things3 Quick Entry for my Obsidian bullet journal

I use Obsidian for bullet journaling but missed the immediacy of Things3 Quick Entry. Obsidian Headless unlocked a simple way to add that capture flow back.

Loupe: a lightweight local tracing dashboard for LLM apps

View the repo on GitHub Install Loupe from npm When you are building with LLMs there is a very annoying tooling gap. At one end you have console.log() and whatever scraps of logging you remembered to add at 1am. At the other end you have full observability stacks built for hosted apps, retained data, team dashboards and production telemetry. Most of the time, when I am iterating on an agent…

Stay Ahead of Scammers: A GPT-4 powered SMS bot to Keep You Safe from Phishing Texts

The problem of SMS Phishing (AKA Smishing) Email spam has been a solved problem for at least 10 years. As any user of Gmail will tell you, the only time they see spam emails is the occasional time they curiously dip into their spam folder and chuckle at the all-to-obvious clichés used by scammers. However, there is another type of spam that is on the rise and seems to be poorly addressed by Big…

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…

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…

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,…

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.…

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…

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…

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,…

Using hapi.js with Socket.io

Socket.io 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');…

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…

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…

Keeping on top of invoices with the Freshbooks API and Ruby

Freshbooks is a great tool as a freelancer, for managing your billing and sending invoices. It is however lacking in a few places for me. One thing I really want to see when I log in is how many days have elapsed since I sent each invoice out. Yes I could work this out from the dates, but I don’t have the time quite often so things start slipping. Luckily there’s an API we can use, and…

Building a complex web component with Facebook's React Library

Edit (12-2016): This article has been updated for React 0.14 and ES2015 React looks set to be the hot front end technology of 2014 with some even calling 2014 the Year of React. So I thought I’d introduce it with a tutorial and hopefully learn something myself too. Here’s what we’ll be building: I’m going to show you how to create a complex, interactive web component with…

Perfect web audio on iOS devices with the Web Audio API

TL;DR A lot of the restrictions imposed on the HTML5 audio element by iOS can be overcome by using the Web Audio API. If you&rsquo;ve ever built a web based game that requires sound effects, you&rsquo;ve no doubt felt the frustration of getting what is trivial to implement on desktop browsers to work smoothly on iOS devices. Initally the obvious way to implement audio is to use the HTML5 <audio>…

Capturing infrared packets with Arduino and plotting them with HTML5 canvas

I had an old DVD player lying around that wasn&rsquo;t working anymore so I stripped the infrared sensor from it (Note this is not a standard IR phototransistor/diode, it has a modulated, logic-level output). I found the fantastic Arduino-IRremote library by Ken Shirriff. This library abstracts away all the processing you need to start getting commands from your remote. It also has decoders for…

Hacker News in your terminal!

If you&rsquo;re anything like me, you visit Hacker news at least 4 times a day and you spend a lot of time in the terminal. I usually open the Hacker News site in my browser and decide if any of the headlines catch my attention, I thought it would be cool if I could see a summary of the new featured posts in my terminal and only open them in a browser if I wanted to read them, so I made this…

Universities don&#39;t help you to stay foolish - My experience with unhelpful admissions at Manchester University

“I always thought of myself as a humanities person as a kid, but I liked electronics. Then I read something that one of my heroes, Edwin Land of Polaroid, said about the importance of people who could stand at the intersection of humanities and sciences, and I decided that’s what I wanted to do.” - Steve Jobs Let&rsquo;s be honest; not everybody gets university right the first time around.

Natwest.js

A command line banking tool written in Node.js Natwest.js is a command line tool written in Node.js which lets CLI addicts get your account information programatically from Natwest Bank (UK). It uses PhantomJS behind the scenes to fire up a webkit, submit your credentials and scrape some ugly HTML and output it into a beautiful terminal interface. Installation PhantomJS is required for this tool…

Largest product in a grid

I&rsquo;ve recently started learning Ruby and also been working my way through the programming problems on http://projecteuler.net/ so I decided to combine the 2. Here&rsquo;s my attempt at problem 11. ##The problem What is the greatest product of four adjacent numbers in the same direction (up, down, left, right, or diagonally) in the 20×20 grid below? 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52…