A Moronicity of Guido van Rossum

M

mensanator

Steven said:
Yes, lunatic is derived from luna, but that doesn't mean the two are
connected. The ancients believed a lot of crap (the world is flat, black
people aren't human, thunder is the sound of god's fighting, buying
over-valued dot-com stock is a good investment) and "phases of the moon
affecting behaviour" was one of them.

People are really bad at connecting cause and effect. See this thread for
a simple example:

http://msgboard.snopes.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=42;t=000228;p=1

A skeptical policeman who says he doesn't actually believe the moon
affects behaviour nevertheless reports that "last weekend" things were
really crazy, and it was a full moon. Somebody writes in to correct him:
no, the full moon is actually "tomorrow".

This shows how cognitive biases can fool us. Even though he was skeptical,
the cop noticed the extra crazy behaviour on this particular weekend, and
manged to fool himself into thinking it matched a full moon.

See here for more details, plus references to research:

http://skepdic.com/fullmoon.html

But correlations can exist even if the cause does not. There is a
correlation between the equinox and balancing an egg. But not
_because_ of the equinox, but because people only try it on the
equinox. Hence, egg balancing only happens on the equinox is a
true assertion.
 
B

brusstoc

I have an excellent idea. Create your own programming language and do
whatever you want with it. Until then, I'm thinking that Guido can do
whatever he wants with his. But I'm guessing that your programming
skills will be in the same place as your greatness - in your own head.
 
S

Steven D'Aprano

*whoosh*

That, my friend, was the sound of a joke flying past and completely
missing you. ;-)


Wouldn't be the first time, and surely not the last. *wink*
 
B

Bart Lateur

Steven said:
A skeptical policeman who says he doesn't actually believe the moon
affects behaviour nevertheless reports that "last weekend" things were
really crazy, and it was a full moon. Somebody writes in to correct him:
no, the full moon is actually "tomorrow".

As a similar example: I've been told by various women independently,
that "there are more babies born near a full moon."

So... is there a correlation between insanity and babies being born? :)
 
X

Xah Lee

the programers in the industry, including bigwigs such as Guido or that
Larry Wall fuckhead, really don't know shit about computer languages.
Sometimes i get pissed by Stephen Wolfram's megalomaniac cries, but in
many ways, i think his statements about the fucking moronicities of the
academicians and otherwise dignitaries are justified.

here i will try to illuminate some miscellaneous things regarding the
lambda in Python issue.

as i have hinted
( http://xahlee.org/perl-python/list_comprehension.html ), the
so-called List Comprehension is just a irregular syntax to facilitate
generating lists. The name is a terrible jargon, and the means is also
quite fucked up. The proper name should be something like
ListGenerator, and the proper means should be the plain function.

For instance, Python's range() is such a list generator, only that it
is limited in scope.

For a example of a powerful list generator, see Mathematica's Table
function:
http://documents.wolfram.com/mathematica/functions/Table

i'm running a project that will code Table in Perl and Python and Java.
You can read about the spec and source code here:
http://xahlee.org/tree/Table.html
(note: the Python version there isn't complete)

Note Table's power in generating not just flat lists, but trees. And if
one really want flat lists, there's the Flatten function that flats any
nested lists. (Python should have this too)

Python's reduce() is Mathematica's Fold. See
http://documents.wolfram.com/mathematica/functions/Fold
Besides Fold, there's FoldList, FixedPoint, FixedPointList, Nest,
NestList and others. In Python's terms, FoldList is like reduce()
except it returns a list of each steps. FixedPoint recursively applies
a function to itself until the result no longer changes (or when a
optional function returns true) Nest is similar except it limits the
iteration by a number. The NestList and FixedPointList are similar
except that they return a list, containing all the steps.

All these can be written as a loop, but they make the code condensed
and meaning clear. More so, they are important when programing in a
functional style. In functional programing, you don't litter lots of
variables or temporary functions or intermediate loops here or there on
every other line. The code is usually tight and inline. When sequencing
a series of functions, you can't stop in the middle and do some loop or
auxiliary calculation. All these are made inline into a function. (that
is: constructed as lambda) A block of code usually corresponds to a
unit of the algorithm used, as opposed to the particular unit of the
implementation of the algorithm. You don't read the minute details of
the code. You read the algorithmic unit's comments, or just the input
and output of a code block.

Also, these inline loop constructs are not just for computing numbers
as Guido likes to ignorantly think. They are specialized forms of
generic loop constructs. Their first argument is a function, and second
argument is a list. Their generality lies with the fact that their
first argument is a function. If a language does not provide a
convenient way to represent the concept of a function, than these
functional loop constructs will suffer in usability.

The Python morons, did not provide a convenient way to represent a
function. (they tried, with their limited implementation of lambda and
shun it like a plaque)

The way Guido puts it gives us a nice glimpse of their retarded
mentality: “Also, once map(), filter() and reduce() are gone, there
aren't a whole lot of places where you really need to write very short
local functions;â€

As we can see here, in Pythoner's mind, lambda is for “very short
local functionsâ€.

Python's limited lambda coupled with their lambda attitude problem
among imperative morons, therefore functional programing suffers in
Python, and consequently one becomes so stupid as to come up with a
bunch of feelings about lambda, map, reduce, filter.

For Python's map(), look at Mathematica's Map on how it might be
extended.
http://documents.wolfram.com/mathematica/functions/Map
Note the ability to map to not just flat lists but trees (nested
lists). Note the power of expressing the concept of levels of a tree.

For Python's filter(), check out the equivalent in Mathematica's
Select:
http://documents.wolfram.com/mathematica/functions/Select
Note how it provides a third option for picking just the first n items.
Also note, that Select is just a way to pick elements in a list.
Mathematica provides a set to do these: Part, Take, Drop, Select,
Cases. All uniformly uses the function syntax and all operate
semantically by returning a new list. In Python and other imperative
clown's language, usually they provide a limited varieties to do such a
task, and also inconsistent like piled on. (e.g. alist[5:9], filter(),
alist.remove(...), del alist[...]). Some modify the list in-place, some
returns a new list.

-----------------

one is quite sorry to read a big shot contemplating on petty issues
with a ambitious name Python THREE THOUSAND.

For the grand Python THREE THOUSAND, what about supporting non-trivial
things such as built-in transparent fractions? What about a smart
exact-arithmetics once for all? What about supporting pattern matching?
(not textual pattern matching (e.g. regex) as Imperative Morons wont to
understand, but patterns of list structures and data types.)

the features of Mathematica mentioned above existed over a decade ago.
But today, OpenSourcing bigwigs can contemplate and dither nothing but
which lipstick to use.

A good number of the industrial dignitaries are just fucking liers. And
today we have the fucking Java and fucking Perl and their bosses
trumpeting their fucking state-of-the-art-ness. Go **** your wifes.

(disclaimer: all mentions of any real person are just opinion.)

-----
See also:
http://xahlee.org/perl-python/python_3000.html

Xah
(e-mail address removed)
∑ http://xahlee.org/
 
M

Mike Meyer

Bart Lateur said:
As a similar example: I've been told by various women independently,
that "there are more babies born near a full moon."

So... is there a correlation between insanity and babies being born? :)

If what they say is true, then yes, there is. That doesn't mean
there's a logical - or even rational - explanation for that
correlation.

<mike
 
P

Paul F. Dietz

Bart said:
As a similar example: I've been told by various women independently,
that "there are more babies born near a full moon."

That's also a myth.

Paul
 
U

Ulrich Hobelmann

Paul said:
That's also a myth.

Right, everybody knows that it's not natural (moon) light that
influences reproductive behavior, it's artificial light -- TV.

When TV is turned off by a power failure, lots of people that usually
never have sex start making love, and lots of people that usually use
contraception lose their minds and forget about it.

9 months later more babies are born, unless that's also a myth.
 
S

Sherm Pendley

Bart Lateur said:
As a similar example: I've been told by various women independently,
that "there are more babies born near a full moon."

So... is there a correlation between insanity and babies being born? :)

If you weren't insane before the baby was born, you will be soon after. ;-)

sherm--
 
R

Running Bare

Ulrich Hobelmann said:
When TV is turned off by a power failure, lots of people that
usually never have sex start making love, and lots of people that
usually use contraception lose their minds and forget about it.

9 months later more babies are born, unless that's also a myth.

http://www.snopes.com/pregnant/blackout.htm

"Despite initial reports of New York City hospitals' seeing a
dramatic increase in the number of births nine months after the
1965 blackout, later analyses showed the birth rate during that
period to be well within the norm."
 
L

Lucas Raab

Xah Lee wrote:

[snip]
(they tried, with their limited implementation of lambda and
shun it like a plaque)

Can't say I've heard that expression before...

--
--------------------------
Lucas Raab
lvraab"@"earthlink.net
dotpyFE"@"gmail.com
AIM: Phoenix11890
MSN: dotpyfe "@" gmail.com
IRC: lvraab
ICQ: 324767918
Yahoo: Phoenix11890
 
M

Matt Garrish

Lucas Raab said:
Xah Lee wrote:

[snip]
(they tried, with their limited implementation of lambda and
shun it like a plaque)

Can't say I've heard that expression before...

Burns: I'm afraid it's not that simple. As punishment for your desertion,
it's company policy to give you the plague.
Smithers: Uh, sir, that's the plaque.

Matt
 
M

Michael

Xah said:
as i have hinted
( http://xahlee.org/perl-python/list_comprehension.html ), the
so-called List Comprehension is just a irregular syntax to facilitate
generating lists. The name is a terrible jargon, and the means is also
quite fucked up. The proper name should be something like
ListGenerator, and the proper means should be the plain function.

List comprehensions get their name (AFAICT) very clearly from set
comprehensions in mathematics. As a result anyone who has ever seen
a set comprehension in maths goes "oooh, I see". They're not the same, but
IMO they're close enough to warrant that name.
i'm running a project that will code Table in Perl and Python and Java.
You can read about the spec and source code here:
http://xahlee.org/tree/Table.html
(note: the Python version there isn't complete)

I just took a look at your python version. I'd agree it's incomplete. Indeed
it doesn't implement what you say it does. You seem to have re-invented
"apply" since you simply (badly) pass a set of arguments provided by the
user to a function provided by the user.

The description of the code you are pointing at bears absolutely no
resemblance whatsoever to the functionality you describe.

And you criticise the way other people name & describe their code,
when you can't show the skills you criticise in others? I know naming and
documentation are not easy skills, and if people take a *civil* tone in
suggested improvements, criticism (and suggestions) can be helpful.

However, I'd suggest /finishing/ your glass house /before/ you start
throwing stones, or else you'll never be able to smash it up the
neighbourhood properly.


Michael.
 
F

Fredrik Lundh

Michael said:
List comprehensions get their name (AFAICT) very clearly from set
comprehensions in mathematics. As a result anyone who has ever seen
a set comprehension in maths goes "oooh, I see". They're not the same, but
IMO they're close enough to warrant that name.

fwiw, they've also been around for ages:

http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?list+comprehension

(the name goes back to the early eighties, the construct is older than that)

</F>
 
M

Michael

Fredrik Lundh wrote:
....
fwiw, they've also been around for ages:

http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?list+comprehension

(the name goes back to the early eighties, the construct is older than
that)

Ahh... Fair enough. I hadn't come across it as a programming construct until
I hit Python. I'd seen the (presumable) precursor of set comprehension it in
maths & formal methods before though.

To help Xah along, this shows a //more nearly// correct version of his table
function (his doesn't do anything like the spec). It works correctly for
tables of the form:

table("i", ("i",3))
table("i,j", ("i",3), ("j",3))
table("math.cos(i+j)", ("i",3), ("j",-3,3))

It doesn't produce quite the right structure when you have more than
2 iteration rules).

Problems with this implementation:
* mkrange() is not passed along the existing context.
This means tables of the form:
table("i,j", ("i",3), ("j",1,"i"))

Won't work. This would require changing the mkRange function such
that it's passed the most currently built environment. This is a
relatively trivial change, which I'll leave for Xah.

* The structure is incorrect for more than 2 iteration rules. I think
I'm missing a simple/obvious trick in my mkTable._extend_table
function.
I'm not really fussed though. (It's clearly something dumb :)

* It's not really clear which list nests which. It's possible the lists
are nested the wrong way round.

I'm fairly certain that the evalTable code will work fine when the mkTable
code creates the right structure.

I'll leave that to Xah to fix. It's somewhat further along than his
original attempt though. (actually matches his spec for 1 or 2 iteration
rules).

def mkRange(listspec):
if len(listspec)==2:
return xrange(1,listspec[1]+1)
elif len(listspec)==3:
return xrange(listspec[1],listspec[2]+1)
return []

def mkTable(ignore, *listspecs):
def _extend_table(listspecs, result):
if len(listspecs) == 0:
return result
else:
listspec = listspecs[-1]
listspecs = listspecs[:-1]
r2 = []
for R_ in result:
for R in R_: # SMELLY
inner_result = []
for i in mkRange(listspec):
inner_env2 = dict(R[1])
inner_env2[listspec[0]] = i
inner_result.append( (ignore, inner_env2) )
r2.append(inner_result)
result = _extend_table(listspecs, r2)
return result
return _extend_table(listspecs,
[[(ignore,dict(globals()))]]) # SMELLY

def evalTable(table):
if len(table) ==0:
return table
else:
result = []
for evallist in table:
inner_result = []
for eval_args in evallist:
try:
r = eval(*eval_args)
inner_result.append(r)
except TypeError:
inner_result.append(evalTable(eval_args))
result.append(inner_result)
return result

def table(ignore, *listspecs):
abstract_table = mkTable(ignore, *listspecs)
return evalTable(abstract_table)

Example:
[[-0.41614683654714241, 0.54030230586813977, 1.0], [0.54030230586813977,
1.0, 0.54030230586813977], [1.0, 0.54030230586813977,
-0.41614683654714241], [0.54030230586813977, -0.41614683654714241,
-0.98999249660044542], [-0.41614683654714241, -0.98999249660044542,
-0.65364362086361194], [-0.98999249660044542, -0.65364362086361194,
0.28366218546322625], [-0.65364362086361194, 0.28366218546322625,
0.96017028665036597]]

Regards,


Michael.
 
C

Cruise Director

Ulrich said:
Right, everybody knows that it's not natural (moon) light that
influences reproductive behavior, it's artificial light -- TV.

When TV is turned off by a power failure, lots of people that usually
never have sex start making love, and lots of people that usually use
contraception lose their minds and forget about it.

9 months later more babies are born, unless that's also a myth.

But the myth in question is babies being *born* under natural or
artificial light. Not being conceived.


Cheers,
Brandon J. Van Every
(cruise (director (of SeaFunc)
'(Seattle Functional Programmers)))
http://groups.yahoo.com/group/SeaFunc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top