dtb trinity
trinity commented on pull request bonsai/harakit#142 2024-07-27 17:23:36 -06:00
Formatting

I'm not partial to either matching or using the clojure, but I think it should be consistent between programs.

trinity commented on pull request bonsai/harakit#142 2024-07-27 17:22:55 -06:00
Formatting

Emma: you told me that returning from main here would be impossible from a clojure. Would it be better to match the Result here to facilitate that?

trinity commented on pull request bonsai/harakit#142 2024-07-27 17:16:14 -06:00
Formatting

Would it be better to just return from main rather than calling a function?

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

Instead of marking that this is to set the delimiter, I'd prefer a more descriptive name for the variable d (like delimiter). I'd also prefer:

trinity pushed to peek at bonsai/harakit 2024-07-26 07:58:46 -06:00
3f23e437e8 peek(1): more style fixes
trinity pushed to peek at bonsai/harakit 2024-07-26 07:42:18 -06:00
a927c39c06 peek(1): update style
trinity commented on pull request bonsai/harakit#93 2024-07-26 07:22:33 -06:00
peek(1)

I can't find a way to rewrite this in Rust without vendoring a crate or writing termios C bindings.

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

The s ternary should be here, without an intermediate variable.

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

I was under the impression you added the s variable to this program?

trinity commented on pull request bonsai/harakit#142 2024-07-26 07:11:32 -06:00
Formatting

I would put this in the same block as getopt(3p) to reduce cognitive load; That One Block is where arguments are interpreted.

trinity commented on pull request bonsai/harakit#142 2024-07-26 07:09:51 -06:00
Formatting

Moving the program_name ternary over here would be more efficient.

trinity pushed to main at trinity/src 2024-07-25 21:31:09 -06:00
fb38d75235 2024-07-25
trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

!any_int < 0 will always evaluate to 1.

trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

Examples of this would be good.

trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

the length of, or so

trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

That's intense. An example:

trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

Prepare to cast all fprintf(3p)s.

trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

Is this possible for analyzing arrays of strings?

trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

The compiler will filter this if down to one condition anyway. Why are there two here? argc==0 isn't a special case with regards to intcmp(1), except that the program_name fallback needs to be used.

trinity commented on pull request bonsai/harakit#142 2024-07-25 20:21:41 -06:00
Formatting

I'm reviewing this hastily because the Rust rewrite is a superior version anyway.