Casey Primozic’s Notes

Misc. notes, code, and other content I want to post publicly that don’t warrant a full blog post

By Casey Primozic

Subscribe to RSS

Fixing Svelte VS Code e.children.findLastIndex Is Not a Function

The Problem I recently created a new SvelteKit project using the Svelte 5 preview and kept getting an error at the beginning of every Svelte component: The error was e.children.findLastIndex is not a function (svelte). It was showing up even on the basic SvelteKit skeleton starter project as soon as I added a <style></style> block. The Fix I looked around online, and I didn’t see anyone having this problem. This led me to believe that it was likely an issue with my local environment or configuration.
Read more →

Investigating Bogus Plausible Analytics Traffic

I run self-hosted Plausible analytics to keep track of how many people are visiting my various websites and web apps. I’m largely very happy with it - it gives me all of the info I need with only a miniscule JS payload, no cookies or other invasive tracking, and full control over the data. However, recently I’ve been running into an issue with fake/bogus traffic getting submitted for my personal homepage.
Read more →

Trying Out sea-orm

For a new project at my dayjob, I’ve had the opportunity to try out sea-orm for the database layer. In the past, I’ve tried out other Rust SQL solutions including diesel and sqlx, so I have some context to compare this one to. At a high level, sea-orm provides a fully-featured solution for managing your database setup in Rust. It provides a framework and CLI for setting up and maintaining migrations, code-gen’ing entities and relations, and writing + running queries.
Read more →

Handling Gamma Correction for Three.JS pmndrs postprocessing Effects

I recently received a bug report on a library I built - three-good-godrays - which implements screen-space raymarched godrays for Three.JS as a pass for the pmndrs postprocessing library. One of the problems pointed out was that colors seemed washed out/desaturated when my pass was used, even when the pass wasn’t rendering any godrays. Here’s how things look by default without the effect (and are supposed to look with it on):
Read more →

Changing Linux Select to Paste Menu fcitx Keyboard Shortcut

For a long time - at least a couple of years - I’ve been cursed with an issue on my KDE Plasma Linux desktop where my PgUp key doesn’t work. Instead of scrolling up in my terminal or editor, it pops open a menu with the title “Select to paste” and a listing of my most recent clipboard entries: I tried briefly a couple of times to fix this and get my page up to work again but to no avail.
Read more →