2026-08-13 20:48:39
The Zig journey continues, things get a bit cleaner and we're now parsing the primary partition entries in the MBR. Very nice...
#programming #zig
The Zig journey continues, things get a bit cleaner and we're now parsing the primary partition entries in the MBR. Very nice...
#programming #zig
What's the best #programminglanguage for #codingagents?
https://danluu.com/pl-tokens/
Holy crap, I have to be missing something with respect to HashMap construction...I officially have all of the `try put` statements...lol. It does work though, and now the primary MBR partitions have appropriate partition type descriptions.
#zig #programming
More progress. I've got the entire MBR processing finished up with a ton of cleanup. Processing the extended partition entries is always fun, but after a fixing a few dumb mistakes everything is parsing out correctly. Even better: no memory leaks.
#zig #programming
Do the simplest thing that will work, except for when you need to do the most robust and forward-thinking thing that will work.
Determining when to do which, that's the rub.
#Programming
Moar progress, will probably move this into the struct along with MBR reconstruction from the struct. This might actually end up doing a bit of `fdisk` stuff...
#zig #programming #mbr
Just wrote a fun little algorithm for iterating through all grid positions within X euclidean distance from a center, roughly in order of distance but also mostly ensuring each position yielded is at least diagonally adjacent to the previous. It's a fun problem to think about with lots of design tradeoffs and many valid solutions.
My solution requires that the origin be on the grid (I think?) and uses a bunch of caching instead of a bajillion distance checks, although I don't actually know what the memory/speed tradeoff is like or whether there are any gains at all (could be net losses, which I'm starting to wonder about more as I write this post). Thankfully I don't expect performance to be very critical here anyways, and doing the caching actually helped separate some logic in a useful way.
A fun little diversion from bigger stuff in the project and a reminder of some of the joys of programming design at a small scope. Feels kinda like mastering the local town's minigame while you're stuck on the main quest in an RPG.
#programming
The perils of under-engineering:
#PHP #Programming
Sonarcube issue: You have 0% coverage for your test class.
Alright, so it's asking who surveys the surveyors, I guess? :morty:
#programming #sonarcube
So, after some consideration I decided to break out the block device reading operations out into its own module. Also, the returned data is now in a struct with a `.deinit` method that will handle cleanups. It might be more complicated than necessary, but it's clean.
#zig #programming
C won because of #NewJersey
#programming
BTW I’m still angry that nobody told me that left recursion in recursive descent parsers generated from PEGs was a solved problem
#programming
#ProgrammingLanguages, targets, and platforms
I started as a #Java developer, but for some time now, I have broadened my horizons. Recently, I thought about how early languages were dedicated to a single target and platform, and now they are broadening their focus. In this post, I want to …
So, after searching far and wide on the internet I have managed to open a file from a command-line argument and read 10 bytes from it using Zig v0.16. I was not expecting it to be quite this complicated.
#programming #zig
I like people I can vibe with. Not machines to vibe at.
#Programming #AI #LLM
"Sharla Boehm earned a teaching degree from the University of California, Los Angeles, before she channeled her talent for math into computer #programming While working at the RAND Corporation, she built a groundbreaking simulation, originally conceived to strengthen military communications during the cold war. The simulation—and her work—would ultimately lay the foundation for the moder…
I hate dealing with file permissions. *HATE*.
#Programming #PHP
I have now reached the "how did this ever work?" stage of debugging.
#PHP #Programming
Code that used to work but now doesn't is the bane of my existence. And yes, there are tests. That doesn't answer *why* this thing no longer works, despite no changes to the relevant files.
#Programming #Debugging
Do the simplest thing that will work, except for when you need to do the most robust and forward-thinking thing that will work.
Determining when to do which, that's the rub.
#Programming
Code that was working and passing all tests, untouched for weeks, now failing tests on the exact same computer, exact same checkout, exact same commit.
This is the bane of my existence. And no, Grand Theft Autocomplete will not fix this. (It will probably make it worse.)
#Programming #AI
RE: #Programming
Hrmm, Zig is an interesting language...figured I'd kick the tires and figure out what's going on. So far it's been pretty nice.
#zig #programming
RE: #Programming
Incompetent managers, take note...
#Programming
Things I've learned today:
- Valgrind does not support AVX512 instructions. That was an adventure because I was writing purposefully bad code at the time...
- However, changed strategies and used `clang` with the `fsanitize=address,undefined` option which seems to work perfectly fine.
#clang