Re: protocols, inheritance and polymorphism

2004-11-29 Thread Dirk Thierbach
Dirk Thierbach <[EMAIL PROTECTED]> wrote: > Donn Cave <[EMAIL PROTECTED]> wrote: >> Quoth Jacek Generowicz <[EMAIL PROTECTED]>: >>> Specifically, dynamic polymorphism is impossible without dynamic >>> typing. > I haven't heard the term "

Re: lambda closure question

2005-02-20 Thread Dirk Thierbach
Ted Lilley <[EMAIL PROTECTED]> wrote: > As a side note, I'm familiar with the term currying from a friend who > learned ML and Scheme quite some time ago. Not sure if that's the true > origin, but it was a sufficiently different context from Python (or at > least I thought) that I didn't want to r

Re: list of unique non-subset sets

2005-03-19 Thread Dirk Thierbach
Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] ] >>> OK, so I need to be more precise. >>> Given a list of sets, output the largest list of sets (from this list, >>> order does not matter) such that: >>> 1) there is no set that is a PROPER subset of another set in this list >>> 2

Re: Puzzling OO design problem

2005-04-09 Thread Dirk Thierbach
George Sakkis <[EMAIL PROTECTED]> wrote: > 1. There is a (single inheritance) hierarchy of domain classes, say > A<-B<-..<-Z (arrows point to the parent in the inheritance tree). > 2. This hierarchy evolved over time to different versions for each > class. So for example, version's 1 hierarchy wou

Re: Puzzling OO design problem

2005-04-09 Thread Dirk Thierbach
Dirk Thierbach <[EMAIL PROTECTED]> wrote: > Ok. Multiple inheritance can often select priority for conflicting > methods. If you can specify yhat tou want "column priority" for > each class, you're fine. On second thought, I had doubts. Consider the following

Re: Puzzling OO design problem

2005-04-10 Thread Dirk Thierbach
George Sakkis <[EMAIL PROTECTED]> wrote: >>A1 - A2 - A3 - A4 - ... >>|||| >>B1 - B2 - + - B4 - ... >>|||| >>C1 - + - C3 - + - ... >>|||| >>D1 - D2 - + - D4 - ... >>|||| >> The solution is simply to include C3 in th

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-22 Thread Dirk Thierbach
[Had to drop alt.comp.lang.haskell, otherwise my newsserver doesn't accept it] Dinko Tenev <[EMAIL PROTECTED]> wrote: > OK, here's a case that will make your program run in exponential time: > S = { a, b }, W = { *a*b, *b*a } -- on my machine, it starts getting > ugly as soon as n is 15 or so. No

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-22 Thread Dirk Thierbach
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > What are some good references for finite state machines? Minimization? A classic is "Introduction to automata theory, languages and computation" by Hopcroft and Ullman. But any other book about finite state machines should cover these topics, too. The

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-23 Thread Dirk Thierbach
Dinko Tenev <[EMAIL PROTECTED]> wrote: > Dirk Thierbach wrote: >> If more time during preprocessing is allowed, another idea is to >> treat the wildcard expressions as regular expressions, convert >> each into a finite state machine, construct the "intersection

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-23 Thread Dirk Thierbach
Dinko Tenev <[EMAIL PROTECTED]> wrote: >> > I don't see immediately how exactly this is going to work. Unless I'm >> > very much mistaken, a FSA in the classical sense will accept or reject >> > only after the whole sequence has been consumed, and this spells >> > exponential times. >> Exponentia

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-24 Thread Dirk Thierbach
Dinko Tenev <[EMAIL PROTECTED]> wrote: > Dirk Thierbach wrote: [One cannot escape exponential behaviour] >> But you cannot get rid of this. Consider S = {a, b}, W = {a}. >> Then there are |S|^n result elements for n > 1, and you have to enumerate >> all of them. &g

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-24 Thread Dirk Thierbach
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Call a wc 'free' if it satisfies the propery that every letter 'a' in > it appears only in the form '*a*', and 'anchored' otherwise. Would '*ab*' be free or anchored? > What if all wc's are free? How does this affect the DFA? I don't know. The impo

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-25 Thread Dirk Thierbach
Dinko Tenev <[EMAIL PROTECTED]> wrote: > Dirk Thierbach wrote: > [A lot of stuff] >> Now clearer? > Let's leave it there, and take a break. Maybe it would help to just take a concrete example, and work through it. Then you'll see exactly what happens. - D

Re: Termination and type systems

2006-06-26 Thread Dirk Thierbach
David Hopwood <[EMAIL PROTECTED]> wrote: > Marshall wrote: >> David Hopwood wrote: >>> A type system that required an annotation on all subprograms that >>> do not provably terminate, OTOH, would not impact expressiveness >>> at all, and would be very useful. >> Interesting. I have always imagine

Re: Termination and type systems

2006-06-27 Thread Dirk Thierbach
David Hopwood <[EMAIL PROTECTED]> wrote: > Dirk Thierbach wrote: > That's interesting, but linear typing imposes some quite severe > restrictions on programming style. From the example of 'h' on page 2, > it's clear that the reason for the linearity restricti