Repository navigation
Conversation
memark
added a commit
that referenced
this pull request
Nov 10, 2026
Supersedes #84, which GitHub closed after an accidental force-push. Closes #45. Most of #45 was already fixed by 93b1454 and 7bd7b35, whose `closes #37, #40, #45` only applied the keyword to #37. State on main: - Every section in `03_intermediate` has an exercise now. - Valgrind note for Apple Silicon is in `02_allocators.md`. - `wr check` is gone. - The 2.2 C harness no longer exists (the exercise became a counting allocator in 947067e). - The `bm` source tree lists `internal.h`. - The signature-only snippets and `doSomething` are gone. The one item left was "`bm` itself is never run", with the fixtures unreferenced. This PR adds a "Take `bm` for a spin" section at the top of `01_rewrite_a_module.md`: - `cd exercises/_bm && make && ./bm` - `add` two bookmarks, then `find` and `list` - `BM_DB=fixtures/sample.bm` with `find` and `list` - `BM_DB=fixtures/corrupt.bm ./bm list`, which shows the storage error path (`bm: fixtures/corrupt.bm:4: duplicate`, then `cannot open ...: corrupt database`, exit 1). This relies on #86, so main is merged into this branch. - A warning that `add`, `del` and `tag` rewrite the database they point at, so they shouldn't be run on the fixtures. I checked: `tag` on `sample.bm` modifies the file, while `find` and `list` leave the fixtures byte-identical (`bm_close` only saves when the database is dirty). It also gitignores `exercises/_bm/bookmarks.bm` and `bookmarks.bm.tmp`, which the walkthrough creates. `make clean` already removes both. Every command in the section was run verbatim on a copy of `exercises/_bm`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #45.
Most of #45 was already fixed by 93b1454 and 7bd7b35, whose
closes #37, #40, #45only applied the keyword to #37. State on main:03_intermediatehas an exercise now.02_allocators.md.wr checkis gone.bmsource tree listsinternal.h.doSomethingare gone.The one item left was "
bmitself is never run", with the fixtures unreferenced. This PR adds a "Takebmfor a spin" section at the top of01_rewrite_a_module.md:cd exercises/_bm && make && ./bmaddtwo bookmarks, thenfindandlistBM_DB=fixtures/sample.bmwithfindandlistBM_DB=fixtures/corrupt.bm ./bm list, which shows the storage error path (bm: fixtures/corrupt.bm:4: duplicate, thencannot open ...: corrupt database, exit 1). This relies on fix(_bm): make corrupt.bm reach the storage error path #86, so main is merged into this branch.add,delandtagrewrite the database they point at, so they shouldn't be run on the fixtures. I checked:tagonsample.bmmodifies the file, whilefindandlistleave the fixtures byte-identical (bm_closeonly saves when the database is dirty).It also gitignores
exercises/_bm/bookmarks.bmandbookmarks.bm.tmp, which the walkthrough creates.make cleanalready removes both.Every command in the section was run verbatim on a copy of
exercises/_bm.