dtb trinity
trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

That's because the amount of data in total that will be written is totally irrelevant to -B.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

It should be highlighted that the input buffer should be very large (e.g. 4M) to take advantage of modern hardware I/O speeds, and for most uses mm(1) is better.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

This is substantially less readable than before.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

Again, this commenting is bad. C isn't its preprocessor. If this kind of commenting is needed I would straight-up rather remove C from this project than continue with it. The alternative to do/whiles is infinite loops with conditions at the end which are what do/whiles exist to solve. Commenting the function of basic C language features clutters code significantly.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

Moving this comment makes it wrong. This ternary makes sure strtol(3p) succeeded. *s == 0, which is on its own vague, checks if no chars are left unparsed.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

getopt(3p) will still happen when argc==0. And dj(1) should run when argc<0. If the user's system is broken, don't deny them the basic tools to fix it.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

This is good.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

Provide an example.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

This shouldn't be required. Typos are easy to spot in Rust and I believe C disallows this.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

The opposite is true.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

This is write size. But dj(1) writes everything it reads.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:26:36 -06:00
Formatting

This sounds wack.

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:02:57 -06:00
Formatting

This should stay that way because it's somewhat common practice among greybeards (I know many in the 9front community do it).

trinity commented on pull request bonsai/harakit#142 2024-07-15 02:01:28 -06:00
Formatting

It should be highlighted that the input buffer should be very large (e.g. 4M) to take advantage of modern hardware I/O speeds, and for most uses mm(1) is better.

trinity approved bonsai/harakit#143 2024-07-15 01:42:29 -06:00
mm(1): rewritten in Rust
trinity commented on pull request bonsai/harakit#143 2024-07-15 01:42:00 -06:00
mm(1): rewritten in Rust

Cleaner, shorter, nicer.

trinity commented on pull request bonsai/harakit#142 2024-07-13 00:44:10 -06:00
Formatting

This should be -1. While it is in reality 255, the negative is consistent with strcmp(3p) and may be useful on certain systems. Also, at some point retvals here should be more significant.

trinity commented on pull request bonsai/harakit#142 2024-07-13 00:44:10 -06:00
Formatting
trinity commented on pull request bonsai/harakit#142 2024-07-13 00:44:10 -06:00
Formatting

C89 can't do 0b literals, which is why I used the more portable hex with a comment.

trinity commented on pull request bonsai/harakit#142 2024-07-13 00:44:10 -06:00
Formatting

Variables should be declared at the start of the scope; this is invalid C89.