9
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I made a web-based fractal playground based on chaos games. It's the latest of a few experiments with WebAssembly and Zig.
The code could be a nice read for someone who want to get started with WebAssembly from first principles. There are a lot of tutorials and examples online that target rather heavy libraries and frameworks, but you can achieve a lot with simple parameter passing and sharing buffers. In addition to what you can see if you view the source of the page, there's the wasm module source code and build script.
The module exports two statically allocated buffers for coordinates. It also exports the
updatefunction which fills these buffers with coordinates and returns the number of coordinates it added. On the JavaScript side I then loop over them and plot a point on an output canvas for each.I also save and load the parameters from the URL fragment, so if you find something nice you can link to it!
Well, I've been back at my Tiny Flowers mod for Minecraft. I've decided to target the next major version for my rewrite, and we seem to be pretty deep into the snapshot cycle so I'm imagining prereleases will start any week now. Though given the announcement that they'll be switching from OpenGL to Vulkan internally there might be a few more snapshots to come. Not that it matters for my mod, I'm not doing anything low level enough to be affected by that.
Over the last weekend I got it in my head that it would be a great and wonderful idea to finally port the mod to NeoForge. To be fair, I did also have a feature request for it but it is also something I've wanted to do.
My first instinct was to use the Architectury Loom plugin for Gradle, which I used when porting my other small mod, to paper over the differences between the build systems for the two mod loaders, but Architectury has not updated for the removal of obfuscation in the base game so I'm unable to use it to develop for the snapshot versions of the game. So instead I searched for other ways to split the sources for the mod loaders and came across multiloader template. Instead of being a separately published Gradle plugin that supports building for both loaders, it instead has a small Gradle plugin included in the repo that calls the right things in each of the sub-projects, and the sub-projects use the normal build system from each loader. It took a little bit of time to set up, but now that it's working I'm unlikely to ever need to touch it again. And if I do, then the changes I've made are so minimal that it wouldn't be hard to just copy from the template again if it ever updates.
But that wasn't the hard part. The hard part was registering blocks, items, and other things across the two loaders. Minecraft uses a registry system for a lot of its internals, and both mod loaders have entirely different ways of interfacing with it. Fabric's system looks much more like the game's code, while NeoForge's system is a step or two removed from the game code. Thankfully, I came across two posts that covered off how to abstract the differences away into something somewhat nice. Though the most annoying part was going through and changing all direct references to my objects to
Suppliers and calling.get()everywhere, and if I missed a spot that the compiler didn't pick up because I'd been casting between types, then the game would just crash while testing. I'm glad this mod is small enough that I can test most of it pretty quickly.The other annoyance was data generation. My mod uses data generation to make a bunch of JSON files, and of course both loaders have slightly different entry points into the data generation system. I was able to make a lot of it common, but there's still a bit that's different between the two. But as long as they generate the same JSON files then it's fine.
I still need to finish updating my GitHub actions workflows to support the template (mostly the ones around updating versions), but other than that I think I've done it. When the next version of the game comes out, my mod will be available for both major mod loaders. Here's the v2 branch on GitHub for anyone curious.
I used Antigravity/Gemini CLI to turn the retirement monte carlo simulation python script that I made last week into a lightweight singlepage app: https://unli.xyz/rforecast/
Gemini is fun to use for web development as long as you do it incrementally and keep
git add --patchhandy ;)The site itself is unfortunately likely US centric--I hope other countries' retirement plans and social safety nets aren't as fucked up to need a complex visualization tool to be able to decide where to store $5,000.
Doing all this made me realize that the Social Security program is actually pretty darn good and I don't get why boomers complain about it.
It also made me realize that the yearly limitations on IRA contributions are pretty ridiculous. It effectively makes them only useful as intermediary vehicles. It's especially ridiculous when you understand that there are ways to build a Roth IRA with a balance in the billions. The bullshit complexity subsidizes the accountant, taxes, and retirement industry--which is perhaps the only good thing about it.
I made an app! Lately I've been doing Power Zone workouts on the Peloton at my gym but generally prefer using the scenic ride/Just Ride modes to the classes because most of the playlists aren't really my speed. I wanted some way to cue myself to go to a certain zone at a certain time, so I hacked together something for iOS that lets me build workouts and does audio/visual cues for what I need to do next.
Fundamentally very simple, but very satisfying to see it all come together. I'm really just making it for myself, but I'll probably distribute it on the App Store eventually (once I get a website, privacy policy that says "no data is collected") up. In the meantime it's on TestFlight if anyone wants to poke at it: https://testflight.apple.com/join/Hwa3GuV4
I made a real debrid client for tvOS since Stremio didn't have any support for the platform.
I had posted about this recently, but didn't get around to doing it until today. I'll note that this was vibe coded using Claude Code: a script that splits FLAC/WV/APE+CUE files into separate tracks.
I have it running right now and it's working perfectly, specially tailored for my needs. One of the key features is that you can run the split command first to verify everything is correct before you take destructive action by running the clean command to actually delete the unsplit files. Since this can potentially require a lot of storage there's also a command to estimate how much storage a split run will take, and it checks if your device has enough free space to run this safely.
My music collection has 999 albums to split, and as of posting this I've processed 15% of the collection successfully. Hopefully everything works out perfectly, I won't be certain until a few more hours.
Edit: 450 albums into the process I found the first error: some track names are too long. Gotta do some research on different truncation strategies; figure out what existing tools have done to solve this problem.
Edit: It worked! Mostly... There was one album that failed because super long file names were an issue. After having the script updated to try truncating names, I just opted to name each track $NUMBER.flac to sidestep any file name issues.