Never again :D
Learn Prolog Now (2006)
101–110 of 251 posts
Re: Learn Prolog Now (2006)
#102Earlier quoted context omitted.
It's been a while since I have done web dev, but web devs back then were certainly not scared of any language. Web devs are like the ultimate polyglots. Or at least they were. I was regularly bouncing around between a half dozen languages when I was doing pro web dev. It was web devs who popularized numerous different languages to begin with simply because delivering apps through a browser allowed us a wide variety o…
I have the complete opposite view of web developers. :)
Re: Learn Prolog Now (2006)
#103Earlier quoted context omitted.
Can you try calculating 101 * 70 in your head?
Very easy to solve, just like it is easy to solve many other ones once you know the tricks. I recommend this book: https://www.amazon.com/Secrets-Mental-Math-Mathemagicians-Ca...
Re: Learn Prolog Now (2006)
#104Earlier quoted context omitted.
Can you try calculating 101 * 70 in your head?
Um, that's really easy to do in your head, there's no carrying or anything? 7,070 7 * 101 = 707 * 10 = 7,070 And computers don't brute-force multiplication either, so I'm not sure how this is relevant to the comment above?
Re: Learn Prolog Now (2006)
#105Earlier quoted context omitted.
There are a bunch of libraries that will do this - here's one example of a python one: https://github.com/yuce/pyswip - and a ruby one: https://github.com/preston/ruby-prolog
Thanks for the reference! `pyswip` is the closest I've seen so far: pl.consult("some-facts.pl") pl.assertz("new(fact)") while pl.Query(...).nextSolution(): print( X.value ) ...will definitely keep it in my back pocket!
https://pypi.org/project/janus-swi/
https://www.swi-prolog.org/pldoc/man?section=janus-call-prol...
Re: Learn Prolog Now (2006)
#106I studied prolog back in 2014. It was used in AI course. I found it very confusing: trying to code A*, N-Queens, or anything in it was just too much. Python, in contrast, was a god-send. I failed the subject twice in my MSc (luckily passing the MSc was based on the total average), but did a similar course in UC Berkeley, with python: aced it, loved it, and learned a lot. Never again :D
I believe your case (and many other students) is that you couldn't abstract yourself from imperative programming (python) into logic programming (prolog).
Re: Learn Prolog Now (2006)
#107Earlier 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…
While usually using native syntax rather than strings, somethign like that exists for most languages of any popularity (and many obscure ones), in the form of miniKanren implementations. https://minikanren.org/
Re: Learn Prolog Now (2006)
#108Re: Learn Prolog Now (2006)
#109Re: Learn Prolog Now (2006)
#110Earlier quoted context omitted.
Even in your example (which is obviously not correct representation of prolog), that code will work X orders magnitude faster and with 100% reliability compared to much more inferior LLM reasoning capabilities.
This is not the point though