<commit_before># Staccato Diary

## Concerns and Decisions

 * For now, let's always have the footer be a plain-old JavaScript object.
 * Opening a staccato can be from the first record or the footer.
 * You can seek into the staccato, then play forward from there.
 * Writing to the staccato appends, flushing writes the footer.<commit_msg>Notes on when to wait on drain.<commit_after># Staccato Diary

## Concerns and Decisions

 * For now, let's always have the footer be a plain-old JavaScript object.
 * Opening a staccato can be from the first record or the footer.
 * You can seek into the staccato, then play forward from there.
 * Writing to the staccato appends, flushing writes the footer.

## When to Wait on Drain

Why wait on drain if you're not going to write again? It appears that the moment
you've gone over the high-water mark, you get the `false` return. Not on a
subsequent write. With Strata I'll be going over the high-water mark
immediately when I write a buffered page, so I'll be waiting until that page is
written, even if I'm off to a next page, or even if I have to build another
large buffer before the next write.

The wait until next time in the `over-clever` branch is the correct
implementation of Staccato.
{'fraction_non_alphanumeric': 0.0499597099113618, 'fraction_numerical': 0.0, 'mean_word_length': 4.008064516129032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7495414', 'n_tokens_mistral': 359, 'n_tokens_neox': 333, 'n_words': 204}