Re: logo design
Ken Tilton wrote: alex23 wrote: Xah Lee wrote: No personal offense intended, but human animal's history is what? 3000 years at least in recorded history? And, all you can think of is what, the view points of a fraction of your personal life span? Thank god evolution spat you out to lead us all to the light, huh? No personal offense intended, but you're a boring, elitist prick. Actually, no, Xah is pretty cool, give him a chance. Yeah, this still seems kind of silly though. Implementations, companies and user groups have logos, not languages. Picture this: Hey, I'm switching to COBOL because its new logo looks great on t-shirts and mugs. Geoff -- http://mail.python.org/mailman/listinfo/python-list
Re: John Bokma harassment
John Bokma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dra¾en Gemiæ [EMAIL PROTECTED] wrote: There is a person on USENET, particularly in hr. hierarchy that posts under three different accounts. Sometimes he argues with himself, and sometimes event supports himself :-) Maybe we have the similar case here. Wouldn't amaze me if some of the buddies of Xah are actually Xah sitting in some Internet cafe, enjoying this troll fest, and already thinking up the next one. That's right, we're all Xah, you're the only other one here. After you kill Navarth, will it be nothing but gruff and deedle with a little wobbly to fill in the chinks? -- Geoff -- http://mail.python.org/mailman/listinfo/python-list
Re: John Bokma harassment
John Bokma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Geoffrey Summerhayes [EMAIL PROTECTED] wrote: After you kill Navarth, will it be nothing but gruff and deedle with a little wobbly to fill in the chinks? Comparing Navarth with Xah is a huge insult to Jack Vance. You should be ashamed of yourself for even thinking about it, let alone write it down. Mr. Vance is too intelligent to be insulted by this. OTOH, Mad Navarth is free to be as insulted as much as his fictional soul will allow. :) -- Geoff -- http://mail.python.org/mailman/listinfo/python-list
Re: John Bokma harassment
Bill Atkins [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] John Bokma [EMAIL PROTECTED] writes: [snip] -- John MexIT: http://johnbokma.com/mexit/ personal page: http://johnbokma.com/ Experienced programmer available: http://castleamber.com/ Happy Customers: http://castleamber.com/testimonials.html Interesting. Doesn't your signature contain advertisements for your website? Aren't you posting to five different groups? Shh! Pointing out ironic hypocrisy never works. -- Geoff P.S. You forgot that it's also off-topic for all groups. P.P.S. Mea culpa -- http://mail.python.org/mailman/listinfo/python-list
Re: Programming challenge: wildcard exclusion in cartesian products
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] After the basic fact of generating the exclusion - a considerable achievement - the program should be interactive. What if the target set has thousands or millions of elements? There should be a loop-like way ('do' in Haskell, for example) to peel off the elements one-by-one and then terminate. There is...(QD) 1 ?- generate_member(X,[1,2],3,[[and, [*,2], [or, [2,1,*], [1,2,*), write(X),nl,write('Is this the term you were looking for? (y/n):'), get(Y), ((Y is 121) - true; fail). % 121 = 'y' [1, 1, 1] Is this the term you were looking for? (y/n):n [1, 1, 2] Is this the term you were looking for? (y/n):|: n [1, 2, 1] Is this the term you were looking for? (y/n):|: y Yes 2 ?- --- Geoff -- http://mail.python.org/mailman/listinfo/python-list
Re: Programming challenge: wildcard exclusion in cartesian products
Dinko Tenev [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It would seem that your program is just filtering the full cartesian product, right? The solution I'm looking for generates the elements one-by-one so that it could be used in a loop. Oops...missed that part. It took me a while to study the exchange on this topic more thoroughly, and I now fully appreciate the fact that the problem calls for a much more sophisticated approach. Sorry for the hasty shot, I'll give it another shortly. I wouldn't worry about it, Prolog generated the elements one-by-one. The loop was the print,nl,fail line. Just beefing it up a bit, I didn't take the time to clean it up though. :-) gen(_,0,[]). gen(S,N,[H|T]):- N 0, N1 is N - 1, member(H,S), gen(S,N1,T). filter([],[]). filter([X|T],[X|T1]):- filter(T,T1). filter([*|T],L):- filter(T,L). filter([*|T],[_|T1]):- filter([*|T],T1). filter_list(L,[[and|T]|_]):- filter_and(L,T), !. filter_list(L,[[or|T]|_]):- filter_list(L,T), !. filter_list(L,[H|_]):- H \= [and|_], H \= [or|_], filter(H,L),!. filter_list(L,[H|T]):- H \= [and|_], H \= [or|_], filter_list(L,T). filter_and(_,[]) :- !. filter_and(L,[H|T]):- filter_list(L,[H]), filter_and(L,T). generate_member(X,S,N,[]):-gen(S,N,X). generate_member(X,S,N,[H|T]):-gen(S,N,X),\+ filter_list(X,[H|T]). 1 ?- generate_member(X,[a,b],3,[[a,*,b],[b,*,a]]). X = [a, a, a] ; X = [a, b, a] ; X = [b, a, b] ; X = [b, b, b] ; No 2 ?- generate_member(X,[1,2],3,[[and, [*,2], [or, [2,1,*], [1,2,*). X = [1, 1, 1] ; X = [1, 1, 2] ; X = [1, 2, 1] ; X = [2, 1, 1] ; X = [2, 2, 1] ; X = [2, 2, 2] ; No --- Geoff -- http://mail.python.org/mailman/listinfo/python-list
Re: Programming challenge: wildcard exclusion in cartesian products
Wade Humeniuk wrote: [EMAIL PROTECTED] wrote: What I have in mind is the efficient, enumerated generation of the complement S^n/WC(S^n). A good program should initialize, generate, and terminate. T=cartprodex(S,n,WC); //initialize for all i in T do what you want with i test to see if any more terminate if not and it should do this without explicitly generating WC and then complementing. For example, if the cardinality of S is m, and the WC is just '*a*b*', with a != b, then EX(S^n):=S^n\WC(S^n) has cardinality (m-1)^(n-1)*(m+n-1). Specifically, if m=5 and n=10, then |EX|=3670016 while |S^10|=9765625, so that |EX|/|S^10| is about 0.3758. In general the program should directly generate EX from arbitrary WC. Of course, in practice the WC should themselves occur in a logically consistent manner, but let's just assume they're a given. Another attempt. I have made no special attempt to create an exclusion language, just used an anonymous lambda predicate. FWIW, here's my Q-and-D pattern matcher (only partially tested). (defun match(list pattern optional (test #'eql)) Match a list of atoms against a pattern list using :all as a 0-to-many wildcard, :single as a 1-to-1 wildcard, a list of elements or a single element to match a specific place. Optional argument test for comparing elements (default eql). Returns: T if match is made, NIL otherwise. Examples: (match '(0 1 2 3 4 5) '(:all (2 3) 3 :single 5 :all)) = T (match '(0 1 2 3 4 5) '(:all (2 3) 3 :single 5 :single)) = NIL (let ((current (first pattern)) (next-pattern (rest pattern)) (candidate (first list))) (cond ((and (null pattern) (null list)) t) ((and (eq :single current) candidate) (match (rest list) next-pattern test)) ((eq :all current) (loop for new-list on list when (match new-list next-pattern test) do (return-from match t)) (null next-pattern)) ; last case null remainder ((if(atom current) (funcall test candidate current) (member candidate current :test test)) (match (rest list) next-pattern test) -- Geoff -- http://mail.python.org/mailman/listinfo/python-list