Merge pull request #4 from julianss/say-bytes-not-chars

say "bytes", not "characters", where the limit is bytes
This commit is contained in:
Victor Taelin 2026-07-30 23:19:57 -03:00 committed by GitHub
commit 1fb164cf39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ The tool lands at `~/.optmem/memo`; put `~/.optmem` on `PATH` to type `memo`.
| | | | | |
|---|---| |---|---|
| `memo wake` | read the memory — the first command of every session | | `memo wake` | read the memory — the first command of every session |
| `memo note "..."` | record one memory: one line, up to 280 chars | | `memo note "..."` | record one memory: one line, up to 280 bytes |
| `memo nap` | answer the merges that came due | | `memo nap` | answer the merges that came due |
| `memo recall <regex>` | search every memory ever recorded, word for word | | `memo recall <regex>` | search every memory ever recorded, word for word |
| `memo zoom <lo>-<hi>` | open a tree node into its two halves | | `memo zoom <lo>-<hi>` | open a tree node into its two halves |
@ -77,7 +77,7 @@ then do exactly what it prints, to the end of its output.
### While working: register memories (mandatory) ### While working: register memories (mandatory)
Call `~/.optmem/memo note "<1 line, max 280 chars>"` whenever you learn Call `~/.optmem/memo note "<1 line, max 280 bytes>"` whenever you learn
something new, or something worth keeping happens. That covers a task something new, or something worth keeping happens. That covers a task
worth real effort, a fact or insight the user teaches you, anything you worth real effort, a fact or insight the user teaches you, anything you
learn about their life (even indirectly), any event of lasting effect. learn about their life (even indirectly), any event of lasting effect.

6
memo
View file

@ -478,7 +478,7 @@ def nap_prompt(d, lo, hi, left):
tail = "" if not left else "\n%s after this one." % ( tail = "" if not left else "\n%s after this one." % (
"1 compression remains" if left == 1 else "1 compression remains" if left == 1 else
"%d compressions remain" % left) "%d compressions remain" % left)
return ("Compress memories #%d-%d into one line of at most %d characters.\n" return ("Compress memories #%d-%d into one line of at most %d bytes.\n"
"Keep what has lasting effect, drop what does not. Invent " "Keep what has lasting effect, drop what does not. Invent "
"nothing.\n\n" "nothing.\n\n"
"%s\n%s\n" "%s\n%s\n"
@ -513,7 +513,7 @@ then do exactly what it prints, to the end of its output.
### While working: register memories (mandatory) ### While working: register memories (mandatory)
Call `{memo} note "<1 line, max {chars} chars>"` whenever you learn Call `{memo} note "<1 line, max {chars} bytes>"` whenever you learn
something new, or something worth keeping happens. That covers a task something new, or something worth keeping happens. That covers a task
worth real effort, a fact or insight the user teaches you, anything you worth real effort, a fact or insight the user teaches you, anything you
learn about their life (even indirectly), any event of lasting effect. learn about their life (even indirectly), any event of lasting effect.
@ -653,7 +653,7 @@ def cmd_wake(d, args):
def cmd_note(d, args): def cmd_note(d, args):
if len(args) != 1: if len(args) != 1:
die("usage: %s note \"<one line, at most %d chars>\"" die("usage: %s note \"<one line, at most %d bytes>\""
% (ME, ENTRY_CHARS)) % (ME, ENTRY_CHARS))
text = check(args[0]) text = check(args[0])
i = log_append(d, [(datetime.date.today().isoformat(), text)]) i = log_append(d, [(datetime.date.today().isoformat(), text)])