Apoorva Joshi
@apoorvaj.io
860 followers 210 following 61 posts
Computer graphics, systems programming, general methods. Staff graphics engineer at @unity.com. Formerly Playdead, NVIDIA, Microsoft. apoorvaj.io 📍Copenhagen
Posts Media Videos Starter Packs
apoorvaj.io
i.e. the median Zig programmer is better than the median JS programmer.
apoorvaj.io
I feel that Claude Code + Sonnet writes way more tasteful Zig code than it does JavaScript. JS is littered with dumb defensive programming, with null checks or conditions where here should be asserts.

My theory is that this is because of the delta in the quality of Zig vs JS human training data.
apoorvaj.io
This was an easy one to implement.

Then I started on white balance, fell into a rabbit hole of black body radiation and color spaces, and then noped out for a bit.
papaya.io
papaya.io @papaya.io · Aug 25
Papaya now has exposure, contrast, and saturation controls.

papaya.io/blog#color-a...
apoorvaj.io
Holy crap, #ziglang 0.14 -> 0.15.1 is quite the breaking change. This is literally 5% of @papaya.io's Zig codebase.
apoorvaj.io
5. Papaya uses Harfbuzz and FreeType for high quality rendering.

6. Text rendering is done in a worker WASM thread. So it is async and faster than JS.

Text rendering is hard, and literally half of all commits to papaya.io so far. So please let me know when you find bugs! :)
apoorvaj.io
3. This is where @mikkomononen.bsky.social 's excellent Skribidi library came to the rescue. This might be the first WASM implementation of Skribidi in the wild. I was able to make some upstream contributions.

4. Papaya supports Arabic, Chinese-Japanese-Korean, Hebrew, Latin and 20 more scripts.
apoorvaj.io
I'm really proud of this.

1. Unlike many other web-based image editors, papaya.io rasterizes text in WebAssembly. This means that text rendering looks the same across browsers or OSes.

2. This means that I had to re-implement a text box, which was not fun.

...
papaya.io
papaya.io @papaya.io · Aug 15
After three months of work, text editing is now live!

papaya.io
Reposted by Apoorva Joshi
pekkavaa.bsky.social
A new article on my site: Approximate first principal component

It describes simple trick to estimate the direction of most spread of a bunch of points without running a full PCA. Includes my Python re-implementation and plots of some quick tests.

30fps.net/pages/approx...
A plot comparing the original PCA and a simpler approximation. Accurate (red) and approximate (orange) first principal components are shown. The approximation seems close to the original based on this experiment. The shown directions are aggregated over five random trials.
Reposted by Apoorva Joshi
apoorvaj.io
Hey Mikko, it's basically impossible for me to find your email address anywhere. Any chance you could DM/email me? My email address is on my website.
apoorvaj.io
The Zig 2026 roadmap is absolute fire. Andrew and team are playing the long game, and it's really starting to pay off big time—incremental compilation, async await, cross compilation, fuzzing, and more. www.youtube.com/watch?v=x3hO...
Zig Roadmap 2026
YouTube video by Zig SHOWTIME
www.youtube.com
apoorvaj.io
*Tin foil hat* Has Google added a special case for Google Docs in Chrome to show the MacOS accent menu in the right spot? It renders out of the window in Firefox, which is what you'd expect to happen when using a hidden textbox to get input. I cannot find a web API do this. Looks like an inside job.
apoorvaj.io
Still long way to go, but got the beginnings of IME text composition working in papaya.io. I'm super impressed that @mikkomononen.bsky.social's Skribidi library even has this feature. Here's a video of me typing in '⌥-u' and then 'o' on Mac, which results in 'ö'.
apoorvaj.io
I'm using Skribidi for emoji, FreeType for everything else. :)
apoorvaj.io
Uh, bsky's image upscaling makes it look weird. But at native res, it's absolutely *chef kiss*
apoorvaj.io
If you've ever worked with font rendering, then you'll know that it's the most impressive to get the fonts looking good at low sizes, because then hinting comes into play, which is where FreeType shines over other simpler libraries.
apoorvaj.io
Got simplified Chinese and FreeType variable font rendering to work in papaya.io.
apoorvaj.io
Multi-script rendering in papaya.io is starting to come together. Here's glyph caching and retrieval across several fonts (including an emoji font)!
apoorvaj.io
Added intermingled rendering of Latin and emoji (from different font files) to papaya.io. (Also look at that automatic word-wrapping and left-alignment, courtesy of Skribidi!)