[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Learning Prolog
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 18
Thread images: 2
File: probot.jpg (28 KB, 460x287) Image search: [Google]
probot.jpg
28 KB, 460x287
Does anybody here have any tips for learning Prolog?

When I start learning a language, the first thing I do is work through the first few Project Euler problems. Thing is, it's become pretty obvious that Prolog isn't a very good language for cute math problems. Can any of you /g/entlemen suggest some small projects where Prolog might really shine, or tell me some things that Prolog is really good for?
>>
>>54879166
Sudoku solver?
>>
File: yesplease.jpg (132 KB, 960x640) Image search: [Google]
yesplease.jpg
132 KB, 960x640
>>54879405
Beautiful.
>>
>>54879166
I worked with prolog back in college.

Back in the 1980s.

Prolog is long gone. You need to keep up with the times.
>>
>>54880218
Name a better declarative language.
>>
I'd suggest some knowledge based program.
>>
>>54880238
Mercury
>>
>>54880238
>declarative
Literally who cares
>>
>>54879453
Who is the girl
>>
>>54880271
I'm surprised anyone went there.
>>
>>54880218
Shit, I'm playing zork right now. I don't get the impression he's learning prolog to get a job.
>>
>>54881372
>zork
This, OP. Write yourself a simple text adventure type game.
>>
PicoLisp has a database, web framework, and prolog engine in it, so I hear.
>>
Bump.
So far we got, a Sudoku solver, a text adventure game, and a database?
>>
>>54879166
Prolog is obsolete bruh
>>
>>54883268
What Prolog really shines at is literally any problem that revolves around backtracking, since that's how it works.
https://en.wikipedia.org/wiki/backtracking
>Backtracking is an important tool for solving constraint satisfaction problems, such as crosswords, verbal arithmetic, Sudoku, and many other puzzles. It is often the most convenient (if not the most efficient) technique for parsing, for the knapsack problem and other combinatorial optimization problems.
>>
>>54883268
>>54884256
And the remainder of what it's good at is metaprogramming, reflection and whatnot, since it's one of the few homoiconic languages and it's easy to assert and retract clauses mid-program.
>>
>>54880238
erlang can be written like prolog

OP, just buy a prolog book.
Thread replies: 18
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.