The terms foobar (), foo, bar, baz, and others are used as metasyntactic variables and placeholder names in computer programming or computer-related documentation. They have been used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept.
== History and etymology ==
It is possible that foobar is a playful allusion to the World War II-era military slang FUBAR (Fucked Up Beyond All Repair).According to an Internet Engineering Task Force RFC, the word FOO originated as a nonsense word with its earliest documented use...
That is a combination of two commonly used metasyntactic variables. en.wikipedia.org/wiki/Metasyntactic_variable in layman's terms "we don't really know what to call this and it doesn't matter anyway". Origin is down the Wikipedia rabbit hole.
"[one possible origin is] related to the Chinese word fu ("福", sometimes transliterated foo, as in foo dog), which can mean happiness or blessing." Oh good, so I've been infusing my programs with blessings this whole time.
A computer is sand that we have tricked into thinking. It might harbor a grudge about that, so one ought to placate it with offerings.
To add an additional parallel thread of pedanticness, I'm pretty sure silicon makes up the green part of the microchip, which current does not typically flow through directly
You want the copper-colored parts for that
(confidence that this was ever true for commercial-grade chips: 70%)
"There is sand here" gets hazy at the atomic level, what with the uncertainty principle, but "there is sand in this general area, with 99% likelihood" counts as information I think
This ties back into the information density/entropy thing from the other day. I vaguely recall reading about how you could, in principle, turn information into energy directly. I didn't understand any of it.
The device that is commonly referred to as computer is just sand that has been forced, through manufacturing, to retain information originated through electric pulses.
We know from the other military acronym, SNAFU, that everything being F'ed up is a familiar, comfortable, neutral state. One might think of foo as a serene acceptance of the world's chaotic nature
For a nonsense verb I like "reticulate", which comes from the nonsense message "reticulating splines..." that appears during loading screens in SimCity and The Sims
And frobnicate, which I simply lifted straight out of the Jargon File
The phrasing "I honestly use whatever" gave me the idea of using valley girl talk as placeholders which in turn reminded me of something I learned of recently jon.how/likepython
Currently reading a tutorial on working with a particular API. A few paragraphs in, it says, "This is where the app ID and secret key you noted earlier come into play." This is the first time that "app ID" and "secret key" appear in the document.
The secret key is so secret that even the instructions for finding it are secret
Initial impression is "Oh look someone reinvented COBOL" which was (partially) designed to be easy to use by English-speakers and borrows constructs from the English language.
Can someone give me some advice on this. I replied no, because I have never seen a callback function return anything that can be used later on, but can it really return something?
to me, it's more like "Everything is possible" which also encompasses "Everything is impossible", because, If everything is truly possible, then it also has to encompass impossibility and vise-versa. Also adding "it depends" into it make the blessing work better
all of that, only specifically when it comes to programming
it's because they are each their own limits. For the "everything is possible", it's as described above, but for the reverse, it's more like "if everything is truly impossible, then it's impossible that there is no way to do X"
Poking through the tkinter code... When the user clicks on a button, the tk engine notifies tkinter, and tkinter calls the callback, and hands its return value back to the tk engine. I don't know what the tk engine does with it, if anything.
I worry that the OP of that question would look at this code and say, "no no, I don't want to see the return value while I'm inside idle. I want to see it right after I call tkinter.Button(root, command=clicked)." This is a problem, because right after tkinter.Button executes, the program has been running for about one millisecond and the window isn't even visible to the user yet. It's logically impossible to know what the callback is going to return a trillion CPU cycles into the future.
Re: "[the name of the callback is the] name of the function and the memory location I assume". You're right. Here's how tkinter decides the cbname of a callback:
@AndrasDeak True, but it depends on the framework. In GTK, callbacks for event handlers can return a bool to indicate whether they successfully handled the event. If the event wasn't successfully handled, the event gets passed up to the parent widget.
That allows multiple widgets in a hierarchy to respond to the same event. It's similar to how exceptions can bubble up, until some handler proclaims "the buck stops here".