Daniel Hooper
banner
danielchooper.bsky.social
Daniel Hooper
@danielchooper.bsky.social
Graphics/low-level/game programmer.
Made www.principle.app.
Former Apple Engineer.

https://danielchasehooper.com

I post more frequently to my x.com/danielchooper account, if you'd rather follow me there.
Ok, here's the new way I recommend to do type safe generics in C.

It's cleaner compared to my old function-pointer-cast approach, avoids the undefined behavior everyone is so paranoid about, and doesn't require typeof()
July 1, 2025 at 5:18 AM
Hacked together a weird spiral Mario game prototype
June 30, 2025 at 11:08 PM
New Post: How I Write Type Safe Generic Data Structures in C
danielchasehooper.com/posts/typech...
June 30, 2025 at 4:37 PM
As a precursor to public key cryptography, William Jevons said in 1874 "What two numbers multiplied together produce 8616460799? I think it unlikely that anyone but I will ever know"

Modern computers find the answer in 0.004s: primes 89681 and 96079

Cool for the time, just needed bigger numbers!
June 4, 2025 at 4:11 PM
I like this comment in the source of /usr/bin/dtruss. It provides context with a "Hey dorks, don't mess with my code" kind of energy.
June 3, 2025 at 11:48 PM
Weird time to be someone that likes making tools
May 30, 2025 at 4:51 PM
Not a good sign when fixing a bug requires editing a file with this at the top
May 21, 2025 at 3:32 PM
This was written by a filmmaker about color science, but it applies just as well to the software industry's dependency problem
May 15, 2025 at 5:40 PM
Github needs this notification option

Tired of getting pinged every time a random person adds their two cents to a Github issue I follow.
May 14, 2025 at 7:58 PM
@flohofwoe.bsky.social Is there a trick to get alpha blending working in sokol-gl, or does that require making my own pipeline?

aka:
sgl_begin_triangles();
sgl_c4b(255, 0, 0, 127);
...
sgl_end();
May 13, 2025 at 9:18 PM
It’s wild that iOS still doesn’t have a “lock orientation *except videos*” mode
May 5, 2025 at 3:27 PM
"C is how a computer actually works"
April 14, 2025 at 3:30 PM
Today I bought an old TV for visual reference. Played Balatro to see how the game's CRT emulation compared to a real Cathode Ray Tube. Sadly details aren't legible on a 13" TV, and the emulation's scanline/phosphor pattern isn't realistic, but it nails the chromatic aberration.
April 11, 2025 at 4:56 AM
135,000 Github projects mention "blazing fast" in the readme, but only 3,000 of those mention "benchmark" or "MB/s".

So in other words, when you read "blazing fast" think "unserious".
March 17, 2025 at 5:49 PM
My article titles keep getting longer. I don't know what to make of this.
March 14, 2025 at 2:51 PM
I'd guess that 93.732% of JavaScript devs don't know about bitmasks.

I used them to speed up my sudoku generator.
March 13, 2025 at 10:58 PM
I designed a new sudoku variant in which every cell has a different shape.

Try it here: danielchasehooper.com/posts/cracke...
March 13, 2025 at 8:13 PM
Reposted by Daniel Hooper
Had fun following the #glsl shader tutorial from @danielchooper.bsky.social. I added Morty to be complete.
February 25, 2025 at 11:02 PM
Thanks to everyone that got it to the front page of hacker news

news.ycombinator.com/item?id=4295...
February 7, 2025 at 5:45 AM
TIL: Perlin Noise was invented as recently as 1983, and its inventor, Ken Perlin, is still alive. Feels like something that could’ve been invented centuries ago by some French dude.
February 6, 2025 at 9:07 PM
Live coding an animated SDF shader
February 5, 2025 at 7:43 PM
Can't wait to see what happens to all the AI-dependent junior programmers when the next trendy framework drops and their AIs can't help because all the Q&A training data is locked up in Discord.
February 5, 2025 at 5:38 PM
⭐️ New Post: Animating Rick and Morty One Pixel at a Time.

An interactive guide on making animations on the GPU

Animating Rick and Morty One Pixel at a Time
An interactive guide on making 2d animations using signed distance fields in GPU shaders
danielchasehooper.com
February 4, 2025 at 7:08 PM