Remix.run Logo
▲ firesteelrain a day ago

I only watched the first few minutes and thought no way touch is that simple! It isn’t. Because most of these utilities have a lot of scar tissue handling years of various edge cases and conditions. Something to be said for software engineering. If you try to build for all the edge conditions then getting a somewhat working example out would take too long

I did appreciate the ways he used the man pages to build out the tools.

Actual touch.c source: https://github.com/coreutils/coreutils/blob/master/src/touch...

▲zokier a day ago | parent | next [-]

GNU utils are very maximalist though. Busybox touch is much simpler, especially if you cut out the optional ifdeffed susv3 features: https://github.com/mirror/busybox/blob/master/coreutils/touc...

plan9 touch is also pretty clean: https://9p.io/sources/plan9/sys/src/cmd/touch.c

▲saidnooneever 16 hours ago | parent | prev [-]

if it only needs to work on his PC then its not tok bad. these utils are often full of crap because they need to work on everyones pc with wacky locales and filesystems and all sortsof crap this guy wont run into.

its always the case if ud implmenet everything just for your case you can skip most edge cases and software can be much more lean.

granted his claim is maybe a bit broadly worded regardin this point ofcourse.