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

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-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 I

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

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

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 mor

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: > > > >

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 an

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 proof-of-c

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

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 dif

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

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 doe

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 like

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

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

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. ) k > > > Here's something I wrote this week, mostly as a mental exercise ;-) It's fun, right? But what you

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. ) k Here's something I wrote this week, mostly as a mental exercise ;-) The whole code is available at

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 wit

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 Py

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'

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-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 bindi

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 *

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*)) ;; ->

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 imp

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 you

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 *

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

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.

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*) ;; -

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 tha

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)) >

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 > va

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 effo

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 > > Y

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

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

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

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

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 es

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 variab

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 >> impo

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 > > spe

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 depen

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 illustr

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 getattr(specia

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

2006-05-10 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

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-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 >>pe

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 i

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,

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 a

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,

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 Brought to you by 'Ouchies', the sharp, prickly toy you bathe with... -- http://mail.python.org/mailman/listinfo/python-list

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

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 q

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 >> n

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 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)) > > > >

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" (c

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 pur

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

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 =

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!) >

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

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 abou

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 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:

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

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 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 >r

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 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 f

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, si

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 package

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,

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. -- http://mail.python.org/mailman/listi

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 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 "nam

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 l

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-09 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 w

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

2006-05-09 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 trivia

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

2006-05-09 Thread Alex Martelli
Joe Marshall <[EMAIL PROTECTED]> wrote: > Pisin Bootvong wrote: > > Is this a Slippery Slope fallacious argument? > > (http://c2.com/cgi/wiki?SlipperySlope) > > > > "if python required you to name every function then soon it will > > require you to name every number, every string, every immediate

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

2006-05-09 Thread Alex Martelli
Paul Rubin wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > > 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-

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

2006-05-09 Thread Alex Martelli
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 `in which context'). W

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

2006-05-09 Thread Paul Rubin
rydis (Martin Rydstr|m) @CD.Chalmers.SE writes: > [Emacs] is written in Lisp, which is the only computer language that is > beautiful. -- Neal Stephenson, _In the Beginning was the Command Line_ I don't remember seeing these lyrics in the thread yet, but obviously it's a requirement: http://www.

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

2006-05-09 Thread Martin Rydstr|m
[EMAIL PROTECTED] (Alex Martelli) writes: > Didn't want to trigger some flamewar;-), but, 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

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

2006-05-09 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > 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, cla

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

2006-05-09 Thread Joe Marshall
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 functions

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

2006-05-09 Thread Joe Marshall
Pisin Bootvong wrote: > Is this a Slippery Slope fallacious argument? > (http://c2.com/cgi/wiki?SlipperySlope) > > "if python required you to name every function then soon it will > require you to name every number, every string, every immediate result, > etc. And we know that is bad. Therefore re

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

2006-05-09 Thread Ken Tilton
[EMAIL PROTECTED] wrote: > 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 Sche

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

2006-05-09 Thread Alex Martelli
Rob Warnock <[EMAIL PROTECTED]> wrote: ... > If "only" being useful is enough, 100 cycles is enough for a DNS server, > or an NTP server, or even a stub HTTP server that delivers some small > piece of real-time data, like a few realtime environmental sensors > [temperature, voltages, etc.]. Rem

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

2006-05-09 Thread Alex Martelli
Pisin Bootvong <[EMAIL PROTECTED]> wrote: ... > Is there such language that allow scalability without any need for > design on the underlying architecture? Perhaps Erlang...? I have no specific experience with it, but according to the rumor mill it forces or cajoles you into an architecture th

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]>: > > > > 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.

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

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 express

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

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

2006-05-09 Thread Chris Uppal
Pisin Bootvong wrote: > Slippery Slope:: >"Argumentation that A is bad, because A might lead to B, and B > to C, and we all know C is very bad." For the Slippery Slope criticism to be applicable, there would have to be some suggestion that removing anonymous functions /would actually/ (te

  1   2   3   >