- From: Arto Bendiken <arto.bendiken@gmail.com>
- Date: Fri, 2 Apr 2010 19:08:00 +0200
- To: Damian Steer <d.steer@bristol.ac.uk>
- Cc: public-rdf-ruby@w3.org
On Fri, Apr 2, 2010 at 3:54 PM, Damian Steer <d.steer@bristol.ac.uk> wrote: > > On 2 Apr 2010, at 10:56, Arto Bendiken wrote: > >> I have now released RDF::Raptor 0.1.0, a plugin for RDF.rb that adds >> support for parsing/serializing RDF/XML and Turtle data using the >> Raptor RDF Parser library: >> >> http://rdf.rubyforge.org/raptor/ >> >> Note that this is emphatically *not* a C binding to the Raptor or >> Redland libraries, but rather a pure-Ruby wrapper for the 'rapper' >> command-line utility included with Raptor (http://librdf.org/raptor/). >> This means a hassle-free installation of the gem itself, with no >> worrying about library or include file paths or settings, and means >> that the plugin should also work fine as-is with e.g. JRuby. > > (Switching jruby hat for rdf hat here) > > If you, or anyone else, does want to plug in to raptor directly please use ffi. That works in ruby, jruby and rubinius. > > End of public service announcement. True. Then again, it's also something like two orders of magnitude more code than `IO.popen`: @command = "#{RAPPER} -q -i #{format} -o ntriples #{input}" @rapper = IO.popen(@command, 'rb') @reader = RDF::NTriples::Reader.new(@rapper, options, &block) ...and considerably more fragile unless done carefully. If you volunteer to write the FFI version, I'll certainly include it as an option. -- Arto Bendiken | http://twitter.com/bendiken
Received on Friday, 2 April 2010 17:08:35 UTC