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 /aux/dev.mk | |
| 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 'aux/dev.mk')
| -rw-r--r-- | aux/dev.mk | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/aux/dev.mk b/aux/dev.mk deleted file mode 100644 index 5f62802..0000000 --- a/aux/dev.mk +++ /dev/null @@ -1,113 +0,0 @@ -.POSIX: - -.SUFFIXES: -.SUFFIXES: .in .md .html - -.in: - sed \ - -e "s:@DOMAIN@:`cat aux/domain.txt`:g" \ - -e "s:@NAME@:`basename "$$PWD"`:g" \ - -e 's:@MAILING_LIST@:$(MAILING_LIST):g' \ - < $< > $@ - -.in.html: - pandoc -s -r man -w html \ - -H aux/headers.html \ - --metadata lang="`echo $< | awk -F. '{ print $$(NF-2) }'`" \ - < $(<D)/`basename "$(<F)" .in` > $@ - -.md.html: - pandoc -s -r commonmark -w html \ - -H aux/headers.html \ - --metadata lang="`echo $(<F) | cut -d. -f2`" \ - --metadata title="`basename "$$PWD"` - `echo $(<F) | cut -d. -f1`" \ - --toc --toc-depth=2 \ - --highlight-style pygments \ - < $< > $@ - -manpages.html = $(manpages.in:.in=.html) - -md_files.html = $(md_files:.md=.html) - -public: manpages.sentinel public/makefile.svg md.sentinel public/index.html \ - public/ci public/TODOs.html public/style.css public/favicon.svg - touch $@ - -public/index.html: - mkdir -p $(@D) - ln -rs public/en/index.html $@ - -public/ci: - sh aux/ci/report.sh -n "`basename "$$PWD"`" -o $@ - -public/TODOs.html: TODOs.md aux/preamble-md - mkdir -p $(@D) - td -H | cat aux/preamble-md - | pandoc -s -r commonmark -w html \ - -H aux/headers.html \ - --metadata lang=en \ - --metadata title="`basename "$$PWD"` - TODOs" \ - --toc --toc-depth=2 \ - --highlight-style pygments \ - > $@ - -public/favicon.svg: aux/favicon.svg - mkdir -p $(@D) - cp aux/favicon.svg $@ - -public/style.css: - mkdir -p $(@D) - td -S > $@ - -md.sentinel: $(md_files.html) - mkdir -p public - sh aux/ext2subdir.sh -o public $? - for d in public/*/; do ln -rfs public/style.css $$d/style.css; done - touch $@ - -manpages.sentinel: $(manpages.html) - mkdir -p public - sh aux/ext2subdir.sh -o public $? - touch $@ - -public/makefile.svg: Makefile - mkdir -p $(@D) - LANG=en.UTF-8 make -Bnd dev | make2graph | dot -Tsvg >$@ - - -index.en.md: - ln -s README.md $@ - -CHANGELOG.en.md: - ln -s CHANGELOG.md $@ - -all_en_files = \ - $(en_files) \ - index.en.md \ - CHANGELOG.en.md - -po/po4a.cfg: $(all_en_files) po - sh aux/po4a-cfg.sh -f '$(all_en_files) aux/checks/manpages/footer.en.0.in' > $@ - po4a $@ - - -test-files = \ - aux/checks/changelog.sh \ - aux/checks/manpages.sh \ - aux/checks/readme.sh \ - aux/checks/shellcheck.sh \ - aux/checks/spelling.sh \ - aux/checks/todos.sh \ - aux/checks/repo.sh \ - -$(test-files): ALWAYS manfooter.sentinel - env MAILING_LIST='$(MAILING_LIST)' sh $@ - -aux/checks/assert-manpages.sh: manfooter.sentinel - -manfooter.sentinel: - $(MAKE) -f aux/dev.mk `echo aux/checks/manpages/*.in | sed 's|\.in||g'` - touch $@ - -dev-check: $(test-files) - -ALWAYS: |
