remembering - TODOs

About

TODOs for remembering.

Register a new one at ~euandreh/public-inbox@lists.sr.ht and see existing discussions.

Você também pode escrever em português.

Vous pouvez aussi écrire en français.

Vi povas ankaŭ skribi esperante.

Tasks

TODO test_mkdir_p() is generating randon directories in $PWD instead of /tmp

#task-bd165b74-c559-48ee-1d29-eaa906aa0393

TODO assert-manpages.sh: ensure that $(manpages) contain everything from $(manpages.en)

#task-20f96d7d-2fd8-7a5f-e861-ded565c3b408

TODO malloc vs calloc

#task-b3261473-9d12-9df4-cbfe-c4017ffed709

TODO Document EXIT_STATUS in manpage for remembering.1

#task-013534fe-8839-9de1-ec4a-9d63980fc096

TODO Use strtok(3) over manually separating strings

#task-44843686-1328-521a-8281-60dbb05f2d3f

TODO Translate usage/help and manpages

#task-47d98f68-0dec-f9b2-4d5c-bfe822411477

Started at a79ced6f0925526ab41ecbdb9e6e8cac86f8ea75.

DONE Also use inline monospaced font in manpages

#task-f1b27444-f824-353e-6e89-63974dcce550

DONE Document requirement on STDIN needing to be sorted

#task-ffd35082-5af0-814e-4270-9305f57aa416

DONE Use inline markings over single line "requests" on troff

#task-cb17c58a-bb00-d554-8ed8-1b53eb12b70d

DONE Use monospace font inside .EX/.EE tags

#task-fe406a67-e406-41a7-df4a-1e006dc636e9

DONE What about UTF-8?

#task-19f9d131-696a-3417-c052-6312f04a33af

Does the current sh implementation handle it correctly? What about the C implementation?

It would be good to have a test stressing that.

CANCELLED Use POSIX $(CFLAGS)

#task-4686d9a5-3514-e7f2-25de-b3cf66199124

The current values for $(CFLAGS) in the Makefile work on GCC, Clang, TinyCC, but not on POSIX c99.

TODO Can't test getopt

#task-2c3021db-7ede-c835-691a-af240c11f883

For some reason, getopt.3 doesn't read any of the options provided in the test.

Right now the code is disabled with an #ifdef DISABLE guard.

DONE Add --version flag

#task-b001c31a-5053-d317-d8d3-c9647aa34067

TODO Add AddressSanitizer and fuzzer tests

#task-8af5055c-d1e1-beba-128c-4cabc40e8057

Rich discussion on AddressSanitizer and similar tools: https://news.ycombinator.com/item?id=26713037.

Relevant tools:

DONE Add $HOME and $XDG_DATA_HOME sh test

#task-9291a8c1-4ac3-409d-b490-872b29a719cc

CANCELLED Rename PROFILE for LABEL?

#task-e3153cfb-b77a-4528-afa0-43b90f267d3d

I feel a more descriptive name could be given.

Current candidates are:

TODO Make test_really_long_list runnable

#task-c1129666-b373-4b9d-8e10-927689048b05

Now test_really_long_list is commented.

Benchmark with yeganesh after this is done.

CANCELLED Improve speed even further

#task-05c7f068-e935-457f-89ea-1f38227e7779

Handle 10k+ lists with ease.

CANCELLED Add completion script

#task-daa4a3e7-bcb4-4fe1-a0df-e73c7d17e43c

How to support multiple shells without duplicating the code?

The major one is Bash, but also consider zsh and fish. Also tcsh and oilsh.

DONE Is tac POSIX

#task-98478c0f-97ac-4667-acdc-9373e2841de9

If it isn't, what to replace it with?

With sed.

DONE Add CHANGELOG.md for 0.1.0

#task-f4258dc4-22aa-408d-a0b1-953f654e0623

CANCELLED How to preserve to sort order from STDIN

#task-b2c26218-5f21-4efd-afbd-ff6af57a358a

Keeping the sort order from STDIN, I would have to find a way to merge STDIN with the existing profile.

DONE Make sure to forward status code given by the provided command

#task-47589312-0a4d-46ac-9f13-45309471efeb

CANCELLED Exclude ponctuation from troff markup

#task-03d0e24c-4baf-404f-ac8a-f8d972ec622e

Things like:

A phrase with the last word
.B bold.

The final period is marked as bold, too.

DONE Add -h and --help flags

#task-8593b78a-a5ac-4b6c-b9cf-74c021d4a8e5

DONE Optimize for large lists

#task-fec292ff-b9de-4d6c-b156-a9adc4771f35

DONE Add tests

#task-146fab37-e53b-489e-95d0-3fcdd4c3eaef

On plain POSIX sh.

Bugs

Improvements

TODO Respond to UNIX signals

#improvement-971e21e1-1083-7507-2379-8e3127a8e359

TODO Work on portability

#improvement-f7317d52-012d-7f94-e699-aec7c84329b0

Resources on writing portable C code:

TODO Learn about secure programming in C

#improvement-8dfd18cf-2c34-ee29-e6cd-53d300687789

The best reference by far I've found to learn about secure programming in C is the SEI CERT C Coding Standard.

There's also MISRA C but it feels like very corp.

Questions

TODO Use more const in the implementation?

#question-9ad11485-c244-bf17-f83b-b627db09fab4

Resources

Scratch