3 ms·
Now you've got me curious which came first, "paste" or "zip". Python's zip function was added in PEP 201 [1], which credits the Haskell 98 report with the name
by teraflop 5y ago
Now you've got me curious which came first, "paste" or "zip".
Python's zip function was added in PEP 201 [1], which credits the Haskell 98 report with the name. The same function appears in all prior versions of the Haskell language that I could find, dating back to Haskell 1.0 in 1990.
On the other hand, the GNU coreutils version of paste[2] has copyright dates going all the way back to 1984, which presumably means it was derived from UNIX System V or an even earlier version.
[1]: https://www.python.org/dev/peps/pep-0201/ https://www.python.org/dev/peps/pep-0201/
[2]: https://github.com/coreutils/coreutils/blob/master/src/paste.c https://github.com/coreutils/coreutils/blob/master/src/paste...
- nicoburns 5y agoIt's possible a lisp of some sort predated the Haskell version
- LukeShu 5y agoThe FreeBSD man page for `paste` claims it first appeared in Unix 32V (1979; derived from v7 Unix, and ancestral to both 4BSD and SysV).
- mprovost 5y agoHere's the commit from 1978: https://github.com/dspinellis/unix-history-repo/blob/Bell-32V-Snapshot-Development/usr/src/cmd/paste.c https://github.com/dspinellis/unix-history-repo/blob/Bell-32... The comments refer to an "old 127 paste command" but I have no idea what that is.
- LukeShu 5y agoI hadn't pursued it further than seeing that it was added in an 1978 commit. Looking at it further, there are a few answers at https://minnie.tuhs.org/pipermail/tuhs/2020-January/019955.html https://minnie.tuhs.org/pipermail/tuhs/2020-January/019955.h... > GWRL stands for Gottfried W. R. Luderer, the author of cut(1) and paste(1), probably around 1978. Those came either from PWB or USG I can verify that neither cut nor past were in PWB 1: https://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1 https://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1 > Also "127" was the internal department number for the Computer Science Research group at Bell Labs where UNIX originated
- camhutch 5y agoThe miranda language (which predates haskell) had a zip function. According to wikipedia, miranda was released in 1985, but I dont know if zip was in the standard miranda environment back then. The comments in the source code say: The following is included for compatibility with Bird and Wadler (1988). The normal Miranda style is to use the curried form `zip2'. > zip :: ([*],[**])->[(*,**)] > zip (x,y) = zip2 x y which suggests a slightly later origination of zip.