看到有人问Foo的来历,我贴一些权威解释吧

KennyYuan 2003-08-05 04:06:01
metasyntactic variable n.

A name used in examples and understood to stand for whatever thing is under discussion, or any random member of a class of things under discussion. The word foo is the canonical example. To avoid confusion, hackers never (well, hardly ever) use `foo' or other words like it as permanent names for anything. In filenames, a common convention is that any filename beginning with a metasyntactic-variable name is a scratch file that may be deleted at any time.

Metasyntactic variables are so called because (1) they are variables in the metalanguage used to talk about programs etc; (2) they are variables whose values are often variables (as in usages like "the value of f(foo,bar) is the sum of foo and bar"). However, it has been plausibly suggested that the real reason for the term "metasyntactic variable" is that it sounds good.

To some extent, the list of one's preferred metasyntactic variables is a cultural signature. They occur both in series (used for related groups of variables or objects) and as singletons. Here are a few common signatures:

foo, bar, baz, quux, quuux, quuuux...:
MIT/Stanford usage, now found everywhere (thanks largely to early versions of this lexicon!). At MIT (but not at Stanford), baz dropped out of use for a while in the 1970s and '80s. A common recent mutation of this sequence inserts qux before quux.

bazola, ztesch:
Stanford (from mid-'70s on).

foo, bar, thud, grunt:
This series was popular at CMU. Other CMU-associated variables include gorp.

foo, bar, bletch:
Waterloo University. We are informed that the CS club at Waterloo formerly had a sign on its door reading "Ye Olde Foo Bar and Grill"; this led to an attempt to establish "grill" as the third metasyntactic variable, but it never caught on.

foo, bar, fum:
This series is reported to be common at XEROX PARC.

fred, jim, sheila, barney:
See the entry for fred. These tend to be Britishisms.

corge, grault, flarp:
Popular at Rutgers University and among GOSMACS hackers.

zxc, spqr, wombat:
Cambridge University (England).

shme
Berkeley, GeoWorks, Ingres. Pronounced /shme/ with a short /e/.

foo, bar, baz, bongo
Yale, late 1970s.

spam, eggs
Python programmers.

snork
Brown University, early 1970s.

foo, bar, zot
Helsinki University of Technology, Finland.

blarg, wibble
New Zealand.

toto, titi, tata, tutu
France.

pippo, pluto, paperino
Italy. Pippo /pee'po/ and Paperino /pa-per-ee'-no/ are the Italian names for Goofy and Donald Duck.

aap, noot, mies
The Netherlands. These are the first words a child used to learn to spell on a Dutch spelling board.

oogle, foogle, boogle; zork, gork, bork
These two series (which may be continued with other initial consonents) are reportedly common in England, and said to go back to Lewis Carroll.
Of all these, only `foo' and `bar' are universal (and baz nearly so). The compounds foobar and `foobaz' also enjoy very wide currency.

Some jargon terms are also used as metasyntactic names; barf and mumble, for example. See also Commonwealth Hackish for discussion of numerous metasyntactic variables found in Great Britain and the Commonwealth.
...全文
198 22 打赏 收藏 转发到动态 举报
写回复
用AI写文章
22 条回复
切换为时间正序
请发表友善的回复…
发表回复
bmj 2003-08-16
  • 打赏
  • 举报
回复
太长了,没心情看下去了,楼主能不能翻译一下?
MaiCle 2003-08-16
  • 打赏
  • 举报
回复
楼主:KennyYuan (我是白菜) 你不晕?你就用中文解释一下给大伙看看嘛。
lemon520 2003-08-16
  • 打赏
  • 举报
回复
看不懂呀!
先收藏!
顶!^_^
代码之诗 2003-08-09
  • 打赏
  • 举报
回复
偶译了几行,发现口语不少,偶译不了。
所以,也来晕……
bm1408 2003-08-07
  • 打赏
  • 举报
回复
有没有人把它翻译成中文!
yjh1982 2003-08-07
  • 打赏
  • 举报
回复
不晕......倒!
KennyYuan 2003-08-07
  • 打赏
  • 举报
回复
不是吧?晕什么?

这些知识很有用的呀!
meijing 2003-08-06
  • 打赏
  • 举报
回复
厉害厉害
OSNC_17 2003-08-06
  • 打赏
  • 举报
回复
I am here !
pengzhenwanli 2003-08-06
  • 打赏
  • 举报
回复
looking
bgu 2003-08-06
  • 打赏
  • 举报
回复
帮忙晕!
Riemann 2003-08-06
  • 打赏
  • 举报
回复
偶也晕~~~~~
98440622 2003-08-06
  • 打赏
  • 举报
回复
晕~~~~~~~~~~~~~~
hlnpro 2003-08-06
  • 打赏
  • 举报
回复
e文好多啊!
KennyYuan 2003-08-06
  • 打赏
  • 举报
回复
xyzzy /X-Y-Z-Z-Y/, /X-Y-ziz'ee/, /ziz'ee/, or /ik-ziz'ee/ adj.

[from the ADVENT game] The canonical `magic word'. This comes from ADVENT, in which the idea is to explore an underground cave with many rooms and to collect the treasures you find there. If you type `xyzzy' at the appropriate time, you can move instantly between two otherwise distant points. If, therefore, you encounter some bit of magic, you might remark on this quite succinctly by saying simply "Xyzzy!" "Ordinarily you can't look at someone else's screen if he has protected it, but if you type quadruple-bucky-clear the system will let you do it anyway." "Xyzzy!" It's traditional for xyzzy to be an Easter egg in games with text interfaces.

Xyzzy has actually been implemented as an undocumented no-op command on several OSes; in Data General's AOS/VS, for example, it would typically respond "Nothing happens", just as ADVENT did if the magic was invoked at the wrong spot or before a player had performed the action that enabled the word. In more recent 32-bit versions, by the way, AOS/VS responds "Twice as much happens".

Early versions of the popular `minesweeper' game under Microsoft Windows had a cheat mode triggered by the command `xyzzy<enter><right-shift>' that turns the top-left pixel of the screen different colors depending on whether or not the cursor is over a bomb. This feature temporarily disappeared in Windows 98, but reappeared in Windows 2000.

The following passage from "The Wonderful Wizard of Oz" by L. Frank Baum, suggesting a possible pre-ADVENT origin, has recently come to light:

"Ziz-zy, zuz-zy, zik!" said Dorothy, who was now standing on both feet. This ended the saying of the charm, and they heard a great chattering and flapping of wings, as the band of Winged Monkeys flew up to them.

The text can be viewed at Project Gutenberg.

PaulZhao 2003-08-06
  • 打赏
  • 举报
回复
好长的e,烦
KennyYuan 2003-08-06
  • 打赏
  • 举报
回复
●●●●●●●●●●●●●●●●●
●●●注意这个词,WWW的念法●●●
●●●●●●●●●●●●●●●●●



●wibble

[UK, perh. originally from the first "Roger Irrelevant" strip in "VIZ" comics, spread via "Your Sinclair magazine in the 1980s and early 1990s"] 1. n.,v. Commonly used to describe chatter, content-free remarks or other essentially meaningless contributions to threads in newsgroups. "Oh, rspence is wibbling again". 2. [UK IRC] An explicit on-line no-op equivalent to humma. 3. One of the preferred metasyntactic variables in the UK, forming a series with wobble, wubble, and flob (attributed to the hilarious historical comedy "Blackadder"). 4. A pronounciation of the letters "www", as seen in URLs; i.e., www.foo.com may be pronounced "wibble dot foo dot com" (compare dub dub dub).
KennyYuan 2003-08-06
  • 打赏
  • 举报
回复
quux /kwuhks/ n.

[Mythically, from the Latin semi-deponent verb quuxo, quuxare, quuxandum iri; noun form variously `quux' (plural `quuces', anglicized to `quuxes') and `quuxu' (genitive plural is `quuxuum', for four u-letters out of seven in all, using up all the `u' letters in Scrabble).] 1. Originally, a metasyntactic variable like foo and foobar. Invented by Guy Steele for precisely this purpose when he was young and naive and not yet interacting with the real computing community. Many people invent such words; this one seems simply to have been lucky enough to have spread a little. In an eloquent display of poetic justice, it has returned to the originator in the form of a nickname. 2. interj. See foo; however, denotes very little disgust, and is uttered mostly for the sake of the sound of it. 3. Guy Steele in his persona as `The Great Quux', which is somewhat infamous for light verse and for the `Crunchly' cartoons. 4. In some circles, used as a punning opposite of `crux'. "Ah, that's the quux of the matter!" implies that the point is not crucial (compare tip of the ice-cube). 5. quuxy: adj. Of or pertaining to a quux.

yurius 2003-08-05
  • 打赏
  • 举报
回复
up
KennyYuan 2003-08-05
  • 打赏
  • 举报
回复
baz /baz/ n.

1. [common] The third metasyntactic variable "Suppose we have three functions: FOO, BAR, and BAZ. FOO calls BAR, which calls BAZ...." (See also fum) 2. interj. A term of mild annoyance. In this usage the term is often drawn out for 2 or 3 seconds, producing an effect not unlike the bleating of a sheep; /baaaaaaz/. 3. Occasionally appended to foo to produce `foobaz'.

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)."





谁帮我插入一个回复呀?我记得CSDN好像不允许连续发三次以上的贴子的,唉!
加载更多回复(2)

15,440

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧