New
The latest blog posts to take off on Hacker News. 1,357 posts.
Parallelism in Crystal
Crystal has made a huge step forward to have parallelism as a first class citizen. In short, you can set up the number of worker threads on runtime and each new fiber will be scheduled to run on one of them. Channel and select will work seamlessly. You are allowed to share memory between workers, but you will probably…
I wrote a self-hosting C compiler in 40 days (2015)
I wrote a self-hosting C compiler which I named 8cc in 40 days. This is a log when I was writing it from scratch by myself in 2012. The code and its history are available at GitHub .
Let the callers of your API control allocations
This is a post about performance. Most of the time when worrying about the performance of a piece of code the overwhelming advice should be (with apologies to Brendan Gregg) don’t worry about it, yet. However there is one area where I counsel developers to think about the performance implications of a design, and that…
Three Tribes of Programming (2017)
There's an old joke that computer science is a lie, because its not really about computers, and its not really a science. Funny joke. Everyone laughs, then someone says "Yeah but it sort of is about computers though, isn't it?". Feet shuffle awkwardly. Someone clears their throat and before you
Solving Every Sudoku Puzzle (2006)
Every square has exactly 3 units and 20 peers. For example, here are the units and peers for the square C2 :
Debugging WebAssembly outside of the browser
WebAssembly has begun to establish itself outside of the browser via dedicated runtimes like Mozilla’s Wasmtime and Fastly’s Lucet. While the promise of a new, universal format for programs is ...
Static TypeScript: A Static Compiler for the TypeScript Language
Static TypeScript is designed to be useful in practice (especially in education), while being amenable to static compilation targeting small devices.
ORMs Are Backwards
Not bad just backwards
Mozilla’s Manifest v3 FAQ
Developers have asked what Google's proposed changes to their extensions API, known as Manifest v3, mean for Mozilla. Here are some frequently asked questions.
Lezer
I keep coming across people who consider parser technology a forbidding, scary field of programming. This is nonsense—a small parser can be very, very simple , and provide a wholesome exercise in recursive thinking. At the same time, it is true that you can make parsing extremely complicated. Mostly, this tends to…
Shenanigans With Hash Tables
One reason to know how your data structures work is so that when your problem has unusual constraints you can tweak how they work to fit the problem better or work faster. In this article I’ll talk about four different fun tweaks to the concept of a hash table that I made in the process of using hash tables to…
Tree traversal without recursion: the tree as a state machine (2007)
I am currently working my way through Higher-Order Perl , a highly recommended tome on effective and practical use of functional programming techniques in Perl. As you’d expect from a book that spends a lot of time discussing such concepts as function composition and recursion, the subject of tree traversal makes a…
Good Code Design from Linux
Learn how Linux/FFmpeg C partial codebase is organized to be extensible and act as if it were meant to have “polymorphism”. Specifically, we’re going to briefly explore how Linux …
An introduction to deterministic builds with C/C++
What are deterministic builds?
Anatomy of a High-Performance Convolution
It's no surprise that modern deep-learning libraries have production-level, highly-optimized implementations of most operations. But just what is the black magic that these libraries use that we mere mortals don't? What exactly does one do to "optimize" or accelerate neural networks operations?
Beginner's Guide to Linkers (2010)
This article is intended to help C & C++ programmers understand the essentials of what the linker does. I've explained this to a number of colleagues over the years, so I decided it was time to write it down so that it's more widely available (and so that I don't have to explain it again). [Updated March 2009 to…