
I needed a way to embed a text file in my C++ code. I recently introduced Leaf code into the Leaf compiler and didn’t want to depend on a file dependency at […]
Everything relating primarily to programming will be under this topic. This is almost all I write about now, so chances are all new articles will be here.
I needed a way to embed a text file in my C++ code. I recently introduced Leaf code into the Leaf compiler and didn’t want to depend on a file dependency at […]
Communicating between components with events is one of the fundamental programming paradigms. One module publishes an event, and other modules respond via listeners. It’s an asynchronous model that provides an excellent separation […]
Error handling is hard, and it’s made harder by a rich error hierarchy. Programs that successfully handle errors tend to have only a couple of generic handlers. Code that catches specific types […]
Three key concepts comprise the essence of functional programming: first-class functions, pure functions, and immutable data. Together they express a fundamental architectural paradigm on how units of code interact with each other. […]
Finally, a big step for Leaf: something that could be called an actual program. Over the weekend I finished a program that loads a file, sorts the lines, and writes it to […]
Imperative programming is a paradigm that explicitly tells the computer what to do and how to do it. Unlike most other approaches it is a relatively concrete view on data and execution […]
When I saw the below demo I thought “neat, how’d they do that”? That may sound surprising if you knew that I wrote the API for this. In this article I’ll describe […]
Why would somebody ever want to take perfectly fine code history and erase it? Phrased like that it makes git squashing seem ridiculous. Alas, some people find sanitizing history is the preferred […]
As types are a keystone in Leaf, working with them must be fluid and simple. I recently improved this area by adding named constructors and bare type names. The results are interesting. […]
I needed pleasant range values for the charting API in Fuse. These are the values written by the ticks on the plot, typically on the Y-axis. In the interest of simplicity it […]
Language support for caching sucks. Despite an ever present need to cache data and calculations most languages require the programmer to do all the work. There’s no way to track dependencies, no […]
The flexibility and usefulness of an API relate directly to its orthogonality. But what does “orthogonal” mean? It’s a term that’s tossed around a lot in programming, with varying degrees of clarity. […]
I can’t decide whether a.size or size(a) is more correct when getting the length of an array. While writing Leaf I have a recurrent feeling that perhaps a.size is wrong. What is […]
We used a lot of object normal maps in RadialBlitz. Figuring out how Blender encoded these was part of the challenge. It didn’t seem to be documented anywhere, nor was I able […]