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

Learning Prolog

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 2

File: probot.jpg (28KB, 460x287px) Image search: [Google]
probot.jpg
28KB, 460x287px
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 (132KB, 960x640px) Image search: [Google]
yesplease.jpg
132KB, 960x640px
>>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 posts: 18
Thread images: 2


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

If you need a post removed click on it's [Report] button and follow the instruction.
If you like this website please support us by donating with Bitcoin at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties. Posts and uploaded images are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that website. If you need information about a Poster - contact 4chan. This project is not affiliated in any way with 4chan.