not_IO@lemmy.blahaj.zone to linuxmemes@lemmy.worldEnglish · 11 days agohow to create a folder, linux made easymedia.void.rehabvideomessage-square61linkfedilinkarrow-up1549file-text
arrow-up1549videohow to create a folder, linux made easymedia.void.rehabnot_IO@lemmy.blahaj.zone to linuxmemes@lemmy.worldEnglish · 11 days agomessage-square61linkfedilinkfile-text
minus-squareSaapas@piefed.ziplinkfedilinkEnglisharrow-up151·11 days agoThat’s cool but I want this rewritten in memory safe Rust
minus-squarefnrir@lemmy.blahaj.zonelinkfedilinkarrow-up39·11 days agohttps://github.com/uutils/coreutils/blob/main/src/uu/mkdir/src/mkdir.rs
minus-squarenot_IO@lemmy.blahaj.zoneOPlinkfedilinkEnglisharrow-up16·11 days agohow is this 376 lines xD
minus-squareprettybunnys@piefed.sociallinkfedilinkEnglisharrow-up26·11 days agoLots of comments, lots of edge cases to match gnu behavior and explanations of it. “Long” code isn’t bad
minus-squareFushuan [he/him]@lemmy.blahaj.zonelinkfedilinkarrow-up5·edit-211 days 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.
minus-squarefnrir@lemmy.blahaj.zonelinkfedilinkarrow-up5·edit-211 days 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
That’s cool but I want this rewritten in memory safe Rust
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
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.
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