bendiken changed the topic of #ruby-rdf to: Ruby RDF & SPARQL chat. | https://github.com/ruby-rdf/rdf | Gitter: https://gitter.im/ruby-rdf/rdf | Mailing List: https://lists.w3.org/Archives/Public/public-rdf-ruby | Twitter: @Gkellogg @bendiken @no_reply | Use http://pastebin.com for code/graph snippets. Also join #swig for general linked data and semantic web chatter. Public channel log at http://irclog.whitequark.org/ruby-rdf/
bendiken has quit []
gkellogg has quit [Quit: gkellogg]
gkellogg has joined #ruby-rdf
burr has joined #ruby-rdf
poka has quit [*.net *.split]
demonimin has quit [Ping timeout: 240 seconds]
<gkellogg> tjohnson: if graph_name coming as false, that’s a failure to isolate the behavior. That’s typically used in Repository#query_execute to distinguish the default graph, as in-memory the default graph uses false, not nil.
<gkellogg> The idea had been that graph_name => nil would query across all graphs, and graph_name => false query just the default graph. We could maybe obsolete that behavior.
<tjohnson> ah, that's helpful
<gkellogg> BTW, just pushed changes to rdf and rdf-spec 2.0 branches. I think we’re close to being able to move those to develop.
<tjohnson> gkellogg: if we still want to treat default graph's that way, then a NullObject pattern feels like a really good thought
<gkellogg> You’ll need to explain what you mean by the “NullObject pattern"
<gkellogg> Maybe raise an issue? I’m AFK for a bit.
<tjohnson> in this case, a class whose instances act as an `RDF::Term`, but represent "no term". or, more specifically for the graph case, that represent `DefaultGraph`
<tjohnson> basically, I've stumbled onto the solution in `RDF::Blazegraph`, converting `false` to BG's "NullGraph": https://github.com/no-reply/rdf-blazegraph/blob/develop/lib/rdf/blazegraph/repository.rb#L132-L137
<tjohnson> but the implementation is fragile; if you do `pattern.node?` or `pattern.variable?` before making that switch, it breaks down on `NoMethodError` for `false`
<gkellogg> It would seem a singleton extended with RDF::Term would work properly, then. I’ll look into that. Perhaps `RDF::Term::Null` is generic enough.
<tjohnson> +1
<gkellogg> `NullGraph` could be a synonym.
<gkellogg> Are you good with mergint release-2_0 to develop?
<tjohnson> yeah. +1 to your email from earlier