Alex Harrison

@alex-for-real.bsky.social

I once went on a 3 day programming bender where I listened to the soundtrack to Koyaanisqatsi on repeat and my only sustenance was homemade brownies and their caffeine and sugar and now every time I listen to that soundtrack I desperately crave brownies

Today I found myself replacing enums + LUTs with pointers to static structs. The main benefit I found (other than being way more ergonomic to read and write) is that you can construct arbitrary variants at runtime as needed - surprisingly useful! The downside is memory usage and non-serializability.

Since BSS memory is allocated virtually, you can pre-allocate huge amounts of memory for free without dealing with mmap! char virtual_mem[10ULL << 30]; You need to set `-mcmodel=medium` for BSS larger than 2GB. Interestingly, it starts segfaulting for me at around ~20GB. I wonder why that is?

I might be missing something but I feel like the idea of a texture atlas is kind of silly. You're representing an array of bytes as a rectangle (the atlas) and allocating a rectangle inside to store an array of bytes (the texture). Just put the small array in the big array, no? Keep it all 1D.

Cool method of handling GPU allocations - Create a combined CPU/GPU linear allocator struct with both cpu and gpu buffers, then take an allocator pointer to everything! No need for reference counting or tracking. Cleanup is just a buffer destroy and a couple pointer resets.

typedef struct E_Arena {
    U8 *base;
    USize used;
    USize size;

    void *gpu_base;
    U32 gpu_used;
    U32 gpu_size;
} E_Arena;

IMO it's totally valid (and in some cases better) to use a big flat string as the backing for a text editor. You can easily memmove for inserts in under a millisecond on multi-megabyte text files. And while people may open and look through larger files (e.g. logs) it's unlikely they will edit them.

It's so fun learning a field that's adjacent to your main expertise. You constantly think "yep, I'm gonna look back at this and cringe". But this feeling isn't negative for me, it's instead looking forward to the enjoyment of drastic improvement over the next few months.

Never thought I'd be saying this but damn, webdev is kinda fun. At least if you don't do anything crazy. Got a simple server read/writing to a db and from a site working in a few hours. Gonna turn it into a simple forum / chat for fun. Used sqlite, mongoose, and htmx and it works great.

I really like doing commissions for tournaments. Being self-employed means I don't have any deadlines, which makes my efforts often meandering and unfocused. Having that hard deadline is nice as it forces me to get my shit together. Reminds me of uni, except now people actually care.

Just fixed a crazy bug. The results screen model scale table was being overwritten unknowingly by mex, causing us to load code as a model scale value making models to disappear. Was hell to track down, thank god for memory breakpoints. Solution was ez tho, just moved the table and it works great!

UI upgrades took so long... BUT I found a cool new (to me) way of representing UI! Instead of a tree, all you need are two vectors, a panel vector and a split vector. Each split contains a direction and bitfields for the l/r or u/d panels. Then split manipulation is pretty much all bitfield ops!

@rwing-aitch.bsky.social · last yr.

Announcing rwing alpha v2! Rwing is an advanced replay viewer for SSBM. It supports in-game notes, creating UnclePunch savestates, combo finding, dynamic UI, and tons more! Grab it on my patreon! www.patreon.com/posts/127319... See the improvements in v2 below!