By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,663 Members | 1,455 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,663 IT Pros & Developers. It's quick & easy.

A Moronicity of Guido van Rossum

P: n/a
A Moronicity of Guido van Rossum

Xah Lee, 200509

On Guido van Rossum's website:
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
dated 20050826, he muses with the idea that he would like to remove
lambda, reduce(), filter() and map() constructs in a future version
Python 3000.

Guido wrote:
«filter(P, S) is almost always written clearer as [x for x in S if
P(x)], and this has the huge advantage that the most common usages
involve predicates that are comparisons, e.g. x==42, and defining a
lambda for that just requires much more effort for the reader (plus the
lambda is slower than the list comprehension)»

the form “[x for x in S if P(x)]” is certainly not more clear than
“filter(P, S)”. The latter is clearly a function. What the fuck is
the former? A function every programer in any language can understand
and appreciate its form and function. What the fuck would anyone to
expect everyone to appreciate a Python syntactical idiosyncrasy “[x
for ...]”?

also, the argument that the from “filter(F,S)” being cumbersome
because the first argument is a function and that mostly likely it
would be a function that returns true and false thus most people will
probably use the form “lambda” and that is quite cumbersomethan if
the whole thing is written with the syntactical idiosyncrasy “[x for
....]”, is rather inane, as you can now see.

The filter(decision_function,list) form is clean, concise, and helps
thinking. Why it helps thinking? Because it condenses the whole
operation into its mathematical essence with the most clarity. That is,
it filters, of a list, and by a yes/no decision function. Nothing is
more, and nothing can be less. It is unfortunate that we have the
jargon Lambda and Predicate developed by the morons in the tech geekers
of the functional programing community. The lambda could be renamed
Pure Function and the Predicate could be called True/False function,
but the world being the way they are already, it is unwise to rewrite
every existing Perl program just because somebody invented another
language.

If the predicate in lambda in filter() is cumbersome, so would exactly
the same thing appear in the syntactical idiosyncrasy “[x for x in S
if P(x)]”.

Guido added this sting as a afterthought:
«(plus the lambda is slower than the list comprehension)»

Which is faster is really the whim and capacity of Python
implementators. And, just before we were using criterion of simplicity.
The concept of a function every programer understands, what the fuck is
a List Comprehension?
Why don't you scrap list comprehension in Python 3000 and create a
table() function that's simpler in syntax and more powerful in
semantics? ( See http://xahlee.org/perl-python/list_comprehension.html
)

Guido wrote:
«Why drop lambda? Most Python users are unfamiliar with Lisp or
Scheme, so the name is confusing; also, there is a widespread
misunderstanding that lambda can do things that a nested function can't
-- I still recall Laura Creighton's Aha!-erlebnis after I showed her
there was no difference! Even with a better name, I think having the
two choices side-by-side just requires programmers to think about
making a choice that's irrelevant for their program; not having the
choice streamlines the thought process. 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; Tkinter callbacks come to
mind, but I find that more often than not the callbacks should be
methods of some state-carrying object anyway (the exception being toy
programs).»

In the outset Guido here assumes a moronitude about the set of Python
users and what they are familiar of. Python users 10 years ago are not
the same Python users today, and will certainly not be the same 10
years later if you chop off lambda. Things change, math literacy
advances, and what users you have changes with what you are. A pure
function (lambda) is the gist of a mathematical idea embodied in
computer languages, not something from LISP or Scheme as tech geeking
morons wont to think.

Guido wrote:
«... there is a widespread misunderstanding that lambda can do things
that a nested function can't...».

One is so insulted by a bigshot in the industry of quoting something so
disparate then shot it down as if showing his perspicacity.

A lambda is a syntax for function or a name for the concept of
function. What the fuck does it mean that a lambda isn't as powerful as
nested function??

The lambda in Python is really ill. It is designed with a built-in
limitation in the first place, and regarded as some foreign substance
in the Imperative crowd such as the Pythoners. If there's any problem
with lambda, it is with lambda in Python and Pythoner's attitude.

Guido wrote:
«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;»

Of course, you begin to write things like Java, in three thousand words
just to state you are a moron.

The removing of elements in a language is in general not a good idea.
Removing powerful features so that morons can use it is moronic. (e.g.
Java) Removing “redundant” constructs is not always smart (e.g.
Scheme), because it pinches on practicality. Removing existing language
features by a visionary upgrade is exceedingly moronic. It forces
unnecessary shakeup and can cause death.

Guido wrote:
«So now reduce(). This is actually the one I've always hated
most,...»

The existence of reduce() in Python is probably caused by tech geeking
clowns of the computing industry. Basically, nobody really have a clear
understanding of mathematics or computing semantics, but every elite
tech geeker knew about bags of constructs of various languages. So, you
add this, i want that, and the language becomes a incoherent soup of
constructs, with the backlash of wanting to chop off things again, with
that good things.

Suggestions: lambda, reduce(), filter() and map() all should stay. I'm
not sure exactly what's the ins and outs of Python 3000. If one wants
to shake things up based on a vision: don't. There are already
gazillion languages and visions; the world don't really need another
bigshot's say for their personal advancement. As for improvement,
lambda in Python should be expanded to remove its built-in limitation
(and Imperative Programing Crowd such as Pythoners should cease to have
lambda attitude problem). The function map() could also be considered
for expansion. (see “What is Expresiveness in a Computer Language”
at http://xahlee.org/perl-python/what_i...esiveness.html ) Function
reduce() should stay because it's already there, even if it is not very
useful and odd. filter() should stay as it is as it is superb and
proper.

---------
This post is archived at:
http://xahlee.org/perl-python/python_3000.html

Xah
xa*@xahlee.org
http://xahlee.org/

Sep 29 '05 #1
Share this Question
Share on Google+
37 Replies


P: n/a
On Thursday 29 September 2005 16:24, Xah Lee wrote:
A Moronicity of Guido van Rossum

Xah Lee, 200509


Assuming you want to reach people to convince them your position is right, why
don't you try that in proper language? "moron" occured 7 times in your not
too long text, that doesn't let you look like a tech moron or a math moron,
but just like a moron.
Sep 29 '05 #2

P: n/a
Michael Goettsche wrote:
Assuming you want to reach people to convince them your position is right, why
don't you try that in proper language? "moron" occured 7 times in your not
too long text, that doesn't let you look like a tech moron or a math moron,
but just like a moron.


Actually, an angry moron, due to the use of the expletive 'fuck' 4 times
in said text.

--

Joshua Simpson -- dataw0lf.org
Lead Network Administrator/Engineer Aero-Graphics Inc.
js******@aero-graphics.com
Sep 29 '05 #3

P: n/a
Michael Goettsche <ma**@tuxipuxi.org> writes:
On Thursday 29 September 2005 16:24, Xah Lee wrote:
A Moronicity of Guido van Rossum

Xah Lee, 200509


Assuming you want to reach people to convince them your position is right, why
don't you try that in proper language? "moron" occured 7 times in your not
too long text, that doesn't let you look like a tech moron or a math moron,
but just like a moron.


His intent was never to convince people or pass information. Look for older
posts from him, where people here tried showing him some mistakes or made
suggestions to enhance his contribution and he simply ignored everything.

It looks like he thinks he's omniscient and always righ. Almost (?) a
deity. :-)
By the way, the doctor said it is dangerous to contradict him... ;-)

--
Jorge Godoy <go***@ieee.org>
Sep 29 '05 #4

P: n/a
Xah Lee wrote:
...What the fuck is the former?
...What the fuck would anyone to
...]”, is rather inane, as you can now see.

...What the fuck does it mean...
...you begin to write things like Java...


Can you please alter the tone of your voice?

Gerrit.

--
Temperature in Luleå, Norrbotten, Sweden:
| Current temperature 05-09-29 18:19:55 6.8 degrees Celsius ( 44.3F) |
--
Det finns inte dåligt väder, bara dåliga kläder.
Sep 29 '05 #5

P: n/a
addendum:

reduce() in fact embodies a form of iteration/recursion on lists, very
suitable in a functional language environment. If Python's lambda and
other functional facilities are more powerful, reduce() would be a good
addition. For instance, in functional programing, it is a paradigm to
nest or sequence functions. (most readers will be familiar in the form
of unix shell's “pipe”). When you sequence functions, you can't
stop in the middle and do a loop construct. So, reduce() and other
functional forms of iteration are convenient and necessary.

----------
For version with slight professionalism (sans “fuck”), see:
http://xahlee.org/perl-python/python_3000.html

Note: Guido certainly isn't a moron. But, this post of his shows his
haughtiness, and rather unfamiliarity with functional programing. (i.e.
has he, worked in a functional language in any significant length or
project?) However, he's got the audacity to assert things, probably due
to bigshot status.

Guido's stumble isn't a rare instance in the industry, and i don't take
him to be of any sinister nature. (i don't know much about Guido the
person or personality.)

There are quite a lot fucking liers and charlatans in the computing
industry, especially the OpenSourcers, from the fucking
a-dime-a-million students with their “FREE” irresponsible homeworks
on the net to fuckheads like James Gosling of Java , Larry Wall of
Perl, Linus Torvolts of Linux kernel, and that fuckhead C++ Berjo
something, the unix advocating fuckers, and those “gang of four”
Design Patterns shit and the criminals of eXtreme Programing and UML...
with these pundits begets one generation of fucking tech geeking coding
monkeys, thinking that they know something, while creating a mass of
garbage that crashes and fucks us up everyday in the computing world.

(disclaimer: this post is pure opinion.)

"The required techniques of effective reasoning are pretty formal, but
as long as programming is done by people that don't master them, the
software crisis will remain with us and will be considered an incurable
disease. And you know what incurable diseases do: they invite the
quacks and charlatans in, who in this case take the form of Software
Engineering gurus." —Edsger Dijkstra 1930-2002.

Xah
xa*@xahlee.org
http://xahlee.org/

Sep 29 '05 #6

P: n/a
> But, this post of his shows [Guido's] haughtiness

+1 IQOTW

(Ironic Quote Of The Week. Thanks for the laughs, Xah)

Peace
Bill Mill
bill.mill at gmail.com
Sep 29 '05 #7

P: n/a
Xah Lee wrote:
There are quite a lot f___ing liers and charlatans in the computing
industry, especially the OpenSourcers, from the f___ing
a-dime-a-million students with their "FREE" irresponsible homeworks
on the net to f___heads like James Gosling of Java , Larry Wall of
Perl, Linus Torvolts of Linux kernel, and that f___head C++ Berjo
something, the unix advocating f___ers, and those "gang of four"
Design Patterns shit and the criminals of eXtreme Programing and UML...
with these pundits begets one generation of f___ing tech geeking coding
monkeys, thinking that they know something, while creating a mass of
garbage that crashes and f___s us up everyday in the computing world.


OK... your post seems to indicate a belief that everyone else is
somehow incompetent. Sounds a bit like the "I am sane, it is everyone
else who is crazy" concept. Can you suggest a technology or
technologist who, in your expert opinion, has gotten it right?

Perhaps the language you have developed and others are using
successfully fits all of our needs?

Sep 29 '05 #8

P: n/a
"Matt" <bs****@gmail.com> writes:
OK... your post seems to indicate a belief that everyone else is
somehow incompetent.


Xah's just a troll - best to just ignore him. He posts these diatribes
to multiple groups hoping to start a fight.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Sep 29 '05 #9

P: n/a
On Thu, 29 Sep 2005 13:13:51 -0400, Bill Mill wrote:
But, this post of his shows [Guido's] haughtiness


+1 IQOTW

(Ironic Quote Of The Week. Thanks for the laughs, Xah)

I swore I wouldn't feed the troll by responding to his post, but the
opportunity to quote from "The Princess Bride" is too strong.

Describing Guido's so-called haughtiness: "That word you keep using. I do
not think it means what you think it means."
--
Steven.

Sep 29 '05 #10

P: n/a
On Thu, 29 Sep 2005 10:44:28 -0700, Matt wrote:
OK... your post seems to indicate a belief that everyone else is
somehow incompetent. Sounds a bit like the "I am sane, it is everyone
else who is crazy" concept. Can you suggest a technology or
technologist who, in your expert opinion, has gotten it right?


Folks, Xah Lee is a classic Internet troll, and has been polluting this
newsgroup for a long time. Ask yourself, why would anyone rational cross
post criticism of Python to perl, lisp and scheme newsgroups? Does he
perhaps think that the Lisp and Scheme language developers are about to
remove the functional programming features from Lisp and need to be
shown Python as a warning?

He is the equivalent of one of those bored, spoiled teenagers who urinate
on public transport just to see the shocked reactions of other people. You
can't engage him in rational debate. Until we find a way to send electric
shocks through the Internet, all we can do is ignore him. To argue with
him just gives him the sick entertainment he wants.
--
Steven.

Sep 29 '05 #11

P: n/a
Steven D'Aprano wrote:
....
He is the equivalent of one of those bored, spoiled teenagers who urinate
on public transport just to see the shocked reactions of other people. You
can't engage him in rational debate. Until we find a way to send electric
shocks through the Internet, all we can do is ignore him. To argue with
him just gives him the sick entertainment he wants.

Rational debate? They urinate on your buses and you worry about
rational debate? Call the transit police. Have them hauled home in a
paddy wagon to say hello to their parents after a few dozen hours of
picking up litter and scrubbing bus floors. We may not be able to do
anything particularly effective to the morons who light *online* fires;
but then they are easily ignored when their signal/noise ratio drops to
nil. But if you're seeing this kind of behaviour in the real world, for
criminney's sake, fix it with the judicious use of a billy club upside
the head.

No society thrives while letting people piss in the common well.
The public transit system is a commons to be protected like any other.
If you see people pissing on your public transit, get scared and fix
your society.

Entirely off-topic,
Mike

--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com

Sep 29 '05 #12

P: n/a
On 9/29/05, Tim Leslie <ti********@gmail.com> wrote:
On 29 Sep 2005 07:24:17 -0700, Xah Lee <xa*@xahlee.org> wrote:
Of course, you begin to write things like Java, in three thousand words
just to state you are a moron.


+1 QOTW.

Tim


-1 XLEGQOTW

(Xah Lee Ever Getting QOTW'd)

Peace
Bill Mill
bill.mill at gmail.com
Sep 30 '05 #13

P: n/a
On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote
(in article <11**********************@g14g2000cwa.googlegroups .com>):
OK... your post seems to indicate a belief that everyone else is
somehow incompetent. Sounds a bit like the "I am sane, it is everyone
else who is crazy" concept. Can you suggest a technology or
technologist who, in your expert opinion, has gotten it right?

He has posted similar posts about other things to at least one other mailing
list, the tone and arguments of these post were exactly the same.

Sep 30 '05 #14

P: n/a
In comp.lang.perl.misc Kalle Anke <sk*****@gmail.com> wrote:
On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote
(in article <11**********************@g14g2000cwa.googlegroups .com>):
OK... your post seems to indicate a belief that everyone else is
somehow incompetent. Sounds a bit like the "I am sane, it is everyone
else who is crazy" concept. Can you suggest a technology or
technologist who, in your expert opinion, has gotten it right?

He has posted similar posts about other things to at least one other mailing
list, the tone and arguments of these post were exactly the same.


I wonder if his postings are related to the phases of the moon? It
might explain a lot.

Axel
Sep 30 '05 #15

P: n/a
ax**@white-eagle.invalid.uk wrote:
In comp.lang.perl.misc Kalle Anke <sk*****@gmail.com> wrote:
On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote
(in article <11**********************@g14g2000cwa.googlegroups .com>):

OK... your post seems to indicate a belief that everyone else is
somehow incompetent. Sounds a bit like the "I am sane, it is everyone
else who is crazy" concept. Can you suggest a technology or
technologist who, in your expert opinion, has gotten it right?

He has posted similar posts about other things to at least one other mailing
list, the tone and arguments of these post were exactly the same.

I wonder if his postings are related to the phases of the moon? It
might explain a lot.

Axel


Or forgetting to take his medication.
Sep 30 '05 #16

P: n/a
Jorge Godoy wrote:
His intent was never to convince people or pass information.


On comp.lang.lisp Xah Lee is a well known troll... don't feed him :)

Sep 30 '05 #17

P: n/a
ax**@white-eagle.invalid.uk writes:
I wonder if his postings are related to the phases of the moon? It
might explain a lot.


Yes, it would. Note that the word lunatic is derived from the Latin word
luna, meaning moon.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Sep 30 '05 #18

P: n/a
On Fri, 30 Sep 2005 18:02:14 -0400, Sherm Pendley wrote:
ax**@white-eagle.invalid.uk writes:
I wonder if his postings are related to the phases of the moon? It
might explain a lot.


Yes, it would. Note that the word lunatic is derived from the Latin word
luna, meaning moon.


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/u...2;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
--
Steven.

Oct 1 '05 #19

P: n/a
Steven D'Aprano <st***@REMOVETHIScyber.com.au> writes:
On Fri, 30 Sep 2005 18:02:14 -0400, Sherm Pendley wrote:
ax**@white-eagle.invalid.uk writes:
I wonder if his postings are related to the phases of the moon? It
might explain a lot.


Yes, it would. Note that the word lunatic is derived from the Latin word
luna, meaning moon.


Yes, lunatic is derived from luna, but that doesn't mean the two are
connected. The ancients believed a lot of crap


*whoosh*

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

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Oct 1 '05 #20

P: n/a

Steven D'Aprano wrote:
On Fri, 30 Sep 2005 18:02:14 -0400, Sherm Pendley wrote:
ax**@white-eagle.invalid.uk writes:
I wonder if his postings are related to the phases of the moon? It
might explain a lot.
Yes, it would. Note that the word lunatic is derived from the Latin word
luna, meaning moon.


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/u...2;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.


--
Steven.


Oct 1 '05 #21

P: n/a
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.

Oct 1 '05 #22

P: n/a
On Sat, 01 Oct 2005 00:18:44 -0400, Sherm Pendley wrote:
*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*
--
Steven.

Oct 1 '05 #23

P: n/a
Steven D'Aprano wrote:
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? :)

--
Bart.
Oct 1 '05 #24

P: n/a
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/mathema...unctions/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/mathema...nctions/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 fuck your wifes.

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

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

Xah
xa*@xahlee.org
http://xahlee.org/

Oct 1 '05 #25

P: n/a
(posted c.l.python ONLY)

Xah (may i call you Xah?)

SOrry to say, but your older posts were much funnier:

http://groups.google.com/group/comp....e26da60295d7c8

(also seems your anti-cult cult really hasn't gotten a lot of
followers. You might want to change password on your email account and
this time not give it out to all your friends.

Anyway, good luck in all your future endeavors. Um, don't have to keep
in touch, tho.

Xah Lee wrote:
the programers in the industry, including bigwigs such as Guido or that
Larry Wall fuckhead, really don't know shit about computer languages.


Oct 1 '05 #26

P: n/a
Bart Lateur <ba*********@pandora.be> writes:
Steven D'Aprano wrote:
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? :)


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
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Oct 1 '05 #27

P: n/a
Bart Lateur wrote:
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
Oct 1 '05 #28

P: n/a
Paul F. Dietz wrote:
Bart Lateur wrote:
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.


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.

--
We're glad that graduates already know Java,
so we only have to teach them how to program.
somewhere in a German company
(credit to M. Felleisen and M. Sperber)
Oct 1 '05 #29

P: n/a
Bart Lateur <ba*********@pandora.be> writes:
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--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Oct 1 '05 #30

P: n/a
Ulrich Hobelmann <u.*********@web.de> writes:
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."
Oct 1 '05 #31

P: n/a
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
Oct 2 '05 #32

P: n/a

"Lucas Raab" <do*****@gmail.com> wrote in message
news:9G*****************@newsread1.news.atl.earthl ink.net...
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
Oct 2 '05 #33

P: n/a
X-Ftn-To: Paul F. Dietz

"Paul F. Dietz" <di***@dls.net> wrote:
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.


Perhaps not, consider deamon or vampire babies.








:)
--
Matija
Oct 2 '05 #34

P: n/a
Xah Lee wrote:
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.

Oct 2 '05 #35

P: n/a
"Michael" wrote:
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/fo...+comprehension

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

</F>

Oct 2 '05 #36

P: n/a
Fredrik Lundh wrote:
....
fwiw, they've also been around for ages:

http://foldoc.doc.ic.ac.uk/foldoc/fo...+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:
import math
table("math.cos(i+j)", ("i",3), ("j",-3,3))

[[-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.

Oct 2 '05 #37

P: n/a

Ulrich Hobelmann wrote:
Paul F. Dietz wrote:
Bart Lateur wrote:
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.


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

Oct 12 '05 #38

This discussion thread is closed

Replies have been disabled for this discussion.