tl; dr
作为元语法变量的
“Foo”和“bar”已由MIT和DEC推广,最早的引用文献是从1964年开始在LISP和PDP-1和MAC项目上工作的。
这些人中有许多人在麻省理工学院的技术模型铁路俱乐部中,我们在1959年发现了“foo”在技术界的首次使用记录(并在1958年出现了变体)。
“foo”和“bar”(甚至“baz”)在流行文化中都是众所周知的,尤其是从Smokey Stover和Pogo漫画中,许多TMRC成员都会阅读。
另外,军事上的FUBAR似乎也为他们的知名度做出了贡献。
在20世纪初期,在流行文化中已经很好地证明了将孤独的“foo”用作废话,军事上的FUBAR也是如此。 (一些背景资料:
FOLDOC
FOLDOC
Jargon File
Jargon File
Wikipedia
RFC3092)
好的,让我们找到一些引用。
停止按下! 发布此答案后,我在1月14日星期五发现了关于“foo”的完美文章。
1938年版
The Tech(“麻省理工学院最古老,规模最大
报纸和网络上出版的第一本报纸”),第LVII卷,第57号,价格三美分:
On Foo-ism
The Lounger thinks that this business of Foo-ism has been carried too far by its misguided proponents, and does hereby and forthwith take his stand against its abuse. It may be that there's no foo like an old foo, and we're it, but anyway, a foo and his money are some party. (Voice from the bleachers- "Don't be foo-lish!")
As an expletive, of course, "foo!" has a definite and probably irreplaceable position in our language, although we fear that the excessive use to which it is currently subjected may well result in its falling into an early (and, alas, a dark) oblivion. We say alas because proper use of the word may result in such happy incidents as the following.
It was an 8.50 Thermodynamics lecture by Professor Slater in Room 6-120. The professor, having covered the front side of the blackboard, set the handle that operates the lift mechanism, turning meanwhile to the class to continue his discussion. The front board slowly, majestically, lifted itself, revealing the board behind it, and on that board, writ large, the symbols that spelled "FOO"!
The Tech newspaper,一年前,给编辑的信,九月
1937 :
By the time the train has reached the station the neophytes are so filled with the stories of the glory of Phi Omicron Omicron, usually referred to as Foo, that they are easy prey.
...
It is not that I mind having lost my first four sons to the Grand and Universal Brotherhood of Phi Omicron Omicron, but I do wish that my fifth son, my baby, should at least be warned in advance.
Hopefully yours,
Indignant Mother of Five.
以及
The Tech在12月
1938 :
General trend of thought might be best interpreted from the remarks made at the end of the ballots. One vote said, '"I don't think what I do is any of Pulver's business," while another merely added a curt "Foo."
科技圈中第一个记录的“foo”可能是
1959 的
Dictionary of the TMRC Language:
FOO: the sacred syllable (FOO MANI PADME HUM); to be spoken only when under inspiration to commune with the Deity. Our first obligation is to keep the Foo Counters turning.
这些在
FOLDOC中解释。字典的编译器Pete Samson在2005年说过:
Use of this word at TMRC antedates my coming there. A foo counter could simply have randomly flashing lights, or could be a real counter with an obscure input.
从1996年的
Jargon File 4.0.0:
Earlier versions of this lexicon derived 'baz' as a Stanford corruption of bar. However, Pete Samson (compiler of the TMRC lexicon) reports it was already current when he joined TMRC in 1958. He says "It came from "Pogo". Albert the Alligator, when vexed or outraged, would shout 'Bazz Fazz!' or 'Rowrbazzle!' The club layout was said to model the (mythical) New England counties of Rowrfolk and Bassex (Rowrbazzle mingled with (Norfolk/Suffolk/Middlesex/Essex)."
在TMRC词典的前一年,
1958 的MIT Voo Doo Gazette(“MIT教务长办公室的幽默补充”)
(PDF)在John Banzhaf(一名电机工程专业的学生)的“墨菲和菲纳格尔法则”中提到了Foocom。 :
Further research under a joint Foocom and Anarcom grant expanded the law to be all embracing and universally applicable: If anything can go wrong, it will!
1964年的MIT Voo Doo
(PDF)也引用了TMRC用法:
Yes! I want to be an instant success and snow customers. Send me a degree in: ...
让我们找到在代码示例中发布的“foo”,“bar”和“foobar”。
因此,
Jargon File 4.4.7说“foobar”:
Probably originally propagated through DECsystem manuals by Digital Equipment Corporation (DEC) in 1960s and early 1970s; confirmed sightings there go back to 1972.
我可以找到的第一个引用文献是1964年2月
,,但由Information International,Inc.于1963年6月写成
The Programming Language LISP: its Operation and Applications,作者很多,但包括Timothy P. Hart和Michael Levin:
Thus, since "FOO" is a name for itself, "COMITRIN" will treat both "FOO" and "(FOO)" in exactly the same way.
还包括其他元语法变量,例如:FOO CROCK GLITCH / POOT TOOR / ON YOU / SNAP CRACKLE POP / X Y Z
我希望这与麻省理工学院的MAC项目在1月的下一个“foo”引用非常相似
1964 的AIM-064,或Timothy P. Hart和Michael Levin的
LISP Exercises:
car[((FOO . CROCK) . GLITCH)]
它共享许多其他元语法变量,例如:CHI /纽约州波士顿/菠菜黄油牛排/ FOO CROCK GLITCH /盆栽/盆栽/ ISTHISATRIVIALEXCERCISE / PLOOP FLOT TOP / SNAP CRACKLE POP /一二三
对于“foo”和“bar”一起使用,我可以找到的最早引用文献是麻省理工学院的MAC项目,即六月
1966 的AIM-098,或者是Petert Samson的
PDP-6 LISP:
EXPLODE, like PRIN1, inserts slashes, so (EXPLODE (QUOTE FOO/ BAR)) PRIN1's as (F O O // / B A R) or PRINC's as (F O O / B A R).
一些更多的回忆。
@Walter Mitty于2008年在此网站上回顾:
I second the jargon file regarding Foo Bar. I can trace it back at least to 1963, and PDP-1 serial number 2, which was on the second floor of Building 26 at MIT. Foo and Foo Bar were used there, and after 1964 at the PDP-6 room at project MAC.
John V. Everett在1996年回忆:
When I joined DEC in 1966, foobar was already being commonly used as a throw-away file name. I believe fubar became foobar because the PDP-6 supported six character names, although I always assumed the term migrated to DEC from MIT. There were many MIT types at DEC in those days, some of whom had worked with the 7090/7094 CTSS. Since the 709x was also a 36 bit machine, foobar may have been used as a common file name there.
Foo and bar were also commonly used as file extensions. Since the text editors of the day operated on an input file and produced an output file, it was common to edit from a .foo file to a .bar file, and back again.
It was also common to use foo to fill a buffer when editing with TECO. The text string to exactly fill one disk block was IFOO$HXA127GA$$. Almost all of the PDP-6/10 programmers I worked with used this same command string.
Daniel P. B. Smith在1998年:
Dick Gruen had a device in his dorm room, the usual assemblage of B-battery, resistors, capacitors, and NE-2 neon tubes, which he called a "foo counter." This would have been circa 1964 or so.
Robert Schuldenfrei在1996年:
The use of FOO and BAR as example variable names goes back at least to 1964 and the IBM 7070. This too may be older, but that is where I first saw it. This was in Assembler. What would be the FORTRAN integer equivalent? IFOO and IBAR?
Paul M. Wexelblat在1992年:
The earliest PDP-1 Assembler used two characters for symbols (18 bit machine) programmers always left a few words as patch space to fix problems. (Jump to patch space, do new code, jump back) That space conventionally was named FU: which stood for Fxxx Up, the place where you fixed Fxxx Ups. When spoken, it was known as FU space. Later Assemblers ( e.g. MIDAS allowed three char tags so FU became FOO, and as ALL PDP-1 programmers will tell you that was FOO space.
Bruce B. Reynolds在1996年:
On the IBM side of FOO(FU)BAR is the use of the BAR side as Base Address Register; in the middle 1970's CICS programmers had to worry out the various xxxBARs...I think one of those was FRACTBAR...
这是1955年的简单
IBM "BAR"。
其他早期引用资料:
1967 foo bar MIT AIM-127
1967 foo bar MIT AIM-127a
1965 foo MIT Tech Engineering News
1968 foo baz DEC
1971 FOO BAR UCLA-NMC RFC269
1972 FOO MIT AI
1972 FOO MIT AI HAKMEM(PDF scan)
1972 FOO DEC
1973 FOO DEC
1973 foo bar International Joint Council on Artificial Intelligence
1975 foo bar International Joint Council on Artificial Intelligence
1977 Foobar
1978 Foobar
1978 Moby Foobar in Software Wars
我无法找到RFC3092和其他地方所建议的对foo bar的引用作为“倒置的foo信号”。
这是一些甚至更早的F00,但我认为它们是巧合/误报:
1959 "FOO 31 IBM-704 Bettis Plant Uses a least squares technique" U.S. Atomic Energy Commission
1960 FOO (FO Out, F1, F2, FOO, FOI) "Digital computer and control engineering"
1967 FOO?
我是一名优秀的程序员,十分优秀!