news
Programming Leftovers
-
Tim Bradshaw ☛ A timing macro for Common Lisp
For a long time I’ve used a little macro to time chunks of code to avoid an endless succession of boilerplate functions to do this. I’ve finally published the wretched thing.
If you’re writing programs where you care about performance, you often want to be able to make programatic comparisons of performance. time doesn’t do this, since it just reports things. Instead you want something that runs a bit of code a bunch of times and then returns the average time, with ‘a bunch of times’ being controllable. timing is that macro. Here is a simple example: [...]
-
Ian Henry ☛ Generalized Worley Noise
Worley noise is a type of noise used for procedural texturing in computer graphics. In its most basic form, it looks like this: [...]
-
Ian Duncan ☛ JSON Schema Demystified: Understanding Schemas, Dialects, Vocabularies, and Metaschemas
I’ve been working on a Haskell JSON Schema library that’s actually fully spec-compliant, which meant I had to figure all of this out. The problem isn’t that the concepts are inherently difficult. The terminology creates artificial barriers to understanding.
This post will break down the key concepts in JSON Schema in a way that actually makes sense, connecting the dots between all these terms that seem designed to confuse. By the end, you’ll understand not just what these words mean, but how they fit together into a coherent system.
-
Zig ☛ Migrating from GitHub to Codeberg
Putting aside GitHub’s relationship with ICE, it’s abundantly clear that the talented folks who used to work on the product have moved on to bigger and better things, with the remaining rookies eager to inflict some kind of bloated, buggy JavaScript framework on us in the name of progress. Stuff that used to be snappy is now sluggish and often entirely broken.
More importantly, Actions is created by monkeys and completely neglected. After the CEO of GitHub said to “embrace AI or get out”, it seems the lackeys at Microsoft took the hint, because GitHub Actions started “vibe-scheduling”; choosing jobs to run seemingly at random. Combined with other bugs and inability to manually intervene, this causes our CI system to get so backed up that not even master branch commits get checked.
Rather than wasting donation money on more CI hardware to work around this crumbling infrastructure, we’ve opted to switch Git hosting providers instead.
-
Ben Joffe ☛ A New Faster Overflow-Safe Date Algorithm
Part 1 introduced a new faster date conversion algorithm which outperforms existing algorithms by 2-12% in speed. Like most fast date algorithms, it supports around 25% of the 32–bit or 64–bit range.
In this article, I explore how Hinnant’s era technique (which expands coverage from ~25% to over 99.9% of the 32–bit range) can be applied to other fast algorithms. With a small tweak, these algorithms can then be made 12-17% faster than previous algorithms, and expand the coverage to 100% of the 32–bit range.
-
Rust
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 627
Hello and welcome to another issue of This Week in Rust!
-