Top posts
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 14,546 posts.
The algebraic structure of functions, illustrated using React components
Did you know there’s an algebraic structure for functions? That may not surprise you at all. But it surprised me when I first found out about it. I knew we used functions to build algebraic structures. It never occurred to me that functions themselves might have an algebraic structure. The structure is fascinating…
Guided by the beauty of our test suite
Last summer, I published Raven , an independent implementation of the Uxn CPU and Varavara ordinator . In short, this is a fictional computer designed for cross-platform portability: programs targetting it can be run on any platform that implements the specification.
Small Introduction to Markov Chains
Introduction A Markov Chain is a set of transitions from one state to the next; Such that the transition from the current state to the next depends only on the current state, the previous and future states do not effect the probability of the transition. A transitions independence from future and past sates is called…
Planjure: A* and Dijkstra's in Om
I wrote Planjure to learn ClojureScript and Om. It’s a fun little program. You paint islands on a canvas and run path-planning algorithms to find the optimal path for your ship to traverse from start to finish. Sailing across blue ocean is faster than hiking through green islands. The three algorithms implemented are…
Writing an SDK with Core Bluetooth
Software Development For People That Help People.
Why I Left the .NET Framework
The .NET Framework was good. Really good. Until it wasn’t. Why did I leave .NET? In short, it constrained our ability to choose (which is a huge deal for
That boolean should probably be something else
One of the first types we learn about is the boolean. It's pretty natural to use, because boolean logic underpins much of modern computing. And yet, it's one of the types we should probably be using a lot less of. In almost every single instance when you use a boolean, it should be something else.
Python is the new BASIC
The above is the Hello World program for Java, arguably one of the most popular programming languages. Encapsulated in the above three lines are several different concepts ranging from static functions to return types to stdout and to the entirety of object oriented programming in general.
A simple makefile is a unicorn
Whenever there is a discussion online about the tools to build software, there is always That One Person that shows up and claims that all b...
Representing the Impractical and Impossible with JDK 10 “var”
Having benefited from “var” for many years when writing c#, I’m delighted that Java is at last getting support for local variable type inference in JDK 10. From JDK 10 instead of saying ArrayList<String> foo = new ArrayList<String>(); we can say var foo = new ArrayList<String>(); and the type of “foo” is inferred as…
Any application that can be written in a system language, eventually will be
Atwood's Law predicted JavaScript's dominance through accessibility. A new corollary is emerging: system languages will win through operational efficiency and AI-assisted development.
PHP in 2024
A blog about modern PHP, the web, and programming in general. Follow my newsletter and YouTube channel as well.
Regexp-based RFC822 email address validation
Mail::RFC822::Address is a Perl module to validate email addresses according to the RFC 822 grammar. It provides the same functionality as RFC::RFC822::Address, but uses Perl regular expressions rather that the Parse::RecDescent parser. This means that the module is much faster to load as it does not need to compile…
Don't test with SQLite when you use Postgres in Production
Yesterday, I was looking for some help trying to have a clean way to roll back database transactions at the end of a test in a Python TestC...
Why are coding agents so dumb?
Models are getting better and better, while the agents that drive them languish.
For processing strings, streams in C++ can be slow
The C++ library has long been organized around stream classes, at least when it comes to reading and parsing strings. But streams can be surprisingly slow. For example, if you want to parse numbers, then this C++ routine is close to being the worst possible choice for performance: std::stringstream in(mystring)…
Banish missing glyphs with Unifont
The GNU Unifont project is amazing. It contains every Unicode glyph in one single file! I am going to argue that you should bundle it with your apps, your operating systems, and - at a pinch - your websites. The Unifont is a perfect fallback font. If your app or website uses a Unicode character which isn't supported…
Let the Type System do the Work
How to use your language's most-overlooked feature to its utmost.
APL: An Array Oriented Programming Language (2018)
APL was invented by Ken Iverson in the early 1960s as a notation for array oriented calculations. It was precise and useful enough, so it…
AI made coding more enjoyable
To me, one of the most annoying parts of software engineering is writing code that doesn’t require thinking. It’s just a typing exercise, and that’s boring.
Rust in 2023: Growing Up
When I started working on Rust in 2011, my daughter was about three months old. She’s now in sixth grade, and she’s started growing rapidly. Sometimes we wake up to find that her clothes don’t quite fit anymore: the sleeves might be a little too short, or the legs come up to her ankles. Rust is experiencing something…