News for hackers. Stuff that matters.
Re:Decoded: GNU Coreutils by ape4 on Tuesday July 02, 2019 @09:38AM (#20334816)
Rather than a flow chart, etc. It would better to convert the utilities to simple C with no error handling or optimization. So `cat` would be about 5 lines. No mmap() or fancy stuff.
Re:Decoded: GNU Coreutils by zyztem on Tuesday July 02, 2019 @03:51PM (#20338793)
You might find source of Xv6 - educational version of unix - useful. Here is their implementation of cat, all 44 lines of it: https://github.com/mit-pdos/xv6-public/blob/master/cat.c
Re:Decoded: GNU Coreutils by saagarjha on Tuesday July 02, 2019 @12:24PM (#20336645)
Many older operating systems do a pretty decent job at this: I would suggest taking a look at those. (Alternatively, if you're looking for something that's still modern, BSD usually cares less about optimization than GNU does.)