I've recently started modeling some of my domains/potential code designs in Prolog. I'm not that advanced. I don't really know Prolog that well. But even just using a couple basic prolog patterns to implement a working spec in the 'prolog way' is *unbelievably* useful for shipping really clean code designs to replace hoary old chestnut code. (prolog -> ruby)
I keep wishing for "regex for prolog", ie: being able to (in an arbitrary language) express some functional bits in "prolog-ish", and then be able to ask/query against it. let prologBlob = new ProLog() prologBlob.add( "a => b" ).add( "b => c" ) prologBlob.query( "a == c?" ) == True (not exactly that, but hopefully you get the gist) There's so much stuff regarding constraints, access control, relationship queries that…
Learn Prolog Now (2006)
21–30 of 251 posts
Re: Learn Prolog Now (2006)
#22Earlier quoted context omitted.
Python wins out in the versatility conversation because of its ecosystem, I'm still kinda convinced that the language itself is mid. Prolog has many implementations and you don't have the same wealth of libraries, but yes, it's Turing complete and not of the "Turing tarpit" variety, you could reasonably write entire applications in SWI-Prolog.
Right, Python is usually the second-best choice for a language for any problem --- arguably the one thing it is best at is learning to program (in Python) --- it wins based on ease-of-learning/familiarity/widespread usage/library availability.
Its ease of use and deployment give it a lot more staying power.
The syntax is also pretty nice.
Re: Learn Prolog Now (2006)
#23What kind of problems is Prolog helping to solve besides GOFAI, theorem proving and computational linguistics?
Re: Learn Prolog Now (2006)
#24Earlier quoted context omitted.
I keep wishing for "regex for prolog", ie: being able to (in an arbitrary language) express some functional bits in "prolog-ish", and then be able to ask/query against it. let prologBlob = new ProLog() prologBlob.add( "a => b" ).add( "b => c" ) prologBlob.query( "a == c?" ) == True (not exactly that, but hopefully you get the gist) There's so much stuff regarding constraints, access control, relationship queries that…
I've wished for the same kind of 'embed prolog in my ruby' for enumerating all possible cases, all invalid cases, etc in test suites. Interesting to know it's not just me!
uKanren is conceptually small and simple, here's a Ruby implementation: https://github.com/jsl/ruby_ukanren
Re: Learn Prolog Now (2006)
#25Re: Learn Prolog Now (2006)
#26I've recently started modeling some of my domains/potential code designs in Prolog. I'm not that advanced. I don't really know Prolog that well. But even just using a couple basic prolog patterns to implement a working spec in the 'prolog way' is *unbelievably* useful for shipping really clean code designs to replace hoary old chestnut code. (prolog -> ruby)
I keep wishing for "regex for prolog", ie: being able to (in an arbitrary language) express some functional bits in "prolog-ish", and then be able to ask/query against it. let prologBlob = new ProLog() prologBlob.add( "a => b" ).add( "b => c" ) prologBlob.query( "a == c?" ) == True (not exactly that, but hopefully you get the gist) There's so much stuff regarding constraints, access control, relationship queries that…
Re: Learn Prolog Now (2006)
#27Earlier quoted context omitted.
I keep wishing for "regex for prolog", ie: being able to (in an arbitrary language) express some functional bits in "prolog-ish", and then be able to ask/query against it. let prologBlob = new ProLog() prologBlob.add( "a => b" ).add( "b => c" ) prologBlob.query( "a == c?" ) == True (not exactly that, but hopefully you get the gist) There's so much stuff regarding constraints, access control, relationship queries that…
I've wished for the same kind of 'embed prolog in my ruby' for enumerating all possible cases, all invalid cases, etc in test suites. Interesting to know it's not just me!
Re: Learn Prolog Now (2006)
#28I've recently started modeling some of my domains/potential code designs in Prolog. I'm not that advanced. I don't really know Prolog that well. But even just using a couple basic prolog patterns to implement a working spec in the 'prolog way' is *unbelievably* useful for shipping really clean code designs to replace hoary old chestnut code. (prolog -> ruby)
I keep wishing for "regex for prolog", ie: being able to (in an arbitrary language) express some functional bits in "prolog-ish", and then be able to ask/query against it. let prologBlob = new ProLog() prologBlob.add( "a => b" ).add( "b => c" ) prologBlob.query( "a == c?" ) == True (not exactly that, but hopefully you get the gist) There's so much stuff regarding constraints, access control, relationship queries that…
Re: Learn Prolog Now (2006)
#29Re: Learn Prolog Now (2006)
#30What kind of problems is Prolog helping to solve besides GOFAI, theorem proving and computational linguistics?