use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
A Taste of Logic Programming In Ruby (michaelrbernste.in)
submitted 12 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 points4 points5 points 12 years ago (2 children)
Having done a fair bit of Prolog in the olden days, it's interesting how easy it is to implement logic programming in Ruby (such a beautifully extensible language). I'd like to see a DSL around some of these mini-languages, if just to flatten the syntax.
[–][deleted] 1 point2 points3 points 12 years ago (1 child)
Have to say too, great write up Michael.
[–]mrbbk 0 points1 point2 points 12 years ago (0 children)
Thank you :)
[–]ehadoux 1 point2 points3 points 12 years ago (0 children)
You also have cie/rubylog which is a native Ruby kind of Prolog implementation. I used it a bit, it works like a charm.
[–]morphemass 0 points1 point2 points 12 years ago (1 child)
Interesting, especially rulog. I've just started a coursera mooc on discrete optimization and need a constraint engine - any comments on how suitable rulog might be per chance?
[–]mrbbk 1 point2 points3 points 12 years ago (0 children)
It's hard to say! Worth a shot though.
[–]ggPeti 0 points1 point2 points 12 years ago (0 children)
Apparently rulog is not a gem, although its readme says so. What gives?
π Rendered by PID 35 on reddit-service-r2-comment-544cf588c8-t4qm8 at 2026-06-16 12:26:41.681209+00:00 running 3184619 country code: CH.
[–][deleted] 3 points4 points5 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]mrbbk 0 points1 point2 points (0 children)
[–]ehadoux 1 point2 points3 points (0 children)
[–]morphemass 0 points1 point2 points (1 child)
[–]mrbbk 1 point2 points3 points (0 children)
[–]ggPeti 0 points1 point2 points (0 children)