this post was submitted on 25 Dec 2024
66 points (100.0% liked)
Programmer Humor
32743 readers
180 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
They're being defined right in this post. ๐
Prolog is a language that allows you to specify a whole bunch of rules/axioms and then you can query logical conclusions that can be made from these.
If you go to https://swish.swi-prolog.org/ and click on "Create a [Program]", then paste the post text on the left side (without the Theorem 1, as that one doesn't compile), then you can query it in the bottom right.
For example, if you ask it between which keys there's a gap of just 1 semitone:
Then it will first tell you that X=e & Y=f, as the first possible solution. Then you can click "Next" and it'll tell you another solution is X=b & Y=c.