Gathatoulie

And of these shall I speak to those eager, That quality of wisdom that all the wise wish And call creative qualities And good creation of the mind The all-powerful truth Truly and that more & better ways are discovered Towards perfection --Zarathustra.

Sunday, January 16, 2011

anatomy of a callback

"The 'Call back' is usually the first time everybody making the
commercial has been in the same room together, thus it's no surprise
that lines and action get changed or re-worked. So you may walk in to
see you have been rehearsing the wrong sides, or you might get asked
to read for a different part on the spot. This is all business as
usual, so be ready for it." --
http://commercialsuccessresource.blogspot.com/2009/03/anatomy-of-callback.html

D'oh - not that kind of callback!

At http://tanks4code.blogspot.com/2008/07/c-style-callbacks-in-c-code.html
there a kind of complicated object-oriented scenario is described,
indicating that a "callback" is quite similar to a "hook" but also a
bit like a "closure".

So then... from
http://stackoverflow.com/questions/615907/how-is-a-closure-different-from-a-callback:

"The bit that makes it a closure, is when that function accesses
anything on the context where it lives, like variables outside it."

And from here: http://stackoverflow.com/questions/2070275/javascript-closures-and-callbacks,

"Callbacks are a simpler concept. A callback is basically where a
function accepts another function as a parameter. At some point during
execution the called function will execute the function passed as a
parameter, this is a callback."

They further remark:

"Quite often the reason that closures get created (either
incidentally, accidentally or deliberately) is the need to create a
callback. [... some code defining a function ...] A closure is
created containing in part the 'message' parameter; 'fn' is executed
[on delay] quite some time after the call to 'AlertThisLater' has
returned, yet 'fn' still has access to the original content of
'message'."

So, that's the scoop on that: a "callback" is when a function executes
another function that is one of its arguments, and a "closure" is when
a function executes another function (whether it was initially passed
in as an argument or not) that continues to have access to the scope
of the original function.

OK, not so bad, but still it seems so much more *comprehensible* in
LISP, where one wouldn't geverally bother thinking about whether the
thing was a "closure" or not - one would just put some local variables
to a lambda, then pass that lambda as an argument to another function,
and be done with it.

Friday, January 14, 2011

BDGBTW

Do you like girls or boys
It's confusing these days...
They sat together in the park
As the evening sky grew dark,
holding hands in the moonlight.
There was silence between them.
Silence to say goodbye.
(And the wall won't come down,
until they're no longer afraid of themselves.)

Thursday, January 13, 2011

when reviewing or writing a paper

Two thematic questions one could ask about any paper are:

(1) What problem and solution does the paper
describe? (What have the authors themselves learned?)

(2) What problem does the paper itself solve?
(What do the authors want the readers to learn from
reading the paper?)

Monday, January 10, 2011

paul coelho on being read

"I always thought that when, at the beginning of your career, you
strive to be read, you can't change your mind later and become greedy
about it" -- http://www.newsweek.com/2008/02/05/free-speech.html

Wednesday, January 5, 2011

like a chronically stressed rat looking for sugar

"Bike Messengers face death on a constant basis. And what do they
receive in return. Harassment, ridicule and getting ripped off[,] and
this is from the companies they work for. Bike Messengers are paid by
the amount of packages they can pick up and drop off in a given day.
This is why they usually look like a rat on crack. All jittery and
looking for sugar." -- "Those Crazy Messengers", Hideousewhitenoise
#56, 2003, by Mr Forehead,
http://www.messmedia.org/Toronto/hwn56-crazy.html

"Extrapolating from the observations that positive emotional
experiences boost the immune system, Roberts speculates that intensely
positive emotional experiences –- sometimes brought about during
mystical experiences occasioned by psychedelic medicines -- may boost
the immune system powerfully. Research on salivary IgA supports this
hypothesis, but experimental testing has not been done." --
http://en.wikipedia.org/wiki/Psychoneuroimmunology, citing
Thomas B. Roberts (2006). "Do Entheogen-induced Mystical Experiences Boost the Immune System?: Psychedelics, Peak Experiences, and Wellness." Chapter 6 in Psychedelic Horizons. Westport, CT: Praeger/Greenwood.

Even if the connection to psychedelia is "as fine as powdered doll
shit" [0], it seems like a good idea to look around for positive
emotional experiences as a general contribution to health and
wellness. And perhaps also to look for any associations between
negative emotional experiences and a downturn in general health.

In a glance through this "negative" lens, we find some research with
an interesting extrapolation of that thought, namely that exposure to
"chronic stress" can sap an individual's ability to select actions
based on the consequences of those actions, and instead causes the
stressed person (or rat) to fall back on habit [1]. The conclusion of
[1] is quoted below in full (minus citations, for readability):

"Optimization of decision-making processes confers an important
advantage in response to a constantly changing environment. The
ability to select the appropriate actions on the basis of their
consequences and on our needs at the time of the decision allows us to
respond in an efficient way to changing situations. However, the
continuous control and attention that this process demands can result
in an unnecessary expenditure of resources and can be inefficient in
many situations. For instance, when behavior is repeated regularly for
extensive periods without major changes in outcome value or
contingency, or under uncertain situations where we cannot manipulate
the probability of obtaining an outcome, general rules and habits can
be advantageous. Thus, the more rapid shift to habits after chronic
stress could be a coping mechanism to improve performance of
well-trained behaviors, while increasing the bioavailability to
acquire and process new information, which seems essential for
adaptation to complex environments. However, when objectives need to
be re-updated in order to make the most appropriate choice, the
inability of stressed subjects to shift from habitual strategies to
goal-directed behavior might be highly detrimental. Such impairment
might be of relevance to understand the high comorbidity between
stress-related disorders and addictive behavior or compulsivity, but
certainly has a broader impact spanning activities from everyday life
decisions to economics."

One of the citations here is [2], which at 33 pages is effectively a
guidebook to stress, including a bit of "stress management".
Recommended reading. (Just now sitting on my desk as a printout.)

I now briefly return to the theme I suggested above: What if a negative
emotional experience is like a "hit" of "chronic stress", inasmuch as
it *temporarily* ratchets up the use of previously learned habits, and
ratchets down the learning of new patterns? As one becomes (perhaps
only briefly) more automaton- or puppet-like, "health" becomes
less and less of a viable facility and perhaps even an undefined
quantity.

To switch to the positive lens: Situations in which we are adaptable
(let's say, autonomous, not automaton-ish) could be taken to be the
very *definition* of health - and positive emotional experiences could
be found by ratcheting habit-use down, and pattern-learning up.
For some reason I'm reminded of "Rosencrantz and Guildenstern Are
Dead"... [3].

"There was a messenger.
Rosencrantz... Guildenstern...
We were sent for."

And for whatever reason, it cheers me up.

[1]: http://www.sciencemag.org/content/325/5940/621.full
[2]: http://physrev.physiology.org/content/87/3/873.full.pdf+html
[3]: http://www.script-o-rama.com/movie_scripts/r/rosencrantz-and-guildenstern-are-dead-script.html

Saturday, January 1, 2011

what are you adding?

It keeps occurring to me to post in various mailing lists

"Hey have you considered such-and-such?"

But it also occurs to me to stop myself. Is it really going to add
much? Perhaps not unless I actually have time to follow through and
actually implement the thing in question.

I don't see the point in talking in that way, if I'm just doing it to
hear myself talk. That's what blogs are for :)

1->2

"My philosophy basically reduces to the idea that
if one is good, two would be better."

(How many philosophies are really so different
from that?)

Blog Archive

words cut, pasted, and otherwise munged by joe corneli otherwise known as arided.