Oooh, this is nice. While learning ML, I was stumbling a bit with python, wishing that Ruby were a good language for working with datasets.<p>For all the faults people find with ruby's performance, I don't think much can be found wrong with its syntax; it is such a wonderful language to code with.<p>Might I suggest aliasing `<<` to `add_tuple`?
I like that it doesn't have any dependencies. Makes it easier to read and understand the source, casually (one of my favorite pastimes during lunch breaks lately).
See also: Axiom[0] and rom-rb[1] (which did use axiom I believe), although, I don't know what does or doesn't make them 'pure' relational algebra libraries.<p>[0] <a href="https://github.com/dkubb/axiom" rel="nofollow">https://github.com/dkubb/axiom</a><p>[1] <a href="http://rom-rb.org/" rel="nofollow">http://rom-rb.org/</a>
Reminds me a bit of Project:M36 Relational Algebra Engine, written in Haskell. No nulls allowed.<p><a href="https://github.com/agentm/project-m36" rel="nofollow">https://github.com/agentm/project-m36</a><p><a href="https://news.ycombinator.com/item?id=11465145" rel="nofollow">https://news.ycombinator.com/item?id=11465145</a>
This is neat. It's nice to see learning tools like this in a language like Ruby, as many implementations of relational algebra codebases in ruby are pretty complicated (see ActiveRecord/ARel and Sequel).
How does this compare to a pure, recursion-free subset of Prolog? Not counting cosmetic differences, e.g., in Prolog, relation arguments are positional, whereas in the relational model, attributes have names.
I'm a big fan of ruby but doesn't saying "Pure ruby" kind of detract from rather than improve a libraries value? Ideally it would have rust/C bindings for all the computationally difficult stuff.