GDB & JSON

I spent a day last week writing code for text editing and undo/redo history, but I kept thinking about debuggers so I wanted to focus on that this week, which ironically I didn't end up doing, except for that one day.

I took my original GDB implementation and brought it into the current codebase. Maybe two functions it depended on were removed, which I needed to change, but the rest were mostly function renames or signature changes. I spent only a day on this and wrote additional tests for GDB.

The other 4 days was writing my own JSON library because the DAP (and LSP later) uses JSON. I spent a week in the past writing a lib, and I didn't like what I ended up with. I have a better idea of how I wanted to implement it this time around, which required a full rewrite. Essentially, I'd have two major uses: look up keys, which is skip-heavy, especially when there are many keys before it with many children, and iterator-heavy code. Sometimes I want to look at every key or need to deserialize an array. Somehow, I wrote nearly 1k lines of code (no copy-paste involved) in those 4 days, which is unusual because I typically write 100 +- 40.

Last week I wrote the July summary instead of what I did, so I'll cover it now. I took all the lessons I learned last month about threads, async, and events, and rewrote my main background thread. Then I took all the tests from all my files and put them in a dedicated test folder. Having the test in the file inflated how much was executed, now that I separated them, I have a more accurate view. 2/3rds of my files have 90% line coverage, about 1/3rd is 80% and two files are poorly tested. I'll improve those slowly.