5 ms·
Just to give an example: https://github.com/uutils/coreutils/blob/master/src/whoami/platform/unix.rs https://github.com/uutils/coreutils/blob/master/src/whoami
by jeena 11y ago
Just to give an example:
https://github.com/uutils/coreutils/blob/master/src/whoami/platform/unix.rs https://github.com/uutils/coreutils/blob/master/src/whoami/p...
looks suspically simmilar to:
http://code.metager.de/source/xref/gnu/coreutils/src/whoami.c http://code.metager.de/source/xref/gnu/coreutils/src/whoami....
- epistasis 11y agoWhat's suspicious? Sharing the same two system calls in the same order, for a trivial function that really can be implemented the same way?
- yxlx 11y agoReally? I don't see much similarity.
- kbenson 11y agoI'm not sure picking a program where the portion that does any actual work is 3-6 lines in length is a good reference for whether they are copying code/algorithms. There's so little of substance to actually do differently, the chance of them looking similar in that respect if fairly high.
- protomyth 11y agoThe rust version looks more like the old FreeBSD version http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/1.0-RELEASE/ports/shellutils/src/whoami.c http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-relea...
- jahewson 11y agoNo it really doesn't. Code which implements the same API is going to look pretty similar, for example ReactOS looks a hell of a lot like Windows. But it's not been copied.
- kps 11y agoAnd they both look equally similar to usr/src/cmd/whoami.c in 3BSD (1978).
- msbarnett 11y agoYou know that whoami didn't originate with GNU, right? The GNU coreutils are themselves rewrites of earlier BSD tools. The Rust version AND the GNU whoami.c both look similar to the BSD original https://github.com/weiss/original-bsd/blob/master/old/whoami/whoami.c https://github.com/weiss/original-bsd/blob/master/old/whoami.... Hell, the rust version is clearly a lot closer to the BSD original than to the GNU clone. Honestly if you're going to have an opinion on this issue, you should try to educate yourself on all of the Unix that predates GNU.