Re: A critic of Guido's blog on Python's lambda

2006-05-24 Thread Michele Simionato
Kay Schluehr wrote: http://www.fiber-space.de/EasyExtend/doc/EE.html Well, I have not read that page yet, but the name fiber space reminds me of old memories, when I was doing less prosaic things than now. Old times .. ;) Michele Simionato It fits quite nice with Python and is

Re: A critic of Guido's blog on Python's lambda

2006-05-24 Thread Kay Schluehr
Michele Simionato wrote: Kay Schluehr wrote: http://www.fiber-space.de/EasyExtend/doc/EE.html Well, I have not read that page yet, but the name fiber space reminds me of old memories, when I was doing less prosaic things than now. Old times .. ;) Michele Simionato But I

Re: A critic of Guido's blog on Python's lambda

2006-05-23 Thread Kay Schluehr
Ken Tilton wrote: Is there any experiemntal macro package out there for Python? Maybe a preprocessor, at least? Or are there ways to actually hack Python to extend the syntax? Yes. I've just released EasyExtend that does this kind of job: http://www.fiber-space.de/EasyExtend/doc/EE.html It

Re: A critic of Guido's blog on Python's lambda

2006-05-16 Thread Ben
Ok, I'm sorry. This kind of discussions between two groups of people, neither of who know the other person's language very well just wind me up something chronic! It wasn't your post as such, just reading through most of the thread in one go. That will teach me to post while cross :). Sorry for

Re: A critic of Guido's blog on Python's lambda

2006-05-16 Thread A. Rogowski
[EMAIL PROTECTED] (Alex Martelli) writes: Bill Atkins [EMAIL PROTECTED] wrote: ... ``allow ( as an ordinary single-character identifier'' as for the unneded feature ``allow unnamed functions with all the flexibility of named ones''. Not so infeasible: (let

Re: A critic of Guido's blog on Python's lambda

2006-05-16 Thread Ken Tilton
Ben wrote: This kind of discussions between two groups of people, neither of who know the other person's language very well just wind me up something chronic! I must say, it is pretty funny how a flamewar turned into a pretty interesting SoC project. Anything that makes programming more

Re: A critic of Guido's blog on Python's lambda

2006-05-16 Thread Lasse Rasinen
Ken Tilton [EMAIL PROTECTED] writes: If you want to insist on how perfect your code is, please go find ltktest-cells-inside.lisp in the source you downloaded and read the long comment detailing the requirements I have identified for data integrity. Then (a) tell me how your code fails at

Re: A critic of Guido's blog on Python's lambda

2006-05-16 Thread Ken Tilton
Lasse Rasinen wrote: Ken Tilton [EMAIL PROTECTED] writes: If you want to insist on how perfect your code is, please go find ltktest-cells-inside.lisp in the source you downloaded and read the long comment detailing the requirements I have identified for data integrity. Then (a) tell me how

Re: A critic of Guido's blog on Python's lambda

2006-05-15 Thread Ken Tilton
Lasse Rasinen wrote: Ken Tilton [EMAIL PROTECTED] writes: if any concepts have survived to the Python version. Since Python's object model is sufficiently different, the system is based on rules being defined per-class... That will be a total disaster for PyCells, if true. But I do not

Re: A critic of Guido's blog on Python's lambda

2006-05-15 Thread Ben
Nothing you have described sounds that complicated, and you never come up with concrete objections to other peoples code (apart that it took 10 years to write in Lisp, so it must be really hard) Why are you running a SoC project for PyCells if you dislike the language so much. People who do

Re: A critic of Guido's blog on Python's lambda

2006-05-15 Thread Ken Tilton
Ben wrote: Nothing you have described sounds that complicated, and you never come up with concrete objections to other peoples code (apart that it took 10 years to write in Lisp, so it must be really hard) Oh, now I have to spend an hour dissecting any code you people toss-off that does

Re: A critic of Guido's blog on Python's lambda

2006-05-15 Thread Ken Tilton
Ken Tilton wrote: Ben wrote: Nothing you have described sounds that complicated, and you never come up with concrete objections to other peoples code (apart that it took 10 years to write in Lisp, so it must be really hard) Oh, now I have to spend an hour dissecting any code you

Re: A critic of Guido's blog on Python's lambda

2006-05-15 Thread Lasse Rasinen
[I trimmed some of the newsgroups away; this mostly concerns Python and Lisp] Ken Tilton [EMAIL PROTECTED] writes: Lasse Rasinen wrote: Ken Tilton [EMAIL PROTECTED] writes: if any concepts have survived to the Python version. Since Python's object model is sufficiently different, the

Re: A critic of Guido's blog on Python's lambda

2006-05-15 Thread Ken Tilton
Lasse Rasinen wrote: [I trimmed some of the newsgroups away; this mostly concerns Python and Lisp] Ken Tilton [EMAIL PROTECTED] writes: Lasse Rasinen wrote: Ken Tilton [EMAIL PROTECTED] writes: if any concepts have survived to the Python version. Since Python's object model is

Re: A critic of Guido's blog on Python's lambda

2006-05-15 Thread Rob Warnock
Ken Tilton [EMAIL PROTECTED] wrote: +--- | Having the reference implementation is the only thing that makes this | conceivably doable in a summer. What you are missing is something I have | often also gotten wrong: the core, cool functionality always comes easy | in the

Re: A critic of Guido's blog on Python's lambda

2006-05-14 Thread Lasse Rasinen
Ken Tilton [EMAIL PROTECTED] writes: ps. flaming aside, PyCells really would be amazingly good for Python. And so Google. (Now your job is on the line. g) k Here's something I wrote this week, mostly as a mental exercise ;-) The whole code is available at http://www.iki.fi/~lrasinen/cells.py,

Re: A critic of Guido's blog on Python's lambda

2006-05-14 Thread Ken Tilton
Lasse Rasinen wrote: Ken Tilton [EMAIL PROTECTED] writes: ps. flaming aside, PyCells really would be amazingly good for Python. And so Google. (Now your job is on the line. g) k Here's something I wrote this week, mostly as a mental exercise ;-) It's fun, right? But what you have is a

Re: A critic of Guido's blog on Python's lambda

2006-05-14 Thread Lasse Rasinen
Ken Tilton [EMAIL PROTECTED] writes: if any concepts have survived to the Python version. Since Python's object model is sufficiently different, the system is based on rules being defined per-class... That will be a total disaster for PyCells, if true. But I do not think it is. You just

Re: A critic of Guido's blog on Python's lambda

2006-05-13 Thread Duane Rettig
Alexander Schmolck [EMAIL PROTECTED] writes: I think that in most contexts lexical transparency is desirable so that deviations from lexical transparency ought to be well motivated. I also believe that a construct that is usually used to establish a lexically transparent binding shouldn't be

Re: A critic of Guido's blog on Python's lambda

2006-05-13 Thread Marcin 'Qrczak' Kowalczyk
Ken Tilton [EMAIL PROTECTED] writes: I think the point is that, with the variable actually being just a string and with dedicated new explicit functions required as accessors, well, you could hack that up in any language with dictionaries. It is the beginnings of an interpreter, not Python

Re: A critic of Guido's blog on Python's lambda

2006-05-13 Thread Marcin 'Qrczak' Kowalczyk
Alexander Schmolck [EMAIL PROTECTED] writes: I'd like to see a demonstration that using the same binding syntax for special and lexical variables buys you something apart from bugs. There are 3 fundamental operations related to plain mutable variables: A1. Making a new mutable variable with

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Michele Simionato
jayessay wrote: Michele Simionato [EMAIL PROTECTED] writes: I can't get this to work at all - syntax errors (presumably you must have 2.5?, I only have 2.4). You can download Python 2.5 from www.python.org, but the important bit, i.e. the use of threading.local to get thread-local variables is

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
Michele Simionato [EMAIL PROTECTED] writes: I was interested in a proof of concept, to show that Python can emulate Lisp special variables with no big effort. OK, but the sort of proof of concept given here is something you can hack up in pretty much anything. So, I wouldn't call it

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
jayessay [EMAIL PROTECTED] writes: Michele Simionato [EMAIL PROTECTED] writes: I was interested in a proof of concept, to show that Python can emulate Lisp special variables with no big effort. OK, but the sort of proof of concept given here is something you can hack up in pretty much

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Michele Simionato wrote: jayessay wrote: I was saying that you are mistaken in that pep-0343 could be used to implement dynamically scoped variables. That stands. Proof by counter example: from __future__ import with_statement import threading special = threading.local() def

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Alexander Schmolck wrote: jayessay [EMAIL PROTECTED] writes: Michele Simionato [EMAIL PROTECTED] writes: I was interested in a proof of concept, to show that Python can emulate Lisp special variables with no big effort. OK, but the sort of proof of concept given here is something you can

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2 (print *x*) ;; - 1 You seem to think that conflating special variable binding and lexical

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Duane Rettig
Alexander Schmolck [EMAIL PROTECTED] writes: Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2 (print *x*) ;; - 1 You seem to think that

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Ken Tilton [EMAIL PROTECTED] writes: Alexander Schmolck wrote: jayessay [EMAIL PROTECTED] writes: Michele Simionato [EMAIL PROTECTED] writes: I was interested in a proof of concept, to show that Python can emulate Lisp special variables with no big effort. OK, but the sort of

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Paul Rubin
Alexander Schmolck [EMAIL PROTECTED] writes: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2 (print *x*) ;; - 1 You seem to think that conflating special variable binding and lexical variable binding is a

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Duane Rettig [EMAIL PROTECTED] writes: Alexander Schmolck [EMAIL PROTECTED] writes: Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Alexander Schmolck wrote: Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2 (print *x*) ;; - 1 You seem to think that conflating special

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
Alexander Schmolck [EMAIL PROTECTED] writes: Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2 (print *x*) ;; - 1 You seem to think

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
Ken Tilton [EMAIL PROTECTED] writes: Alexander Schmolck wrote: jayessay [EMAIL PROTECTED] writes: Michele Simionato [EMAIL PROTECTED] writes: I was interested in a proof of concept, to show that Python can emulate Lisp special variables with no big effort. OK, but the sort of proof

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread jayessay
Alexander Schmolck [EMAIL PROTECTED] writes: Ken Tilton [EMAIL PROTECTED] writes: Alexander Schmolck wrote: jayessay [EMAIL PROTECTED] writes: Michele Simionato [EMAIL PROTECTED] writes: I was interested in a proof of concept, to show that Python can emulate Lisp special

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Duane Rettig
Alexander Schmolck [EMAIL PROTECTED] writes: Duane Rettig [EMAIL PROTECTED] writes: Alexander Schmolck [EMAIL PROTECTED] writes: Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Duane Rettig [EMAIL PROTECTED] writes: My reason for responding to you in the first place was due to your poor use of the often misused term bug. You could have used many other words or phrases to describe the situation, and I would have left any of those alone. I'm happy to accept your

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
jayessay [EMAIL PROTECTED] writes: Great -- so can I see some code? Can't be that difficult, it takes about 10-15 lines in python (and less in scheme). Do you actually need the code to understand this relatively simple concept??? Yes. I'd be genuinely curious to see how an

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Alexander Schmolck
Ken Tilton [EMAIL PROTECTED] writes: Alexander Schmolck wrote: Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2 (print *x*) ;; - 1 You

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Alexander Schmolck wrote: Duane Rettig [EMAIL PROTECTED] writes: Alexander Schmolck [EMAIL PROTECTED] writes: Ken Tilton [EMAIL PROTECTED] writes: In Common Lisp we would have: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Paul Rubin wrote: Alexander Schmolck [EMAIL PROTECTED] writes: (defvar *x*) ;; makes it special (setf *x* 1) (print *x*) ;;- 1 (let ((*x* 2)) (print *x*)) ;; - 2 (print *x*) ;; - 1 You seem to think that conflating special variable binding and lexical variable

Re: A critic of Guido's blog on Python's lambda

2006-05-12 Thread Ken Tilton
Everything else responded to separately, but... I'd like to see a demonstration that using the same binding syntax for special and lexical variables buys you something apart from bugs. Buys me something? Why do I have to sell simplicity, transparency, and clean syntax on c.l.python? kenny

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread M Jared Finder
Chris Uppal wrote: E.g. can you add three-way comparisons (less-than, same-as, greater-than to, say, Python with corresponding three-way conditional control structures to supplement if etc ? Are they on a semantic and syntactic par with the existing ones ? In Smalltalk that is trivial (too

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread Michele Simionato
jayessay wrote: I was saying that you are mistaken in that pep-0343 could be used to implement dynamically scoped variables. That stands. Proof by counter example: from __future__ import with_statement import threading special = threading.local() def getvar(name): return

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread Petr Prikryl
Chris Uppal wrote: Petr Prikryl wrote: for element in aCollection: if element 0: return True return False [I'm not sure whether this is supposed to be an example of some specific language (Python ?) or just a generic illustration. I'll

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread Thomas F. Burdick
Ken Tilton [EMAIL PROTECTED] writes: David C. Ullrich wrote: But duh, if that's how things are then we can't have transitive dependencies working out right; surely we want to be able to have B depend on A and then C depend on B... (And also if A and B are allowed to depend on each

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread jayessay
Michele Simionato [EMAIL PROTECTED] writes: jayessay wrote: I was saying that you are mistaken in that pep-0343 could be used to implement dynamically scoped variables. That stands. Proof by counter example: from __future__ import with_statement import threading special =

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread Boris Borcic
jayessay wrote: Michele Simionato [EMAIL PROTECTED] writes: jayessay wrote: I was saying that you are mistaken in that pep-0343 could be used to implement dynamically scoped variables. That stands. Proof by counter example: from __future__ import with_statement import threading

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Petr Prikryl
Alex Martelli wrote... Joe Marshall wrote: ... If you language allows unnamed integers, unnamed strings, unnamed characters, unnamed arrays or aggregates, unnamed floats, unnamed expressions, unnamed statements, unnamed argument lists, etc. why *require* a name for trivial

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread M Jared Finder
Alex Martelli wrote: Stefan Nobis [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Alex Martelli) writes: if anonymous functions are available, they're used in even more cases where naming would help Yes, you're right. But don't stop here. What about expressions? Many people write very complex

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Antoon Pardon
Op 2006-05-09, Pisin Bootvong schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2006-05-09, Pisin Bootvong schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2006-05-09, Pisin Bootvong schreef [EMAIL PROTECTED]: Is this a Slippery Slope fallacious argument?

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ketil Malde
[EMAIL PROTECTED] (Alex Martelli) writes: But if we can agree to name every function except continuations I'll be content FWIW, I disagree: A simple example, doubling each entry in a list: map (*2) xs vs. let double x = x*2 in map double xs Here's another example, extracting all

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Rob Warnock
Ketil Malde [EMAIL PROTECTED] wrote: +--- | Sometimes the best documentation is the code itself. | Sometimes the best name for a function is the code itself. +--- And there's no reason that an anonymous LAMBDA [even if compiled] couldn't store its source code in the name

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread sross
I do wonder what would happen to Cells if I ever want to support multiple threads. Or in a parallel processing environment. AFAIK It should be fine. In LW, SBCL and ACL all bindings of dynamic variables are thread-local. Cheers, Sean. -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Boris Borcic
Ken Tilton wrote: Now if you are like most people, you think that means X. It does not. As far as natural language and understanding are concerned, to mean means conformity to what most people understand, Humpty Dumpties notwithstanding. Cheers. --

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Boris Borcic
Bill Atkins wrote: It's interesting how much people who don't have macros like to put them down and treat them as some arcane art that are too *insane*ly powerful to be used well. They're actually very straightforward and can often (shock of shocks!) make your code more readable, without

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Petr Prikryl
Chris Uppal wrote... Alex Martelli wrote: I think it's reasonable to make a name a part of functions, classes and modules because they may often be involved in tracebacks (in case of uncaught errors): to me, it makes sense to let an error-diagnosing tracebacks display packages, modules,

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Chris Uppal
Petr Prikryl wrote: for element in aCollection: if element 0: return True return False [I'm not sure whether this is supposed to be an example of some specific language (Python ?) or just a generic illustration. I'll take it as the latter, since

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Michele Simionato
Ken Tilton wrote: I was not thinking about the thread issue (of which I know little). The big deal for Cells is the dynamic bit: (let ((*dependent* me)) (funcall (rule me) me)) Then if a rule forces another cell to recalculate itself, *dependent* gets rebound and (the fun

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Chris Uppal
Bill Atkins wrote: My favorite macro is ITERATE [...] Thanks for the examples. -- chris -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread David C.Ullrich
On Tue, 09 May 2006 05:35:47 -0500, David C. Ullrich [EMAIL PROTECTED] wrote: On Mon, 08 May 2006 18:46:57 -0400, Ken Tilton [EMAIL PROTECTED] wrote: [...] If you, um, look at the code you see that cells.a = 42 triggers cells.__setattr__, which fires a's callback; the callback then reaches

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Marcin 'Qrczak' Kowalczyk
Followup-To: comp.lang.lisp Bill Atkins [EMAIL PROTECTED] writes: The cool thing about ITERATE is that it lets you express looping concepts in a language designed explicitly for such a purpose, e.g. (iter (for x in '(1 3 3)) (summing x)) = 7 (iter (for x in '(1 -3 2))

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Chris F Clark
David C Ullrich asked: Q: How do we ensure there are no loops in the dependencies? Do we actually run the whole graph through some algorithm to verify there are no loops? The question you are asking is the dependency graph a directed acyclic graph (commonly called a DAG)? One algorithm to

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ken Tilton
sross wrote: I do wonder what would happen to Cells if I ever want to support multiple threads. Or in a parallel processing environment. AFAIK It should be fine. In LW, SBCL and ACL all bindings of dynamic variables are thread-local. Ah, I was guilty of making an unspoken segue: the

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Alex Martelli
M Jared Finder [EMAIL PROTECTED] wrote: ... Your reasoning, taken to the extreme, implies that an assembly language, by virtue of having the fewest constructs, is the best designed language Except that the major premise is faulty! Try e.g.

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread David Hopwood
M Jared Finder wrote: Alex Martelli wrote: Stefan Nobis [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Alex Martelli) writes: if anonymous functions are available, they're used in even more cases where naming would help Yes, you're right. But don't stop here. What about expressions? Many

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ken Tilton
Boris Borcic wrote: Ken Tilton wrote: Now if you are like most people, you think that means X. It does not. As far as natural language and understanding are concerned, to mean means conformity to what most people understand, Humpty Dumpties notwithstanding. Nonsense. You are

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ken Tilton
Boris Borcic wrote: Bill Atkins wrote: It's interesting how much people who don't have macros like to put them down and treat them as some arcane art that are too *insane*ly powerful to be used well. They're actually very straightforward and can often (shock of shocks!) make your code

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ken Tilton
[Sorry, I missed this one originally.] David C. Ullrich wrote: On Tue, 09 May 2006 05:35:47 -0500, David C. Ullrich [EMAIL PROTECTED] wrote: On Mon, 08 May 2006 18:46:57 -0400, Ken Tilton [EMAIL PROTECTED] wrote: [...] If you, um, look at the code you see that cells.a = 42 triggers

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread jayessay
Michele Simionato [EMAIL PROTECTED] writes: Ken Tilton wrote: I was not thinking about the thread issue (of which I know little). The big deal for Cells is the dynamic bit: (let ((*dependent* me)) (funcall (rule me) me)) Then if a rule forces another cell to

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Jonathan Ellis
Randal L. Schwartz wrote: Alex == Alex Martelli [EMAIL PROTECTED] writes: Alex The difference, if any, is that gurus of Java, C++ and Python get to Alex practice and/or keep developing their respectively favorite languages Alex (since those three are the blessed general purpose languages for

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ken Tilton
Chris F Clark wrote: David C Ullrich asked: Q: How do we ensure there are no loops in the dependencies? Do we actually run the whole graph through some algorithm to verify there are no loops? The question you are asking is the dependency graph a directed acyclic graph (commonly called

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Michele Simionato
jayessay wrote: Michele Simionato [EMAIL PROTECTED] writes: Ken Tilton wrote: I was not thinking about the thread issue (of which I know little). The big deal for Cells is the dynamic bit: (let ((*dependent* me)) (funcall (rule me) me)) Then if a rule forces

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ken Tilton
Ketil Malde wrote: Sometimes the best documentation is the code itself. Sometimes the best name for a function is the code itself. Absolutely. When I take over someone else's code I begin by deleting all the comments. Then I read the code. If a variable or function name makes no sense

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Boris Borcic
Ken Tilton wrote: Boris Borcic wrote: Ken Tilton wrote: Now if you are like most people, you think that means X. It does not. As far as natural language and understanding are concerned, to mean means conformity to what most people understand, Humpty Dumpties notwithstanding.

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Joe Marshall
Alex Martelli wrote: Joe Marshall [EMAIL PROTECTED] wrote: ... The problem is that a `name' is a mapping from a symbolic identifier to an object and that this mapping must either be global (with the attendant name collision issues) or within a context (with the attendant question of

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread jayessay
Michele Simionato [EMAIL PROTECTED] writes: jayessay wrote: Michele Simionato [EMAIL PROTECTED] writes: Ken Tilton wrote: I was not thinking about the thread issue (of which I know little). The big deal for Cells is the dynamic bit: (let ((*dependent* me))

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Robert Uhl
Ken Tilton [EMAIL PROTECTED] writes: Set Kelvin, and make Celsius and Fahrneheit functions of that. Or Rankine:-) -- Robert Uhl http://public.xdi.org/=ruhl Brought to you by 'Ouchies', the sharp, prickly toy you bathe with... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's DSLs (was: A critic of Guido's blog on Python's lambda)

2006-05-10 Thread aaronwmail-usenet
Cameron Laird wrote: In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: ... . 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

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Chris F Clark
Kenny replied to me saying: Yep. But with Cells the dependency graph is just a shifting record of who asked who, shifting because all of a sudden some outlier data will enter the system and a rule will branch to code for the first time, and suddenly depend on on some new other cell (new as in

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Frank Goenninger DG1SBG
Ken Tilton [EMAIL PROTECTED] writes: sross wrote: I do wonder what would happen to Cells if I ever want to support multiple threads. Or in a parallel processing environment. AFAIK It should be fine. In LW, SBCL and ACL all bindings of dynamic variables are thread-local. Ah, I was guilty of

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Alex Martelli
Joe Marshall [EMAIL PROTECTED] wrote: Alex Martelli wrote: Joe Marshall [EMAIL PROTECTED] wrote: ... The problem is that a `name' is a mapping from a symbolic identifier to an object and that this mapping must either be global (with the attendant name collision issues) or within

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Ken Tilton
Alex Martelli wrote: Stefan Nobis [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Alex Martelli) writes: if anonymous functions are available, they're used in even more cases where naming would help Yes, you're right. But don't stop here. What about expressions? Many people write very

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread M Jared Finder
Alex Martelli wrote: M Jared Finder [EMAIL PROTECTED] wrote: ... Your reasoning, taken to the extreme, implies that an assembly language, by virtue of having the fewest constructs, is the best designed language Except that the major premise is faulty! Try e.g.

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Alex Martelli
M Jared Finder [EMAIL PROTECTED] wrote: ... Any time you want an anonymous function (or class, or type, or number) it would be because that thing is sufficiently small and simple that the best name for it is the code itself. In one game I worked on, there was That's not what I see happen

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Pisin Bootvong
Kaz Kylheku wrote: Now imagine you had to do this with every object. def add_five(x) # return x + 5 -- anonymous integer literal, not allowed!!! five = 5 # define it first return x + five I mentioned that as Slippery slope fallacious argument in other reply. [...]

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Ketil Malde
[EMAIL PROTECTED] (Alex Martelli) writes: Any time you want an anonymous function (or class, or type, or number) it would be because that thing is sufficiently small and simple that the best name for it is the code itself. In the real world, people don't choose anonymous functions only in

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread michele . simionato
Ken Tilton wrote: 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. I am pretty much ignorant of Common Lisp, but I have the impression they are the same as Scheme parameters, i.e. thread-local dynamically

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Michele Simionato
Alex Martelli wrote: yes, if that was my only choice, I'd much rather use small, simple Scheme than huge, complicated, rich, powerful Common Lisp. ((But in this case I'm biased by early experiences, since when I learned and used Lisp-ish languages there WAS no Common Lisp, while Scheme was

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Antoon Pardon
Op 2006-05-09, Pisin Bootvong schreef [EMAIL PROTECTED]: Joe Marshall wrote: Alex Martelli wrote: Most languages allow `unnamed numbers'. The `VAT_MULTIPLIER' argument is a strawman. Would you want to have to use a special syntax to name the increment in loop? defnumber zero 0

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Rob Warnock
Pisin Bootvong [EMAIL PROTECTED] wrote: +--- | No matter how scalable your language is, you cannot make a 100MHz/128MB | server serve 100,000 client a second over the internet. +--- Sure you can! That's ~1000 CPU cycles/request, which [assuming at least a 100BASE-TX NIC]

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Pisin Bootvong
Rob Warnock wrote: Pisin Bootvong [EMAIL PROTECTED] wrote: +--- | No matter how scalable your language is, you cannot make a 100MHz/128MB | server serve 100,000 client a second over the internet. +--- Sure you can! That's ~1000 CPU cycles/request, which [assuming at

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Stefan Nobis
[EMAIL PROTECTED] (Alex Martelli) writes: if anonymous functions are available, they're used in even more cases where naming would help Yes, you're right. But don't stop here. What about expressions? Many people write very complex expression, that are hard to understand. A good language should

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Rob Warnock
Pisin Bootvong [EMAIL PROTECTED] wrote: +--- | Rob Warnock wrote: | | No matter how scalable your language is, you cannot make a | | 100MHz/128MB server serve 100,000 client a second over the internet. | +--- | | Sure you can! That's ~1000 CPU cycles/request, which

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Pisin Bootvong
Antoon Pardon wrote: Op 2006-05-09, Pisin Bootvong schreef [EMAIL PROTECTED]: Is this a Slippery Slope fallacious argument? (http://c2.com/cgi/wiki?SlipperySlope) No it is not. [...] So the question I have is: Why is requiring me to give this function a name considered a good thing,

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Chris Uppal
Alex Martelli wrote: I think it's reasonable to make a name a part of functions, classes and modules because they may often be involved in tracebacks (in case of uncaught errors): to me, it makes sense to let an error-diagnosing tracebacks display packages, modules, classes and

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Antoon Pardon
Op 2006-05-09, Pisin Bootvong schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2006-05-09, Pisin Bootvong schreef [EMAIL PROTECTED]: Is this a Slippery Slope fallacious argument? (http://c2.com/cgi/wiki?SlipperySlope) No it is not. [...] So the question I have is: Why is requiring

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread David C.Ullrich
On Mon, 08 May 2006 18:46:57 -0400, Ken Tilton [EMAIL PROTECTED] wrote: David C. Ullrich wrote: On 08 May 2006 12:53:09 -0700, [EMAIL PROTECTED] (Thomas F. Burdick) wrote: Ken Tilton [EMAIL PROTECTED] writes: No, you do not want on-change handlers propagating data to other slots, though

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Alex Martelli
Stefan Nobis [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Alex Martelli) writes: if anonymous functions are available, they're used in even more cases where naming would help Yes, you're right. But don't stop here. What about expressions? Many people write very complex expression, that

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Randal L. Schwartz
Alex == Alex Martelli [EMAIL PROTECTED] writes: Alex The difference, if any, is that gurus of Java, C++ and Python get to Alex practice and/or keep developing their respectively favorite languages Alex (since those three are the blessed general purpose languages for Alex Google - I say general

  1   2   3   >