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

2006-05-07 Thread Tomasz Zielonka
Alex Martelli wrote: > Worst case, you name all your functions Beverly so you don't have to > think about the naming I didn't think about this, probably because I am accustomed to Haskell, where you rather give functions different names (at the module top-level you have no other choice). I just ch

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

2006-05-07 Thread Tomasz Zielonka
I V wrote: > Monads are one of those parts of functional programming I've never really > got my head around, but as I understand them, they're a way of > transforming what looks like a sequence of imperative programming > statements that operate on a global state into a sequence of function > calls

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

2006-05-06 Thread Tomasz Zielonka
Alex Martelli wrote: > Tomasz Zielonka <[EMAIL PROTECTED]> wrote: > >> Alex Martelli wrote: >> > Having to give functions a name places no "ceiling on expressiveness", >> > any more than, say, having to give _macros_ a name. >> >> And wha

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

2006-05-06 Thread Tomasz Zielonka
Alex Martelli wrote: > Having to give functions a name places no "ceiling on expressiveness", > any more than, say, having to give _macros_ a name. And what about having to give numbers a name? > Yes, we are, because the debate about why it's better for Python (as a > language used in real-world

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

2006-05-06 Thread Tomasz Zielonka
Alex Martelli wrote: > ``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 fl

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

2006-05-06 Thread Tomasz Zielonka
Bill Atkins wrote: > 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

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-17 Thread Tomasz Zielonka
[EMAIL PROTECTED] wrote: > -- The states are lists of regular expressions > -- where [a,b,..] means match a or b or... > > I haven't run or studied your program yet myself but what I had in mind > was that the list of wc's are *all* to be excluded, so the list > [wc1..wcn] is to correspond generati

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-17 Thread Tomasz Zielonka
Dan Piponi wrote: > Is this Haskell implementation what you want? It does the wildcard > matching through a state machine and it essentially threads the > state machine through the cartesian product, switching to the > ordinary cartesian product when possible as an optimisation. > The execution of

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Tomasz Zielonka
Major correction (missing case): Tomasz Zielonka wrote: > generateMatching :: (Ord a) => Int -> Set a -> [Pat a] -> [[a]] > generateMatching 0 _[]= [[]] generateMatching 0 alphabet (All:ps) = generateMatching 0 alphabet ps > generateMatching 0 _(_:

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Tomasz Zielonka
Tomasz Zielonka wrote: > putStrLn (concat (intersperse " " ["generateMatching", show a, show > b, show c])) Minor correction: it should be "generateNotMatching". Best regards Tomasz -- I am searching for programmers who are good at least in (Haskell

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Tomasz Zielonka
[EMAIL PROTECTED] wrote: > The python code below generates a cartesian product subject to any > logical combination of wildcard exclusions. For example, suppose I want > to generate a cartesian product S^n, n>=3, of [a,b,c,d] that excludes > '*a*b*' and '*c*d*a*'. See below for details. > > CHALLEN