Topics /

Software Engineering

The most popular blog posts about software engineering on Hacker News. 1,260 posts.

2025
1171

`std::flip`

std::flip is a little-known utility from the C++ standard library header <functional>: it is a higher-order function that accepts a Callable and returns an equivalent Callable with the order of its parameters reversed (or “flipped”).

1172

Contracts for C

C++ seems to finally converge with their contracts proposal, I decided to give it a try and come up with ideas how such a thing would look for C. This is in early stages, not a full proposal yet, a…

1178

Parsing Advances

I find myself writing yet another toy parser, as one does during a Christmas break. It roughly follows Resilient LL Parsing Tutorial. Not because I need resilience, but mostly because I find producing a syntax tree and a collection of diagnostics a more natural fit for the problem than bailing out on the first error.

1180

Advent of Code on the Z-Machine

Fantasy consoles like the Pico-8 are a great idea. A fantasy console provides a standardised and portable environment in which developers can explore ideas within creative constraints. The Z-machine , developed by Infocom in 1979, is the earliest fantasy console I know, although this is probably the first time it’s…

1187

Towards a test suite for TOTP codes

Because I'm a massive nerd, I actually try to read specification documents. As I've ranted ad nauseam before, the current TOTP spec is irresponsibly obsolete. The three major implementations of the spec - Google, Apple, and Yubico - all subtly disagree on how it should be implemented. Every other MFA app has their own…

1192

The Expression Problem and its solutions (2016)

The craft of programming is almost universally concerned with different types of data and operations/algorithms that act on this data [1] . Therefore, it's hardly surprising that designing abstractions for data types and operations has been on the mind of software engineers and programming-language designers since…

1194

Simulated Economy Tutorial

Concept Motivation Imagine an open world RPG where your actions affect the price of goods, the markets reacting to anything the player may do (burn down wheat fields, cost of food increases; kill the merchants, prices differentiate between cities; sell the many swords you’ve collected on your adventures, tank the…

1200

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.