RSSAmplifier

Blog

Code Through Coffee

Infinite scroll of half-done hacks powered by bottomless mugs and top-shelf denial.

code.tcRSS feed ↗10 posts

Latest posts

Nim usage on GitHub

I was digging through some platform data today and thought I'd take a look at stats for Nim: as of Aug. 2025, there are 29k source repos (no forks, no archives, no spam) that have Nim as a primary or secondary language. Repos created per week have a slight upwards trend (first graph), and the cumulative growth is steady. On GitHub we detect a repo's primary language using linguist (which can be…

Love2D 12 compute shaders 101: Hashing Drawables

Last time we looked at Love2D 12 compute shaders and basic synchronization primitives to coordinate threads within a work group, each accessing the same four values - a true content bounds (TCB) box - and expanding it if neccessary. Today, let’s push synchronization further by coordinating a single outcome for the entire shader run: a hash of the contents of a texture. Like TCB, content hashing is…

Love2D 12 compute shaders 101: Finding True Content Bounds

Last time we talked about Love 12’s new compute shader support and set up a basic project to demonstrate data transport between GPU and CPU. Today, let’s build on that and do something useful, but not terribly complex: true content bounds (TCB) detection. TCB are quite important in compositing: there might be really expensive shader effects applied to the contents of a Canvas (Texture), but the…

Fixing Energy Loss in IIR-Blurred UI Shadows: Why Renormalisation Matters

IIR blurs make a pretty significant difference in shadow quality compared to integral blurs or even StackBlur approaches. Here's a comparison of the same shadow parameters (drop + inset) for the same mask. The top example is using the fast path (simple integral blur), the bottom one is using IIR (Deriche / Young‑van Vliet). Ignore the aliasing, the source mask (blue) is rendered just for debugging…

Love2D 12 compute shaders 101: Practical Primer

I've been tracking the development progress for Love 12.0 for a while now (thanks for implementing some of my suggestions btw ), codename Bestest Friend . Which is appropriate! Love 12 is going to be absolutely fantastic. One of the headline features has been - let's say - highly anticipated: So I put together a small, self-contained example of how to use compute shaders in Love 12 with two…

Basic Nim bindings for the Clay layout library

To call nicbarker/clay from Nim, we only need to cover the basic types. The CLAY macro is optional, and you can recreate it with templates/macros if needed. Each element is declared like this: OpenElement () ConfigureOpenElement ( ClayElementDeclaration ( id : clayId ( "CenterBox" ), layout : ClayLayoutConfig ( sizing : ClaySizing ( width : sizingAxisFixed ( 100 ), height : sizingAxisFixed ( 40 ),…

A minimal variable font viewer using HarfBuzz

In support of a feature request submitted to Love2D, I created an MVP example of how to load variable fonts, detect their (common) axis limits and style sets, and render them with FreeType and SDL3. As you may have noticed, all of those libraries are what Love (12+ anyway) is based on. Try it out, it even includes a few example fonts, featuring our very own Mona Sans : turbo/harfbuzz-variable…

Recreating Serato's spectral waveforms in C

I've been spending a lot of time in Serato Studio lately. Its simplicity is enticing, and I'm a lifetime licence customer (we'll see how long a lifetime is for this company). If the (audio) job calls for bigger guns, I move to other tools: analysis: deCoda, RipX DAW, BeatNet, Acoustica, etc. linear recording: LUNA, Logic Pro sequencing: Maschine 3 What bugs me about all of them is that the waste…

Paper Highlight: Microsoft TRELLIS - pretrained image & text to 3D model generative AI

Just a quick one today: our friends at MSFT have released all pretrained checkpoints for the TRELLIS model family, which now unlocks text-to-3D generation, whereas on launch it was only image-to-3D Get the code, paper, and weights at microsoft/TRELLIS Cheers ☕

Paper Highlight: Advances in AI-Powered Code Security (LLMSA)

I invited Chengpeng's team for a GitHub Day of Learning talk to discuss LLM-powered security analysis: Joining live us from Purdue University, Chengpeng Wang and Prof. Xiangyu Zhang will share their latest research on AI-powered code security analysis and how their work has led to the discovery of new vulnerabilities in real-world projects. Through these discussions, they hope to showcase a vision…