Lewis Metcalf

Series

Making Regex From Scratch in Go

This series is a step by step guide to creating an (almost) fully fledged Regex engine using Go. It explores the basics of Finite State Automata, incrementally creates a parser and compiler for turning strings into state machines, walks through the setup of a visualizer for the FSM node graph. All of the development is structured as a TDD project, and uses modern Go features such as fuzzing, generics, and profiling.


Posts

Http - A HistoryA few notes based on this great video HTTP/1 TCP/IP The first and most simple approach, making a TCP handshake for each resource which has to be shared. The downsides to this approach is that in order to speed up transfer rates, we want to send many resource pieces in parallel. With HTTP/1, this means doing a new TCP handshake every-time, which is costly and time consuming. This was alleviated in a later version HTTP/1.…
The Journey of a RefactorBasically, I was trying to do something and went down the wrong path, and when I finally saw the light it all got a lot better. Problem I’m trying to write a test that makes sure that no other fields in the db are effected when we write to the db - only the field that we care about. The issue is that when you decode a response from the db to a go struct, you can use known fields with a struct, or unknown fields with a map, but you can’t do a mix.…