not_IO@lemmy.blahaj.zone to linuxmemes@lemmy.worldEnglish · 2 days agohow to create a folder, linux made easymedia.void.rehabvideomessage-square59fedilinkarrow-up1512arrow-down113file-text
arrow-up1499arrow-down1videohow to create a folder, linux made easymedia.void.rehabnot_IO@lemmy.blahaj.zone to linuxmemes@lemmy.worldEnglish · 2 days agomessage-square59fedilinkfile-text
minus-squarefnrir@lemmy.blahaj.zonelinkfedilinkarrow-up33·2 days agohttps://github.com/uutils/coreutils/blob/main/src/uu/mkdir/src/mkdir.rs
minus-squarenot_IO@lemmy.blahaj.zoneOPlinkfedilinkEnglisharrow-up12·1 day agohow is this 376 lines xD
minus-squareprettybunnys@piefed.sociallinkfedilinkEnglisharrow-up17·1 day agoLots of comments, lots of edge cases to match gnu behavior and explanations of it. “Long” code isn’t bad
minus-squarefnrir@lemmy.blahaj.zonelinkfedilinkarrow-up3·edit-221 hours agoThe GNU Coreutils version is 319 lines. https://github.com/coreutils/coreutils/blob/master/src%2Fmkdir.c 376/319 is an around 18% difference (ignoring that these are different languages) EDIT: i misread the result XD
minus-squareFushuan [he/him]@lemmy.blahaj.zonelinkfedilinkarrow-up5arrow-down1·edit-21 day agoI lines per Arg specific code for windows or not windows, plenty comments in different style through the code (ew, pick one)… It seems to do a bunch of checks for AppArmor or SELinux and so… Yah idk, some questionable formatting of code.
https://github.com/uutils/coreutils/blob/main/src/uu/mkdir/src/mkdir.rs
how is this 376 lines xD
Lots of comments, lots of edge cases to match gnu behavior and explanations of it.
“Long” code isn’t bad
The GNU Coreutils version is 319 lines.
https://github.com/coreutils/coreutils/blob/master/src%2Fmkdir.c
376/319 is an around 18% difference (ignoring that these are different languages)
EDIT: i misread the result XD
I lines per Arg specific code for windows or not windows, plenty comments in different style through the code (ew, pick one)…
It seems to do a bunch of checks for AppArmor or SELinux and so…
Yah idk, some questionable formatting of code.