Quiz: Remember the definition of mal de mer?
"to vomit or retch,"1960, American English slang, probably imitative. Related: Barfed; barfing. As a noun, from 1966. Barf bag "air sickness pouch" attested from 1966.
An exclamation of strong disgust: You want to know what I think of it? Barf! (1970s+)verb
[Computer 1980s+; probably echoic]
/barf/ [mainstream slang for "vomit"] 1. Term of disgust. This is the closest hackish equivalent of the Val\-speak "gag me with a spoon". (Like, euwww!) See bletch.
2. To say "Barf!" or emit some similar expression of disgust. "I showed him my latest hack and he barfed" means only that he complained about it, not that he literally vomited.
3. To fail to work because of unacceptable input, perhaps with a suitable error message, perhaps not. Examples: "The division operation barfs if you try to divide by 0." (That is, the division operation checks for an attempt to divide by zero, and if one is encountered it causes the operation to fail in some unspecified, but generally obvious, manner.) "The text editor barfs if you try to read in a new file before writing out the old one".
See choke, gag.
In Commonwealth Hackish, "barf" is generally replaced by "puke" or "vom". barf is sometimes also used as a metasyntactic variable, like foo or bar.