RE: Foo (Bar)---I now see the light! (Or that which is made lig ht of)
Have a look at the Jargon File (google for an updated version). A foobar-specific link is http://www.catb.org/%7Eesr/jargon/html/F/foobar.html Adrian Ichim -Original Message- From: jason corbett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 8:14 PM To: perl beginners Subject: Foo (Bar)---I now see the light! (Or that which is made light of) jason corbett [EMAIL PROTECTED] wrote: As a newbie, I have seen the statement foo (bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its just for examples. If I am wrong please explain in detail what this is about. Thanks, JC - ** PLEASE NOTE: The above email address has recently changed from a previous naming standard -- if this does not match your records, please update them to use this new name in future email addressed to this individual.This message and any attachments are intended for the individual or entity named above. If you are not the intended recipient, please do not forward, copy, print, use or disclose this communication to others; also please notify the sender by replying to this message, and then delete it from your system. The Timken Company ** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Foo (Bar)
On Wed, 8 Sep 2004, jason corbett wrote: As a newbie, I have seen the statement foo(bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its just for examples. If I am wrong please explain in detail what this is about. Is your question about the names, or the syntax construction? The names foo and bar (and variants -- baz, bat, foobar, etc) are common stubs that are often used in throwaway code, for demos and examples, for names to be filled in later, etc. Just as algebra problems often use x and n for arbitrary variables, many Perl programmers use foo and bar for arbitrary variables. As for the construct, `this( that )` is a subroutine / function call, where the language defined function or the programmer defined sub (or library module defined method) called this is being called with the parameter / argument that. Or, in your example, foo and bar instead of this and that. Generally, if you see the phrase foo(bar), exactly like that, in documentation, then the writer is just making some kind of example, perhaps about what typical subroutine calls look like. (Note though that this example probably wouldn't actually work, because 'bar' here is a bareword, rather than a quoted string or a variable, so Perl might complain about passing it as an argument because it's not clear what should be done with bar; if it should be treated as a string, it should be wrapped in single- or double-quotes, and if it is a variable then it needs a prefix ($ @ % ). ) Make sense, or is something still unclear ? -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: Foo (Bar)
Jason: Foo bar (or just foobar) are terms of varied origins simply meant to express 'this thing' as in 'in function foo what will the output be given argument bar'. (Compare also to: x (y)) There are many explanations for the origin of the term, and most are captured at one of the two following links: FOLDOC (Free Online Dictionary Of Computing) http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=foo The Jargon File http://catb.org/~esr/jargon/html/F/foo.html http://catb.org/~esr/jargon/html/F/foobar.html Hope this helps. Matt -Original Message- From: jason corbett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:43 PM To: perl beginners Subject: Foo (Bar) As a newbie, I have seen the statement foo (bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its just for examples. If I am wrong please explain in detail what this is about. Thanks, JC -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Foo (Bar)
in short , foo bar baz etc. just mean 'something', 'another something' whatever is discussing about.for more, check results in google.com for 'metasyntactic variables' HTH - Original Message - From: jason corbett [EMAIL PROTECTED] To: perl beginners [EMAIL PROTECTED] Sent: Thursday, September 09, 2004 12:42 AM Subject: Foo (Bar) As a newbie, I have seen the statement foo (bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its just for examples. If I am wrong please explain in detail what this is about. Thanks, JC -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Foo (Bar)
On Wed, 8 Sep 2004, jason corbett wrote: As a newbie, I have seen the statement foo(bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its just for examples. If I am wrong please explain in detail what this is about. Is your question about the names, or the syntax construction? The names foo and bar (and variants -- baz, bat, foobar, etc) are common stubs that are often used in throwaway code, for demos and examples, for names to be filled in later, etc. Just as algebra problems often use x and n for arbitrary variables, many Perl programmers use foo and bar for arbitrary variables. Not just Perl programmers: http://jargon.watson-net.com/jargon.asp?w=metasyntactic%20variable http://jargon.watson-net.com/jargon.asp?w=foo As for the construct, `this( that )` is a subroutine / function call, where the language defined function or the programmer defined sub (or library module defined method) called this is being called with the parameter / argument that. Or, in your example, foo and bar instead of this and that. Generally, if you see the phrase foo(bar), exactly like that, in documentation, then the writer is just making some kind of example, perhaps about what typical subroutine calls look like. (Note though that this example probably wouldn't actually work, because 'bar' here is a bareword, rather than a quoted string or a variable, so Perl might complain about passing it as an argument because it's not clear what should be done with bar; if it should be treated as a string, it should be wrapped in single- or double-quotes, and if it is a variable then it needs a prefix ($ @ % ). ) 'Sigil' rather than 'prefix'... (distinguishing the two will eventually become necessary it seems) Make sense, or is something still unclear ? http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Foo (Bar)
Hi, On Wed, 8 Sep 2004, jason corbett wrote: As a newbie, I have seen the statement foo (bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its justfor examples. If I am wrong please explain in detail what this is about. I read somewhere, that it stands for F**ked Beyond All Recognition. :) Senthil -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: Foo (Bar)
jason corbett wrote: As a newbie, I have seen the statement foo (bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its just for examples. If I am wrong please explain in detail what this is about. http://www.catb.org/~esr/jargon/html/M/metasyntactic-variable.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Foo (Bar)
On Wed, 8 Sep 2004, Wiggins d Anconia wrote: On Wed, 8 Sep 2004, jason corbett wrote: Just as algebra problems often use x and n for arbitrary variables, many Perl programmers use foo and bar for arbitrary variables. Not just Perl programmers: http://jargon.watson-net.com/jargon.asp?w=metasyntactic%20variable http://jargon.watson-net.com/jargon.asp?w=foo [] if it should be treated as a string, it should be wrapped in single- or double-quotes, and if it is a variable then it needs a prefix ($ @ % ). ) 'Sigil' rather than 'prefix'... Well, yes, to both points. I was trying to err on the side of minimal jargon only Perl, but of course you're right: lots of languages use the foo/bar variable name idiom, and the term for the character that precedes one of Perl's nouns is sigil. (In this context, I'm treating a subroutine [that does something] as a noun, not thinking about how verby they are, in order to be consistent with the other uses of sigils.) -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: Foo (Bar)
Bob Showalter wrote: http://www.catb.org/~esr/jargon/html/M/metasyntactic-variable.html Oops, sorry. Didn't realize someone already posted that link. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: Foo (Bar)
-Original Message- From: M Senthil Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 9:53 AM To: jason corbett Cc: perl beginners Subject: Re: Foo (Bar) Hi, On Wed, 8 Sep 2004, jason corbett wrote: As a newbie, I have seen the statement foo (bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its justfor examples. If I am wrong please explain in detail what this is about. I read somewhere, that it stands for F**ked Beyond All Recognition. :) Senthil Yeah, FUBAR. F'd Up Beyond All Repair. It originated in the American military in WWII. As an acronym it was a natural to be adapted to the world of computing. :) --Walt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Foo (Bar)
Wiggins == Wiggins d Anconia [EMAIL PROTECTED] writes: Wiggins Not just Perl programmers: Wiggins http://jargon.watson-net.com/jargon.asp?w=metasyntactic%20variable Wiggins http://jargon.watson-net.com/jargon.asp?w=foo It's because of the overuse of Foo and Bar that I chose Fred and Barney in the first edition of Learning Perl. I had originally put Foo and Bar in many examples, but was watching some cable network like WTBS (this was before Cartoon Network) in the background and kept hearing Fred and Barney in place of Foo and Bar. So, I did a global substitute of Fred for Foo, and Barney for Bar, and then cleaned up the text. Once that gelled out, I started using the rest of the Flintstones as a theme for the examples that had not been written. And that's how it got started. When Perl5 came along, the tradition continued into the manpages, using Flintstones, Jetsons, and Simpsons. And when Stonehenge instructors wrote the other materials, we picked different themes, like the Gilligan's Island references for the Alpaca (Learning Perl volume 2). So, there you have it. Foo/Bar = Fred/Barney, and the rest is history. Eric Raymond once asked if I had invented this mapping, or if I had copied it from some British documentation he had seen. But my response (roughly the above) has not yet made it into ESR's Hackers Dictionary. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Foo (Bar)---I now see the light! (Or that which is made light of)
From dictionary.com : jargon Another common metasyntactic variable; see foo. Hackers do *not* generally use this to mean FUBAR in either the slang or jargon sense. According to a german correspondent, the term was coined during WW2 by allied troops who could not pronounce the german word furchtbar (horrible, terrible, awful). Interesting :-) Because whenever I write foobar, I don't mean horrible, terrible nor awful :-) On Wed, 2004-09-08 at 18:13, jason corbett wrote: jason corbett [EMAIL PROTECTED] wrote: As a newbie, I have seen the statement foo (bar) mentioned in books and and even on this site. I haven't yet seen what this actually mean as I can assume that its just for examples. If I am wrong please explain in detail what this is about. Thanks, JC -- José Alves de Castro [EMAIL PROTECTED] http://natura.di.uminho.pt/~jac signature.asc Description: This is a digitally signed message part
Re: Foo (Bar)---I now see the light! (Or that which is made light of)
On Wed, 8 Sep 2004, Jose Alves de Castro wrote: From dictionary.com : jargon Another common metasyntactic variable; see foo. Hackers do *not* generally use this to mean FUBAR in either the slang or jargon sense. According to a german correspondent, the term was coined during WW2 by allied troops who could not pronounce the german word furchtbar (horrible, terrible, awful). Interesting :-) Because whenever I write foobar, I don't mean horrible, terrible nor awful :-) The Jargon File is a decent source of background information on what terms mean and where they may have come from, but when it branches out into speculation about what people do or don't mean, or think, or believe, or whatever, well, keep in mind that it is largely filtered through the prism of how Eric Raymond, self-appointed spokesperson anthropoligist for all things Free Software, sees things. More often than not, he is dead wrong. In this case, the definition is basically correct -- most people are aware of the foobar -- fubar -- 'f*cked up beyond all recognition idea, but it isn't what they're alluding to in selecting foo and bar as variable names. But the idea that it is a corruption of furchtbar is grasping a little -- it may be true, but it isn't the widely accepted origin of the term. More broadly though, when the Jargon File starts going off about hackers think that... -- that's when you stop reading and go on to the next entry, because everything that follows should more accurately be prefixed with Eric Raymond thinks that... and, well, why bother? :-) -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: foo-bar
On Monday 02 September 2002 5:54 am, Alex B. wrote: Hello list, this is a very simple question: what does FOO or BAR or FOOBAR mean??? I've seen it on t-shirts (perl), my programming perl book, programming CGI with perl, and even learning perl... now, does FOO have any meaning? - sounds almost like: whuzup, foo(l)! :) Have a look at: http://www.tuxedo.org/~esr/jargon/ Ttis is a very good source of information such highly technical terms as foo and bar -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: foo-bar
Alex B. [EMAIL PROTECTED] wrote: this is a very simple question: what does FOO or BAR or FOOBAR mean??? http://info.astrian.net/jargon/terms/f/foo.html -- Steve perldoc -qa.j | perl -lpe '($_)=m((.*))' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: $foo
lol. This should help explain. http://whatis.techtarget.com/definition/0,,sid9_gci212139,00.html When you see something like $foo = $_; It means that someone is taking the value of the default variable ($_) and assiging in to another scalar. In this case, $foo, but it could just as easily be $someName. The default variable is more often than not invisible in scripts. For example @array = qw(one two three); foreach (@array) { print; } In that code, then default variable appears twice. Can't see it?? That's because most of the perl operators default to working with the default operator if no other is assigned. The code above does exactly the same as this @array = qw(one two three); foreach $_ (@array) { print $_; } And if you want make it clear which variable you are working with you can do either @array = qw(one two three); foreach $someName (@array) { print $somName; } which assigns each element in turn to $someName or... @array = qw(one two three); foreach (@array) { $someName = $_; print $someName; } which assigns each element in turn to $_, then you are taking that value and assiging it to $someName within the loop and working with that new value. HTH John -Original Message- From: Susan Aurand [mailto:[EMAIL PROTECTED]] Sent: 15 February 2002 14:49 To: [EMAIL PROTECTED] Subject: $foo I am learning Perl, so this may seem a dumb question to the advance Perl Programmers. What exact purpose does $foo do? Example $foo=$_. What benefit do I get from making the input string $foo? Every place I look I do not get a clear understanding or picture of $foo. Thank you Susan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --Confidentiality--. This E-mail is confidential. It should not be read, copied, disclosed or used by any person other than the intended recipient. Unauthorised use, disclosure or copying by whatever medium is strictly prohibited and may be unlawful. If you have received this E-mail in error please contact the sender immediately and delete the E-mail from your system. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: $foo
From: Susan Aurand [EMAIL PROTECTED] I am learning Perl, so this may seem a dumb question to the advance Perl Programmers. What exact purpose does $foo do? Example $foo=$_. What benefit do I get from making the input string $foo? Every place I look I do not get a clear understanding or picture of $foo. Thank you Susan I think it's good to think about $_ as if it was a pronoun You. s/hello/hi/g; === Hey you there change all hellos to his! chomp; === Hey you drop the end-fo-line! ... Now it you only work with one variable and the part of code is short it's OK to use $_ ... since you'll know which you do you mean. But as soon as the code gets more complex, you pass the variable around or you have some internal loops with their own you ... you'll soon loose track who are you shouting at at the moment. Then it's good to name the variable at last. So that you know when do you speak to Mary and when to Robin :-) Jenda P.S.: If the question was more about why the heck do they use foo, what does that name mean. ... then .. the name foo doesn't mean anything. Foo is used in place of a real name of variable in examples and similar places. Basicaly it's also kind of ... pronoun. === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz == There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: foo bar?
actually, ww2 veterans are thought to have originated it. 'fucked up beyond all recognition'. Jos Boumans wrote: it comes from the vietnam war iirc (watch full metal jacket if you want some 'insight' ;-) it is originally 'fubar' or Fucked Up Beyond Any Recognition (pardon the expletives) so, us perl geeks use 'foo' and 'bar' as standard variable names in examples now... So much for a short stroll thru history =) Regards, Jos Boumans ber kessels wrote: Hi, Maybe a silly question but where does foo-bar or foobar refer to? Everyone uses it in perl, but I cannot find the origin of it. I am not english (I am Duch), but even my english teacher didn't know it, he had even never heard of it. I am just curious that's all. Thanx for reading Ber _ STRUIKDUIK IS VERNIEUWD (er staat nu dus iets) http://struikduik.tripod.com telefoon: ++31625181320 adres: Capadosestraat 51 2623 AD Den Haag Get your wireless addressbook at room33. http://room33.com
Re: foo bar?
On Wed, 16 May 2001, ber kessels wrote: Maybe a silly question but where does foo-bar or foobar refer to? Everyone uses it in perl, but I cannot find the origin of it. I am not english (I am Duch), but even my english teacher didn't know it, he had even never heard of it. foo and bar are, to put it simply, the canonical metasyntactic variables used in programming examples. :-) You see thenm used all the time in C coding examples: Take function foo and pass it value bar... The actual phrase supposedly derives from an old (probably US) Army term FUBAR -- Fouled[0] Up Beyond All Recognition. -- Brett [0] Or any other F word you choose to use to indicate a bad situation
Re: foo bar?
: Maybe a silly question but where does foo-bar or foobar refer to? : : Everyone uses it in perl, but I cannot find the origin of it. See the entry in the Hacker Jargon file: http://www.tuxedo.org/~esr/jargon/html/entry/foo.html -- tdk
Re: foo bar?
This is in the jargon file: http://www.tuxedo.org/~esr/jargon/html/entry/foobar.html Cheers, Kevin On Wed, May 16, 2001 at 09:07:11AM -0400, Brett W. McCoy ([EMAIL PROTECTED]) spew-ed forth: On Wed, 16 May 2001, ber kessels wrote: Maybe a silly question but where does foo-bar or foobar refer to? Everyone uses it in perl, but I cannot find the origin of it. I am not english (I am Duch), but even my english teacher didn't know it, he had even never heard of it. foo and bar are, to put it simply, the canonical metasyntactic variables used in programming examples. :-) You see thenm used all the time in C coding examples: Take function foo and pass it value bar... The actual phrase supposedly derives from an old (probably US) Army term FUBAR -- Fouled[0] Up Beyond All Recognition. -- Brett [0] Or any other F word you choose to use to indicate a bad situation -- [Writing CGI Applications with Perl - http://perlcgi-book.com] As the fletcher whittles and makes straight his arrows, so the master directs his straying thoughts. -- Buddha
Re: foo bar? -Reply
Actually, the American military acronym 'fubar' goes back at least to World War II. The use of 'foo' and 'bar' as metasyntactic variables probably dates to the the lisp hackers at the MIT AI lab in the 50's or 60's , before unix. Foo and bar function like 'x' or 'n' in the traditional mathematical exposition 'let x = n. They remain in common usage in the unix world and its derivatives, because of their brevity and style. Jos Boumans [EMAIL PROTECTED] 05/16 8:33 am it comes from the vietnam war iirc (watch full metal jacket if you want some 'insight' ;-) it is originally 'fubar' or Fucked Up Beyond Any Recognition (pardon the expletives) so, us perl geeks use 'foo' and 'bar' as standard variable names in examples now... So much for a short stroll thru history =) Regards, Jos Boumans ber kessels wrote: Hi, Maybe a silly question but where does foo-bar or foobar refer to? Everyone uses it in perl, but I cannot find the origin of it. I am not english (I am Duch), but even my english teacher didn't know it, he had even never heard of it. I am just curious that's all. Thanx for reading Ber _ STRUIKDUIK IS VERNIEUWD (er staat nu dus iets) http://struikduik.tripod.com telefoon: ++31625181320 adres: Capadosestraat 51 2623 AD Den Haag Get your wireless addressbook at room33. http://room33.com