News for hackers. Stuff that matters.
Re:Linux tool to show progress for cp, mv, dd by pstoll on Friday May 19, 2023 @09:04AM (#36001438)
Random aside - I know formatting discussions border on the religious (and why something like gofmt is the only correct answer & yet I am also good with spaces for Python) but..

Did anyone else look at the code and ask themselves- what is the actual formatting standard being used?

Looked like a mix of “open brace on same line, 4 chars indent for code” then “open brace on new line, code at same zero indent”

Not a big deal obviously. Just something that tripped up my eyes scanning the code.

Re:Linux tool to show progress for cp, mv, dd by reaperducer on Friday May 19, 2023 @09:41AM (#36001844)
Did anyone else look at the code and ask themselves- what is the actual formatting standard being used?

Looks like a combination of Whitesmiths and ChatGPT.

Re:Linux tool to show progress for cp, mv, dd by antihero on Friday May 19, 2023 @09:12AM (#36001510)
Yeah it just looks messy and harder to read when it’s inconsistent
Re:Linux tool to show progress for cp, mv, dd by akritid on Friday May 19, 2023 @10:21AM (#36002323)
From a quick look to one file, seems fairly consistent. Perhaps most unorthodox but at the same time easiest to justify: function bodies skip one level of indentation. The curly brace of function body at column zero is actually a separate, very traditional style. It's just that both styles apply to function bodies, there is no other causal relationship. Finally, indentation is 4 spaces, and tabs are expanded. Of course a very few places may be miss-styled, as happens with hand crafted code. While definitely sinful for not indenting with tabs as God intended, the style is not messy