New
The latest blog posts to take off on Hacker News. 14,543 posts.
Seemingly Impossible Swift Programs
We will construct Swift programs that should be impossible to implement, yet somehow are not!
The -a to -z of Command-Line Options (2003)
Unix tradition encourages the use of command-line switches to control programs, so that options can be specified from scripts. This is especially important for programs that function as pipes or filters. Three conventions for how to distinguish command-line options from ordinary arguments exist; the original Unix…
The Game Engine Black Book: Doom
The Game Engine Black Book: DOOM is now available for purchase. It is being released exactly 25 years after DOOM.zip was first published on the University of Wisconsin FTP server in December 1993. You can get it at the following locations: - Amazon ( USA , France , UK , and many more). - Google Books ( here with no…
How Does setState Know What to Do?
Dependency injection is nice if you don’t have to think about it.
From macOS to Windows and WSL
Writings about computing, agents, and the Internet.
Pipenv: promises a lot, delivers very little
Pipenv is a Python packaging tool that does one thing reasonably well — application dependency management. However, it is also plagued by issues, limitations and a break-neck development process. In the past, Pipenv’s promotional material was highly misleading as to its purpose and backers.
Look ma, no locks
We describe a systematic approach for replacing locks with tasks. In this approach thread blocking is replaced by properly scheduling of tasks.
A Not-Called Function Can Cause a 5X Slowdown
Subtitle: Making Windows Slower Part 3: Process Destruction In the summer of 2017 I wrestled with a Windows performance problem. Process destruction was slow, serialized, and was blocking the syste…
How I Wrote a Modern C++ Library in Rust
Since version 56, Firefox has had a new character encoding conversion library called encoding_rs. It is written in Rust and replaced the old C++ character encoding conversion library called uconv that dated from early 1999. Initially, all the callers of the character encoding conversion library were C++ code, so the…
Developer on Call
For the system at work, I am on call one week every seven weeks. For most of the past ten years, I have been on organized on call rotations for the systems I have been developing. I think being on …
Pointers in C (2010)
This document comes with a companion example program, available as one file or as multiple files (zipped) .
How Does React Tell a Class from a Function?
We talk about classes, new, instanceof, prototype chains, and API design.
Algebras we love
If you work with anything that can be modeled mathematically, you most likely know that many things you work on can be expressed with algebras. However, if you are not a graduate of a computer science course or similar you might not know how ubiquitous they are and how often you rely on some of them. (And I don’t mean…
How Google Code Search Worked: Regex Matching with a Trigram Index (2012)
In the summer of 2006, I was lucky enough to be an intern at Google. At the time, Google had an internal tool called gsearch that acted as if it ran grep over all the files in the Google source tree and printed the results. Of course, that implementation would be fairly slow, so what gsearch actually did was talk to a…
A Programmer's Introduction to Mathematics
For the last four years I’ve been working on a book for programmers who want to learn mathematics. It’s finally done, and you can buy it today. The website for the book is pimbook.org, which has purchase links—paperback and ebook—and a preview of the first pages. You can see more snippets later in the book on the…
The Second Edition of “Refactoring”
I'm finishing a new edition of my Refactoring book. Here's details and periodic memos about my work.
Portability of tar features
The tar format is one of the oldest archive formats in use. It comes as no surprise that it is ugly — built as layers of hacks on the older format versions to overcome their limitations. However, given the POSIX standarization in late 80s and the popularity of GNU tar, you would expect the interoperability problems to…
UTF-7: a ghost from the time before UTF-8
On Halloween this year I learned two scary things. The first is that a young toddler can go trick-or-treating in your apartment building and acquire a huge amount of candy. When they are this young they have no interest in the candy itself, so you are left having to eat it all yourself.
How to design co-programs
I recently attended the Matthias Felleisen Half-Time Show, a symposium held in Boston on 3rd November in celebration of Matthias’s 60th birthday. I was honoured to be able to give a talk ther…
Pythran as a bridge between fast prototyping and code deployment
As a researcher/engineer (really, an algorithm developer) in the general area of audio and speech processing, I've always run into the same difficulty at all the companies I've worked at: How to quickly prototype and develop algorithms, and subsequently turn them into efficient code that can be deployed to customers.
Erlang/OTP 21's new logger
With OTP-21 came a new logging library in Erlang called logger . It comes as an attempt to offer a built-in alternative to long successful projects such as lager , which have seen years of battle testing and tweaking for performance. I've seen few articles written about the new logger and what it can do, so I've…
ECMAScript regular expressions are getting better (2017)
Sixteen years later, ES6/ES2015 introduced Unicode mode (the u flag) , sticky mode (the y flag) , and the RegExp.prototype.flags getter .
Fortran is still a thing
A short essay about Fortran in the modern world.