W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > August 2011

Re: loading rdf/xml from file

From: cdr <_@whats-your.name>
Date: Sat, 6 Aug 2011 06:45:16 -0700
To: public-rdf-ruby@w3.org
Message-ID: <20110806134516.GA9862@myhost>
> I had to ask to find out what to do

because you didnt want to try figuring it out?

when faced with a new Ruby library, i'll open IRB, and do something like

(RDF.new.methods - Object.methods).grep /load/

or even just read the list. barring that i'll type 'rdoc' in the library's path - it may have already been generated.

barring that i'll look around for projects using the library to see what they did. i never get as far as asking mailing lists - if i can't figure it out, it's proably too complicated a library.

RDF.rb was easy to figure out how to use, IMO. personallly i dont use it as i speciically wrotea RDF-like resource class that instead uses JSON and filesystem for everything so i wouldnt have to deal with FFI segfaults and leaks and other oddities (Which i do experience on RDF.rb but of course it was much worse with Redland SWIG bindings. and i'm too lazy to file any bug reports because 1 i dont use it and 2 i'm not getting paid to )

how i ended up generating a stream of triples from RDF.rb [ http://gitorious.org/element/element/blobs/master/ruby/W/rdf.rb ]

who knows, maybe the code's broken. the only thing i really use the project for is my mailreader/feed-aggregator/personal-searchengine/mediaplayer/schedule-layouter/log-filterer and if one of those breaks i'd notice but none of them use RDF.rb so i wouldnt notice unless maybe doing something like making a schema search-engine [ http://blog.whats-your.name/post/2011/01/05/finding-linked-data-property-names ] but due to aforementioned usual-breakage ended up using rapper (And its excellent conneg abilities) to just spit out .nt file

as for your subdir question, i find myself using globs a lot so added a glob method to the E class which does what youd expect, returning an array of E objects, and threaded it through to HTTP layer. so you could do like. curl http://localhost/*rdf?format=turtle >> allmyRDF.ttl or so..
Received on Saturday, 6 August 2011 13:45:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 6 August 2011 13:45:54 GMT