LastChoice - A Zig Journey to Data Recovery
Table of Contents
A FirstChoice database file reader written in zig. Written for my dad as an exercise, but hopefully helpful for others looking to use FOL files in data archeology. My dad was an early adopter. He ran his business and much of his life through PFS: First Choice, an all-in-one DOS suite from the late ’80s, and over the years its little flat-file database accumulated things worth keeping. Then his old computer finally died, and the data was stranded in So: a family IT ticket, escalated to engineering. LastChoice is a command-line tool that reads FirstChoice It turned out to be a good pairing. Parsing a 1980s block-structured format (128-byte blocks, records that span blocks, a schema you have to reconstruct) is exactly the kind of work where Zig’s explicit memory management keeps you honest. No garbage collector to hide behind; you know where every byte lives, which is rather the point when the bytes are your dad’s records. Niche? Extremely. But formats die and bytes don’t, and somebody has to keep the ferry running between them.Why This Exists
.FOL files that nothing modern can open. The recovery options I found were either paid services or tools you’d need to already be a programmer to use.Enter LastChoice (and Zig)
.FOL databases and exports them to formats that will outlive us all (SQLite, CSV, JSON). I wrote it in Zig, partly because a binary file format parser is a great fit for a systems language, and mostly because I wanted an excuse to learn Zig properly.What Came of It
.FOL files (and the retro-computing corners of the internet suggest there are more of you than you’d think) can recover their own data for free. Data archeology as a public good.