Tomek Czajecki

@tchayen.com

EM @expo.dev working on EAS product infrastructure I blog about my hobbies – a mix of graphics programming and gamedev – see tchayen.com

A use case for LLMs where they shine the most for me is doing research for non-urgent online shopping. Sometimes I have very specific requirements, like Japanese rice cooker that cooks rice for a single person not a village and ships to Finland. Or a 5K IPS screen, ideally >60Hz

I don't know how I survived this long recompiling WASM binary after every change but I finally wrote a mini Vite plugin for HMR. Now when I change anything and save the file, WASM module is automatically compiled and reloaded.

Screenshot of the browser demonstrating HMR reload of the WASM module.

It's crazy how Cursor packs two opposite user experiences in one app. Tab autocomplete is reading my mind, while chat agent mode feels like trying to get the dumbest coder I have ever met to fix my code without giving him ability to run it.

My watch told me my sleep goal was met but then I checked the app and turns out it included yesterday evening nap. Well, explains why I don't feel like my sleep goal was met

I was working on a WebGPU demo and decided to try how fast I can make it. Zig in WASM generates a buffer with command stream sorted to minimize GPU state changes. This is 10k individual draw calls, unoptimized, no instancing, no render bundles. Every object is controlled separately.

Asked gemini for WebGPU setup with several cylinder models and orbiting camera. Got interstellar scene (unfortunately had to first spend 15 minutes to fix it).

Writing a blog over a span of several years is a great practice in fighting perfectionism. I hate most of my old blogposts. The problems I was solving were poorly defined, approach badly explained. The scope so small that I wouldn't bother posting about it now.

Recently Arc started randomly changing window size and now all the open non-pinned tabs went blank and don't refresh. How does unmaintained software get more buggy over time lol.

Just copied some code from GitHub for a change, not from LLM. Someone tested it, ran who knows how many times and even wrote unit tests. Worked on the first try. Incredible feeling. I already miss it.

Uhhh… hours_wasted_because_my_struct_was_stack_allocated_and_should_have_been_on_heap += 3. I was sitting with debugger staring at two memory regions and pulling my hair wondering why one and changes one doesn’t. Having code run orders of magnitude faster than equivalent JS comes at a price…

I am trying Biome on some side projects and loving it so far. Happily haven't had to touch the default config yet, but forcing me to omit else when there are earlier returns is just plain wrong.

Tried GPT-4o for the first time (when it came out I was using Claude 3.5 Sonnet and wasn’t looking back). Initially 4o started by impressing me with one or two super solid code samples but the usual problems came quickly – it was hallucinating things and getting stuck in a loop on a fix attempt.

I love when after a flu my body decides that afternoon naps were actually the sleep and the night sleep was an extended nap, which we don’t need to do anymore.

There’s this weird mix of pride and disappointment when I ask Perplexity about a problem and it quotes back my blogpost. Good for me I guess but I am sorry to everyone if that’s the best resource out there. It’s just my notes from trying to learn that – they often don’t age well.

Small weekend (I lost track of time anyway) project: mesh picking in WebGPU. There's a render pass which draws scene to a r32_unit texture where color of mesh is its ID. Then a compute shader given mouse coordinates writes which color it was to a tiny buffer which is mapped and read back CPU side.

Screenshot of an app showing very simple 3D scene with debug text showing which object is being hovered.Screenshot from RenderDoc showing color picking texture where each mesh is drawn using color corresponding to its ID.

Oh I forgot to run device.tick() and that’s why WebGPU read back from buffer in Dawn was so slow (happening every 7th frame which is kind of weird on its own). In old programming fashion, I found solution in GitHub issues of a completely unrelated project – Swift bindings for WebGPU.

Note to self: writing texture to a buffer and reading from it in WebGPU is trickier than I expected. Mapping buffer in my particular case seems to be slow, only happens on every 7nth so it must be 100+ ms.

Programming in the evening is always like: hmm what was I doing? Maybe better question – why do I not remember that? Oh, it's 2 AM, right…

I had 20h between leaving home and entering hotel in NYC. Spent half of that time watching the X-Files (for the first time!). Woah, it’s way better than I expected

React Native tip of the day: For perfectly juicy chicken breasts, bake at 200°C/400°F and use a meat thermometer. Remove from oven when internal temperature reaches 76°C/169°F. This became my go to method for making chicken for lunch.