Java Forum / General / May 2006
A critic of Guido's blog on Python's lambda
Xah Lee - 06 May 2006 01:26 GMT Python, Lambda, and Guido van Rossum
Xah Lee, 2006-05-05
In this post, i'd like to deconstruct one of Guido's recent blog about lambda in Python.
In Guido's blog written in 2006-02-10 at http://www.artima.com/weblogs/viewpost.jsp?thread=147358
is first of all, the title Language Design Is Not Just Solving Puzzles. In the outset, and in between the lines, we are told that I'm the supreme intellect, and I created Python.
This seems impressive, except that the tech geekers due to their ignorance of sociology as well as lack of analytic abilities of the mathematician, do not know that creating a language is a act that requires little qualifications. However, creating a language that is used by a lot people takes considerable skill, and a big part of that skill is salesmanship. Guido seems to have done it well and seems to continue selling it well, where, he can put up a title of belittlement and get away with it too.
Gaudy title aside, let's look at the content of his say. If you peruse the 700 words, you'll find that it amounts to that Guido does not like the suggested lambda fix due to its multi-line nature, and says that he don't think there could possibly be any proposal he'll like. The reason? Not much! Zen is bantered about, mathematician's impractical ways is waved, undefinable qualities are given, human's right brain is mentioned for support (neuroscience!), Rube Goldberg contrivance phraseology is thrown, and coolness of Google Inc is reminded for the tech geekers (in juxtaposition of a big notice that Guido works there.).
If you are serious, doesn't this writing sounds bigger than its content? Look at the gorgeous ending: This is also the reason why Python will never have continuations, and even why I'm uninterested in optimizing tail recursion. But that's for another installment.. This benevolent geeker is gonna give us another INSTALLMENT!
There is a computer language leader by the name of Larry Wall, who said that The three chief virtues of a programmer are: Laziness, Impatience and Hubris among quite a lot of other ingenious outpourings. It seems to me, the more i learn about Python and its leader, the more similarities i see.
So Guido, i understand that selling oneself is a inherent and necessary part of being a human animal. But i think the lesser beings should be educated enough to know that fact. So that when minions follow a leader, they have a clear understanding of why and what.
----
Regarding the lambda in Python situation... conceivably you are right that Python lambda is perhaps at best left as it is crippled, or even eliminated. However, this is what i want: I want Python literatures, and also in Wikipedia, to cease and desist stating that Python supports functional programing. (this is not necessarily a bad publicity) And, I want the Perl literatures to cease and desist saying they support OOP. But that's for another installment.
---- This post is archived at: http://xahlee.org/UnixResource_dir/writ/python_lambda_guido.html
Xah xah@xahlee.org http://xahlee.org/
Ken Tilton - 06 May 2006 02:16 GMT > Python, Lambda, and Guido van Rossum > [quoted text clipped - 27 lines] > mentioned for support (neuroscience!), Rube Goldberg contrivance > phraseology is thrown, I think this is what you missed in your deconstruction. The upshot of what he wrote is that it would be really hard to make semantically meaningful indentation work with lambda. Guido did not mean it, but the Rube Goldberg slam is actually against indentation as syntax. "Yes, print statements in a while loop would be helpful, but..." it would be so hard, let's go shopping. ie, GvR and Python have hit a ceiling.
That's OK, it was never meant to be anything more than a scripting language anyway.
But the key in the whole thread is simply that indentation will not scale. Nor will Python.
> and coolness of Google Inc is reminded for the > tech geekers (in juxtaposition of a big notice that Guido works [quoted text clipped - 16 lines] > educated enough to know that fact. So that when minions follow a > leader, they have a clear understanding of why and what. Oh, my, you are preaching to the herd (?!) of lemmings?! Please tell me you are aware that lemmings do not have ears. You should just do Lisp all day and add to the open source libraries to speed Lisp's ascendance. The lemmings will be liberated the day Wired puts John McCarthy on the cover, and not a day sooner anyway.
kenny (wondering what to call a flock (?!) of lemmings)
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Alex Martelli - 06 May 2006 02:53 GMT ...
> But the key in the whole thread is simply that indentation will not > scale. Nor will Python. Absolutely. That's why firms who are interested in building *seriously* large scale systems, like my employer (and supplier of your free mail account), would never, EVER use Python, nor employ in prominent positions such people as the language's inventor and BDFL, the author of the most used checking tool for it, and the author of the best-selling reference book about that language; and, for that matter, a Director of Search Quality who, while personally a world-renowned expert of AI and LISP, is on record as supporting Python very strongly, and publically stating its importance to said employer.
Obviously will not scale. Never.
Well... hardly ever!
Alex
Ken Tilton - 06 May 2006 03:44 GMT > ... > [quoted text clipped - 14 lines] > > Well... hardly ever! You are talking about being incredibly popular. I was talking about language expressivity. COBOL in its day was incredibly popular and certainly the language of choice (hell, the only language) for the biggest corporations you can imagine. But it did not scale as a language. I hope there are no doubts on that score (and I actually am a huge fan of COBOL).
The problem for Python is its success. meant to be a KISS scripting language, it has caught on so well that people are asking it to be a full-blown, OO, GC, reflexive, yada, yada, yada language. Tough to do when all you wanted to be when you grew up was a scripting language.
kenny (who is old enough to have seen many a language come and go)
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Alex Martelli - 06 May 2006 08:13 GMT ...
> > Absolutely. That's why firms who are interested in building *seriously* > > large scale systems, like my employer (and supplier of your free mail ...
> > Obviously will not scale. Never. > > > > Well... hardly ever! > > You are talking about being incredibly popular. I was talking about Who, me? I'm talking about the deliberate, eyes-wide-open choice by *ONE* firm -- one which happens to more or less *redefine* what "large scale" computation *means*, along many axes. That's got nothing to do with Python being "incredibly popular": it has everything to do with scalability -- the choice was made in the late '90s (and, incidentally, by people quite familiar with lisp... no less than the reddit.com guys, you know, the ones who recently chose to rewrite their side from Lisp to Python...?), based on scalability issues, definitely not "popularity" (Python in the late '90s was a very obscure, little-known language).
> kenny (who is old enough to have seen many a language come and go) See your "many a language" and raise you one penny -- besides sundry Basic dialects, machine languages, and microcode[s], I started out with Fortran IV and APL, and I have professionally programmed in Pascal (many dialects), Rexx, Forth, PL/I, Cobol, Lisp before there was a "Common" one, Prolog, Scheme, Icon, Tcl, Awk, EDL, and several proprietary 3rd and 4th generation languages -- as well of course as C and its descendants such as C++ and Java, and Perl. Many other languages I've studied and played with, I've never programmed _professionally_ (i.e., been paid for programs in those languages), but I've written enough "toy" programs to get some feeling for (Ruby, SML, O'CAML, Haskell, Snobol, FP/1, Applescript, C#, Javascript, Erlang, Mozart, ...).
Out of all languages I know, I've deliberately chosen to specialize in Python, *because it scales better* (yes, functional programming is _conceptually_ perfect, but one can never find sufficiently large teams of people with the right highly-abstract mathematical mindset and at the same time with sufficiently down-to-earth pragmaticity -- so, for _real world_ uses, Python scales better). When I was unable to convince top management, at the firm at which I was the top programmer, that the firm should move to Python (beyond the pilot projects which I led and gave such stellar results), I quit, and for years I made a great living as a freelance consultant (mostly in Python -- once in a while, a touch of Pyrex, C or C++ as a vigorish;-).
That's how come I ended up working at the firm supplying your free mail (as Uber Tech Lead) -- they reached across an ocean to lure me to move from my native Italy to California, and my proven excellence in Python was their prime motive. The terms of their offer were just too incredible to pass by... so, I rapidly got my O1 visa ("alien of exceptional skills"), and here I am, happily ubertechleading... and enjoying Python and its incredibly good scalability every single day!
Alex
Bill Atkins - 06 May 2006 09:22 GMT > ... >> > Absolutely. That's why firms who are interested in building *seriously* [quoted text clipped - 51 lines] > > Alex How do you define scalability?
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Martin P. Hellwig - 06 May 2006 11:24 GMT <cut>
> How do you define scalability? http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search
;-)
 Signature mph
Bill Atkins - 06 May 2006 11:42 GMT > <cut> >> [quoted text clipped - 3 lines] > > ;-) OK, my real question is: what features of Python make it "scalable"?
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Tomasz Zielonka - 06 May 2006 12:04 GMT > OK, my real question is: what features of Python make it "scalable"? Let me guess: Python makes it easier to scale the application on the "features" axis, and the approach to large-scale computation taken by google makes Python's poor raw performance not so big an issue, so it doesn't prevent the application from scaling on the "load" and "amount of data" axes. I also guess that python is often used to control simple, fast C/C++ programs, or even to generate such programs.
Best regards Tomasz
Martin P. Hellwig - 06 May 2006 12:27 GMT >> <cut> >>> How do you define scalability? [quoted text clipped - 4 lines] > > OK, my real question is: what features of Python make it "scalable"? Well I'm no expert, but I guess the ease of creating network services and clients make it quite scalable. For example, I'm creating a xmlrpcserver that returns a randomized cardlist, but I because of fail-over I needed some form of scalability , my solution was to first randomize the deck then marshal it and dump the file on a ZFS partition, giving back the client a ticket number, the client can then connect with the ticket number to receive the cardlist (read the file - unmarshal it).
While this is overkill for 1 server, I needed multiple because of fail-over and load-balancing, in this case I have 3 'crypto' boxes (with hardware crypto engines using OpenBSD) doing only the randomizing and 4 solaris machines doing the zfs and distribution of the list.
By using xmlrpc and DNS round-robin, I can just add boxes and it scales without any problem, The ZFS boxes are the front-end listening to the name 'shuffle' and are connecting to a private network to my crypto boxes listening to the name 'crypto'.
So as long as I make DNS aliases (I have a little script that hearbeats the boxes and when not responding within 10 seconds removes it alias) and install the right scripts on the box I can scale till I'm round the earth. Of course when the machine amount gets over a certain degree I have to add some management functionality.
Now I don't say that I handle this situation well and that its the right solution, but it worked for me and it was easy and fun to do with python, but I guess that any language in this sence should be 'scalable' and perhaps other languages have even better built-in networking libraries but I'm not a professional programmer and until I learn other languages (and are comfortable enough to use it) I'll keep on using python for my projects.
For me python is easy, scalable, fun and by this the 'best' but that is personal and I simply don't know whether my opinion will change in the future or not.
 Signature mph
Paul Rubin - 06 May 2006 15:36 GMT > and clients make it quite scalable. For example, I'm creating a > xmlrpcserver that returns a randomized cardlist, but I because of [quoted text clipped - 3 lines] > connect with the ticket number to receive the cardlist (read the file > - unmarshal it). This is a weird approach. Why not let the "ticket" by the (maybe encrypted) PRNG seed that generates the permutation?
> While this is overkill for 1 server, I needed multiple because of > fail-over and load-balancing, in this case I have 3 'crypto' boxes > (with hardware crypto engines using OpenBSD) doing only the > randomizing and 4 solaris machines doing the zfs and distribution of > the list. I don't know what good that hardware crypto is doing you, if you're then writing out the shuffled deck to disk in the clear.
Paul Rubin - 06 May 2006 15:52 GMT > I don't know what good that hardware crypto is doing you, if you're > then writing out the shuffled deck to disk in the clear. Ehhh, I guess you want the crypto hardware to generate physical randomness for each shuffle. I'm skeptical of the value of this since a cryptographic PRNG seeded with good entropy is supposed to be computationally indistinguishable from physical randomness, and if it's not, we're all in big trouble; further, that hardware engine is almost certainly doing some cryptographic whitening, which is a problem if you don't think that cryptography works.
Anyway, if it's just a 52-card deck you're shuffling, there's only about 226 bits of entropy per shuffle, or 52*6 = 312 bits if you write out the permutation straightforwardly as a vector. You could use that as the ticket but if you're generating it that way you may need to save the shuffle for later auditing.
For practical security purposes I'd be happier generating the shuffles entirely inside the crypto module (HSM) by cryptographic means, with the "ticket" just being a label for a shuffle. E.g. let
K1, K2 = secret keys
T(n) = ticket #n = AES(K1, n) to prevent clients from guessing ticket numbers
shuffle(n) = HMAC-SHA-384(K2, n) truncated to 312 bits, treated as permutation on 52 cards
You could put some of the card dealing logic into the HSM to get the cards dealt out only as the game as played, to decrease the likelihood of any cards getting exposed prematurely.
Dr.Ruud - 07 May 2006 10:20 GMT Paul Rubin schreef:
> a cryptographic PRNG seeded with good entropy is supposed to be > computationally indistinguishable from physical randomness Doesn't your "good entropy" include "physical randomness"?
 Signature Affijn, Ruud
"Gewoon is een tijger."
Martin P. Hellwig - 06 May 2006 15:55 GMT >> and clients make it quite scalable. For example, I'm creating a >> xmlrpcserver that returns a randomized cardlist, but I because of [quoted text clipped - 6 lines] > This is a weird approach. Why not let the "ticket" by the (maybe > encrypted) PRNG seed that generates the permutation? Because the server that handles the generate request doesn't need to be the same as the one that handles the request to give the client that deck. Even more, the server that handles the request calls the crypto servers to actually do the shuffling. So when the server fails before it has given the client the ticket, it could be possible that a deck is already created but not used, no biggie there. But if the ticket is given to the client, than any other server can serve back that ticket to give the shuffled deck, unless the ZFS dies of course but then again thats why I use ZFS so I can mirror them om 4 different machines in 2 different locations.
>> While this is overkill for 1 server, I needed multiple because of >> fail-over and load-balancing, in this case I have 3 'crypto' boxes [quoted text clipped - 4 lines] > I don't know what good that hardware crypto is doing you, if you're > then writing out the shuffled deck to disk in the clear. It's not about access security it's more about the best possible randomness to shuffle the deck.
 Signature mph
Paul Rubin - 06 May 2006 18:41 GMT > > This is a weird approach. Why not let the "ticket" by the (maybe > > encrypted) PRNG seed that generates the permutation? > > Because the server that handles the generate request doesn't need to > be the same as the one that handles the request to give the client > that deck. Wait a sec, are you giving the entire shuffled deck to the client? Can you describe the application? I was imagining an online card game where clients are playing against each other. Letting any client see the full shuffle is disastrous.
> But if the ticket is given to the client, than any other server can > serve back that ticket to give the shuffled deck, unless the ZFS dies > of course but then again thats why I use ZFS so I can mirror them om 4 > different machines in 2 different locations.
> > I don't know what good that hardware crypto is doing you, if you're > > then writing out the shuffled deck to disk in the clear. > > It's not about access security it's more about the best possible > randomness to shuffle the deck. Depending on just what the server is for, access security may be a far more important issue. If I'm playing cards online with someone, I'd be WAY more concerned about the idea of my opponent being able to see my cards by breaking into the server, than his being able to cryptanalyze a well-designed PRNG based solely on its previous outputs.
Martin P. Hellwig - 06 May 2006 19:18 GMT >>> This is a weird approach. Why not let the "ticket" by the (maybe >>> encrypted) PRNG seed that generates the permutation? [quoted text clipped - 6 lines] > where clients are playing against each other. Letting any client see > the full shuffle is disastrous. Nope I have a front end service that does the client bit, its about this (in this context, there are more services of course):
crypto - ZFS - table servers - mirror dispatching - client xmlrpc access - client ( last one has not been written yet )
<cut>
> Depending on just what the server is for, access security may be a far > more important issue. If I'm playing cards online with someone, I'd > be WAY more concerned about the idea of my opponent being able to see > my cards by breaking into the server, than his being able to > cryptanalyze a well-designed PRNG based solely on its previous > outputs. Only client xmlrpc access is (should be) accessible from the outside and since this server is user session based they only see their own card. However this project is still in it's early development, I'm doing now initial alpha-tests (and stress testing) and after this I'm going to let some audit bureau's check for security (probably Madison-Ghurka, but I haven't asked them yet).
 Signature mph
Ken Tilton - 06 May 2006 16:04 GMT > <cut> > >> How do you define scalability? >> > http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search Damn! Google can do that?! Omigod!!! Not joking, I never knew that,a lways used dictionary.com. Thx! I meant:
> The ability to add power and capability to an existing system without significant expense or overhead. > www.yipes.com/care/cc_glossary.shtml The number of definitions explains why most respondents should save their breath. Natural language is naturally ambiguous. Meanwhile Usenet is the perfect place to grab one meaning out of a dozen and argue over the implications of that one meaning which of course is never the one originally intended, as any reasonable, good faith reader would admit.
kenny
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Alex Martelli - 06 May 2006 20:43 GMT > > <cut> > > [quoted text clipped - 3 lines] > > Damn! Google can do that?! Omigod!!! Not joking, I never knew that,a You're welcome; we do have several little useful tricks like that.
> lways used dictionary.com. Thx! I meant: > > > The ability to add power and capability to an existing system without > > significant expense or overhead. www.yipes.com/care/cc_glossary.shtml Excellent -- just the definition of "scalability" that Google and its competitor live and die by ((OK, OK, I'm _not_ implying that such issues as usability &c don't matter, by no means -- but, I live mostly in the world of infrastructure, where scalability and reliability reign)).
> The number of definitions explains why most respondents should save > their breath. Natural language is naturally ambiguous. Meanwhile Usenet > is the perfect place to grab one meaning out of a dozen and argue over > the implications of that one meaning which of course is never the one > originally intended, as any reasonable, good faith reader would admit. However, you and I are/were discussing exactly the same nuance of meaning, either by a funny quirk of fate or because it's the one that really matters in large-scale programming (and more generally, large-scale systems). E.g., if your existing system can gracefully handle your current traffic of, say, a billion queries of complexity X, you want to be able to rapidly add a feature that will increase the average query's complexity to (X+dX) and attract 20% more users, so you'll need to handle 1.2 billion queries just as gracefully: i.e., you need to be able to add power and capability to your existing system, rapidly and reliably, just as that definition says.
When this is the challenge, your choice of programming language is not the first order of business, of course -- your hardware and network architecture loom large, and so does the structuring of your applications and infrastructure software across machines and networks. Still, language does matter, at a "tertiary" level if you will. Among the potential advantages of Lisp is the fact that you could use Lisp across almost all semantic levels ("almost" because I don't think "Lisp machines" are a realistic option nowadays, so lower levels of the stack would remain in C and machine language -- but those levels may probably be best handled by a specialized squad of kernel-level and device-driver programmers, anyway); among the potential advantages of Python, the fact that (while not as suited as Lisp to lower-level coding, partly because of a lack of good solid compilers to make machine language out of it), it brings a powerful drive to uniformity, rather than a drive towards a host of "domain-specific" Little Languages as is encouraged by Lisp's admirably-powerful macro system.
One key axis of scalability here is, how rapidly can you grow the teams of people that develop and maintain your software base? To meet all the challenges and grasp all the opportunities of an exploding market, Google has had to almost-double its size, in terms of number of engineers, every year for the last few years -- I believe that doing so while keeping stellar quality and productivity is an unprecedented feat, and while (again!) the choice of language(s) is not a primary factor (most kudos must go to our management and its approaches and methods, of course, and in particular to the strong corporate identity and culture they managed to develop and maintain), it still does matter. The uniformity of coding style and practices in our codebase is strong.
We don't demand Python knowledge from all the engineers we hire: for any "engineering superstar" worth the adjective, Python is really easy and fast to pick up and start using productively -- I've seen it happen thousands of times, both in Google and in my previous career, and not just for engineers with a strong software background, but also for those whose specialties are hardware design, network operations, etc, etc. The language's simplicity and versatility allow this. Python "fits people's brains" to an unsurpassed extent -- in a way that, alas, languages requiring major "paradigm shifts" (such as pure FP languages, or Common Lisp, or even, say, Smalltalk, or Prolog...) just don't -- they really require a certain kind of mathematical mindset or predisposition which just isn't as widespread as you might hope. Myself, I do have more or less that kind of mindset, please note: while my Lisp and scheme are nowadays very rusty, proficiency with them was part of what landed me my first job, over a quarter century ago (microchip designers with a good grasp of lisp-ish languages being pretty rare, and TI being rather hungry for them at the time) -- but I must acknowlegde I'm an exception.
Of course, the choice of Python does mean that, when we really truly need a "domain specific little language", we have to implement it as a language in its own right, rather than piggybacking it on top of a general-purpose language as Lisp would no doubt afford; see <http://labs.google.com/papers/sawzall.html> for such a DSLL developed at Google. However, I think this tradeoff is worthwhile, and, in particular, does not impede scaling.
Alex
Ken Tilton - 06 May 2006 22:21 GMT >>><cut> >>> [quoted text clipped - 35 lines] > When this is the challenge, your choice of programming language is not > the first order of business, of course ... Looks like dictionaries are no match for the ambiguity of natural language. :) Let me try again: it is Python itself that cannot scale, as in gain "new power and capability", and at least in the case of lambda it seems to be because of indentation-sensitivity.
Is that not what GvR said?
By contrast, in On Lisp we see Graham toss off Prolog in Chapter 22 and an object system from scratch in Chapter 25. Lite versions, to be sure, but you get the idea.
My sig has a link to a hack I developed after doing Lisp for less than a month, and without lambda (and to a lesser degree macros) it would be half the tool it is. It adds a declarative paradigm to the CL object system, and is built on nothing but ansi standard Lisp. Yet it provides new power and capability. And that by an application programmer just working on a nasty problem, never mind the language developer.
I just find it interesting that sexpr notation (which McCarthy still wants to toss!) is such a huge win, and that indentation seems to be so limiting.
-- your hardware and network
> architecture loom large, and so does the structuring of your > applications and infrastructure software across machines and networks. [quoted text clipped - 13 lines] > One key axis of scalability here is, how rapidly can you grow the teams > of people that develop and maintain your software base? I am with Brooks on the Man-Month myth, so I am more interested in /not/ growing my team. If Lisp is <pick a number, any numer> times more expressive than Python, you need exponentially fewer people.
In some parallel universe Norvig had the cojones to dictate Lisp to Google and they listened, and in that universe... I don't know, maybe GMail lets me click on the sender column to sort my mail? :)
> To meet all the > challenges and grasp all the opportunities of an exploding market, [quoted text clipped - 6 lines] > they managed to develop and maintain), it still does matter. The > uniformity of coding style and practices in our codebase is strong. Well, you said it for me. Google hires the best and pays a lot. Hey, I wrote great code in Cobol. So as much as you want to brag on yourself and Google <g>, your success does not address:
Indentation-sensitivity: Is it holding Python back?
> We don't demand Python knowledge from all the engineers we hire: for any > "engineering superstar" worth the adjective, Python is really easy and [quoted text clipped - 8 lines] > require a certain kind of mathematical mindset or predisposition which > just isn't as widespread as you might hope. Talk about Lisp myths. The better the language, the easier the language. And the best programmers on a team get to develop tools and macrology that empower the lesser lights, so (a) they have fun work that keeps them entertained while (b) the drones who just want to get through the day are insanely productive, too.
Another myth (or is this the same?) is this "pure FP" thing. Newbies can and usually do code as imperatively as they wanna be. Until someone else sees their code, tidies it up, and the light bulb goes on. But CL does not force a sharp transition on anyone.
> Myself, I do have more or > less that kind of mindset, please note: while my Lisp and scheme are [quoted text clipped - 9 lines] > <http://labs.google.com/papers/sawzall.html> for such a DSLL developed > at Google. No lambdas? Static typing?! eewwwewww. :) Loved the movie, tho.
Come on, try just one meaty Common Lisp project at Google. Have someone port Cells to Python. I got halfway done but decided I would rather be doing Lisp. uh-oh. Does Python have anything like special variables? :)
Kenny
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Ken Tilton - 06 May 2006 22:36 GMT > Come on, try just one meaty Common Lisp project at Google. Have someone > port Cells to Python. I got halfway done but decided I would rather be > doing Lisp. uh-oh. Does Python have anything like special variables? :) Omigod. I scare myself sometimes. This would be a great Summer of Code project. Port Cells (see sig) to Python. Trust me, this is Silver Bullet stuff. (Brooks was wrong on that.)
If a strong Pythonista wants to submit a proposal, er, move fast. I am mentoring through LispNYC: http://www.lispnyc.org/soc.clp
Gotta be all over Python metaclasses, and everything else pure Python. PyGtk would be a good idea for the demo, which will involve a GUI mini app. Just gotta be able to /read/ Common Lisp.
kenny
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Alex Martelli - 06 May 2006 23:37 GMT ...
> Looks like dictionaries are no match for the ambiguity of natural > language. :) Let me try again: it is Python itself that cannot scale, as > in gain "new power and capability", and at least in the case of lambda > it seems to be because of indentation-sensitivity. In my opinion (and that of several others), the best way for Python to grow in this regard would be to _lose_ lambda altogether, since named functions are preferable (and it's an acknowledged Python design principle that there should ideally be just one obvious way to perform a task); GvR used to hold the same opinion, but changed his mind recently, alas, so we'll keep the wart.
But, quite apart from the whole issue of whether it's desirable to languages to change massively ("add new power and capability" meaning new enriched features in the language itself), your whole argument is bogus: it's obvious that _any_ fundamental design choice in an artefact will influence the feasibility and desirability of future design choices in future releases of that same, identical artefact. At a syntax-sugar level, for example, Lisp's choice to use parentheses as delimiter means it's undesirable, even unfeasible, to use the single character '(' as an ordinary identifier in a future release of the language. Considering this to mean that Lisp "cannot scale" is just as ridiculous as considering that Python "cannot scale" by not having an elegant way to make lambdas heavier and richer -- totally laughable and idiotic. ``An unneeded feature "cannot" be added (elegantly) in future releases of the language'' is just as trivial and acceptable for the unneded feature ``allow ( as an ordinary single-character identifier'' as for the unneded feature ``allow unnamed functions with all the flexibility of named ones''.
> By contrast, in On Lisp we see Graham toss off Prolog in Chapter 22 and Oh, is that the same Graham who writes:
""" A friend of mine who knows nearly all the widely used languages uses Python for most of his projects. He says the main reason is that he likes the way source code looks. That may seem a frivolous reason to choose one language over another. But it is not so frivolous as it sounds: when you program, you spend more time reading code than writing it. You push blobs of source code around the way a sculptor does blobs of clay. So a language that makes source code ugly is maddening to an exacting programmer, as clay full of lumps would be to a sculptor. """ ...? [[ I suspect that friend is in fact a common friend of mine and Graham's, the guy you also mention later in your post, and who introduced Graham and me when G recently came talk at Google (we had "brushed" before, speaking in the same sessions at conferences and the like, but had never "met", as in, got introduced and _talked_...;-). ]]
But, no matter, let's get back to Graham's point: significant indentation is a large part of what gives Python its own special beauty, uncluttered by unneeded punctuation. And while you, I, Graham, and that common friend of ours, might likely agree that Lisp, while entirely different, has its own eerie beauty, most people's aesthetics are poles apart from that (why else would major pure-FP languages such as *ML and Haskell entirely reject Lisp's surface syntax, willingly dropping the ease of macros, to introduce infix operator syntax etc...? obviously, their designers' aesthetics weigh parenthesized prefixsyntax negatively, despite said designers' undeniable depth, skill and excellence).
Alex
Bill Atkins - 07 May 2006 00:27 GMT > ... >> Looks like dictionaries are no match for the ambiguity of natural [quoted text clipped - 26 lines] > unneded feature ``allow unnamed functions with all the flexibility of > named ones''. Not so infeasible:
(let ((|bizarrely(named()symbol| 3)) (+ |bizarrely(named()symbol| 4))
;; => 7
And in any case, enforced indentation is a policy with vastly more serious consequences than the naming of identifiers.
>> By contrast, in On Lisp we see Graham toss off Prolog in Chapter 22 and > [quoted text clipped - 28 lines] > > Alex
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Alex Martelli - 07 May 2006 00:57 GMT ...
> > ``allow ( as an ordinary single-character identifier'' as for the > > unneded feature ``allow unnamed functions with all the flexibility of [quoted text clipped - 6 lines] > > ;; => 7 Read again what I wrote: I very specifically said "ordinary *single-character* identifier" (as opposed to "one of many characters inside a multi-character identifier"). Why do you think I said otherwise, when you just quoted what I had written? (Even just a _leading_ ( at the start of an identifier may be problematic -- and just as trivial as having to give names to functions, of course, see below).
> And in any case, enforced indentation is a policy with vastly more > serious consequences than the naming of identifiers. So far, what was being discussed here isn't -- having to use an identifier for an object, rather than keeping it anonymous -- trivial. Python practically enforces names for several kinds of objects, such as classes and modules as well as functions ("practically" because you CAN call new.function(...), type(...), etc, where the name is still there but might e.g. be empty -- not a very practical alternative, though) -- so what? Can you have an unnamed macro in Lisp? Is being "forced" to name it a "serious consequence"? Pah.
Anyway, I repeat: *any* design choice (in a language, or for that matter any other artefact) has consequences. As Paul Graham quotes and supports his unnamed friend as saying, Python lets you easily write code that *looks* good, and, as Graham argues, that's an important issue -- and, please note, a crucial consequence of using significant indentation. Alien whitespace eating nanoviruses are no more of a worry than alien parentheses eating nanoviruses, after all.
Alex
Bill Atkins - 07 May 2006 01:16 GMT > ... >> > ``allow ( as an ordinary single-character identifier'' as for the [quoted text clipped - 14 lines] > _leading_ ( at the start of an identifier may be problematic -- and just > as trivial as having to give names to functions, of course, see below). Well, the same technique can obviously be used for:
(let ((|(| 3))) (+ |(| 4))) ;; => 7
The length of the identifier is irrelevant...
>> And in any case, enforced indentation is a policy with vastly more >> serious consequences than the naming of identifiers. [quoted text clipped - 7 lines] > so what? Can you have an unnamed macro in Lisp? Is being "forced" to > name it a "serious consequence"? Pah. Common Lisp does not support unnamed macros (how would these be useful?), but nothing stops me from adding these. What use case do you envision for anonymous macros?
> Anyway, I repeat: *any* design choice (in a language, or for that matter > any other artefact) has consequences. As Paul Graham quotes and [quoted text clipped - 3 lines] > indentation. Alien whitespace eating nanoviruses are no more of a worry > than alien parentheses eating nanoviruses, after all. It *is* an important issue, but it's also a subjective issue. I find Lisp to be far prettier than any syntax-based language, so it's far from an objective truth that Python code often looks good - or even at all.
Plus, I can easily write code that looks good without using a language that enforces indentation rules. Lisp's regular syntax lets Emacs do it for me with a simple C-M-a C-M-q. What could be easier?
> Alex
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Alex Martelli - 07 May 2006 01:49 GMT ...
> > Read again what I wrote: I very specifically said "ordinary > > *single-character* identifier" (as opposed to "one of many characters [quoted text clipped - 10 lines] > > The length of the identifier is irrelevant... But it cannot be a SINGLE CHARACTER, *just* the openparenthesis.
Wow, it's incredible to me that you STILL can't read, parse and understand what I have so clearly expressed and repeated!
> Common Lisp does not support unnamed macros (how would these be > useful?), but nothing stops me from adding these. What use case do > you envision for anonymous macros? None, just like there is none for anonymous functions -- there is nothing useful I can do with anonymous functions that I cannot do with named ones.
> > Anyway, I repeat: *any* design choice (in a language, or for that matter > > any other artefact) has consequences. As Paul Graham quotes and [quoted text clipped - 8 lines] > from an objective truth that Python code often looks good - or even at > all. The undeniable truth, the objective fact, is that *to most programmers* (including ones deeply enamored of Lisp, such as Graham, Tilton, Norvig, ...) Python code looks good; the Lisp code that looks good to YOU (and, no doubt them), and palatable to me (I have spoken of "eerie beauty"), just doesn't to most prospective readers. If you program on your own, or just with a few people who share your tastes, then only your taste matters; if you want to operate in the real world, maybe, as I've already pointed out, to build up a successful firm faster than had ever previously happened, this *DOESN'T SCALE*. Essentially the same issue I'm explaining on the parallel subthread with Tilton, except that he fully agrees with my aesthetic sense (quoting Tilton, "No argument. The little Python I wrote while porting Cells to Python was strikingly attractive") so this facet of the jewel needed no further belaboring there.
> Plus, I can easily write code that looks good without using a language > that enforces indentation rules. Lisp's regular syntax lets Emacs do > it for me with a simple C-M-a C-M-q. What could be easier? If you need to edit and reformat other people's code with Emacs to find it "looks good", you've made my point: code exists to be read, far more than it's written, and Python's design choice to keep punctuation scarce and unobtrusive obviates the need to edit and reformat code that way.
Alex
Bill Atkins - 07 May 2006 02:19 GMT > ... >> > [quoted text clipped - 17 lines] > Wow, it's incredible to me that you STILL can't read, parse and > understand what I have so clearly expressed and repeated! Read my other post. It's incredible that you STILL haven't considered the possibility that you're just wrong.
>> Common Lisp does not support unnamed macros (how would these be >> useful?), but nothing stops me from adding these. What use case do [quoted text clipped - 3 lines] > nothing useful I can do with anonymous functions that I cannot do with > named ones. Sure there are.
Does Python have any support for closures? If so, ignore this point. But if not, what about examples like this:
(defun make-window (window observer) ;; initialization code here (add-handler window 'close (lambda (event) (notify observer event))) ;; more code)
Being able to keep pass around state with functions is useful.
There are also cases where a function is so trivial that the simplest way to describe it is with its source code, where giving it a name and putting it at the beginning of a function is just distracting and time-consuming. E.g.:
(remove-if (lambda (name) (find #\- name :test #'char=)) list-of-names)
What's the sense of giving that function its own name? It's much clearer to simply write it in place. Yes, it's _possible_ to use named functions, but in this case its functionality is so simple that it's clearer to simply type it in place. Why is this expressiveness a bad thing, aside from its power to wreck an indentation-significant language?
>> > Anyway, I repeat: *any* design choice (in a language, or for that matter >> > any other artefact) has consequences. As Paul Graham quotes and [quoted text clipped - 23 lines] > attractive") so this facet of the jewel needed no further belaboring > there. And I'm sure Kelly Clarkson sounds better *to most listeners* but that doesn't mean she's a better musician than Hendrix. The fact that most people are used to ALGOL-like languages does not mean that ALGOL-like languages are more aesthetically pleasing on their own merits.
>> Plus, I can easily write code that looks good without using a language >> that enforces indentation rules. Lisp's regular syntax lets Emacs do [quoted text clipped - 4 lines] > than it's written, and Python's design choice to keep punctuation scarce > and unobtrusive obviates the need to edit and reformat code that way. That's not what I'm saying at all. My point is that I can write a function, counting on Emacs to keep it indented for me, and then after making a series of changes to it, a mere C-M-a C-M-q takes them into account and bam, no-fuss indenting.
> Alex >
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Paul Rubin - 07 May 2006 02:29 GMT > Does Python have any support for closures? If so, ignore this point. > But if not, what about examples like this: [quoted text clipped - 5 lines] > (notify observer event))) > ;; more code) Python has closures but you can only read the closed variables, not write them.
> Being able to keep pass around state with functions is useful. > [quoted text clipped - 6 lines] > (find #\- name :test #'char=)) > list-of-names) If I read that correctly, in Python you could use
filter(list_of_names, lambda name: '-' not in name) or [name for name in list_of_names if '-' not in name]
Both of these have become more natural for me than the Lisp version.
Alex Martelli - 07 May 2006 03:23 GMT ...
> Does Python have any support for closures? If so, ignore this point. Ignored, since closures are there.
> Being able to keep pass around state with functions is useful. Sure, but naming the functions doesn't hamper that.
> There are also cases where a function is so trivial that the simplest > way to describe it is with its source code, where giving it a name and [quoted text clipped - 11 lines] > bad thing, aside from its power to wreck an indentation-significant > language? Offering several "equivalently obvious" approaches to performing just one same task is bad for many reasons: you end up with a bigger language (with all the attending ills) with no extra power, and you diminish the style uniformity of programs written in the language, hampering the ability of many people to work in the same codebase with no "ownership".
Like most all design principles, "there should be one, and preferably only one, obvious way to perform a task" is an _ideal_, unattainable in its perfect form in this sublunar world; but I find it an extremely helpful guideline to design, and it does pervade Python (many of the planned improvements for the future Python 3.0, which will be allowed to be backwards-incompatible with 2.*, involve *removing* old features made, in this sense, redundant by enhancements in recent versions; my only beef here is that _not enough_ is scheduled for removal, alas).
> people are used to ALGOL-like languages does not mean that ALGOL-like > languages are more aesthetically pleasing on their own merits. "on their own merits" can't be the case -- as Wittgenstein pointed out, we ARE talking about the natural history of human beings. A frequently observed aestethic preference for X over Y says nothing about X and Y ``on their own merits'' (if such noumena could even be envisaged), but it's empirically important about X and Y _when many human beings must interact with them_.
Being "used to" some kinds of languages has nothing to do with it: when I met Python I was most "used to" perl (and cognizant of Forth, scheme, pre-common Lisp, sh, APL, ...), nevertheless Python immediately struck me as allowing particularly beautiful coding. And I specifically named many Lisp experts as acknowledging exacty the same thing, further demolishing your "used to" strawman...
Alex
A. Rogowski - 16 May 2006 12:50 GMT > ... > > > ``allow ( as an ordinary single-character identifier'' as for the [quoted text clipped - 14 lines] > _leading_ ( at the start of an identifier may be problematic -- and just > as trivial as having to give names to functions, of course, see below). bah...
[1]> (setq rtbl (copy-readtable)) #<READTABLE #x203A0F6D> [2]> (set-syntax-from-char #\{ #\() T [3]> (set-syntax-from-char #\( #\a) T [4]> {defun ( {a) {1+ a)) ( [5]> {( 1) 2 [6]> {( 4) 5 [7]> {setq *readtable* rtbl) #<READTABLE #x203A0F6D> [8]> (1+ 1) 2
With readtable and reader macros you can change the syntax as you wish.
ajr.
Ken Tilton - 07 May 2006 00:55 GMT > ... > [quoted text clipped - 9 lines] > task); GvR used to hold the same opinion, but changed his mind recently, > alas, so we'll keep the wart. Yes, I am enjoying watching lambda teetering on the brink. So it has been re-upped for another tour? Go, lambda! Go, lambda!
> But, quite apart from the whole issue of whether it's desirable to > languages to change massively ("add new power and capability" meaning > new enriched features in the language itself), your whole argument is > bogus: it's obvious that _any_ fundamental design choice in an artefact > will influence the feasibility and desirability of future design choices > in future releases of that same, identical artefact. True but circular, because my very point is that () was a great design choice in that it made macros possible and they made CL almost infinitely extensible, while indentation-sensitivity was a mistaken design choice because it makes for very clean code (I agree wholeheartedly) but placed a ceiling on its expressiveness.
As for:
> At a syntax-sugar > level, for example, Lisp's choice to use parentheses as delimiter means > it's undesirable, even unfeasible, to use the single character '(' as an > ordinary identifier in a future release of the language. (defun |(| (aside) (format nil "Parenthetically speaking...~a." aside)) => |(| (|(| "your Lisp /is/ rusty.") => "Parenthetically speaking...your Lisp /is/ rusty.."
:) No, seriously, is that all you can come up with?
> Considering > this to mean that Lisp "cannot scale" is just as ridiculous as > considering that Python "cannot scale" by not having an elegant way to > make lambdas heavier and richer -- totally laughable and idiotic. Harsh. :) I demand satisfaction. See end of article.
> ``An > unneeded feature "cannot" be added (elegantly) in future releases of the [quoted text clipped - 6 lines] > > Oh, is that the same Graham who writes: So we are going to skip the point I was making about Common Lisp being so insanely extensible? By /application/ programmers? Hell, for all we know CL does have a BDFL, we just do not need their cooperation.
> """ > A friend of mine who knows nearly all the widely used languages uses > Python for most of his projects. He says the main reason is that he > likes the way source code looks. No argument. The little Python I wrote while porting Cells to Python was strikingly attractive. But it was a deal with the devil, unless Python is content to be just a scripting language. (And it should be.)
OK, I propose a duel. We'll co-mentor this:
http://www.lispnyc.org/wiki.clp?page=PyCells
In the end Python will have a Silver Bullet, and only the syntax will differ, because Python has a weak lambda, statements do not always return values, it does not have macros, and I do not know if it has special variables.
Then we can just eyeball the code and see if the difference is interesting. These abstract discussions do tend to loop.
kenny
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Alex Martelli - 07 May 2006 01:34 GMT ...
> True but circular, because my very point is that () was a great design > choice in that it made macros possible and they made CL almost > infinitely extensible, while indentation-sensitivity was a mistaken > design choice because it makes for very clean code (I agree > wholeheartedly) but placed a ceiling on its expressiveness. Having to give functions a name places no "ceiling on expressiveness", any more than, say, having to give _macros_ a name.
> As for: > [quoted text clipped - 9 lines] > > :) No, seriously, is that all you can come up with? Interestingly, the SECOND lisper to prove himself unable to read the very text he's quoting. Reread carefully, *USE THE ***SINGLE*** CHARACTER* ... *AS AN ORDINARY IDENTIFIER*. What makes you read a ``PART OF'' that I had never written? You've shown how to use the characters as *PART* of an identifier [[and I believe it couldn't be the very start]], and you appear to believe that this somehow refutes my assertion?
Are you ready to admit you were utterly wrong, and (while it is indeed true that my Lisp is rusty) there is nothing in this exchange to show it, as opposed to showing rustiness in your ability to understand English? Or shall we move from polite although total dissent right on to flamewars and namecalling?
The point is, OF COURSE any design choice places limitations on future design choices; but some limitations are even DESIRABLE (a language where *every* single isolated character could mean anything whatsoever would not be "expressive", but rather totally unreadable) or at least utterly trivial (syntax-sugar level issues most typically are). Wilfully distorting some such limitation as meaning that one language "can scale" (when EVERY language inevitably has SOME such limitations) is not even funny, and clearly characterizes a polemist who is intent on proving a preconceived thesis, as opposed to an investigator with any real interest in ascertaining the truth of the matter.
> > Oh, is that the same Graham who writes: > > So we are going to skip the point I was making about Common Lisp being > so insanely extensible? By /application/ programmers? Hell, for all we > know CL does have a BDFL, we just do not need their cooperation. Yes, we are, because the debate about why it's better for Python (as a language used in real-world production systems, *SCALABLE* to extremely large-scale ones) to *NOT* be insanely extensible and mutable is a separate one -- Python's uniformity of style allows SCALABILITY of teams, and teams-of-teams, which is as crucial in the real world as obviously not understood by you (the law you misquoted was about adding personnel to a LATE project making it later -- nothing to do with how desirable it can be to add personnel to a large and growing collection of projects, scaling and growing in an agile, iterative way to meet equally growing needs and market opportunities).
This specific debate grew from your misuse of "scalable" to mean or imply "a bazillion feechurz can [[and, implicitly, should]] be added to a language, and therefore anything that stands in the way of feechuritis is somehow holding the language back". That's bad enough, even though in its contextual misuse of "scalable" it breaks new ground, and I don't want to waste even more time re-treading *old* ground as to whether the "*insane* extensibility" afforded by macros is a good or a bad thing in a language to be used for real-world software production (as opposed to prototyping and research).
> > """ > > A friend of mine who knows nearly all the widely used languages uses [quoted text clipped - 4 lines] > strikingly attractive. But it was a deal with the devil, unless Python > is content to be just a scripting language. (And it should be.) It's hard to attribute feelings to a programming language, but, if you really must, I'd say Pyton aspires to be *useful* -- if all you need is "just a scripting language", it will be content to be one for you, and if your need SCALE, well then, PYTHON IS SCALABLE, and will remain a *SIMPLE, CLEAN, LITTLE AND POWERFUL LANGUAGE* (letting nobody do anything INSANE to it;-) while scaling up to whatever size of project(s) you need (including systems so large that they redefine the very concept of "large scale" -- believe me, once in a while at a conference I make the mistake of going to some talk about "large scale" this or that, and invariably stagger out once again with the realization that what's "large scale" to the world tends to be a neat toy-sized throwaway little experiment to my current employer).
> OK, I propose a duel. We'll co-mentor this: > [quoted text clipped - 7 lines] > Then we can just eyeball the code and see if the difference is > interesting. These abstract discussions do tend to loop. As a SummerOfCode mentor, I'm spoken for, and can't undertake to mentor other projects. I do agree that these discussions can be sterile, and I'll be glad to see what comes of your "pycells" project, but until then there's little we can do except agree to disagree (save that I'd like you to acknowledge my point above, regarding what exactly I had said and the fact that your alleged counterexample doesn't address at all what I had said -- but, I'll live even without such an acknowledgment).
Alex
Bill Atkins - 07 May 2006 02:02 GMT > ... >> True but circular, because my very point is that () was a great design [quoted text clipped - 27 lines] > very start]], and you appear to believe that this somehow refutes my > assertion? Now I see what the problem is here - you just don't know what you're talking about. The identifier in Ken's and my samples *is* a single character identifier. The vertical bars tell the Lisp reader that what's between them is exempt from other reading rules.
(symbol-name '|(| ) => "("
(length (symbol-name '|(| )) => 1
> Are you ready to admit you were utterly wrong, and (while it is indeed > true that my Lisp is rusty) there is nothing in this exchange to show > it, as opposed to showing rustiness in your ability to understand > English? Or shall we move from polite although total dissent right on > to flamewars and namecalling? Believe it or not, _you_ got it wrong.
> The point is, OF COURSE any design choice places limitations on future > design choices; but some limitations are even DESIRABLE (a language [quoted text clipped - 6 lines] > preconceived thesis, as opposed to an investigator with any real > interest in ascertaining the truth of the matter. Having to name a variable "paren" instead of "(" is not a serious restriction. I can't think of a single situation where being able to do so would be useful.
That said, raw, out-of-the-box Common Lisp can accomodate you if you both a) need variables named "(" and b) are unwilling to use the bar syntax. Simply redefine the parenthesis characters in the readtable (a matter of four function calls) and get this abomination:
{let {{( 3}} {+ ( 5}}
Lisp places no restrictions on you, even when your goal is as silly as this one.
>> > Oh, is that the same Graham who writes: >> [quoted text clipped - 12 lines] > of projects, scaling and growing in an agile, iterative way to meet > equally growing needs and market opportunities). Buh? The project doesn't have to be late for Brooks's law to hold; adding programmers, so goes Brooks reasoning, will always increase the time required to complete the project because of various communication issues.
> This specific debate grew from your misuse of "scalable" to mean or > imply "a bazillion feechurz can [[and, implicitly, should]] be added to [quoted text clipped - 27 lines] > "large scale" to the world tends to be a neat toy-sized throwaway little > experiment to my current employer). You haven't given much justification for the claim that Python is a particularly "scalable" language. Sure, Google uses it, Graham gave it some props somewhere in the middle of his notoriously pro-Lisp writings, and even Norvig has said good things about it.
Fair enough. But what does Python offer above any garbage-collected language that makes it so scalable?
>> OK, I propose a duel. We'll co-mentor this: >> [quoted text clipped - 17 lines] > > Alex
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Paul Rubin - 07 May 2006 02:10 GMT > Fair enough. But what does Python offer above any garbage-collected > language that makes it so scalable? I think what used to be Lisp culture now uses the *ML languages or Haskell. It's only throwbacks (which includes me sometimes) who still use Lisp. I've been wanting for a while to do something in ML but just haven't worked up enough steam for it. Python really does make small and medium-sized tasks easy, even compared with Lisp. I'm still reserving judgement about how it is at large tasks.
Alex Martelli - 07 May 2006 03:23 GMT ...
> Believe it or not, _you_ got it wrong. Acknowledged: Common Lisp is even MORE insane (note that the quote "INSANELY extensible" is from Tilton) than I believed -- I'm pretty sure that the Lisp dialects I used in 1979-1981 didn't go to such crazy extremes, and neither did Scheme.
> Buh? The project doesn't have to be late for Brooks's law to hold; > adding programmers, so goes Brooks reasoning, will always increase the > time required to complete the project because of various communication > issues. And here is where we check if you're as gracious about admitting your errors, as I am about mine. Brooks' law is:
"""Adding manpower to a late software project makes it later."""
These are Brooks' words, literally. OK so far?
Your claim, that adding programmers will ALWAYS increase the time, is not just wrong, but utterly ridiculous. I can't put it better than the wikipedia: """ Misconceptions
A commonly understood implication of Brooks' law is that it will be more productive to employ a smaller number of very talented (and highly paid) programmers on a project than to employ a larger number of less talented programmers, since individual programmer productivity can vary greatly between highly talented and efficient programmers and less talented programmers. However, Brooks' law does not mean that starving a project of resources by employing fewer programmers beyond a certain point will get it done faster. """
Moreover, check out the research on Pair Programming: it scientifically, empirically confirms that "two heads are better than one", which should surprise nobody. Does this mean that there aren't "various communication issues"? Of course there are, but there's no implied weighting of these factors wrt the _advantages_ of having that second person on the team (check the Pair Programming literature for long lists of those advantages).
Only empirical research can tell us where the boundary is -- when productivity is decreased by going from N to N+1. A lot depends on imponderable issues such as personality meshes or clashes, leadership abilities at hands, methodology used, etc. All of this is pretty obvious, making your assertion that Brooks held otherwise actionable (as libel, by Brooks) in many legislations.
As it happens, I also have examples in which adding (a few carefully selected) people to a software project that WAS (slightly) late put that project back on track and made it deliver successfully on schedule. Definitely not the "pointy-haired boss" management style of "throwing warm bodies at the problem" that Brooks was fighting against, but, consider: the project's velocity has suffered because [a] the tech lead has his personal (usually phenomenal) productivity hampered by a painful condition requiring elective surgery to abate, and [b] nobody on the team is really super-experienced in the intricacies of cryptography, yes some very subtle cryptographic work turns out to be necessary. One day, the tech lead calls in -- the pain has gotten just too bad, he's going for surgery, and will be out of the fray for at least one week.
I still remember with admiration how my Director reacted to the emergency: he suspended two other projects, deciding that, if THEIR deadlines were broken, that would be a lesser damage to the company than if this one slipped any further; and cherrypicked exactly two people -- one incredibly flexible "jack of all trades" was tasked with getting up to speed on the project and becoming the acting TL for it, and an excellent cryptography specialist was tasked to dig deep into the project's cryptography needs and solve them pronto.
So, We Broke Brooks' Law -- the cryptographer did his magic, and meanwhile the JOAT ramped up instantly and took the lead (kudos to the Jack's skills, to the clarity and transparency of the previous TL's work, to the agile methodologies employed throughout, AND to the uniformity of style of one language which will stay unnamed here)... and the project delivered on time and within budget. We had one extra person (two "replacements" for one TL's absence), yet it didn't make the late software project even later -- it brought it back on track perfectly well.
I have many other experiences where _I_ was that JOAT (and slightly fewer ones where I was the specialist -- broadly speaking, I'm more of a generalist, but, as needs drive, sometimes I do of necessity become the specialist in some obscure yet necessary technology... must have happened a dozen times over the 30 years of my careers, counting graduate school...).
This set of experiences in no way tarnishes the value of Brooks' Law, but it does *put it into perspective*: done JUST RIGHT, by sufficiently brilliant management, adding A FEW people with exactly the right mix of skills and personality to a late software project CAN save the bacon,
> Fair enough. But what does Python offer above any garbage-collected > language that makes it so scalable? Uniformity of style, facilitating egoless programming; a strong cultural bias for simplicity and clarity, and against cleverness and obscurity; "just the right constraints" (well, mostly;-), such as immutability at more or less the right spots (FP languages, with _everything_ immutable, have an edge there IN THEORY... but in practice, using them most effectively requires a rare mindset/skillset, making it hard to "scale up" teams due to the extra difficulty of finding the right people).
Alex
Bill Atkins - 07 May 2006 03:41 GMT > ... >> Believe it or not, _you_ got it wrong. [quoted text clipped - 15 lines] > > These are Brooks' words, literally. OK so far? You are correct.
I posted too hastily. Here is what my paragraph ought to have said:
Buh? The project doesn't have to be late for Brooks's law to hold; adding programmers *in the middle of a project*, so goes Brooks reasoning, will always increase the time required to complete the project because of various communication issues.
Agree?
> Your claim, that adding programmers will ALWAYS increase the time, is > not just wrong, but utterly ridiculous. I can't put it better than the [quoted text clipped - 26 lines] > obvious, making your assertion that Brooks held otherwise actionable (as > libel, by Brooks) in many legislations. Hahaha.
> As it happens, I also have examples in which adding (a few carefully > selected) people to a software project that WAS (slightly) late put that [quoted text clipped - 52 lines] > > Alex
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Alex Martelli - 07 May 2006 05:18 GMT ...
> > And here is where we check if you're as gracious about admitting your > > errors, as I am about mine. Brooks' law is: [quoted text clipped - 13 lines] > > Agree? "What does one do when an essential software project is behind schedule? Add manpower, naturally. As Figs 2.1 through 2.4 suggest, this may or may not help".
How do you translate "may or may not help" into "will always increase the time required", and manage to impute that translation to "Brooks reasoning"? It *MAY* help -- Brooks says so very explicitly, and from the Fig 2.4 he quotes just as explicitly you may infer he has in mind that the cases in which it may help are those in which the project was badly understaffed to begin with (a very common case, as the rest of the early parts of chapter 2 explains quite adequately).
I could further critique Brooks for his ignoring specific personal factors -- some extremely rare guys are able to get up to speed on an existing project in less time, and requiring less time from those already on board, than 99.9% of the human race (the JOAT in my previous example); and, another crucial issue is that sometimes the key reason a project is late is due to lack of skill on some crucial _specialty_, in which case, while adding more "generic" programmers "may or may not help" (in Brooks' words), adding just the right specialist (such as, the cryptography expert in my previous example) can help a LOT. But, it would be uncourteous to critique a seminal work in the field for not anticipating such detailed, nuanced discussion (besides, in the next chapter Brooks does mention teams including specialists, although if I recall correctly he does not touch on the issue of a project which finds out the need for a specialist _late_, as in this case). I'm still more interested in critiquing your overgeneralization of Brooks' assertions and reasoning.
Alex
Paul Rubin - 07 May 2006 02:05 GMT > > (|(| "your Lisp /is/ rusty.") > [quoted text clipped - 5 lines] > very start]], and you appear to believe that this somehow refutes my > assertion? The identifier there is a single paren. The vertical bars are used to escape the paren, so that the reader doesn't get confused. The Pythonic equivalent would be something like
\( = 5
where the backslash escapes the paren. In real Python you could say:
locals()['('] = 5
In Lisp you could get rid of the need to escape the paren if you wanted, using suitable read macros. Whether that's a good idea is of course a different matter.
> Yes, we are, because the debate about why it's better for Python (as a > language used in real-world production systems, *SCALABLE* to extremely > large-scale ones) to *NOT* be insanely extensible and mutable is a > separate one -- Python's uniformity of style allows SCALABILITY of > teams, and teams-of-teams, which is as crucial in the real world ... My current take on Lisp vs Python is pretty close to Peter Norvig's (http://www.norvig.com/python-lisp.html):
Python has the philosophy of making sensible compromises that make the easy things very easy, and don't preclude too many hard things. In my opinion it does a very good job. The easy things are easy, the harder things are progressively harder, and you tend not to notice the inconsistencies. Lisp has the philosophy of making fewer compromises: of providing a very powerful and totally consistent core. This can make Lisp harder to learn because you operate at a higher level of abstraction right from the start and because you need to understand what you're doing, rather than just relying on what feels or looks nice. But it also means that in Lisp it is easier to add levels of abstraction and complexity; Lisp makes the very hard things not too hard.
> It's hard to attribute feelings to a programming language, but, if you > really must, I'd say Pyton aspires to be *useful* -- if all you need is [quoted text clipped - 8 lines] > "large scale" to the world tends to be a neat toy-sized throwaway little > experiment to my current employer). I've heard many times that your current employer uses Python for all kinds of internal tools; I hadn't heard that it was used in Very Large projects over there. I'd be interested to hear how that's been working out, since the biggest Python projects I'd heard of before (e.g. Zope) are, as you say, toy-sized throwaways compared to the stuff done regularly over there at G.
Alex Martelli - 07 May 2006 03:23 GMT ...
> > Yes, we are, because the debate about why it's better for Python (as a > > language used in real-world production systems, *SCALABLE* to extremely [quoted text clipped - 17 lines] > Lisp it is easier to add levels of abstraction and complexity; > Lisp makes the very hard things not too hard. Sure -- however, Python makes them not all that hard either. Peter and I have uncannily similar tastes -- just last month we happened to meet at the same Arizona Pueblo-ancestral-people ruins-cum-museum (we both independently chose to take vacation during spring break week to take the kids along, we both love the Grand Canyon region, we both love dwelling on ancient cultures, etc -- so I guess the coincidence wasn't TOO crazy -- but it still WAS a shock to see Peter walk into the museum at the same time I was walking out of it!-). Yes, it IS easier to add complexity in Lisp; that's a good summary of why I prefer Python.
> I've heard many times that your current employer uses Python for all > kinds of internal tools; I hadn't heard that it was used in Very Large > projects over there. I'd be interested to hear how that's been > working out, since the biggest Python projects I'd heard of before > (e.g. Zope) are, as you say, toy-sized throwaways compared to the > stuff done regularly over there at G. Sorry, but I'm not authorized to speak for my employer nor to reveal details of our internal systems -- hey, I cannot even say how many servers we have; the "corporate approved metrics" is ``several thousands''...;-). The most that managed to get approved for external communication you'll find in the "Python at Google" presentation that Chris di Bona and Greg Stein hold at times in various venues, and that's not saying much -- good thing I'm not the one giving those presentations, as I might find hard to stick to the approved line;-)
Alex
Ken Tilton - 07 May 2006 02:11 GMT > ... > [quoted text clipped - 28 lines] > very start]], and you appear to believe that this somehow refutes my > assertion? The function name here:
(|(| "Boy, your Lisp is rusty") -> Boy, your Lisp is rusty.
...is exactly one (1) character long.
(length (symbol-name'|(|) -> 1
Why? (symbol-name '|(|) -> "(" (No, the "s are not part of the name!)
If you want to argue about that, I will have to bring up the Lisp readtable. Or did you forget that, too?
:) kenny
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Alex Martelli - 07 May 2006 03:23 GMT ...
> Why? (symbol-name '|(|) -> "(" (No, the "s are not part of the name!) > > If you want to argue about that, I will have to bring up the Lisp > readtable. Or did you forget that, too? Mea culpa -- it wasn't in the Lisp(s) I used 25+ years ago, nor in Scheme; I've never used Common Lisp in anger, and obviously "just dabbling" gives one no good feel for how *INSANELY COMPLICATED* (or, if you prefer, "insanely extensible") it truly is.
I personally think these gyrations are a good example of why Python, the language that "fits your brain" and has simplicity among its goals, is vastly superior for production purposes. Nevertheless, I admit I was wrong!
Alex
Ken Tilton - 07 May 2006 04:56 GMT > ... > [quoted text clipped - 9 lines] > > I personally think these gyrations... Please. You are the only one gyrating. I was joking with both |(| and the fact that its length is one, no matter what our eyes tell us.
And I hope to god you were joking with the objection that a Lisper could not name a variable "(". You would not say something that daft just to win a Usenet debate, would you? Omigod...I think you did! I mean, look at the way you were jumping up and down and shouting and accusing Bill and me of not understanding English and... well, you are an uber tech geek, what did i expect? All is forgiven. But...
It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project on which Adobe (your superiors at software, right?) has bet the ranch. This is the Grail, dude, Brooks's long lost Silver Bullet. And you want to pass?????
C'mon, Alex, I just want you as co-mentor for your star quality. Of course you won't have to do a thing, just identify for me a True Python Geek and she and I will take it from there.
Here's the link in case you lost it:
http://www.lispnyc.org/wiki.clp?page=PyCells
:) peace, kenny
ps. flaming aside, PyCells really would be amazingly good for Python. And so Google. (Now your job is on the line. <g>) k
 Signature Cells: http://common-lisp.net/project/cells/
"Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems.
Serge Orlov - 07 May 2006 07:17 GMT > It is vastly more disappointing that an alleged tech genius would sniff > at the chance to take undeserved credit for PyCells, something probably [quoted text clipped - 16 lines] > ps. flaming aside, PyCells really would be amazingly good for Python. > And so Google. (Now your job is on the line. <g>) k Perhaps I'm missing something but what's the big deal about PyCells? Here is 22-lines barebones implementation of spreadsheet in Python, later I create 2 cells "a" and "b", "b" depends on a and evaluate all the cells. The output is
a = negate(sin(pi/2)+one) = -2.0 b = negate(a)*10 = 20.0
=================== spreadsheet.py ================== class Spreadsheet(dict): def __init__(self, **kwd): self.namespace = kwd def __getitem__(self, cell_name): item = self.namespace[cell_name] if hasattr(item, "formula"): return item() return item def evaluate(self, formula): return eval(formula, self) def cell(self, cell_name, formula): "Create a cell defined by formula" def evaluate_cell(): return self.evaluate(formula) evaluate_cell.formula = formula self.namespace[cell_name] = evaluate_cell def cells(self): "Yield all cells of the spreadsheet along with current values and formulas" for cell_name, value in self.namespace.items(): if not hasattr(value, "formula"): continue yield cell_name, self[cell_name], value.formula
import math def negate(x): return -x sheet1 = Spreadsheet(one=1, sin=math.sin, pi=math.pi, negate=negate) sheet1.cell("a", "negate(sin(pi/2)+one)") sheet1.cell("b", "negate(a)*10") for name, value, formula in sheet1.cells(): print name, "=", formula, "=", value
Bill Atkins - 07 May 2006 08:02 GMT >> It is vastly more disappointing that an alleged tech genius would sniff >> at the chance to take undeserved credit for PyCells, something probably [quoted text clipped - 58 lines] > for name, value, formula in sheet1.cells(): > print name, "=", formula, "=", value I hope Ken doesn't mind me answering for him, but Cells is not a spreadsheet (where did you get that idea?). It does apply the basic idea of a spreadsheet to software - that is, instead of updating value when some event occurs, you specify in advance how that value can be computed and then you stop worrying about keeping it updated.
Incidentally, is this supposed to be an example of Python's supposed "aesthetic pleasantness"? I find it a little hideous, even giving you the benefit of the doubt and pretending there are newlines between each function. There's nothing like a word wrapped in pairs of underscores to totally ruin an aesthetic experience.
P.S. Is this really a spreadsheet? It looks like it's a flat hashtable...
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Bill Atkins - 07 May 2006 08:07 GMT > Incidentally, is this supposed to be an example of Python's supposed > "aesthetic pleasantness"? I find it a little hideous, even giving you > the benefit of the doubt and pretending there are newlines between > each function. There's nothing like a word wrapped in pairs of > underscores to totally ruin an aesthetic experience. I don't mean to suggest that your code in particular is hideous - sorry if it came off that way. It's just that Python code seems a disappointingly un-pretty after all the discussion about its beauty in this thread.
 Signature This is a song that took me ten years to live and two years to write. - Bob Dylan
Serge Orlov - 07 May 2006 09:08 GMT > >> It is vastly more disappointing that an alleged tech genius would sniff > >> at the chance to take undeserved credit for PyCells, something probably [quoted text clipped - 61 lines] > I hope Ken doesn't mind me answering for him, but Cells is not a > spreadsheet (where did you get that idea?). It's written on the page linked above, second sentence: "Think of the slots as cells in a spreadsheet, and you've got the right idea". I'm not claiming that my code is full PyCell implementation.
> It does apply the basic > idea of a spreadsheet to software - that is, instead of updating value > when some event occurs, you specify in advance how that value can be > computed and then you stop worrying about keeping it updated. The result is the same. Of course, I don't track dependances in such a tiny barebones example. But when you retrieve a cell you will get the same value as with dependances. Adding dependances is left as an exercise.
> Incidentally, is this supposed to be an example of Python's supposed > "aesthetic pleasantness"? Nope. This is an example that you don't need macros and multi-statements. Ken writes: "While the absence of macros and multi-statement lambda in Python will make coding more cumbersome". I'd like to see Python code doing the same if the language had macros and multi-statement lambda. Will it be more simple? More expressive?
> I find it a little hideous, even giving you > the benefit of the doubt and pretending there are newlines between > each function. There's nothing like a word wrapped in pairs of > underscores to totally ruin an aesthetic experience. I don't think anyone who is not a master of a language can judge readability. You're just distracted by insignificant details, they don't matter if you code in that language for many years. I'm not going to tell you how Lisp Cell code looks to me ;)
> P.S. Is this really a spreadsheet? It looks like it's a flat > hashtable... Does it matter if it's flat or 2D?
|
|