P

Phil Eaton

notes.eatonphil.com · Personal blog · on HN since 2016

Phil Eaton, a database engineer, writes about building databases, parsers and emulators from scratch, and about writing and careers.

What HN saysCommenters praise his database-from-scratch series in Go and recommend him as a writer, especially his post on whether it is worth writing about.
93HN people shared it
22linked it in comments
227stories submitted
6.4Kstory points
6 months agolast shared
2016people per year2026

Most-shared posts

  1. 1
  2. 2
    Writing a SQL database from scratch in Go
    7 people · 438 points · first shared 2020 · 54 comments on HN
  3. 3
  4. 4
  5. 5
    Emulator basics: a stack and register machine
    5 people · 160 points · first shared 2019 · 4 comments on HN
  6. 6
    Writing a SQL database, take two: Zig and RocksDB
    5 people · 47 points · first shared 2022 · 3 comments on HN
  7. 7
    LLMs and Your Career
    5 people · 7 points · first shared 2026 · discussion on HN
  8. 8
    Is it worth writing about?
    5 people · 4 points · first shared 2022 · 1 comments on HN
  9. 9
    Homepage
    5 people · first shared 2019
  10. 10
  11. 11
  12. 12
  13. 13
    Writing a simple Python to C compiler: hello, fibonacci
    4 people · 49 points · first shared 2020 · 4 comments on HN
  14. 14
    How to recommend books, or, stop recommending SICP
    4 people · 29 points · first shared 2022 · 20 comments on HN
  15. 15
    Burn Your Title
    4 people · 29 points · first shared 2025 · 10 comments on HN

What HN people wrote when they linked it

adamgordonbell · 2022-09-16
I'm not sure about SRE specific or CI specific writing but at risk of answering another question, here's what comes to mind for me. In the Operations space my favorite writer is Charity Majors, although a lot of what she talks about isn't OPs specific: https://charity.wtf/ Rachel by the Bay is also great: https://rachelbythebay.com/w/ Totally not related, but Phil Eaton's posts on how databases work are super interesting and lack fluff. https://notes.eatonphil.com/ In terms of CI and builds, I try to write some on this topic for the Earthly Blog. My Bazel article was recently on Hn. Here are my posts: https://earthly.dev/blog/authors/adam/ Warning though, I also write about lots of other stuff. Are there specific CI topics you'd like to see covered?
xuancanh · 2023-10-17
K0nserv · 2026-05-05
There is work happening on keyword generics[0], which would let a function be generic over keywords like `async` and `const`. For now the best option to write code that wants to live in both worlds is sans-io. Thomas Eizinger at Fireguard has written a good article about this[1] pattern. Not only does it nicely solve the sync/async issue, but it also makes testing easier and opens the door to techniques like DST[2] I have my own writing on the topic[3], which highlights that the problem is wider than just async vs sync due to different executors. 0: https://github.com/rust-lang/effects-initiative 1: https://www.firezone.dev/blog/sans-io 2: https://notes.eatonphil.com/2024-08-20-deterministic-simulation-testin… 3: https://hugotunius.se/2024/03/08/on-async-rust.html
qianli_cs · 2025-01-19
I've read a similar series from Phil back in 2020: "Writing a SQL database from scratch in Go" https://notes.eatonphil.com/database-basics.html The code is available on GitHub: https://github.com/eatonphil/gosql (it's specifically a PostgreSQL implementation in Go). It's cool to build a database in 3000 lines, but for a real production-ready database you'll need testing. Would love to see some coverage on correctness and reliability tests. For example, SQLite has about 590 times more test code than the library itself. (https://www.sqlite.org/testing.html)
beoberha · 2023-05-25
Phil rocks. Highly suggest following him on twitter. He’s pretty outspoken about writing. This is a great post of his that I need to reflect on more: https://notes.eatonphil.com/is-it-worth-writing-about.html
eatonphil · 2023-01-03
Reading books is great! And curating a list is useful and fun. But you have to be pretty careful when you say things are a "must" since that's... pretty hard to prove (and can just make people feel bad). And the proof has already been pointed out as not true in this thread. Unless we all want to start evaluating eachother's programming ability virtually. Again, lists and reading is great! And it's probably better to (try to) read any of these books than not. But for the folks who try the books and can't get through them (like me and SICP), I'd say don't worry about it. I have my own [0] list of books I think devs should read but I just try not to say "must read". [0] https://notes.eatonphil.com/books-developers-should-read.html
madushan1000 · 2020-05-15
I've been writing a sql parser + memory backend in rust called rustsql[1] I've been following this[2] go tutorial and converting code into rust. [1] https://github.com/madushan1000/rustsql [2] https://notes.eatonphil.com/database-basics.html
voberoi · 2023-07-04
https://vikramoberoi.com I started writing publicly late last year. It's been tons of effort but it's been tremendously fun and fruitful. Some of my more-visited or favorite posts: * A primer on Roaring bitmaps: what they are and how they work -- https://vikramoberoi.com/a-primer-on-roaring-bitmaps-what-they-are-and… This one ended up on the front page of HN and gets hundreds of visits monthly. I wrote it because it's the post I would have liked to read instead of reading the papers themselves. * An internship working on "Customers who bought this also bought" at Amazon 16 years ago -- https://vikramoberoi.com/an-internship-working-on-customers-who-bought… I wrote this one as an addendum to throwaway tweet I posted that went viral. * How I made atariemailarchive.org -- https://vikramoberoi.com/how-i-made-atariemailarchive-org/. I wrote this one when I open-sourced the dataset behind atariemailarchive.org. The dataset got featured in Data is Plural and in a podcast interview I did with Jeremy Singer-Vine. --- My favorite personal blog to read this past year is Phil Eaton's (eatonphil on HN): https://notes.eatonphil.com/. I enjoy the subject matter he posts about (a lot of systems work and research, primarily), but his other posts are great too. His post, "Is it worth writing about?" is a nice inspirational one for folks who want to/have been thinking about writing:…
tolerance · 2026-05-12
People like me may be more interested in this blog post: https://notes.eatonphil.com/2024-05-30-how-i-run-book-clubs.html
chubot · 2025-12-26
Yeah that's basically what was discussed here: https://lobste.rs/s/xz6fwz/unix_find_expressions_compiled_bytecode And then I pointed to this article on databases: https://notes.eatonphil.com/2023-09-21-how-do-databases-execute-expres… Even MySQL, Duck DB, and Cockroach DB apparently use tree-walking to evaluate expressions, not bytecode! Probably for the same reason - many parts are dominated by I/O, so the work on optimization goes elsewhere And MySQL is a super-mature codebase
quamserena · 2025-12-16
Not really. Here’s a comparison of different languages: https://notes.eatonphil.com/parser-generators-vs-handwritten-parsers-s… Most roll their own for three reasons: performance, context, and error handling. Bison/Menhir et al. are easy to write a grammar and get started with, but in exchange you get less flexibility overall. It becomes difficult to handle context-sensitive parts, do error recovery, and give the user meaningful errors that describe exactly what’s wrong. Usually if there’s a small syntax error we want to try to tell the user how to fix it instead of just producing “Syntax error”, and that requires being able to fix the input and keep parsing. Menhir has a new mode where the parser is driven externally; this allows your code to drive the entire thing, which requires a lot more machinery than fire-and-forget but also affords you more flexibility.
crabmusket · 2025-11-01
This feels like the sort of thing that has led to the development of deterministic simulation testing (DST) techniques as pioneered by FoundationDB and TigerBeetle. https://notes.eatonphil.com/2024-08-20-deterministic-simulation-testin… I hope something like this becomes popular in the Rust/Tokio space. It seems like Turmoil is that? https://tokio.rs/blog/2023-01-03-announcing-turmoil
eevmanu · 2025-09-25
stevekemp · 2024-10-07
Nice job. You can see this post for the start of a guide in implementing something very similar "Writing a SQL database from scratch in Go": https://notes.eatonphil.com/database-basics.html (Use the tag "sql" to find the later parts. Sadly not linked directly from that first one.)
jeden · 2024-08-05
https://notes.eatonphil.com/lua-in-rust.html It's some kind of developer trend.
ghusbands · 2022-06-11
That's a fairly normal approach, yes [1]. It's not so painstaking. There are parser generators other than lex and yacc that do a better job, but making most generators produce good errors and handle your context-sensitive tokenisation is more effort overall than making an equivalent hand-written parser (be it near-Pratt, PEG, general recursive descent or anything else). [1] https://notes.eatonphil.com/parser-generators-vs-handwritten-parsers-s…
gavinray · 2022-01-12
I thoroughly enjoyed what little I read of this, bookmarked it for later -- thanks! https://notes.eatonphil.com/emulating-amd64-starting-with-elf.html
Jemaclus · 2021-09-06
Not sure if you knew this or not, but Phil Eaton (the OP) writes databases for fun[1]. This post isn't saying Postgres and MySQL aren't modern, but is more trying to get ideas for what to play around with next. [1] https://notes.eatonphil.com/database-basics.html
jlarocco · 2021-08-06
On further thought, what I meant to say was that in this specific example, I don't think it makes sense to use these particular libraries from Common Lisp because there are native CL libraries for doing basically the same thing. On the other hand, I completely agree that it's useful to run a CL application on ABCL to access Java libraries that don't exist for CL. EDIT: On a side note, I just noticed the abcl.org link immediately under "Picking a language, libraries" is pointing to "https://notes.eatonphil.com/abcl.org"
yjftsjthsd-h · 2021-10-27
> What popular languages fall into this category ? Not all, but many. Going down the list of most popular languages from https://www.tiobe.com/tiobe-index/ - Python - CPython, PyPy, MicroPython C - numerous (gcc, clang, msvc, tcc, etc.) Java - https://en.wikipedia.org/wiki/List_of_Java_virtual_machines C++ - gcc, clang, msvc, etc. C# - Microsoft's version and mono Visual Basic - probably only one implementation JavaScript - https://notes.eatonphil.com/javascript-implementations.html SQL - assorted dialects, not sure that counts PHP - probably only one implementation ASM - assorted dialects, not sure that counts Classic Visual Basic - probably only one implementation Go - only one version that matters, AFAIK MATLAB - probably only one implementation R - probably only one implementation Groovy - probably only one implementation Ruby - https://opensourcelibs.com/lib/ruby-implementations (Why are there so many in Go?) Swift - probably only one implementation Fortran - https://fortran-lang.org/compilers/ Perl - probably only one implementation Delphi/Object Pascal - there are a decent number of Pascals historically, and FPC and Delphi are the big modern options

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close