diff options
| author | EuAndreh <eu@euandre.org> | 2026-06-12 09:19:28 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2026-06-12 09:19:28 -0300 |
| commit | 46fd0362bce11d709e5efe6d540358533985d363 (patch) | |
| tree | f77d2ed33c4f3fb6e85353e436efca4e19028f73 /doc/remembering.fr.5.in | |
| parent | rm .tdrc COPYING (diff) | |
| download | remembering-46fd0362bce11d709e5efe6d540358533985d363.tar.gz remembering-46fd0362bce11d709e5efe6d540358533985d363.tar.xz | |
Rewrite remembering in Go
The shell pipeline (sed | sort | tee | awk | sort | cut | "$@"
plus the cut | uniq | awk profile rewrite) becomes a single static
binary with the same observable behaviour, pinned by the original
ranking.sh, signals.sh and cli-opts.sh suites, now aimed at
remembering.bin:
- the profile keeps the exact on-disk format, COUNT profile TEXT,
byte-sorted with new picks appended at 1 and offered-but-never-
picked entries persisted at 0;
- the menu stays count-descending with byte-order ties, stdin
alone defines what is offered, and duplicate profile lines sum
for ranking but collapse to the highest count on rewrite, as
sort | uniq -f1 did;
- the wrapped command's exit status is forwarded as-is (128+sig
for signal deaths), its stderr passes through, and an empty pick
learns nothing;
- the profile rewrite stays atomic via .tmp plus rename.
Per the house CLI conventions, -h/-V/--help/--version are gone
(the manpage is the documentation; bad options print the usage on
stderr and exit 2), and getopts-style attached option arguments
(-pNAME) are not accepted any more --- no script in the wild used
them.
The project layout follows rot: raw go tool compile/link Makefile,
mkdeps.sh-generated deps.mk, white-box unit suite, fuzz target
over the profile parse/serialize roundtrip, functional pick
roundtrip, a 1M-line ranking benchmark, and a single English
asciidoc manpage absorbing the old .5 page; the po4a/aux release
machinery goes away.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'doc/remembering.fr.5.in')
| -rw-r--r-- | doc/remembering.fr.5.in | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/doc/remembering.fr.5.in b/doc/remembering.fr.5.in deleted file mode 100644 index 3f78c56..0000000 --- a/doc/remembering.fr.5.in +++ /dev/null @@ -1,106 +0,0 @@ -.\"******************************************************************* -.\" -.\" This file was generated with po4a. Translate the source file. -.\" -.\"******************************************************************* -.TH REMEMBERING 5 @DATE@ "remembering @VERSION@" - - -.SH NAME - -remembering \- format of the \fIPROFILE\fP text file. - - -.SH PROFILE - -The \fIPROFILE\fP is a text file, stored on -\f(CR$XDG_DATA_HOME/remembering/profile\-name\fR if \f(CR$XDG_DATA_HOME\fR is -defined. Otherwise, it lives in -\f(CR~/.local/share/remembering/profile\-name\fR. - -Each line of the \fIPROFILE\fP contains three pieces of information: - -.RS -.IP 1 -the \fBrank\fP of the current entry; -.IP 2 -the \f(CR:\fR separator; -.IP 3 -the \fBentry\fP itself. -.RE - -The \fBrank\fP is a number, and the \fBentry\fP is all the text until the end of -the line after the \f(CR:\fR separator: - -.RS -.nf -0:an entry -0:banana -0:entry -0:something -0:zzz -.fi -.RE - -Above is an example of a \fIPROFILE\fP file where all the entries have the -default \fBrank\fP value: \fB0\fP. - -If the \fICOMMAND\fP runs and chooses \f(CRbanana\fR, the new \fIPROFILE\fP will -be: - -.RS -.nf -0:an entry -1:banana -0:entry -0:something -0:zzz -.fi -.RE - -Now the next time the \fICOMMAND\fP runs it will get \f(CRbanana\fR at the -beginning of the list, and as new picks happen their weight will increase, -and will keep going up in priority. - -The entries of the \fIPROFILE\fP are created and kept sorted. -\fBremembering\fP(1) expects to always find sorted entries in the \fIPROFILE\fP. - -The current raking algorithm increments entries as a simple counter. Every -time an entry is picked, its ranked is incremented in the \fIPROFILE\fP. - - -.SH "SEE ALSO" - -\fBremembering\fP(1) - - -.SH AUTHORS - -.MT eu@euandre.org -EuAndreh -.ME -and contributors. - - -.SH BUGS - -.IP \(bu -Report bugs to the -.MT ~euandreh/public\-inbox@lists.sr.ht -mailing list -.ME . -Use the subject "\f(CR[remembering] BUG or TASK: -<description>\fR". -.IP \(bu -Browse bugs -.UR https://euandreh.xyz/remembering/TODOs.html -online -.UE . -.IP \(bu -.UR https://euandreh.xyz/remembering/en/ -Homepage -.UE . -.IP \(bu -.UR https://lists.sr.ht/~euandreh/public\-inbox?search=%5Bremembering%5D -Comments and discussions -.UE . |
