Sign in

Daniel Hooper

@danielchooper.bsky.social
385 followers 69 following 60 posts

Graphics/low-level/game programmer. Made www.principle.app. Former Apple Engineer. danielchasehooper.com I post more frequently to my x.com/danielchooper account, if you'd rather follow me there.

PostsRepliesMedia
Daniel Hooper @danielchooper.bsky.social · 05/08/2026
@karlseguin.com I enjoyed your recent post. I use a segment array to avoid that ArrayList+Arena resize awkwardness. One other nice property: it doesn't move existing items when it grows. I wrote about it here: danielchasehooper.com/posts/segmen...
danielchasehooper.com
A Fast, Growable Array With Stable Pointers in C
My last article about generic data structures in C was written to set the stage for today’s topic: A data structure with constant time indexing, stable pointers, and works well with arena allocators. ...
011
Daniel Hooper @danielchooper.bsky.social · 22/04/2026
@marcoarment.bsky.social Is there a way to see how many hours of audio are in the "all" playlist? Would be useful to plan for a long drive I have coming up
000
Daniel Hooper @danielchooper.bsky.social · 23/03/2026
Sorry for delay. Very few early access invites have been sent out so far since it’s still deeply in development and isn’t ready for lots of people to be using it.
110
Daniel Hooper @danielchooper.bsky.social · 09/02/2026
I wrote it for my build profiler, more info and early access here: danielchasehooper.com/posts/syscal...
danielchasehooper.com
I Made A Real-Time Build Visualizer
Sometimes software takes a long time to compile just due to how much code it has, like in the LLVM project. But often a build is slower than it could be for dumb, fixable reasons. I’ve had the suspici...
100
Daniel Hooper @danielchooper.bsky.social · 09/02/2026
I wrote a UI library in C that can lay out 95000 items at 60fps. The library is 566 lines of C, and the application-specific ui code is 998 lines. Works on mac, windows, and linux.
270
Daniel Hooper @danielchooper.bsky.social · 12/01/2026
in my experience the models small enough to run locally aren't that good. But keeping your code to yourself may be a lost cause if you host your code somewhere like github
000
Daniel Hooper @danielchooper.bsky.social · 10/01/2026
Thanks! Thats one of my most common uses for it. I’m writing a new hash map so I pointed it at the source for several open source implementations to summarize each one’s design
000
Daniel Hooper @danielchooper.bsky.social · 09/01/2026
New post: Testing Opus 4.5 For C Programming. TLDR: it's good, even for curmudgeons like me, but you need to play to its strengths. You don't have to use it like a dumb yolo vibecoder. danielchasehooper.com/posts/code-a...
danielchasehooper.com
Testing Opus 4.5 For C Programming
A grumpy C programmer sees what all the fuss is about
291
Daniel Hooper @danielchooper.bsky.social · 19/09/2025
I ran into this today with a different button - still no idea what the button does. Just removed it.
010
Daniel Hooper @danielchooper.bsky.social · 13/08/2025
⭐️ New Article: Snooping On Slow Builds (Using syscalls) danielchasehooper.com/posts/syscal...
danielchasehooper.com
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...
020
Daniel Hooper @danielchooper.bsky.social · 06/08/2025
⭐️ New Post: A Fast, Growable Array With Stable Pointers in C danielchasehooper.com/posts/segmen...
danielchasehooper.com
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,…
1132
Daniel Hooper @danielchooper.bsky.social · 09/07/2025
The header technique described towards the beginning of my article is effectively that.
100
Daniel Hooper @danielchooper.bsky.social · 01/07/2025
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()
161
Daniel Hooper @danielchooper.bsky.social · 01/07/2025
Hacked together a weird spiral Mario game prototype
040
Daniel Hooper @danielchooper.bsky.social · 30/06/2025
I haven't, thanks for the link. I used to do that too, but it became problematic in a large, long lived, multi-engineer codebase
100
Daniel Hooper @danielchooper.bsky.social · 30/06/2025
New Post: How I Write Type Safe Generic Data Structures in C danielchasehooper.com/posts/typech...
1193
Daniel Hooper @danielchooper.bsky.social · 04/06/2025
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!
020
Daniel Hooper @danielchooper.bsky.social · 04/06/2025
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.
010
Daniel Hooper @danielchooper.bsky.social · 30/05/2025
Weird time to be someone that likes making tools
000
Daniel Hooper @danielchooper.bsky.social · 29/05/2025
Haha so true!
010
Daniel Hooper @danielchooper.bsky.social · 21/05/2025
Not a good sign when fixing a bug requires editing a file with this at the top
040
Daniel Hooper @danielchooper.bsky.social · 15/05/2025
This was written by a filmmaker about color science, but it applies just as well to the software industry's dependency problem
010
Daniel Hooper @danielchooper.bsky.social · 15/05/2025
I ended up doing this: github.com/floooh/sokol...
github.com
Support Alpha blending in sokol_gl.h by danielchasehooper · Pull Request #1266 · floooh/sokol
sokol_gl's api accepts colors with alpha, so blending should probably be enabled
100
Daniel Hooper @danielchooper.bsky.social · 14/05/2025
Github needs this notification option Tired of getting pinged every time a random person adds their two cents to a Github issue I follow.
030
Daniel Hooper @danielchooper.bsky.social · 14/05/2025
I've had that sitting on my games shelf for years but haven't played it, maybe I never will now!
100
Daniel Hooper @danielchooper.bsky.social · 13/05/2025
@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();
100
Daniel Hooper @danielchooper.bsky.social · 05/05/2025
It’s wild that iOS still doesn’t have a “lock orientation *except videos*” mode
030
Daniel Hooper @danielchooper.bsky.social · 14/04/2025
That was really nice. I recently realized I haven’t been playing guitar as much I used to, so I’m trying to fix that.
110
Daniel Hooper @danielchooper.bsky.social · 14/04/2025
haha yeah, I wasn’t sure how far to take the meme…could have included micro architecture all the way down to electrons!
010
Daniel Hooper @danielchooper.bsky.social · 14/04/2025
"C is how a computer actually works"
150
Daniel Hooper @danielchooper.bsky.social · 11/04/2025
TIL that CRT "pixels" can have only a portion illuminated, unlike LCD pixels. (Seen on the top and bottom edge of this 'P')
030
Daniel Hooper @danielchooper.bsky.social · 11/04/2025
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.
130
Daniel Hooper @danielchooper.bsky.social · 04/04/2025
Already exists! “Space” toggles pencil. “Shift + a number” edits pencil digits regardless of pencil mode.
010
Daniel Hooper @danielchooper.bsky.social · 19/03/2025
The bottom middle 4 and the 8 are disambiguated by the cell to the NE of the center 7 – in other words it has one solution but you made a mistake by filling in the 4/8 cells too early. Colors don't mean anything.
020
Daniel Hooper @danielchooper.bsky.social · 17/03/2025
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".
030
Daniel Hooper @danielchooper.bsky.social · 14/03/2025
My article titles keep getting longer. I don't know what to make of this.
020
Daniel Hooper @danielchooper.bsky.social · 13/03/2025
I never wrote a version that uses `Set`, so I don't know. Coming from C, I just reach for bitmasks first.
110
Daniel Hooper @danielchooper.bsky.social · 13/03/2025
Agreed. A sudoku setter contacted me today about creating a cracked sudoku, will post about that when it's done!
110
Daniel Hooper @danielchooper.bsky.social · 13/03/2025
I'd guess that 93.732% of JavaScript devs don't know about bitmasks. I used them to speed up my sudoku generator.
190
Daniel Hooper @danielchooper.bsky.social · 13/03/2025
I removed dark mode for the puzzle page. Couldn't make a color scheme that was as legible as light mode.
010
Daniel Hooper @danielchooper.bsky.social · 13/03/2025
I designed a new sudoku variant in which every cell has a different shape. Try it here: danielchasehooper.com/posts/cracke...
592
Daniel Hooper @danielchooper.bsky.social · 10/03/2025
Ah gotcha, the lack of documentation, poor api design, and churn scared me away from the zig build system. I have hope that it’ll be good someday because the people working on it are good, but it’s not there yet.
100
Daniel Hooper @danielchooper.bsky.social · 10/03/2025
Is there a GitHub pr or blogpost about what you’re referring to?
100
Daniel Hooper @danielchooper.bsky.social · 26/02/2025
This is rad!
110
Reposted by Daniel Hooper
Daeinc @daeinc.bsky.social · 25/02/2025
Had fun following the #glsl shader tutorial from @danielchooper.bsky.social. I added Morty to be complete.
271
Daniel Hooper @danielchooper.bsky.social · 07/02/2025
Thanks to everyone that got it to the front page of hacker news news.ycombinator.com/item?id=4295...
040
Daniel Hooper @danielchooper.bsky.social · 06/02/2025
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.
070
Daniel Hooper @danielchooper.bsky.social · 06/02/2025
Send me a link to your shader code if you do! (A "Share Shader" button appears below any editor on the page that you've changed the code of)
000
Daniel Hooper @danielchooper.bsky.social · 05/02/2025
Play with the code and live editor: danielchasehooper.com/posts/code-a...
danielchasehooper.com
Animating Rick and Morty One Pixel at a Time
An interactive guide on making 2d animations using signed distance fields in GPU shaders
131
Daniel Hooper @danielchooper.bsky.social · 05/02/2025
Live coding an animated SDF shader
140