• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

prolog?

NeoMadHatter

Platinum Member
anyone here actually use it in real world stuff? i have to write a program in it and i really hate the language. it seems so rediculously useless and it really makes no sense. mostly massive recursion.
 
What is it like? Lots of recursion, sounds like a "functional" language like lisp, haskell, scheme, etc. That's the type of stuff I have been wanting to get into 😀
 
Actually, Prolog falls into the "logic programming" group or languages. I used it in my graduate programming languages course and found it to be very unlike anything I've used before. Not really sure what types of applications it would be useful for -- we made a simple text based game, much like the classic "zork."

Here is a sample program.
Intro to Prolog


BingBongWongFooey, Scheme/Lisp was a blast when I had it for an entire semester as an undergrad, but sadly Prolog is quite different. As a side note, most people seen to dislike scheme with a vengeance, but a few of us love it.
 
I've seen ads / press releases for at least one add on Prolog "engine" to act as a logic / AI processor for a more normal c/c++ application, similar to how you use Direct3D for graphics.

I could see such an engine being used for logic / rule-based decision making apps in "fuzzy" problems like making credit decisions or choosing oil exploration sites. Prolog is apparently used more heavily in the UK and Japan than in the USA where lisp is the king of AI languages.
 
daMachine, that's awesome =). All we used PL for in our Programming Language Concepts class is to solve massive riddles, never anything fun like an adventure game. I'm going to try that out on the lab machines.
 
I've had to suffer through Prolog in a languages class, as well as in a prolog lab class I elected to take over Java.... 🙂

As daMachine mentioned, it's a logical language. Everything is based on rules and evaluations of those rules. You can apparently accomplish just about anything, but you have to be a little tricky about how you go about solving the problems. My Prof always boasted he could write a simple pascal compiler in 100 lines... but then again, he's been working with Prolog for many years and has written a few books about it. His field was mostly natural language processing, so I have a feeling Prolog is probably fairly useful for that as well.

Personally, I can't come up with any real-world practical uses for Prolog. It COULD be used as a database system, or for AI (same prof uses Prolog to teach an honours AI course as well). More experience with Prolog would most likely yield quite a few uses.

If you're just up for some punishment, and many hours of smashing your head against your keyboard, give it a try. It definately makes you think and solve problems in a completely different way.
 
Back
Top