Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Matthew MacFarquhar
Part 3 Working with Shared State
Introduction In this article, we'll explore different ways to manage state in a Svelte application by supercharging our habit tracker with persistent memory and backend integration. Up to this point, our state has been managed locally within components using simple $state and $derived runes.
Learning Svelte: Part 1 Basic State
Learning a new framework can feel overwhelming — but it’s also where the fun begins. As I worked my way through Svelte, I found a handful of concepts that really made things click. In this series, we’ll unpack those ideas together while building something practical: a habit tracker web app. Along the way, we’ll cover essentials like state management, template logic, the context API, snippets, and more. In a SvelteKit project, the directory defines your app’s pages.
Understanding MCP: Part 4 Advanced AI x UI Integrations
In this tutorial series, we’ll build a classic Todo list app — with a twist. Instead of using traditional UI elements like buttons, text inputs, or filters, all interactions will be handled through a conversational AI assistant. Powered by Model Context Protocol (MCP), this assistant will have access to tools and context, enabling it to manage your tasks entirely through natural language.
Understanding MCP: Part 3 Adding Prompts to MCP Servers
In this tutorial series, we’ll build a classic Todo list app — with a twist. Instead of using traditional UI elements like buttons, text inputs, or filters, all interactions will be handled through a conversational AI assistant. Powered by Model Context Protocol (MCP), this assistant will have access to tools and context, enabling it to manage your tasks entirely through natural language. What are MCP Prompts? MCP prompts are stored user queries that are stored on the MCP server.
Building a Browser Part 8: Updating The Visualization Engine
In this series of articles, we will be building a very basic Web Browser. Browsers are extremely complex and massive beasts that have to deal with tons and tons of Web API specs, languages, and edge cases. Our browser will completely ignore most of these specs and be a very simple slice into how browsers work, giving us a view into the end-to-end workings of a browser without being encumbered by the nitty gritty details.
Building a Browser Part 6: Executing Javascript
In this series of articles, we will be building a very basic Web Browser. Browsers are extremely complex and massive beasts that have to deal with tons and tons of Web API specs, languages, and edge cases. Our browser will completely ignore most of these specs and be a very simple slice into how browsers work, giving us a view into the end-to-end workings of a browser without being encumbered by the nitty gritty details.
Building a Browser Part 4: Adding The Browser Chrome
Matthew MacFarquhar · Follow 7 min read · -- In this series of articles, we will be building a very basic Web Browser. Browsers are extremely complex and massive beasts that have to deal with tons and tons of Web API specs, languages, and edge cases. Our browser will completely ignore most of these specs and be a very simple slice into how browsers work, giving us a view into the end-to-end workings of a browser without being encumbered by the nitty gritty details.
Building a Browser Part 3: Adding Styles
Matthew MacFarquhar · Follow 8 min read · -- In this series of articles, we will be building a very basic Web Browser. Browsers are extremely complex and massive beasts that have to deal with tons and tons of Web API specs, languages, and edge cases. Our browser will completely ignore most of these specs and be a very simple slice into how browsers work, giving us a view into the end-to-end workings of a browser without being encumbered by the nitty gritty details.
Building a Browser: Part 1 Loading a Page
Matthew MacFarquhar · Follow 10 min read · -- In this series of articles, we will be building a very basic Web Browser. Browsers are extremely complex and massive beasts that have to deal with tons and tons of Web API specs, languages, and edge cases. Our browser will completely ignore most of these specs and be a very simple slice into how browsers work, giving us a view into the end-to-end workings of a browser without being encumbered by the nitty gritty details.
WebGPU Rendering: Part 24 Speeding up Raytracing using BVH
Matthew MacFarquhar · Follow 9 min read · -- In this final article in our glTF raytracing sub-series we will be adding in some extreme performance boost using Bounding Volume Hierarchies. Up until now, we could only really render one frame of our duck and could not handle any realtime interactions. The reason for this is that our raytracing code is extremely slow! Particularly the part where we try to see if our ray hit anything.
WebGPU Rendering: Part 19 Loading Materials
Matthew MacFarquhar · Follow 13 min read · -- In these next couple articles, we will use the foundations of WebGPU programming we have learned to build a glb loader. A lot of these upcoming articles will be based on a combination of the 0 to glTF article series and this webgpu+glTF case study. For my version, I will use typescript instead of the original javascript and focus more on encapsulating logic within classes — like we were doing in our previous articles.
WebGPU Rendering: Part 16 Animations
Matthew MacFarquhar · Follow 10 min read · -- I have been reading through this online book on WebGPU. In this series of articles, I will be going through this book and implementing the lessons in a more structured typescript class approach and eventually we will build three types of WebGPU renderers: Gaussian Splatting, Ray tracing and Rasterization. In this article we will talk about the Animations. Animations are enabled using a list of bones.
WebGPU Rendering: Part 14 Equirectangular Rendering
Matthew MacFarquhar · Follow 6 min read · -- I have been reading through this online book on WebGPU. In this series of articles, I will be going through this book and implementing the lessons in a more structured typescript class approach and eventually we will build three types of WebGPU renderers: Gaussian Splatting, Ray tracing and Rasterization.
WebGPU Rendering: Part 12 Stencil Buffer
Matthew MacFarquhar · Follow 15 min read · -- I have been reading through this online book on WebGPU. In this series of articles, I will be going through this book and implementing the lessons in a more structured typescript class approach and eventually we will build three types of WebGPU renderers: Gaussian Splatting, Ray tracing and Rasterization.
WebGPU Rendering: Part 6 Multiple Render Passes
Matthew MacFarquhar · Follow 5 min read · -- I have been reading through this online book on WebGPU. In this series of articles, I will be going through this book and implementing the lessons in a more structured typescript class approach and eventually we will build three types of WebGPU renderers: Gaussian Splatting, Ray tracing and Rasterization. In this article we will talk about an interesting rendering use case, multiple render passes.
WebGPU Rendering: Part 3 Depth Testing
Matthew MacFarquhar · Follow 4 min read · -- Front faces in blue, back faces in green I have been reading through this online book on WebGPU. In this series of articles, I will be going through this book and implementing the lessons in a more structured typescript class approach and eventually we will build three types of WebGPU renderers: Gaussian Splatting, Ray tracing and Rasterization. In this article we will address depth testing.
Ray Tracing in One Weekend: Part 12 Expanding PDFs
Matthew MacFarquhar · Follow 4 min read · -- I have been reading through this book series on Raytracing which walks the reader through the creation of a Raytracer using C++. In this series of articles, I will be going through this book and implementing the lessons in Rust instead and diving deep into the pieces. In this article we will be completing our PDF implementation, adding the ability to mix multiple PDFs in the scene and add PDF components to spheres and hittable lists.
Ray Tracing in One Weekend: Part 11 Importance Sampling on Lights
Matthew MacFarquhar · Follow 7 min read · -- I have been reading through this book series on Raytracing which walks the reader through the creation of a Raytracer using C++. In this series of articles, I will be going through this book and implementing the lessons in Rust instead and diving deep into the pieces. In this article we will be adding importance sampling to our raytracer with the help of PDFs (Probability Density Functions).
Ray Tracing in One Weekend: Part 10 Monte Carlo Optimizations
Matthew MacFarquhar · Follow 6 min read · -- I have been reading through this book series on Raytracing which walks the reader through the creation of a Raytracer using C++. In this series of articles, I will be going through this book and implementing the lessons in Rust instead and diving deep into the pieces. In this article we will be applying some Monte Carlo approaches to make our render more performant.
Ray Tracing in One Weekend: Part 9 Volumes
Matthew MacFarquhar · Follow 5 min read · -- I have been reading through this book series on Raytracing which walks the reader through the creation of a Raytracer using C++. In this series of articles, I will be going through this book and implementing the lessons in Rust instead and diving deep into the pieces. In this article we will be adding the ability to create objects with volumes.
Ray Tracing in One Weekend: Part 8 Transformations
Matthew MacFarquhar · Follow 4 min read · -- I have been reading through this book series on Raytracing which walks the reader through the creation of a Raytracer using C++. In this series of articles, I will be going through this book and implementing the lessons in Rust instead and diving deep into the pieces. In this article we will be adding transformations to our tool chest (specifically translation and y rotation).
Ray Tracing in One Weekend: Part 7 Lights
Matthew MacFarquhar · Follow 4 min read · -- I have been reading through this book series on Raytracing which walks the reader through the creation of a Raytracer using C++. In this series of articles, I will be going through this book and implementing the lessons in Rust instead and diving deep into the pieces. In this article we will be lighting up our scene.
Ray Tracing in One Weekend: Part 6 Quads
Matthew MacFarquhar · Follow 4 min read · -- I have been reading through this book series on Raytracing which walks the reader through the creation of a Raytracer using C++. In this series of articles, I will be going through this book and implementing the lessons in Rust instead and diving deep into the pieces. This article will admittedly be quite short, all we will really be doing is adding a new primitive — Quads.
Programming WebAssembly with Rust Part 3: Targeting JS with Wasm-Bindgen
Matthew MacFarquhar · Follow 11 min read · -- WebAssembly (Wasm) has opened new doors for web development, allowing developers to write high-performance code in languages like Rust, C++, and C, which can then be run in the browser. However, one of the key challenges in using WebAssembly is effectively integrating it with JavaScript, the language of the web. This is where wasm-bindgen comes into play. wasm-bindgen is a powerful tool designed to facilitate the interaction between Wasm and JavaScript.
Procedural Content Generation With Deep Q-Learning
I have been reading this book on Procedural Content Generation and its integration with ML. As I go through this book, I will try my best to implement the concepts we go over in small, easily implementable examples. In this chapter, we will explore using Reinforcement Learning to teach an agent to create Monster stats for a game which will win against our target opponent 50% of the time using Deep Q-Learning (creating a balanced opponent).
Intro to ML with Procedural Content Generation
I have been reading this book on Procedural Content Generation and its integration with ML. As I go through this book, I will try my best to implement the concepts we go over in small, easily implementable examples. In this chapter, we will start our investigation of using ML in a PCG setting by approximating a platformer level with a regression model. The Notebooks used in this article can be found in the below repository.
Server Side Rendering In React
I have been reading this book on React 18 and its best practices. As I go through this book, I will distill the core pieces of the most interesting tid-bits in this series of articles on React. In this article we will be discussing server side rendering and what benefits it can bring to help us build a universal web application.
Managing Data in React
I have been reading this book on React 18 and its best practices. As I go through this book, I will distill the core pieces of the most interesting tid-bits in this series of articles on React. In this article we will talk about how to manage the global state of an application using Redux and the useContext hook. We will also discuss utilizing react suspense to show fallback components whilst our components load.
React Router
I have been reading this book on React 18 and its best practices. As I go through this book, I will distill the core pieces of the most interesting tid-bits in this series of articles on React. In this article we will talk about adding "routes" to our single-page web app, which enables us to navigate to different pages via the url. We will be using react-router to achieve this. Our basic route setup will involve some simple routes which render components when navigated to.
Styling React Components
I have been reading this book on React 18 and its best practices. As I go through this book, I will distill the core pieces of the most interesting tid-bits in this series of articles on React. In this article we will talk about a couple options we can take to style components in React and avoid polluting the global namespace with a bunch of styles which may clash. React offers three solutions for this: Inline styles, CSS modules and the Styled Components library.
React and The Browser
I have been reading this book on React 18 and its best practices. As I go through this book, I will distill the core pieces of the most interesting tid-bits in this series of articles on React. This article will talk about some of the integrations React has with some common things we would want in a webpage.
React Compositional Patterns
interface FetchProps { url: string children: (props: { data: any; loading: boolean; error: any }) => ReactNode } const Fetch: FC<FetchProps> = ({ url, children }) => { const [data, setData] = useState(null) const [loading, setLoading] = useState(true) const [error, setError] = useState(null) useEffect(() => { const fetchData = async () => { try { // const response = await fetch(url) // const result = await response.json() const result: any = [{name: "bill"}, {name: "bob"}] setData(result) }...
Part 6 Intermediate Code Generation
In this series, I will be working through this book on building your own programming language. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. The book offers tracks for building our new language using icon - an esoteric language that the author made contributions to - and java. I will be using Java throughout this tutorial.
Part 5 Type Checking
In this series, I will be working through this book on building your own programming language. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. The book offers tracks for building our new language using icon - an esoteric language that the author made contributions to - and java. I will be using Java throughout this tutorial.
Part 3 The Syntax Tree
In this series, I will be working through this book on building your own programming language. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. The book offers tracks for building our new language using icon - an esoteric language that the author made contributions to - and java. I will be using Java throughout this tutorial. In this section, we will learn about the Syntax Tree.
Part 2 The Parser
import java.io.FileReader; public class j0 { public static Yylex yylexer; public static parser par; public static int yylineno; public static int yycolno; public static int count; public static void main(String[] argv) throws Exception { init(argv[0]); par = new parser(); yylineno = 1; yycolno = 1; count = 0; int i = par.yyparse(); if (i == 0) { System.out.println("no errors " + j0.count + " tokens parsed"); } } public static void init(String s) throws Exception { yylexer = new Yylex(new...
Part 7 Resilience
In this series, I will be working through this book on Distributed Systems using Node.js. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs (for those following along in the book, this is actually chapter 8). In this section, we will learn about how to deal with failures in our system to make our application more resilient.
Part 6 Deployments
In this series, I will be working through this book on Distributed Systems using Node.js. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. In this section, we will learn how to build an end-to-end CI/CD pipeline for a new example application we will create.
Distributed Systems With Node.js: Part 5 Containers
In this series, I will be working through this book on Distributed Systems using Node.js. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. In this section, we will learn how to container-ize our applications so that they run the same regardless of what machine they are deployed to.
Distributed Systems With Node.js: Part 4 Observability
In this series, I will be working through this book on Distributed Systems using Node.js. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs.
Distributed Systems With Node.js: Part 2 Protocols
In this series, I will be working through this book on Distributed Systems using Node.js. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs.
Working Through Rust Web Programming pt 7: Deploying our App
In this series, I will be working through this book on Rust Web Programming. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. In this section, we will craft a build server to utilize an EC2 in order to create and publish images from our front and back end repos to Docker hub. Then, we will create a separate project to pull down those images in an EC2 and run our service in the cloud.
Working Through Rust Web Programming pt 6: Testing our System
In this series, I will be working through this book on Rust Web Programming. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. In this section, we will finally start adding tests to our system. In your real life development work, please do not wait as long as we have to write tests.
Working Through Rust Web Programming pt 4: Authentication and Authorization
In this series, I will be working through this book on Rust Web Programming. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. In this section, we will be locking down our endpoints, so only authorized users can access them, we will be utilizing our JSON Web Token we set up in part 1 to enable a user to get a token on login and then use that token to access the endpoints in our web app.
Working Through Rust Web Programming pt 3: Persisting Data With PostgreSQL
In this series, I will be working through this book on Rust Web Programming. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. In this section, we will be overhauling the JSON state management we hacked together in part 1 in favor of a more production-ized postgreSQL database.
Working Through Rust Web Programming pt 2: Building a Front End
In this series, I will be working through this book on Rust Web Programming. The book is quite large and in depth, but in these articles I will be distilling the big picture pieces of the book into bite size tutorials and walk throughs. In this section, we will not be doing any Rust code, as most of what we need for the backend has been set up in part 1.
Sculpting Language: GPT-2 Fine-Tuning with LoRa
GPTs have burst onto the scene as the greatest thing that has ever happened to the NLP field. ChatGPT has sparked interest in many fields and disrupted the status quo like nothing else. In this article we will explore how applications like ChatGPT are created by taking a pre-trained GPT (Generative Pre-Trained Transformer) and fine-tuning the model for our task specific requirements.
From Theory to Practice: Fine-Tuning BERT Models for Maximum Impact
In the rapidly evolving landscape of natural language processing (NLP), fine-tuning pre-trained models like BERT has emerged as a cornerstone technique for achieving state-of-the-art performance on various language understanding tasks with less compute compared with previous end-to-end training methods. This process involves adapting a pre-trained BERT model to a specific downstream task by adding a task-specific layer on top of the BERT encoder outputs.
Cracking the High-Dimensional Code: Autoencoders in Action
In this tutorial, we will be going through an end-to-end implementation of an AutoEncoder model for de-noising a 28x28 black and white image of a hand drawn number — like the ones found in for those of you that are familiar. Running This Tutorial For the data, we will use the MNIST data set which is built into pytorch by default To run the training, I was able to use just my CPU on my Macbook pro with 16 GB RAM. For the configuration I will be demoing, a CPU will work just fine.
U-Nets in Action: From Theory to Practice in Image Segmentation
In this tutorial, we will be going through and end-to-end implementation of A U-Net Deep Learning model for segmenting out a car in an image This tutorial is based on this amazing youtube tutorial and walkthrough. I will be copying most of the code from it, but we will go more in depth into the specific pieces and answer some questions I initially had when learning about U-Nets.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Matthew
Contact Matthew, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack