Best of 2019

The blog posts Hacker News loved most in 2019. 1,357 posts.

Software Engineering
225

Clear is better than clever

This article is based on my GopherCon Singapore 2019 presentation. In the presentation I referenced material from my post on declaring variables and my GolangUK 2017 presentation on SOLID design . For brevity those parts of the talk have been elided from this article. If you prefer, you can watch the recording of the…

227

Let's Build a Compiler

Compilers, interpreters, runtimes, and the like can sometimes feel vaguely magical. They take your code, perform complex transformations that you only partially understand, and spit out an executable binary. Clearly, the inner workings of such a beast must contain arcane secrets, not meant for the minds of mortals.

236

I Built a Lisp Compiler

I’m very proud to announce the completion of my first programming language compiler! Malcc is an incremental and ahead-of-time lisp compiler written in C. This is the story of my progress over the years and what I learned in the process. An alternate title for this post is: “How to Write a Compiler in Ten Years or…

240

Go Slices Are Fat Pointers

One of the frequent challenges in C is that pointers are nothing but a memory address. A callee who is passed a pointer doesn’t truly know anything other than the type of object being pointed at, which says some things about alignment and how that pointer can be used… maybe. If it’s a pointer to void ( void * ) then…