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.
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.
Pinned
A Fast, Growable Array With Stable Pointers in C
The C implementation is available here. My last post about generic data structures in C was written to set the stage for today’s topic: A data structure that can be used in place of dynamic arrays,…
danielchasehooper.com
⭐️ New Post: A Fast, Growable Array With Stable Pointers in C
danielchasehooper.com/posts/segmen...
danielchasehooper.com/posts/segmen...
⭐️ New Article: Snooping On Slow Builds (Using syscalls)
danielchasehooper.com/posts/syscal...
danielchasehooper.com/posts/syscal...
Snooping On Slow Builds (Using Syscalls)
Many software projects take a long time to compile. Sometimes that’s just due to the sheer amount of code, like in the LLVM project. But often a build is slower than it should be for dumb, fixable rea...
danielchasehooper.com
August 13, 2025 at 5:21 PM
⭐️ New Article: Snooping On Slow Builds (Using syscalls)
danielchasehooper.com/posts/syscal...
danielchasehooper.com/posts/syscal...
⭐️ New Post: A Fast, Growable Array With Stable Pointers in C
danielchasehooper.com/posts/segmen...
danielchasehooper.com/posts/segmen...
A Fast, Growable Array With Stable Pointers in C
The C implementation is available here. My last post about generic data structures in C was written to set the stage for today’s topic: A data structure that can be used in place of dynamic arrays,…
danielchasehooper.com
August 6, 2025 at 4:56 PM
⭐️ New Post: A Fast, Growable Array With Stable Pointers in C
danielchasehooper.com/posts/segmen...
danielchasehooper.com/posts/segmen...
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()
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
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()
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()
Hacked together a weird spiral Mario game prototype
June 30, 2025 at 11:08 PM
Hacked together a weird spiral Mario game prototype
New Post: How I Write Type Safe Generic Data Structures in C
danielchasehooper.com/posts/typech...
danielchasehooper.com/posts/typech...
June 30, 2025 at 4:37 PM
New Post: How I Write Type Safe Generic Data Structures in C
danielchasehooper.com/posts/typech...
danielchasehooper.com/posts/typech...
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!
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
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!
Modern computers find the answer in 0.004s: primes 89681 and 96079
Cool for the time, just needed bigger numbers!
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
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.
Weird time to be someone that likes making tools
May 30, 2025 at 4:51 PM
Weird time to be someone that likes making tools
Not a good sign when fixing a bug requires editing a file with this at the top
May 21, 2025 at 3:32 PM
Not a good sign when fixing a bug requires editing a file with this at the top
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
This was written by a filmmaker about color science, but it applies just as well to the software industry's dependency problem
Github needs this notification option
Tired of getting pinged every time a random person adds their two cents to a Github issue I follow.
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
Github needs this notification option
Tired of getting pinged every time a random person adds their two cents to a Github issue I follow.
Tired of getting pinged every time a random person adds their two cents to a Github issue I follow.
@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();
aka:
sgl_begin_triangles();
sgl_c4b(255, 0, 0, 127);
...
sgl_end();
May 13, 2025 at 9:18 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();
aka:
sgl_begin_triangles();
sgl_c4b(255, 0, 0, 127);
...
sgl_end();
It’s wild that iOS still doesn’t have a “lock orientation *except videos*” mode
May 5, 2025 at 3:27 PM
It’s wild that iOS still doesn’t have a “lock orientation *except videos*” mode
"C is how a computer actually works"
April 14, 2025 at 3:30 PM
"C is how a computer actually works"
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
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.
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".
So in other words, when you read "blazing fast" think "unserious".
March 17, 2025 at 5:49 PM
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".
So in other words, when you read "blazing fast" think "unserious".
My article titles keep getting longer. I don't know what to make of this.
March 14, 2025 at 2:51 PM
My article titles keep getting longer. I don't know what to make of this.
I'd guess that 93.732% of JavaScript devs don't know about bitmasks.
I used them to speed up my sudoku generator.
I used them to speed up my sudoku generator.
March 13, 2025 at 10:58 PM
I'd guess that 93.732% of JavaScript devs don't know about bitmasks.
I used them to speed up my sudoku generator.
I used them to speed up my sudoku generator.
I designed a new sudoku variant in which every cell has a different shape.
Try it here: danielchasehooper.com/posts/cracke...
Try it here: danielchasehooper.com/posts/cracke...
March 13, 2025 at 8:13 PM
I designed a new sudoku variant in which every cell has a different shape.
Try it here: danielchasehooper.com/posts/cracke...
Try it here: danielchasehooper.com/posts/cracke...
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
Had fun following the #glsl shader tutorial from @danielchooper.bsky.social. I added Morty to be complete.
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
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.
Live coding an animated SDF shader
February 5, 2025 at 7:43 PM
Live coding an animated SDF shader
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
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.
⭐️ New Post: Animating Rick and Morty One Pixel at a Time.
An interactive guide on making animations on the GPU
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
⭐️ New Post: Animating Rick and Morty One Pixel at a Time.
An interactive guide on making animations on the GPU
An interactive guide on making animations on the GPU