Re: [OT] Prolog and Regular Expressions, Was: Re: perspective on ruby

2006-06-29 Thread Harry George
Kenneth McDonald [EMAIL PROTECTED] writes:
[snip]
 
 That said, it'd be nice if there were some easy way to access a Prolog
 engine from Python. When Prolog is appropriate, it's _really_
 appropriate.
 
 
 Cheers,
 Ken
 

http://christophe.delord.free.fr/en/pylog/
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303057
http://www.ibiblio.org/obp/py4fun/prolog/prolog2.html
http://sourceforge.net/projects/pyprolog/

Also, before these showed up, we locally did prolog-calls-python and
python-calls-prolog (all from a C++ CAD engine) by using the embedding
libraries and bindings.

-- 
Harry George
PLM Engineering Architecture
-- 
http://mail.python.org/mailman/listinfo/python-list


[OT] Prolog and Regular Expressions, Was: Re: perspective on ruby

2006-06-28 Thread Kenneth McDonald
Lawrence D'Oliveiro wrote:
 In article [EMAIL PROTECTED],
  Edward Elliott [EMAIL PROTECTED] wrote:

   
 XML?  Conceptually (and more elegantly) covered 
 as LISP s-expressions. 
 

 ...Lisp is still #1 for key algorithmic techniques such as recursion 
 and condescension.
 -- Verity Stob 
 http://www.regdeveloper.co.uk/2006/01/11/exception_handling/

   
 XSLT?  Just a bastardized spawn of Prolog.
 

 As is any kind of pattern matching, including everyone's favourite 
 regular expressions. Prolog did it all.
   
I'm assuming you're kidding--there is a lot of difference between an RE 
that produces a highly optimized finite state machine to quickly match a 
string, and a language that uses brute-force depth-first recursion, plus 
some nonobvious tricks, to do the same thing. Like many orders of 
magnitude in execution time :-)

That said, it'd be nice if there were some easy way to access a Prolog 
engine from Python. When Prolog is appropriate, it's _really_ appropriate.


Cheers,
Ken

-- 
http://mail.python.org/mailman/listinfo/python-list