Tootfinder

Opt-in global Mastodon full text search. Join the index!

@jamesthebard@social.linux.pizza
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

A screenshot of neovim with the primary partition parse code written in Zig.
@frankel@mastodon.top
2026-08-14 09:06:26

What's the best #programminglanguage for #codingagents?
danluu.com/pl-tokens/

@jamesthebard@social.linux.pizza
2026-08-14 00:03:42

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

ALL OF THE MBR PARTITION TYPE KEY/VALUE PAIRS in Zig.
@jamesthebard@social.linux.pizza
2026-08-14 18:27:07

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

Source code in VSCodium showing part of the MBR partition processing section.  The bottom pane shows the current partition struct output from the run against a test file with 3 primary and 4 extended partitions.
@crell@phpc.social
2026-07-07 17:56:04

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

@jamesthebard@social.linux.pizza
2026-08-12 20:30:11

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

MBR breakdown in Zig via `neovim`.
@tiotasram@kolektiva.social
2026-06-29 12:33:34

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

@crell@phpc.social
2026-08-10 18:23:33

The perils of under-engineering:
#PHP #Programming

@theDuesentrieb@social.linux.pizza
2026-06-01 09:06:10

Sonarcube issue: You have 0% coverage for your test class.
Alright, so it's asking who surveys the surveyors, I guess? :morty:
#programming #sonarcube

@jamesthebard@social.linux.pizza
2026-08-12 03:49:19

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

A screenshot of the new `dataops` module showing the buffer struct along with the `getData` function.  It even compiles!
@stefan@gardenstate.social
2026-05-26 20:09:03

C won because of #NewJersey
#programming

@fraca7@social.linux.pizza
2026-06-03 20:56:23

BTW I’m still angry that nobody told me that left recursion in recursive descent parsers generated from PEGs was a solved problem
#programming

@frankel@mastodon.top
2026-06-21 16:29:49

#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 …

@jamesthebard@social.linux.pizza
2026-08-09 15:18:56

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

A screenshot of the Zig source code that I wrote running in Neovim that opens a file and reads 10 bytes from a file then prints it to a screen.
@crell@phpc.social
2026-07-29 18:19:19

I like people I can vibe with. Not machines to vibe at.
#Programming #AI #LLM

@curiouscat@fosstodon.org
2026-05-20 21:30:52

"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…

@crell@phpc.social
2026-07-26 16:35:52

I hate dealing with file permissions. *HATE*.
#Programming #PHP

@crell@phpc.social
2026-06-26 16:53:29

I have now reached the "how did this ever work?" stage of debugging.
#PHP #Programming

@crell@phpc.social
2026-06-26 17:42:51

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

@crell@phpc.social
2026-07-07 17:56:04

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

@crell@phpc.social
2026-07-26 00:34:46

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

@crell@phpc.social
2026-06-24 23:59:06

RE: #Programming

@jamesthebard@social.linux.pizza
2026-06-20 17:40:32

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

A screenshot of me working through a linked list "recipe" found on The Internet:tm: written in Zig.
@crell@phpc.social
2026-06-22 14:32:41

RE: #Programming

@crell@phpc.social
2026-06-19 16:07:28

Incompetent managers, take note...
#Programming

A single-pane cartoon showing a museum setup.  The wall has a sign reading "Museum of Meaningless Metrics."  There are four exhibits: Lines of Code, Story Points, Pull Requests, and Tokens Spent.  A museum curator is standing by the Tokens Spent display, showing it to some patrons.  He is saying "Our newest exhibit."
@jamesthebard@social.linux.pizza
2026-07-20 17:32:52

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

A screenshot of Neovim with the source code that was compiled, and the output of the binary using the clang sanitize options of address and undefined.