this post was submitted on 11 May 2026
1 points (100.0% liked)

programming

301 readers
1 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 2 years ago
MODERATORS
 

This blog post introduces the basics of Prolog, then motivates and describes a project the author created where they built a Prolog database that allows them to easily make incredibly specific queries about Pokémon (which would be unwieldy in a relational database query language like SQL). For an idea of how powerful it is, here's one which "finds all the Special moves that Tornadus learns which are super-effective against any member of Justin’s team" (the Prolog database was set up to help the author in planning their teams for a Pokémon draft tournament):

?- justin(Target), learns(tornadus, Move), super_effective_move(Move, Target), move_category(Move, special).
   Target = charizardmegay, Move = chillingwater
;  Target = terapagosterastal, Move = focusblast
;  Target = alomomola, Move = grassknot
;  Target = scizor, Move = heatwave
;  Target = scizor, Move = incinerate
;  Target = runerigus, Move = chillingwater
;  Target = runerigus, Move = darkpulse
;  Target = runerigus, Move = grassknot
;  Target = runerigus, Move = icywind
;  Target = screamtail, Move = sludgebomb
;  Target = screamtail, Move = sludgewave
;  Target = trapinch, Move = chillingwater
;  Target = trapinch, Move = grassknot
;  Target = trapinch, Move = icywind
;  false.
?-
no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here