HNHacker News
TopNewBestAskShowJobs

psyclyx

12 karma · joined August 8, 2026

submissionscomments
psyclyx··on SDF vs. MSDF vs. Slug: GPU Text Rendering
Slug mentioned!

When the Slug patent was released to the public domain, I put together[1] Snail[2], a Slug implementation in Zig.

One thing I found was that it was tough to get small text to look good with some fonts. TrueType fonts often have bytecode that tweaks curve points to better fit the pixel grid at a particular size. Part of the pitch for Slug is that it doesn't require per-size glyph prep, so Slug text is just unhinted.

As monitors have gotten denser, the major font renderers have moved away from bytecode hinting, either toward auto-hinting (ignore the bytecode, look at the outline, and decide what to do) or toward no hinting at all.

Snail has GPU auto-hinting that tries to replicate a lot of that, so I could have hinted text without per-size prep. It precomputes knots at various glyph features, and the shader then moves the knots to stretch/squeeze parts of the glyph. It's not perfect (especially for serif fonts!), benefits from per-font tuning, and focuses on Latin glyphs (pretty much always draws CJK glyphs unhinted because they're too complex for the current shaders to handle). Also, cases where you want hinting and wouldn't be better served by just scissoring prepared bitmaps aren't all that common. It also includes a TrueType VM, for cases where the per-size cost is acceptable (DejaVu Mono looks decent with the auto-hinter, but it has phenomenal hinting bytecode).

It was a lot of fun to put together, I learned a lot, and as far as I know the auto-hinter is unique among Slug implementations. Slug is a very cool algorithm.

[1] through high-effort delegation to Claude [2] https://github.com/psyclyx/snail - includes some diagrams (made with Snail!) that explain most of the prep/rendering of a glyph with Slug

psyclyx··on Ask HN: Who wants to be hired? (September 2026)
Location: Seattle

Remote: preferred

Willing to relocate: Possibly

Technologies: Nix/NixOS (multi-site homelab), Linux, Clojure/CLJS, Zig + others as needed

Resume/CV: email

Email: hn@psyclyx.xyz

Prior position: Senior SDE working on various parts of a Customer Data Platform/data deduplication system. Put together new product surfaces, maintained existing ones, took on large pieces of tech debt, found opportunities to improve relationships with important customers.

Recently, I've been hacking on github.com/psyclyx/fix, a fast Nix evaluator in Zig, which achieves meaningful (2-5x) evaluation time improvements on NixOS systems over CppNix and forks. I've also been working on a multiplayer CRDT-based text editor with a WASM plugin runtime, targeting something in between Emacs and Zed. Pre-release, but would make a good demo at the start of a call.

Neither of these are areas I had much experience in prior to working on them, I've just been going deep on problems that I wanted to be solved. I'm looking for a role where I can apply that to hard problems alongside driven people and have an impact. Early-stage companies preferred.

psyclyx··on Super Mario Derivations
Neat! Very sad to have missed Nix Vegas, sounds like it was particularly good this year. I[0] hacked together something similar[1] for the Game Boy a couple months ago[2], outputting frames with builtins.trace instead of images, and it ended up being useful as a memory pressure test while working on a Nix evaluator implementation[3].

Pokemon was so slow that coming up with TAS scripts, even with state saves/loads for every run, became infeasible, so I ended up searching against a C implementation of the same emulator. It eventually beat Brock, but was very button-inefficient and would've taken 10 hours to play back under Nix, if it would've even made it that far. On my implementation, if I turn the GC off, the much shorter script in [3] OOMs on a box with 128gb about 2/3 of the way through!

[0]: my claudes [1]: https://github.com/psyclyx/nixboy [2]: https://x.com/psyclyx/status/2066249660046725213 [3]: https://github.com/psyclyx/fix#a-less-rigorous-benchmark