Origin of japanese metasyntactic variables 「ほげ」


[Metasyntactic
variables](https://en.wikipedia.org/wiki/Metasyntactic_variable) are using in
programming as placeholders. Wikipedia mentions several Japanese words used in
this fashion, and I would like to know how they came about.

  * [ほげ - hoge](https://jisho.org/word/%EF%BD%88%EF%BD%8F%EF%BD%87%EF%BD%85)
  * [ぴよ - piyo](https://jisho.org/search/%E3%81%B4%E3%82%88)
  * [ふが - fuga](https://jisho.org/search/%E3%81%B5%E3%81%8C)
  * [ほげら - hogera](https://jisho.org/search/%E3%81%BB%E3%81%92%E3%82%89)
  * [ほげほげ - hogehoge](https://jisho.org/search/%E3%81%BB%E3%81%92%E3%81%BB%E3%81%92)*

*this one seems obvious; it just repeats the first word twice.




There's one I can't find much about, but I think I've determined the basis for
most of your list. Here it is, regrouped a bit:

>   * ほげ - hoge
>   * ほげら - hogera
>   * ほげほげ - hogehoge
>   * ふが - fuga
>   * ぴよ - piyo
>

The first three are all variations on _hoge_. Digging around, this appears to
derive from the verb _hogeru_ , "a hole opens up, a hole appears; to fall
apart". Since the metasyntactic variable is really a _place_ holder, or a kind
of stop _gap_ for the actual variable to be used in the programmer's own code,
this _hoge_ is a "hole" for the programmer to fill. Alternatively, since the
"hole" meaning might be archaic or dialectal, this might arise instead from
the "fall apart" sense as a sort of
[calque](https://en.wikipedia.org/wiki/Calque) of the English metasyntactic
variables _foo_ and _bar_ , presumably from [_fubar_](https://www.merriam-
webster.com/dictionary/fubar) in reference to things having "fallen apart"
(rather dramatically).

_Hoge **ra**_ would then be _hoge_ + suffix _-ra_ , often used as a pluralizer
or generalizer (as in _kochi **ra**_ , _soko **ra** -hen_, etc.).

_Hogehoge_ , as you noted, is just _hoge_ reduplicated.

  * See also [the Weblio entry for ほげ](https://www.weblio.jp/content/%E3%81%BB%E3%81%92), [the Weblio entry for ほげる](https://www.weblio.jp/content/%E3%81%BB%E3%81%92%E3%82%8B), and [the Kotobank entry for ほげる](https://kotobank.jp/word/%E3%81%BB%E3%81%92%E3%82%8B-383338).

_Fuga_ , meanwhile, looks like half of _fugafuga_ , "blathering, spluttering".
As a generic term of "something that doesn't have any particular meaning of
its own", this makes sense to use as a metasyntactic variable name.

  * See [Weblio](https://www.weblio.jp/content/%E3%81%B5%E3%81%8C%E3%81%B5%E3%81%8C) and [Kotobank](https://kotobank.jp/word/%E3%81%B5%E3%81%8C%E3%81%B5%E3%81%8C-616787) for ふがふが.

Lastly, _piyo_ only shows up, as far as I can tell, in _piyopiyo_ as an
[onomatopoeia](https://en.wiktionary.org/wiki/onomatopoeia#English) for the
sound of chicks chirping or tweeting. This might be used in a similar fashion
as _fuga_ , as "something that doesn't have any particular meaning of its
own".

  * See [Weblio](https://www.weblio.jp/content/%E3%81%B4%E3%82%88%E3%81%B4%E3%82%88) and [Kotobank](https://kotobank.jp/word/%E3%81%B4%E3%82%88%E3%81%B4%E3%82%88-613682) for ぴよぴよ.

That said, the above is only my best guess based on the minimal research I've
done to date. I haven't found a source that clearly states, "this
metasyntactic variable name comes from XYZ..." for any of the above. The
Japanese Wikipedia article on メタ構文変数 [explicitly mentions _hoge_ and
_piyo_](https://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%BF%E6%A7%8B%E6%96%87%E5%A4%89%E6%95%B0#hoge%E3%81%A8piyo),
but about their origins, it only states that 「起【き】源【げん】は定【さだ】かではない」 ("the
origins aren't certain").




There's one I can't find much about, but I think I've determined the basis for
most of your list. Here it is, regrouped a bit:

>   * ほげ - hoge
>   * ほげら - hogera
>   * ほげほげ - hogehoge
>   * ふが - fuga
>   * ぴよ - piyo
>

The first three are all variations on _hoge_. Digging around, this appears to
derive from the verb _hogeru_ , "a hole opens up, a hole appears; to fall
apart". Since the metasyntactic variable is really a _place_ holder, or a kind
of stop _gap_ for the actual variable to be used in the programmer's own code,
this _hoge_ is a "hole" for the programmer to fill. Alternatively, since the
"hole" meaning might be archaic or dialectal, this might arise instead from
the "fall apart" sense as a sort of
[calque](https://en.wikipedia.org/wiki/Calque) of the English metasyntactic
variables _foo_ and _bar_ , presumably from [_fubar_](https://www.merriam-
webster.com/dictionary/fubar) in reference to things having "fallen apart"
(rather dramatically).

_Hoge **ra**_ would then be _hoge_ + suffix _-ra_ , often used as a pluralizer
or generalizer (as in _kochi **ra**_ , _soko **ra** -hen_, etc.).

_Hogehoge_ , as you noted, is just _hoge_ reduplicated.

  * See also [the Weblio entry for ほげ](https://www.weblio.jp/content/%E3%81%BB%E3%81%92), [the Weblio entry for ほげる](https://www.weblio.jp/content/%E3%81%BB%E3%81%92%E3%82%8B), and [the Kotobank entry for ほげる](https://kotobank.jp/word/%E3%81%BB%E3%81%92%E3%82%8B-383338).

_Fuga_ , meanwhile, looks like half of _fugafuga_ , "blathering, spluttering".
As a generic term of "something that doesn't have any particular meaning of
its own", this makes sense to use as a metasyntactic variable name.

  * See [Weblio](https://www.weblio.jp/content/%E3%81%B5%E3%81%8C%E3%81%B5%E3%81%8C) and [Kotobank](https://kotobank.jp/word/%E3%81%B5%E3%81%8C%E3%81%B5%E3%81%8C-616787) for ふがふが.

Lastly, _piyo_ only shows up, as far as I can tell, in _piyopiyo_ as an
[onomatopoeia](https://en.wiktionary.org/wiki/onomatopoeia#English) for the
sound of chicks chirping or tweeting. This might be used in a similar fashion
as _fuga_ , as "something that doesn't have any particular meaning of its
own".

  * See [Weblio](https://www.weblio.jp/content/%E3%81%B4%E3%82%88%E3%81%B4%E3%82%88) and [Kotobank](https://kotobank.jp/word/%E3%81%B4%E3%82%88%E3%81%B4%E3%82%88-613682) for ぴよぴよ.

That said, the above is only my best guess based on the minimal research I've
done to date. I haven't found a source that clearly states, "this
metasyntactic variable name comes from XYZ..." for any of the above. The
Japanese Wikipedia article on メタ構文変数 [explicitly mentions _hoge_ and
_piyo_](https://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%BF%E6%A7%8B%E6%96%87%E5%A4%89%E6%95%B0#hoge%E3%81%A8piyo),
but about their origins, it only states that 「起【き】源【げん】は定【さだ】かではない」 ("the
origins aren't certain").

