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

Either way, formatting shouldn't be done manually, and I can't approve this until there's a way to do it automatically.

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

Indenting this sucks and looks ugly even in practice. See my criticisms in the style guide.

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

This should be scope-limited to just the getopt(3p) part, which the if statement did.

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

This looks like I threw my code line through an AI blender. The bits should be next to the hex, separate from the unrelated comment. This statement is missing a semicolon.

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

These bits should be next to the hex.

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

What macros are used?

trinity suggested changes for bonsai/harakit#142 2024-07-15 02:26:37 -06:00
Formatting
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

This is what indentation is for. This introduces extra complexity to program maintenance - what if the command and while statement are mismatched? It's less important to know the constraints of repetition in a do/while because the code inside will always run at least once; the while constraint is only on subsequent runs.

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

This stands to clutter code significantly. I guess because Rust does it, it makes sense for this project, but C programmers who do this bug the hell out of me.

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

Nesting specifically.

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

This is fine. Maybe even good.