filter(lambda W : W not in 'ILLITERATE','BULLSHIT') (Re : python expression)
Boris
borcis at removethis.infomaniak.andthis.ch
Sat Sep 21 08:40:44 EDT 2002
Terry Reedy <tjreedy at udel.edu> a écrit dans le message :
WSLi9.165658$z91.6788612 at bin3.nnrp.aus1.giganews.com...
>
> "Boris"
> >
> > filter(lambda W : W not in 'ILLITERATE','BULLSHIT')
>
> This somewhat-well-known and certainly well-worn programmer joke
Well, *I* invented this formula myself soon after Mr Bush revealed to
the world that "USA" is written in "CRUSADE" just like "US" is in
"BUSH". Adding : "Either you are with US, or you are against US".
It's not a joke, it's a comment on being called to participate to a folly
that is given no other justification than allusions to kindergarten
references that are specific to the US as a pretext to eg licking boots
to the - militarily speaking - most powerful man in the world, and
- intellectually speaking - most dangerous man in the world for a
man in that position.
The full form of it I have never published, and it is :
filter(lambda I : I not in 'USA','CRUSADE'
)==(
'C' + filter(lambda I : I not in 'U','RUDE')
) and (
filter(lambda W : W not in 'ILLITERATE','BULLSHIT'))
Since I invented it, I know exactly how much I distributed it myself,
and your I-am-expert-on-the-matter tone falls flat. I would rejoice
on the implication that it has been more widely distributed that
seems to stem from your words, except that, well, there is some
ground for me to doubt your good faith on that point.
Noticed BTW how the typhoon that recently befell Corea was
called RUSA ? US, BUSH, BULLSHIT ; USA, RUSA, CRUSADE
Speak of butterflies...
> functional programming expression, borrowed from Lisp, etc, that
> happens to have been written this time with Python syntax in
> preference to the Lisp or other FP syntax that could have been used
> instead. (A good choice for presentation to non-programmers, but
> that's another issue.) It has nothing to do with Python in
> particular.
That's about as precise as saying the following other semi-joke of mine
is base-dependent :
"12 ? - 12 is the least integer symbolizing the natural integers
by itself. Its successor is 123"
You know as well as I do that although it's clear that the computation
implied by filter(lambda W : W not in "ILLITERATE","BULLSHIT")
can be easily translated to another language, its more direct reading
highly depends on a layout and details of sequence behavior that
python provides and for which it is not a priori clear that immediate
equivalents are available in other programming languages.
> One could just as well justify cross-posting to lisp and
That would be true if the equivalent lisp one-liner existed, and *I* know
I never wrote a translation. Why don't you prove what you say by
providing one ?
But in any case you are probably right on one point : the
right way to advertise the thing is to open a competition
for translations into other programming languages. Then
we could actually measure the material ground of your
easy assertions.
> other functional programming groups, but please don't.
>
> > > and should never have been added.
> >
> > That's a dogmatic opinion that I believe lacking in justification.
>
> I base my opinion (which I still hold) on the complete lack of any
> particular relevance to Python, the computer programming language
I notice that you carefully avoided adressing my point on this
matter. What I pointed out in the message you fake responding to
[in a way, if I may say so, itself depicted in spirit by my formula]
is that the irony in filter(lambda W : W not in "ILLITERATE","BULLSHIT")
is much enhanced when having the technical details of python (such as
is responsibility of experts) put aside in the same manner that the detailed
machinery of Prolog (as experts come to intuit it) is put aside when
contemplating the first-order logic reading of the Prolog code.
Now you answer "us" with a batch of non-sensical Lisp context.
Yes, sure, lambda and filter are found in lisp. The real question is
whether lisp allows to write it down in a form that doesn't give
away that the implementation operates from a differently structured
parse tree. Thus with minimal uncamouflaged clutter between
ILLITERATE and BULLSHIT : no best inquisition rule.
> and
> the presence of very un-Pythonic ugliness
Ah, you are an aesthetician of pythonicity - will you deny the title as
ugly,
pythonically speaking ? But then, what's your competence to formulate
such assertions ?
Okay, say we'd look into the virtues and vices of Python as a programming
language to describe cool and simple algorithms fit to form the flesh of the
code in a file of Python featuring ten lines such as :
from battle.devices.russianRoulette import QuantumRussianRoulette
Class DieteticWar(War) :
def __init__(self,Democracy,Tyrant) :
assert self.casusBelli.provided(Tyrant), RelevanceException
assert self.ultimatum.provided(Democracy), CenturyException
What about it ? Perhaps Dylan is better, perhaps not. The real question
is how much time do we have before the time bandits get it their way
<not-python-related>
no it's more clearly that UN has to check grammatical well-formedness of
any ultimatum Mr Bush submits in the name of furthering the UN's
own intentions. Grammatical well formedness of ultimata implies that
simply saying "I will enter war against you in N days" in camouflaged
language doesn't cut it. Such a language is not an ultimatum, it's a war
ruse directed against the more naive public.
</not-python-related>
Since it is in no way the UN's role to promote war ruses, the UN
should simply force US ultimata to obey ISO 9000-type standards
certification procedures.
I-ll-be-back-unless-nazis-kill-me-in-the-meantime-ly yours,
Boris
--
"W is a mass-creating boson. Mass makes gravity. What do superstrings say ?"
More information about the Python-list
mailing list