I wrote and self-published two books. You can find out more about how these books came to be by reading Why I wrote a book about interpreters, What I didn't do to write a book, and The Tools I Use To Write Books.
Writing An Interpreter In Go
In the book we build a programming language from scratch. We start with 0 lines of code and end up with a fully working interpreter for the Monkey programming language. We build the lexer, the parser, the AST, the object system, and the evaluator — written with tests first and without 3rd-party libraries. This book is not about theory, its focus is runnable, working code.
Find out more and buy it at interpreterbook.com
Writing A Compiler In Go
This is the sequel to Writing An Interpreter In Go and contains the next step in the evolution of the Monkey programming language: we're switching out the tree-walking evaluator for a bytecode compiler and virtual machine. It starts where the first book ends, uses the same codebase and follows the same approach: working code front and center, written from the ground up, tested and runnable.
Find out more and buy it at compilerbook.com